Codebase list opendmarc / 6674b9b
import opendmarc_1.3.2.orig.tar.gz Scott Kitterman 6 years ago
185 changed file(s) with 111213 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 INSTALLING OPENDMARC
1
2 OVERVIEW
3 ========
4
5 In order to install the opendkim as a milter to an MTA you will need to
6 perform the following steps:
7
8 * Compile the opendmarc program itself.
9
10 * Configure the opendmarc filter.
11
12 * Install the opendmarc and configure your MTA to use it.
13
14 Note that there is a difference between "OpenDMARC" and "opendmarc".
15 "OpenDMARC" is a package containing a library, a filter and some tools to
16 be used in testing and using your DMARC installation. "opendmarc" is the
17 filter program contained in the "OpenDMARC" package.
18
19 libopendmarc is a library available as an API for programmers everywhere.
20 That API is described in a set of HTML files in the OpenDMARC source code
21 package.
22
23 The opendmarc filter program incorporates the libopendmarc library and works
24 with recent versions of sendmail and Postfix or any other MTA that supports
25 "milter". For more information about milter, see <http://www.milter.org>.
26
27 Sendmail is available at <http://www.sendmail.org> and Postfix is available
28 at <http://www.postfix.org>.
29
30
31 OPTIONAL PACKAGES
32 =================
33
34 OpenDMARC supports a few optional packages that can be included in the build
35 to provide additional services. A few of these become mandatory when
36 enabling certain features below. Specifying only the "--with-xxx" parameter
37 to the "configure" command (described below) enables the package and makes a
38 guess at where it might be installed on your system. If the configure script
39 doesn't find it, you will need to specify the location with
40 "--with-xxx=location".
41
42 --with-milter Sendmail's "milter" include file and library. Required
43 unless compilation of the filter is disabled (see below).
44 Enabled by default.
45
46 --with-sql-backend
47 Names the SQL backend in use on your system. The default
48 is "mysql".
49
50 FEATURES
51 ========
52
53 There are several compile-time features you may select. Some of these
54 are present but unsupported while others are fully-supported. Read the
55 FEATURES file for a description of the unsupported features.
56
57 The supported features are as follows. The can be turned on at compile
58 time by adding "--enable-xxx" to the "configure" command line (described
59 below), where "xxx" is the name of the feature.
60
61 filter Compile the opendmarc filter. Requires libmilter (see
62 "--with-milter" above). This is on by default; if you
63 don't want the filter, specify "--disable-filter".
64
65 filter-tests Includes filter unit tests when doing "make check".
66 Requires the "miltertest" program, which is available as
67 part of the OpenDKIM package (see http://www.opendkim.org).
68
69
70 COMPILING
71 =========
72
73 The opendmarc filter requires either sendmail v8.13.0 or Postfix v2.3 or later
74 for required milter protocol enhancements.
75
76 As Postfix currently does not provide the milter library, you need to have
77 sendmail sources or development package installed. See
78 http://www.postfix.org/MILTER_README.html
79
80 You can view the configuration options with the following command:
81
82 ./configure --help
83
84 The commands shown below assume a UNIX system with standard build tools
85 installed.
86
87 Steps to compiling the library and the milter:
88
89 (1) Download the source from SourceForge
90 (http://sourceforge.net/projects/opendmarc).
91
92 (2) Unpack the tarball:
93 tar -xzvf opendmarc-<version>.tar.gz
94
95 Note: Use <version> as the version number that you downloaded.
96
97 (3) Change directories to the release directory (opendmarc-<version>) that
98 was created in step 2.
99 cd opendmarc-<version>
100
101 (4) Run the "configure" script to configure the package for your operating
102 system.
103 ./configure
104
105 (5) Compile the package.
106 make
107
108 (6) Install the output of the build. You probably need to become the
109 superuser to run this step.
110 make install
111
112
113 CONFIGURING OPENDMARC
114 =====================
115
116 The README document (in the opendmarc directory) covers the installation and
117 configuration of opendmarc.
0 Copyright (c) 2009, 2010, 2012, 2013, The Trusted Domain Project.
1 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 are met:
5 * Redistributions of source code must retain the above copyright
6 notice, this list of conditions and the following disclaimer.
7 * Redistributions in binary form must reproduce the above copyright
8 notice, this list of conditions and the following disclaimer in the
9 documentation and/or other materials provided with the distribution.
10 * Neither the name of The Trusted Domain Project nor the names of its
11 contributors may be used to endorse or promote products derived from
12 this software without specific prior written permission.
13
14 Portions of this project are also covered by the Sendmail Open Source
15 License, available in this distribution in the file "LICENSE.Sendmail".
16 See the copyright notice(s) in each file to determine whether it is covered
17 by either or both of the licenses. For example:
18
19 Copyright (c) <year> Sendmail, Inc. and its suppliers.
20 All rights reserved.
21
22 Files bearing the banner above are covered under the Sendmail Open Source
23 License (see LICENSE.Sendmail).
24
25 Copyright (c) <year>, The Trusted Domain Project.
26 All rights reserved.
27
28 Files bearing the banner above are covered under the Trusted Domain Project
29 License (above).
30
31 Files bearing both banners are covered under both sets of license terms.
32
33 THIS SOFTWARE IS PROVIDED BY THE TRUSTED DOMAIN PROJECT ''AS IS'' AND ANY
34 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
36 DISCLAIMED. IN NO EVENT SHALL THE TRUSTED DOMAIN PROJECT BE LIABLE FOR ANY
37 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
38 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
39 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
40 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0 SENDMAIL OPEN SOURCE LICENSE
1
2 The following license terms and conditions apply to this open source
3 software ("Software"), unless a different license is obtained directly
4 from Sendmail, Inc. ("Sendmail") located at 6475 Christie Ave, Suite 350,
5 Emeryville, CA 94608, USA.
6
7 Use, modification and redistribution (including distribution of any
8 modified or derived work) of the Software in source and binary forms is
9 permitted only if each of the following conditions of 1-6 are met:
10
11 1. Redistributions of the Software qualify as "freeware" or "open
12 source software" under one of the following terms:
13
14 (a) Redistributions are made at no charge beyond the reasonable
15 cost of materials and delivery; or
16
17 (b) Redistributions are accompanied by a copy of the modified
18 Source Code (on an acceptable machine-readable medium) or by an
19 irrevocable offer to provide a copy of the modified Source Code
20 (on an acceptable machine-readable medium) for up to three years
21 at the cost of materials and delivery. Such redistributions must
22 allow further use, modification, and redistribution of the Source
23 Code under substantially the same terms as this license. For
24 the purposes of redistribution "Source Code" means the complete
25 human-readable, compilable, linkable, and operational source
26 code of the redistributed module(s) including all modifications.
27
28 2. Redistributions of the Software Source Code must retain the
29 copyright notices as they appear in each Source Code file, these
30 license terms and conditions, and the disclaimer/limitation of
31 liability set forth in paragraph 6 below. Redistributions of the
32 Software Source Code must also comply with the copyright notices
33 and/or license terms and conditions imposed by contributors on
34 embedded code. The contributors' license terms and conditions
35 and/or copyright notices are contained in the Source Code
36 distribution.
37
38 3. Redistributions of the Software in binary form must reproduce the
39 Copyright Notice described below, these license terms and conditions,
40 and the disclaimer/limitation of liability set forth in paragraph
41 6 below, in the documentation and/or other materials provided with
42 the binary distribution. For the purposes of binary distribution,
43 "Copyright Notice" refers to the following language: "Copyright (c)
44 1998-2009 Sendmail, Inc. All rights reserved."
45
46 4. Neither the name, trademark or logo of Sendmail, Inc. (including
47 without limitation its subsidiaries or affiliates) or its contributors
48 may be used to endorse or promote products, or software or services
49 derived from this Software without specific prior written permission.
50 The name "sendmail" is a registered trademark and service mark of
51 Sendmail, Inc.
52
53 5. We reserve the right to cancel this license if you do not comply with
54 the terms. This license is governed by California law and both of us
55 agree that for any dispute arising out of or relating to this Software,
56 that jurisdiction and venue is proper in San Francisco or Alameda
57 counties. These license terms and conditions reflect the complete
58 agreement for the license of the Software (which means this supercedes
59 prior or contemporaneous agreements or representations). If any term
60 or condition under this license is found to be invalid, the remaining
61 terms and conditions still apply.
62
63 6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY
64 SENDMAIL AND ITS CONTRIBUTORS "AS IS" WITHOUT WARRANTY OF ANY KIND
65 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
66 IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A
67 PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. IN NO EVENT SHALL SENDMAIL
68 OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
69 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
70 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
71 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
72 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
73 WITHOUT LIMITATION NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
74 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
75
76 $Revision: 1.1 $ $Date: 2009/07/16 18:43:18 $
0 ACLOCAL_AMFLAGS = -I m4
1
2 libdir=@LIBDMARC_DIR@/lib
3 includedir=@LIBDMARC_DIR@/include
4
5 SUBDIRS = contrib db docs libopendmarc reports
6 if BUILD_FILTER
7 SUBDIRS += opendmarc
8 endif
9
10 auxdir = @ac_aux_dir@
11 AUX_DIST = $(auxdir)/install-sh $(auxdir)/missing \
12 $(auxdir)/mkinstalldirs \
13 $(auxdir)/config.guess $(auxdir)/build \
14 $(auxdir)/dh.m4
15
16
17 AUTOMAKE_OPTIONS = foreign
18 MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure \
19 $(AUX_DIST)
20
21 ACLOCAL = aclocal -I $(auxdir)
22
23 dist_doc_DATA = LICENSE LICENSE.Sendmail
24
25 DISTCLEANFILES = opendmarc-@VERSION@.tar.gz
26
27 DISTCHECK_CONFIGURE_FLAGS=--enable-filter-tests
28
29 dist-hook:
30 [ -f $(distdir)/libopendmarc/dmarc.h ] && rm -f $(distdir)/libopendmarc/dmarc.h
31 sed -e '/OPENDMARC_LIB_VERSION/s/0x[0-9]*/0x@HEX_VERSION@/' < $(srcdir)/libopendmarc/dmarc.h > $(distdir)/libopendmarc/dmarc.h
32 echo "looking to see if @VERSION@ is in the RELEASE_NOTES"
33 fgrep @VERSION@ $(srcdir)/RELEASE_NOTES
34 sed -e 's|\(@VERSION@[ \t]*\)[0-9?]\{4\}\(/[0-9?]\{2\}\)\{2\}|\1'`date +%Y/%m/%d`'|' < $(srcdir)/RELEASE_NOTES > $(distdir)/RELEASE_NOTES
35
36 $(DIST_ARCHIVES): distcheck
37
38 $(DIST_ARCHIVES).md5: $(DIST_ARCHIVES)
39 md5 $? > $@ || md5sum $? > $@
40
41 $(DIST_ARCHIVES).sha1: $(DIST_ARCHIVES)
42 sha1 $? > $@ || sha1sum $? > $@
43
44 $(DIST_ARCHIVES).asc: $(DIST_ARCHIVES)
45 gpg -a -u security@trusteddomain.org --detach-sign $?
46
47 push: $(DIST_ARCHIVES) $(DIST_ARCHIVES).sha1 $(DIST_ARCHIVES).md5 $(DIST_ARCHIVES).asc
48 @echo "Are you sure you want to tag and release $(DIST_ARCHIVES)? (y/n)"
49 @read confirm && [ $$confirm = 'y' ]
50 git tag rel-opendmarc-`echo $(VERSION) | sed 's/\./-/g'`
51 git push --tags
52 scp $(DIST_ARCHIVES) $(DIST_ARCHIVES).sha1 $(DIST_ARCHIVES).md5 $(DIST_ARCHIVES).asc RELEASE_NOTES cm-msk,opendmarc@frs.sourceforge.net:/home/frs/project/o/op/opendmarc/
53
54 .PHONY: push
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
30 case $$MAKEFLAGS in \
31 *\\[\ \ ]*) \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
35 esac; \
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 @BUILD_FILTER_TRUE@am__append_1 = opendmarc
81 subdir = .
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/configure $(am__configure_deps) \
84 $(srcdir)/build-config.h.in $(dist_doc_DATA) INSTALL README \
85 build-aux/README build-aux/compile build-aux/config.guess \
86 build-aux/config.sub build-aux/depcomp build-aux/install-sh \
87 build-aux/missing build-aux/ltmain.sh \
88 $(top_srcdir)/build-aux/compile \
89 $(top_srcdir)/build-aux/config.guess \
90 $(top_srcdir)/build-aux/config.sub \
91 $(top_srcdir)/build-aux/install-sh \
92 $(top_srcdir)/build-aux/ltmain.sh \
93 $(top_srcdir)/build-aux/missing
94 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
95 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
96 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
97 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
98 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
99 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
100 $(ACLOCAL_M4)
101 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
102 configure.lineno config.status.lineno
103 mkinstalldirs = $(install_sh) -d
104 CONFIG_HEADER = build-config.h
105 CONFIG_CLEAN_FILES =
106 CONFIG_CLEAN_VPATH_FILES =
107 AM_V_P = $(am__v_P_@AM_V@)
108 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
109 am__v_P_0 = false
110 am__v_P_1 = :
111 AM_V_GEN = $(am__v_GEN_@AM_V@)
112 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
113 am__v_GEN_0 = @echo " GEN " $@;
114 am__v_GEN_1 =
115 AM_V_at = $(am__v_at_@AM_V@)
116 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
117 am__v_at_0 = @
118 am__v_at_1 =
119 SOURCES =
120 DIST_SOURCES =
121 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
122 ctags-recursive dvi-recursive html-recursive info-recursive \
123 install-data-recursive install-dvi-recursive \
124 install-exec-recursive install-html-recursive \
125 install-info-recursive install-pdf-recursive \
126 install-ps-recursive install-recursive installcheck-recursive \
127 installdirs-recursive pdf-recursive ps-recursive \
128 tags-recursive uninstall-recursive
129 am__can_run_installinfo = \
130 case $$AM_UPDATE_INFO_DIR in \
131 n|no|NO) false;; \
132 *) (install-info --version) >/dev/null 2>&1;; \
133 esac
134 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
135 am__vpath_adj = case $$p in \
136 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
137 *) f=$$p;; \
138 esac;
139 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
140 am__install_max = 40
141 am__nobase_strip_setup = \
142 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
143 am__nobase_strip = \
144 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
145 am__nobase_list = $(am__nobase_strip_setup); \
146 for p in $$list; do echo "$$p $$p"; done | \
147 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
148 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
149 if (++n[$$2] == $(am__install_max)) \
150 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
151 END { for (dir in files) print dir, files[dir] }'
152 am__base_list = \
153 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
154 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
155 am__uninstall_files_from_dir = { \
156 test -z "$$files" \
157 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
158 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
159 $(am__cd) "$$dir" && rm -f $$files; }; \
160 }
161 am__installdirs = "$(DESTDIR)$(docdir)"
162 DATA = $(dist_doc_DATA)
163 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
164 distclean-recursive maintainer-clean-recursive
165 am__recursive_targets = \
166 $(RECURSIVE_TARGETS) \
167 $(RECURSIVE_CLEAN_TARGETS) \
168 $(am__extra_recursive_targets)
169 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
170 cscope distdir dist dist-all distcheck
171 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
172 $(LISP)build-config.h.in
173 # Read a list of newline-separated strings from the standard input,
174 # and print each of them once, without duplicates. Input order is
175 # *not* preserved.
176 am__uniquify_input = $(AWK) '\
177 BEGIN { nonempty = 0; } \
178 { items[$$0] = 1; nonempty = 1; } \
179 END { if (nonempty) { for (i in items) print i; }; } \
180 '
181 # Make sure the list of sources is unique. This is necessary because,
182 # e.g., the same source file might be shared among _SOURCES variables
183 # for different programs/libraries.
184 am__define_uniq_tagged_files = \
185 list='$(am__tagged_files)'; \
186 unique=`for i in $$list; do \
187 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
188 done | $(am__uniquify_input)`
189 ETAGS = etags
190 CTAGS = ctags
191 CSCOPE = cscope
192 DIST_SUBDIRS = contrib db docs libopendmarc reports opendmarc
193 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
194 distdir = $(PACKAGE)-$(VERSION)
195 top_distdir = $(distdir)
196 am__remove_distdir = \
197 if test -d "$(distdir)"; then \
198 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
199 && rm -rf "$(distdir)" \
200 || { sleep 5 && rm -rf "$(distdir)"; }; \
201 else :; fi
202 am__post_remove_distdir = $(am__remove_distdir)
203 am__relativize = \
204 dir0=`pwd`; \
205 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
206 sed_rest='s,^[^/]*/*,,'; \
207 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
208 sed_butlast='s,/*[^/]*$$,,'; \
209 while test -n "$$dir1"; do \
210 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
211 if test "$$first" != "."; then \
212 if test "$$first" = ".."; then \
213 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
214 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
215 else \
216 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
217 if test "$$first2" = "$$first"; then \
218 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
219 else \
220 dir2="../$$dir2"; \
221 fi; \
222 dir0="$$dir0"/"$$first"; \
223 fi; \
224 fi; \
225 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
226 done; \
227 reldir="$$dir2"
228 DIST_ARCHIVES = $(distdir).tar.gz
229 GZIP_ENV = --best
230 DIST_TARGETS = dist-gzip
231 distuninstallcheck_listfiles = find . -type f -print
232 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
233 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
234 distcleancheck_listfiles = find . -type f -print
235 ACLOCAL = aclocal -I $(auxdir)
236 AMTAR = @AMTAR@
237 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
238 AR = @AR@
239 AUTOCONF = @AUTOCONF@
240 AUTOHEADER = @AUTOHEADER@
241 AUTOMAKE = @AUTOMAKE@
242 AWK = @AWK@
243 CC = @CC@
244 CCDEPMODE = @CCDEPMODE@
245 CFLAGS = @CFLAGS@
246 CPP = @CPP@
247 CPPFLAGS = @CPPFLAGS@
248 CYGPATH_W = @CYGPATH_W@
249 DEFS = @DEFS@
250 DEPDIR = @DEPDIR@
251 DLLTOOL = @DLLTOOL@
252 DSYMUTIL = @DSYMUTIL@
253 DUMPBIN = @DUMPBIN@
254 ECHO_C = @ECHO_C@
255 ECHO_N = @ECHO_N@
256 ECHO_T = @ECHO_T@
257 EGREP = @EGREP@
258 EXEEXT = @EXEEXT@
259 FGREP = @FGREP@
260 GREP = @GREP@
261 HEX_VERSION = @HEX_VERSION@
262 INSTALL = @INSTALL@
263 INSTALL_DATA = @INSTALL_DATA@
264 INSTALL_PROGRAM = @INSTALL_PROGRAM@
265 INSTALL_SCRIPT = @INSTALL_SCRIPT@
266 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
267 LD = @LD@
268 LDFLAGS = @LDFLAGS@
269 LIBDMARC_DIR = @LIBDMARC_DIR@
270 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
271 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
272 LIBMILTER_LIBS = @LIBMILTER_LIBS@
273 LIBOBJS = @LIBOBJS@
274 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
275 LIBRESOLV = @LIBRESOLV@
276 LIBS = @LIBS@
277 LIBTOOL = @LIBTOOL@
278 LIPO = @LIPO@
279 LN_S = @LN_S@
280 LTLIBOBJS = @LTLIBOBJS@
281 MAKEINFO = @MAKEINFO@
282 MANIFEST_TOOL = @MANIFEST_TOOL@
283 MKDIR_P = @MKDIR_P@
284 NM = @NM@
285 NMEDIT = @NMEDIT@
286 OBJDUMP = @OBJDUMP@
287 OBJEXT = @OBJEXT@
288 OTOOL = @OTOOL@
289 OTOOL64 = @OTOOL64@
290 PACKAGE = @PACKAGE@
291 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
292 PACKAGE_NAME = @PACKAGE_NAME@
293 PACKAGE_STRING = @PACKAGE_STRING@
294 PACKAGE_TARNAME = @PACKAGE_TARNAME@
295 PACKAGE_URL = @PACKAGE_URL@
296 PACKAGE_VERSION = @PACKAGE_VERSION@
297 PATH_SEPARATOR = @PATH_SEPARATOR@
298 PKG_CONFIG = @PKG_CONFIG@
299 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
300 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
301 PTHREAD_CC = @PTHREAD_CC@
302 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
303 PTHREAD_LIBS = @PTHREAD_LIBS@
304 RANLIB = @RANLIB@
305 SED = @SED@
306 SET_MAKE = @SET_MAKE@
307 SHELL = @SHELL@
308 SQL_BACKEND = @SQL_BACKEND@
309 STRIP = @STRIP@
310 SYSCONFDIR = @SYSCONFDIR@
311 VERSION = @VERSION@
312 abs_builddir = @abs_builddir@
313 abs_srcdir = @abs_srcdir@
314 abs_top_builddir = @abs_top_builddir@
315 abs_top_srcdir = @abs_top_srcdir@
316 ac_aux_dir = @ac_aux_dir@
317 ac_ct_AR = @ac_ct_AR@
318 ac_ct_CC = @ac_ct_CC@
319 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
320 am__include = @am__include@
321 am__leading_dot = @am__leading_dot@
322 am__quote = @am__quote@
323 am__tar = @am__tar@
324 am__untar = @am__untar@
325 ax_pthread_config = @ax_pthread_config@
326 bindir = @bindir@
327 build = @build@
328 build_alias = @build_alias@
329 build_cpu = @build_cpu@
330 build_os = @build_os@
331 build_vendor = @build_vendor@
332 builddir = @builddir@
333 datadir = @datadir@
334 datarootdir = @datarootdir@
335 docdir = @docdir@
336 dvidir = @dvidir@
337 exec_prefix = @exec_prefix@
338 host = @host@
339 host_alias = @host_alias@
340 host_cpu = @host_cpu@
341 host_os = @host_os@
342 host_vendor = @host_vendor@
343 htmldir = @htmldir@
344 includedir = @LIBDMARC_DIR@/include
345 infodir = @infodir@
346 install_sh = @install_sh@
347 libdir = @LIBDMARC_DIR@/lib
348 libexecdir = @libexecdir@
349 localedir = @localedir@
350 localstatedir = @localstatedir@
351 mandir = @mandir@
352 miltertest = @miltertest@
353 mkdir_p = @mkdir_p@
354 oldincludedir = @oldincludedir@
355 pdfdir = @pdfdir@
356 prefix = @prefix@
357 program_transform_name = @program_transform_name@
358 psdir = @psdir@
359 sbindir = @sbindir@
360 sharedstatedir = @sharedstatedir@
361 srcdir = @srcdir@
362 sysconfdir = @sysconfdir@
363 target_alias = @target_alias@
364 top_build_prefix = @top_build_prefix@
365 top_builddir = @top_builddir@
366 top_srcdir = @top_srcdir@
367 ACLOCAL_AMFLAGS = -I m4
368 SUBDIRS = contrib db docs libopendmarc reports $(am__append_1)
369 auxdir = @ac_aux_dir@
370 AUX_DIST = $(auxdir)/install-sh $(auxdir)/missing \
371 $(auxdir)/mkinstalldirs \
372 $(auxdir)/config.guess $(auxdir)/build \
373 $(auxdir)/dh.m4
374
375 AUTOMAKE_OPTIONS = foreign
376 MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure \
377 $(AUX_DIST)
378
379 dist_doc_DATA = LICENSE LICENSE.Sendmail
380 DISTCLEANFILES = opendmarc-@VERSION@.tar.gz
381 DISTCHECK_CONFIGURE_FLAGS = --enable-filter-tests
382 all: build-config.h
383 $(MAKE) $(AM_MAKEFLAGS) all-recursive
384
385 .SUFFIXES:
386 am--refresh: Makefile
387 @:
388 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
389 @for dep in $?; do \
390 case '$(am__configure_deps)' in \
391 *$$dep*) \
392 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
393 $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
394 && exit 0; \
395 exit 1;; \
396 esac; \
397 done; \
398 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
399 $(am__cd) $(top_srcdir) && \
400 $(AUTOMAKE) --foreign Makefile
401 .PRECIOUS: Makefile
402 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
403 @case '$?' in \
404 *config.status*) \
405 echo ' $(SHELL) ./config.status'; \
406 $(SHELL) ./config.status;; \
407 *) \
408 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
409 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
410 esac;
411
412 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
413 $(SHELL) ./config.status --recheck
414
415 $(top_srcdir)/configure: $(am__configure_deps)
416 $(am__cd) $(srcdir) && $(AUTOCONF)
417 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
418 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
419 $(am__aclocal_m4_deps):
420
421 build-config.h: stamp-h1
422 @if test ! -f $@; then rm -f stamp-h1; else :; fi
423 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
424
425 stamp-h1: $(srcdir)/build-config.h.in $(top_builddir)/config.status
426 @rm -f stamp-h1
427 cd $(top_builddir) && $(SHELL) ./config.status build-config.h
428 $(srcdir)/build-config.h.in: $(am__configure_deps)
429 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
430 rm -f stamp-h1
431 touch $@
432
433 distclean-hdr:
434 -rm -f build-config.h stamp-h1
435
436 mostlyclean-libtool:
437 -rm -f *.lo
438
439 clean-libtool:
440 -rm -rf .libs _libs
441
442 distclean-libtool:
443 -rm -f libtool config.lt
444 install-dist_docDATA: $(dist_doc_DATA)
445 @$(NORMAL_INSTALL)
446 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
447 if test -n "$$list"; then \
448 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
449 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
450 fi; \
451 for p in $$list; do \
452 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
453 echo "$$d$$p"; \
454 done | $(am__base_list) | \
455 while read files; do \
456 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
457 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
458 done
459
460 uninstall-dist_docDATA:
461 @$(NORMAL_UNINSTALL)
462 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
463 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
464 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
465
466 # This directory's subdirectories are mostly independent; you can cd
467 # into them and run 'make' without going through this Makefile.
468 # To change the values of 'make' variables: instead of editing Makefiles,
469 # (1) if the variable is set in 'config.status', edit 'config.status'
470 # (which will cause the Makefiles to be regenerated when you run 'make');
471 # (2) otherwise, pass the desired values on the 'make' command line.
472 $(am__recursive_targets):
473 @fail=; \
474 if $(am__make_keepgoing); then \
475 failcom='fail=yes'; \
476 else \
477 failcom='exit 1'; \
478 fi; \
479 dot_seen=no; \
480 target=`echo $@ | sed s/-recursive//`; \
481 case "$@" in \
482 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
483 *) list='$(SUBDIRS)' ;; \
484 esac; \
485 for subdir in $$list; do \
486 echo "Making $$target in $$subdir"; \
487 if test "$$subdir" = "."; then \
488 dot_seen=yes; \
489 local_target="$$target-am"; \
490 else \
491 local_target="$$target"; \
492 fi; \
493 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
494 || eval $$failcom; \
495 done; \
496 if test "$$dot_seen" = "no"; then \
497 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
498 fi; test -z "$$fail"
499
500 ID: $(am__tagged_files)
501 $(am__define_uniq_tagged_files); mkid -fID $$unique
502 tags: tags-recursive
503 TAGS: tags
504
505 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
506 set x; \
507 here=`pwd`; \
508 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
509 include_option=--etags-include; \
510 empty_fix=.; \
511 else \
512 include_option=--include; \
513 empty_fix=; \
514 fi; \
515 list='$(SUBDIRS)'; for subdir in $$list; do \
516 if test "$$subdir" = .; then :; else \
517 test ! -f $$subdir/TAGS || \
518 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
519 fi; \
520 done; \
521 $(am__define_uniq_tagged_files); \
522 shift; \
523 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
524 test -n "$$unique" || unique=$$empty_fix; \
525 if test $$# -gt 0; then \
526 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
527 "$$@" $$unique; \
528 else \
529 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
530 $$unique; \
531 fi; \
532 fi
533 ctags: ctags-recursive
534
535 CTAGS: ctags
536 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
537 $(am__define_uniq_tagged_files); \
538 test -z "$(CTAGS_ARGS)$$unique" \
539 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
540 $$unique
541
542 GTAGS:
543 here=`$(am__cd) $(top_builddir) && pwd` \
544 && $(am__cd) $(top_srcdir) \
545 && gtags -i $(GTAGS_ARGS) "$$here"
546 cscope: cscope.files
547 test ! -s cscope.files \
548 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
549 clean-cscope:
550 -rm -f cscope.files
551 cscope.files: clean-cscope cscopelist
552 cscopelist: cscopelist-recursive
553
554 cscopelist-am: $(am__tagged_files)
555 list='$(am__tagged_files)'; \
556 case "$(srcdir)" in \
557 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
558 *) sdir=$(subdir)/$(srcdir) ;; \
559 esac; \
560 for i in $$list; do \
561 if test -f "$$i"; then \
562 echo "$(subdir)/$$i"; \
563 else \
564 echo "$$sdir/$$i"; \
565 fi; \
566 done >> $(top_builddir)/cscope.files
567
568 distclean-tags:
569 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
570 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
571
572 distdir: $(DISTFILES)
573 $(am__remove_distdir)
574 test -d "$(distdir)" || mkdir "$(distdir)"
575 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
576 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
577 list='$(DISTFILES)'; \
578 dist_files=`for file in $$list; do echo $$file; done | \
579 sed -e "s|^$$srcdirstrip/||;t" \
580 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
581 case $$dist_files in \
582 */*) $(MKDIR_P) `echo "$$dist_files" | \
583 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
584 sort -u` ;; \
585 esac; \
586 for file in $$dist_files; do \
587 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
588 if test -d $$d/$$file; then \
589 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
590 if test -d "$(distdir)/$$file"; then \
591 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
592 fi; \
593 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
594 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
595 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
596 fi; \
597 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
598 else \
599 test -f "$(distdir)/$$file" \
600 || cp -p $$d/$$file "$(distdir)/$$file" \
601 || exit 1; \
602 fi; \
603 done
604 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
605 if test "$$subdir" = .; then :; else \
606 $(am__make_dryrun) \
607 || test -d "$(distdir)/$$subdir" \
608 || $(MKDIR_P) "$(distdir)/$$subdir" \
609 || exit 1; \
610 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
611 $(am__relativize); \
612 new_distdir=$$reldir; \
613 dir1=$$subdir; dir2="$(top_distdir)"; \
614 $(am__relativize); \
615 new_top_distdir=$$reldir; \
616 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
617 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
618 ($(am__cd) $$subdir && \
619 $(MAKE) $(AM_MAKEFLAGS) \
620 top_distdir="$$new_top_distdir" \
621 distdir="$$new_distdir" \
622 am__remove_distdir=: \
623 am__skip_length_check=: \
624 am__skip_mode_fix=: \
625 distdir) \
626 || exit 1; \
627 fi; \
628 done
629 $(MAKE) $(AM_MAKEFLAGS) \
630 top_distdir="$(top_distdir)" distdir="$(distdir)" \
631 dist-hook
632 -test -n "$(am__skip_mode_fix)" \
633 || find "$(distdir)" -type d ! -perm -755 \
634 -exec chmod u+rwx,go+rx {} \; -o \
635 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
636 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
637 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
638 || chmod -R a+r "$(distdir)"
639 dist-gzip: distdir
640 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
641 $(am__post_remove_distdir)
642
643 dist-bzip2: distdir
644 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
645 $(am__post_remove_distdir)
646
647 dist-lzip: distdir
648 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
649 $(am__post_remove_distdir)
650
651 dist-xz: distdir
652 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
653 $(am__post_remove_distdir)
654
655 dist-tarZ: distdir
656 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
657 $(am__post_remove_distdir)
658
659 dist-shar: distdir
660 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
661 $(am__post_remove_distdir)
662
663 dist-zip: distdir
664 -rm -f $(distdir).zip
665 zip -rq $(distdir).zip $(distdir)
666 $(am__post_remove_distdir)
667
668 dist dist-all:
669 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
670 $(am__post_remove_distdir)
671
672 # This target untars the dist file and tries a VPATH configuration. Then
673 # it guarantees that the distribution is self-contained by making another
674 # tarfile.
675 distcheck: dist
676 case '$(DIST_ARCHIVES)' in \
677 *.tar.gz*) \
678 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
679 *.tar.bz2*) \
680 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
681 *.tar.lz*) \
682 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
683 *.tar.xz*) \
684 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
685 *.tar.Z*) \
686 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
687 *.shar.gz*) \
688 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
689 *.zip*) \
690 unzip $(distdir).zip ;;\
691 esac
692 chmod -R a-w $(distdir)
693 chmod u+w $(distdir)
694 mkdir $(distdir)/_build $(distdir)/_inst
695 chmod a-w $(distdir)
696 test -d $(distdir)/_build || exit 0; \
697 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
698 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
699 && am__cwd=`pwd` \
700 && $(am__cd) $(distdir)/_build \
701 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
702 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
703 $(DISTCHECK_CONFIGURE_FLAGS) \
704 && $(MAKE) $(AM_MAKEFLAGS) \
705 && $(MAKE) $(AM_MAKEFLAGS) dvi \
706 && $(MAKE) $(AM_MAKEFLAGS) check \
707 && $(MAKE) $(AM_MAKEFLAGS) install \
708 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
709 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
710 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
711 distuninstallcheck \
712 && chmod -R a-w "$$dc_install_base" \
713 && ({ \
714 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
715 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
716 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
717 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
718 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
719 } || { rm -rf "$$dc_destdir"; exit 1; }) \
720 && rm -rf "$$dc_destdir" \
721 && $(MAKE) $(AM_MAKEFLAGS) dist \
722 && rm -rf $(DIST_ARCHIVES) \
723 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
724 && cd "$$am__cwd" \
725 || exit 1
726 $(am__post_remove_distdir)
727 @(echo "$(distdir) archives ready for distribution: "; \
728 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
729 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
730 distuninstallcheck:
731 @test -n '$(distuninstallcheck_dir)' || { \
732 echo 'ERROR: trying to run $@ with an empty' \
733 '$$(distuninstallcheck_dir)' >&2; \
734 exit 1; \
735 }; \
736 $(am__cd) '$(distuninstallcheck_dir)' || { \
737 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
738 exit 1; \
739 }; \
740 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
741 || { echo "ERROR: files left after uninstall:" ; \
742 if test -n "$(DESTDIR)"; then \
743 echo " (check DESTDIR support)"; \
744 fi ; \
745 $(distuninstallcheck_listfiles) ; \
746 exit 1; } >&2
747 distcleancheck: distclean
748 @if test '$(srcdir)' = . ; then \
749 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
750 exit 1 ; \
751 fi
752 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
753 || { echo "ERROR: files left in build directory after distclean:" ; \
754 $(distcleancheck_listfiles) ; \
755 exit 1; } >&2
756 check-am: all-am
757 check: check-recursive
758 all-am: Makefile $(DATA) build-config.h
759 installdirs: installdirs-recursive
760 installdirs-am:
761 for dir in "$(DESTDIR)$(docdir)"; do \
762 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
763 done
764 install: install-recursive
765 install-exec: install-exec-recursive
766 install-data: install-data-recursive
767 uninstall: uninstall-recursive
768
769 install-am: all-am
770 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
771
772 installcheck: installcheck-recursive
773 install-strip:
774 if test -z '$(STRIP)'; then \
775 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
776 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
777 install; \
778 else \
779 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
780 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
781 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
782 fi
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 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
791
792 maintainer-clean-generic:
793 @echo "This command is intended for maintainers to use"
794 @echo "it deletes files that may require special tools to rebuild."
795 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
796 clean: clean-recursive
797
798 clean-am: clean-generic clean-libtool mostlyclean-am
799
800 distclean: distclean-recursive
801 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
802 -rm -f Makefile
803 distclean-am: clean-am distclean-generic distclean-hdr \
804 distclean-libtool distclean-tags
805
806 dvi: dvi-recursive
807
808 dvi-am:
809
810 html: html-recursive
811
812 html-am:
813
814 info: info-recursive
815
816 info-am:
817
818 install-data-am: install-dist_docDATA
819
820 install-dvi: install-dvi-recursive
821
822 install-dvi-am:
823
824 install-exec-am:
825
826 install-html: install-html-recursive
827
828 install-html-am:
829
830 install-info: install-info-recursive
831
832 install-info-am:
833
834 install-man:
835
836 install-pdf: install-pdf-recursive
837
838 install-pdf-am:
839
840 install-ps: install-ps-recursive
841
842 install-ps-am:
843
844 installcheck-am:
845
846 maintainer-clean: maintainer-clean-recursive
847 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
848 -rm -rf $(top_srcdir)/autom4te.cache
849 -rm -f Makefile
850 maintainer-clean-am: distclean-am maintainer-clean-generic
851
852 mostlyclean: mostlyclean-recursive
853
854 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
855
856 pdf: pdf-recursive
857
858 pdf-am:
859
860 ps: ps-recursive
861
862 ps-am:
863
864 uninstall-am: uninstall-dist_docDATA
865
866 .MAKE: $(am__recursive_targets) all install-am install-strip
867
868 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
869 am--refresh check check-am clean clean-cscope clean-generic \
870 clean-libtool cscope cscopelist-am ctags ctags-am dist \
871 dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
872 dist-tarZ dist-xz dist-zip distcheck distclean \
873 distclean-generic distclean-hdr distclean-libtool \
874 distclean-tags distcleancheck distdir distuninstallcheck dvi \
875 dvi-am html html-am info info-am install install-am \
876 install-data install-data-am install-dist_docDATA install-dvi \
877 install-dvi-am install-exec install-exec-am install-html \
878 install-html-am install-info install-info-am install-man \
879 install-pdf install-pdf-am install-ps install-ps-am \
880 install-strip installcheck installcheck-am installdirs \
881 installdirs-am maintainer-clean maintainer-clean-generic \
882 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
883 ps ps-am tags tags-am uninstall uninstall-am \
884 uninstall-dist_docDATA
885
886
887 dist-hook:
888 [ -f $(distdir)/libopendmarc/dmarc.h ] && rm -f $(distdir)/libopendmarc/dmarc.h
889 sed -e '/OPENDMARC_LIB_VERSION/s/0x[0-9]*/0x@HEX_VERSION@/' < $(srcdir)/libopendmarc/dmarc.h > $(distdir)/libopendmarc/dmarc.h
890 echo "looking to see if @VERSION@ is in the RELEASE_NOTES"
891 fgrep @VERSION@ $(srcdir)/RELEASE_NOTES
892 sed -e 's|\(@VERSION@[ \t]*\)[0-9?]\{4\}\(/[0-9?]\{2\}\)\{2\}|\1'`date +%Y/%m/%d`'|' < $(srcdir)/RELEASE_NOTES > $(distdir)/RELEASE_NOTES
893
894 $(DIST_ARCHIVES): distcheck
895
896 $(DIST_ARCHIVES).md5: $(DIST_ARCHIVES)
897 md5 $? > $@ || md5sum $? > $@
898
899 $(DIST_ARCHIVES).sha1: $(DIST_ARCHIVES)
900 sha1 $? > $@ || sha1sum $? > $@
901
902 $(DIST_ARCHIVES).asc: $(DIST_ARCHIVES)
903 gpg -a -u security@trusteddomain.org --detach-sign $?
904
905 push: $(DIST_ARCHIVES) $(DIST_ARCHIVES).sha1 $(DIST_ARCHIVES).md5 $(DIST_ARCHIVES).asc
906 @echo "Are you sure you want to tag and release $(DIST_ARCHIVES)? (y/n)"
907 @read confirm && [ $$confirm = 'y' ]
908 git tag rel-opendmarc-`echo $(VERSION) | sed 's/\./-/g'`
909 git push --tags
910 scp $(DIST_ARCHIVES) $(DIST_ARCHIVES).sha1 $(DIST_ARCHIVES).md5 $(DIST_ARCHIVES).asc RELEASE_NOTES cm-msk,opendmarc@frs.sourceforge.net:/home/frs/project/o/op/opendmarc/
911
912 .PHONY: push
913
914 # Tell versions [3.59,3.63) of GNU make to not export all variables.
915 # Otherwise a system limit (for SysV at least) may be exceeded.
916 .NOEXPORT:
0
1 This directory has the latest open source DMARC software from The Trusted
2 Domain Project.
3
4 There is a web site at http://www.trusteddomain.org/opendmarc that is home for
5 the latest updates.
6
7
8 +--------------+
9 | INTRODUCTION |
10 +--------------+
11
12 The OpenDMARC project is a community effort to develop and maintain an open
13 source package for providing DMARC report generation and policy enforcement
14 services. It includes a library for handling DMARC record parsing,
15 a database schema and tools for aggregating and processing transaction
16 history to produce DMARC reports, and a filter that ties it all together
17 with an MTA using the milter protocol.
18
19 "milter" is a portmanteau of "mail filter" and refers to a protocol and API
20 for communicating mail traffic information between MTAs and mail filtering
21 plug-in applications. It was originally invented at Sendmail, Inc. but
22 has also been adapted to other MTAs.
23
24 +--------------+
25 | DEPENDENCIES |
26 +--------------+
27
28 To compile and operate, this package requires the following:
29
30 o sendmail v8.13.0 (or later), or Postfix 2.3, (or later) and libmilter.
31 (These are only required if you are building the filter.)
32
33 o Access to a working nameserver (required only for signature verification).
34
35 o A perl interpreter.
36
37 o If you are interested in tinkering with the build and packaging structure,
38 you may need to upgrade to these versions of GNU's "autotools" components:
39 autoconf (GNU Autoconf) 2.61
40 automake (GNU automake) 1.7 (or 1.9 to avoid warnings)
41 ltmain.sh (GNU libtool) 2.2.6 (or 1.5.26 after make maintainer-clean)
42
43
44 +-----------------------+
45 | RELATED DOCUMENTATION |
46 +-----------------------+
47
48 The man page for opendmarc (the actual filter program) is present in the
49 opendmarc directory of this source distribution. There is additional
50 information in the INSTALL and FEATURES files, and in the README file in the
51 opendmarc directory. Changes are documented in the RELEASE_NOTES file.
52
53 HTML-style documentation for libopendmarc is available in libopendmarc/docs in
54 this source distribution.
55
56 General information about DMARC can be found at http://www.dmarc.org
57
58 Mailing lists discussing and supporting the DMARC software found in this
59 package are maintained via a list server at trusteddomain.org. Visit
60 http://www.trusteddomain.org to subscribe or browse archives. The available
61 lists are:
62
63 opendmarc-announce (moderated) Release announcements.
64
65 opendmarc-users General OpenDMARC user questions and answers.
66
67 opendmarc-dev Chatter among OpenDMARC developers.
68
69 opendmarc-code Automated source code change announcements.
70
71 Bug tracking is done via the trackers on SourceForge at
72 http://sourceforge.net/projects/opendmarc. You can enter new bug
73 reports there, but please check first for older bugs already open,
74 or even already closed, before opening a new issue.
75
76
77 +---------------------+
78 | DIRECTORY STRUCTURE |
79 +---------------------+
80
81 contrib A collection of user contributed scripts that may be useful.
82
83 db Database schema and tools for generating DMARC reports based
84 upon accumulated data.
85
86 docs A collection of RFCs and drafts related to opendmarc.
87
88 libopendmarc A library that implements the proposed DMARC standard.
89
90 libopendmarc/docs
91 HTML documentation describing the API provided by libopendmarc.
92
93 opendmarc A milter-based filter application which uses libopendmarc (and
94 optionally libar) to provide DMARC service via an MTA using
95 the milter protocol.
96
97
98 +----------------+
99 | RUNTIME ISSUES |
100 +----------------+
101
102 WARNING: symbol 'X' not available
103
104 The filter attempted to get some information from the MTA that the MTA
105 did not provide.
106
107 At various points in the interaction between the MTA and the filter, certain
108 macros containing information about the job in progress or the connection
109 being handled are passed from the MTA to the filter.
110
111 In the case of sendmail, the names of the macros the MTA should pass to the
112 filter are defined by the "Milter.macros" settings in sendmail.cf, e.g.
113 "Milter.macros.connect", "Milter.macros.envfrom", etc. This message
114 indicates that the filter needed the contents of macro X, but that macro
115 was not passed down from the MTA.
116
117 Typically the values needed by this filter are passed from the MTA if the
118 sendmail.cf was generated by the usual m4 method. If you do not have
119 those options defined in your sendmail.cf, make sure your M4 configuration
120 files are current and rebuild your sendmail.cf to get appropriate lines
121 added to your sendmail.cf, and then restart sendmail.
122
123 MTA timeouts
124
125 By default, the MTA is configured to wait up to ten seconds for a response
126 from a filter before giving up. When querying remote nameservers
127 for key and policy data, the DMARC filter may not get a response from the
128 resolver within that time frame, and thus this MTA timeout will occur.
129 This can cause messages to be rejected, temp-failed or delivered without
130 verification, depending on the failure mode selected for the filter.
131
132 When using the standard resolver library provided with your system, the
133 DNS timeout cannot be adjusted. If you encounter this problem, you must
134 increase the time the MTA waits for replies. See the documentation in
135 the sendmail open source distribution (libmilter/README in particular)
136 for instructions on changing these timeouts.
137
138 When using the provided asynchronous resolver library, you can use the
139 "-T" command line option to change the timeout so that it is shorter than
140 the MTA timeout.
141
142 Other OpenDMARC issues:
143
144 Report any bugs to the email address opendmarc-users@trusteddomain.org or to
145 the SourceForge issue tracker accessible at:
146
147 http://sourceforge.net/p/opendmarc/tickets/
148
149
150 --
151 Copyright (c) 2012, 2016, The Trusted Domain Project. All rights reserved.
152
153 $Id: README,v 1.13 2010/10/25 20:41:55 cm-msk Exp $
0 OPENDMARC RELEASE NOTES
1
2 This listing shows the versions of the OpenDMARC package, the date of
3 release, and a summary of the changes in that release.
4
5 1.3.2 2016/12/19
6 Feature request #86: Change meaning of "RequiredHeaders" such that
7 header validity is always checked, but messages are only
8 rejected on that basis when the flag is set. Based
9 on a patch from Andreas Schulze.
10 Feature request #127: Log SPF results when rejecting. Requested
11 by Patrick Wagner; patch from Andreas Schulze, follow-up
12 patch from Juri Haberland.
13 Feature request #138: Inculde policy and disposition information
14 in an Authentication-Results comment. Based on a patch
15 from Juri Haberland.
16 Feature request #139: Include the client host name if known
17 in failure reports. Suggested by Roland Turner;
18 patch by Andreas Schulze.
19 Fix bug #95: Assume IPv6 for SPF operations. Patch from Juri Haberland.
20 Fix bug #120: Fix control logic around the SPF result.
21 Reported by Christophe Wolfhugel; patch from Andreas Schulze.
22 Fix bug #122: Don't skip the HELO milter phase when SPF is enabled.
23 Reported by Christophe Wolfhugel.
24 Fix bug #157: Fix logging of implicit authserv-ids. Reported
25 by Andreas Schulze; patch from Juri Haberland.
26 Fix bug #158: Log ignored connections. Patch from Andreas Schulze.
27 Fix bug #160: Fix "SyslogFacility" handling. Patch from
28 Juri Haberland.
29 Fix bug #163: Use a larger buffer for the raw MAIL FROM value.
30 Based on a patch from Andreas Schulze.
31 Fix bug #174: Trim "!" suffixes from reporting addresses. Problem
32 noted by Juri Haberland.
33 Fix bug #186: When reloading the configuration file, the public
34 suffix list was read in with the wrong comment indicator.
35 Patch from Federico Omoto.
36 LIBOPENDMARC: Fix bug #115: Fix type mismatch. Patch from
37 Sebastian A. Siewior via Scott Kitterman.
38 LIBOPENDMARC: Fix bug #121: Fix IPv6 CIDR matching in SPF code.
39 Patch from Christophe Wolfhugel.
40 LIBOPENDMARC: Fix bug #125: Compile time IPv6 fix. Reported by
41 Christophe Wolfhugel.
42 LIBOPENDMARC: Fix bug #131: Fix alignment bug. Patch from
43 Andreas Schulze.
44 LIBOPENDMARC: Fix bug #147: Fix stripping of whitespace from
45 DMARC DNS records. Based on a patch from Job Noorman.
46 LIBOPENDMARC: Fix bug #149: Apply "sp" setting, if present and
47 applicable. Patch from Petr Novak.
48 LIBOPENDMARC: Fix bug #154: Fix "rf" and "fo" processing logic.
49 LIBOPENDMARC: Fix bug #156: Fix variable name. Patch by
50 Andreas Schulze.
51 LIBOPENDMARC: Fix bug #165: Fix logic in checking which SPF
52 identifier was used. Patches from Marco Favero and
53 Juri Haberland.
54 LIBOPENDMARC: Fix bug #167: Don't return "fail" when we should
55 return "none". Patch from Marco Favero.
56 REPORTS: Fix bug #134: Handle SMTP errors correctly. Patch from
57 Andreas Schulze.
58 REPORTS: Fix bug #141: Set the HELO parameter correctly.
59 Reported by Alan Smith; patch from Andreas Schulze.
60 REPORTS: Fix bug #143: Fix logic in table truncation.
61 Reported by Wayne Andersen; patch from Juri Haberland.
62 REPORTS: Fix bug #162: Always report "sp" in aggregate reports.
63 Patch from Juri Haberland.
64 REPORTS: Fix bug #166: Fix report start/end time logic.
65 Patch from Juri Haberland.
66 REPORTS: Fix bug #188: Don't delete inputs too early in
67 opendmarc-reports. Patch from Juri Haberland.
68 TOOLS: Fix bug #161: "Forensic" reports were renamed "Failure"
69 reports. Patch from Andreas Schulze.
70 TOOLS: Fix bug #164: Handle IPv6 test addresses. Reported by
71 Andreas Schulze; patch from Juri Haberland.
72 DOCS: Patch #189: Replace the DMARC RFC with an HTML page
73 referencing the relevant specs, since Debian doesn't
74 consider RFCs to be "free". Patch from Scott Kitterman
75 via Juri Haberland.
76
77 1.3.1 2015/02/23
78 Fix bug #97: Add ability to change envelope sender, client IP
79 address, client hostname, and HELO value used in test
80 mode, via environment variables. This can be turned
81 into something more formal in a later release. Suggested
82 by Andreas Schulze.
83 Fix bug #102: Don't lose SPF results and output the "-1" default.
84 Reported by Kurt Roeckx.
85 Fix bug #103: Fix IgnoreAuthenticatedClients by requesting the
86 right macro value from the MTA.
87 Fix bug #113: Remove "TemporaryDirectory" (unused). Patch from
88 Andreas Schulze.
89 LIBOPENDMARC: Fix bug #104: Include <sys/param.h> and <resolv.h>
90 in <opendmarc/dmarc.h> so that MAXPATHLEN and MAXNS get
91 defined consistently. Reported by Frank J. Lhota.
92 LIBOPENDMARC: Fix bug #105: Get the h_errno definition from
93 <netdb.h> rather than declaring it. Problem noted
94 by Frank J. Lhota.
95 LIBOPENDMARC: Fix bug #106: Clean up issues with the types passed
96 to opendmarc_policy_library_dns_hook(). Noted by
97 Frank J. Lhota.
98 DOCS: Fix bug #99: Update list of constraints on
99 opendmarc_policy_fetch_alignment(). Reported by
100 Frank J. Lhota.
101 REPORTS: Fix bug #108: Handle malformed mailto URIs in DMARC
102 records (e.g., just "mailto:"). Reported by Andreas Schulze.
103 REPORTS: Fix bug #110: Support SQL backend selection in
104 opendmarc-expire. Reported by Mark Reidenbach.
105
106 1.3.0 2014/07/31
107 Integrated SPF checking is now available through the new
108 SPFSelfValidate and SPFIgnoreResults settings.
109 Feature request #79: Optionally ignore clients that authenticated
110 using SMTP AUTH.
111 Fix bug #60, part II: Default AuthservID to the name provided by the
112 MTA, not the local host name, which is consistent with what
113 OpenDKIM does. Suggested by Robbert Klarenbeek.
114 Fix bug #72: Don't crash when From fields are absent. Patch from
115 Andreas Schulze.
116 Fix bug #74: Change "Forensic" to "Failure" just about everywhere
117 to match the language now being used in the base DMARC
118 draft. Note that this also changes some names in the
119 configuration file.
120 Fix bug #75: Correct typo in MIME of forensic reports. Reported by
121 Julian Mehnle.
122 Fix bug #76: Repair damage with respect to Authentication-Results
123 header field selection. Reported by Todd Lyons.
124 Fix bug #77: Request quarantine from the MTA during option
125 negotiation. Reported by Richard Platel.
126 Fix bug #78: Add missing newline in forensic report header.
127 Fix bug #90: Make "--with-sql-backend" without any value do the
128 right thing. Reported by Scott Kitterman.
129 Fix bug #93: Honor size limits in URIs. Patch from Tomki Camp.
130 Make "smime" and "rrvs" legal Authentication-Results methods.
131 Provide better logging when pclose() for a forensic report returns
132 non-zero. Problem noted by Michael Nausch.
133 Add configuration support for internal SPF checks. Includes hooks in
134 the milter to check that SPF is configured to do so.
135 This can use a private SPF implementation or libspf2.
136 Fix strlcat() and strlcpy() support for Debian. Patch from Scott
137 Kitterman.
138 REPORTS: Feature request #80: Generate aggregate reports on UTC
139 day boundaries. Requested by Tomki Camp.
140 REPORTS: Feature request #84: Optionally expire old data from
141 lower-growth tables. Requested by Christoph Steindl.
142 REPORTS: Fix bug #70: Fix date range generation in reports. Patch
143 from Karol Augustin.
144 REPORTS: Fix bug #82: Fix recording of report timestamp to avoid lost
145 records. Reported by Christoph Steindl.
146 REPORTS: Fix bug #83: When expiring data, truncate the signatures table
147 if all messages were expired. Reported by Christoph Steindl.
148 REPORTS: Fix bug #85: Report subdomain policy. Patch from
149 Christoph Steindl.
150 LIBOPENDMARC: Fix bug #71: Fix "rua" extraction from DMARC records
151 Problem noted by Karol Augustin.
152 LIBOPENDMARC: Added support for milter to perform own spf checks.
153 Three new files: opendmarc_spf.c, opendmard_spf_dns.c and
154 test/test_spf.cl, allow integrated SPF support. Support for
155 use of libspf2 is also provided.
156
157 1.2.0 2014/03/14
158 Feature request #44: Allow override of the From: field on forensic
159 reports. Requested by Scott Kitterman.
160 Feature request #45: Log the host portion of ignored
161 Authentication-Results fields at "debug" level. Suggested
162 by Andreas Schulze.
163 Feature request #56: Add "RequiredHeaders" setting to enforce syntax
164 checks against a message and reject those that don't comply.
165 Suggested by Franck Martin; additional code from Andreas
166 Schulze.
167 Feature request #65: Add "ForensicReportsBcc". Requested by
168 Franck Martin.
169 Fix bug #46: Charitable tweak to a couple of log messages. Requested
170 by Andreas Schulze.
171 Fix bug #55: The "SoftwareHeader" setting wasn't being set properly.
172 Problem noted by Birta Levente.
173 Fix bug #58: The "smtp.mailfrom" part of an Authentication-Results
174 field might contain only a domain name. Problem noted by Scott
175 Kitterman.
176 Fix bug #60: Default AuthservID to the name provided by the MTA,
177 not the local host name, which is consistent with what
178 OpenDKIM does. Suggested by Robbert Klarenbeek.
179 Merge request #2: Validate external recipients before adding them to
180 report recipient lists. Code from Will Orr.
181 Record all DKIM results to the history file, rather than only
182 passing results.
183 BUILD: Fix bug #50: Check libbsd for strlcat() and strlcpy() so we
184 don't make our own when we don't need to. Requested by
185 Scott Kitterman.
186 CONTRIB: Fix bug #52: Update path to draft RFC in contrib/spec.
187 Problem noted by Kevin San Diego.
188 CONTRIB: Fix bug #59: Allow database name, userid and password to be
189 specified on the command line rather than hard-coding them.
190 Problem noted by Scott Kitterman.
191 DOCS: Fix bug #48: Add a libopendmarc use overview page.
192 DOCS: Fix bug #53: Add man page for opendmarc-importstats. Requested
193 by Scott Kitterman.
194 REPORTS: Fix bug #51: Check status after every phase of SMTP when
195 sending reports. Suggested by Todd Lyons.
196 REPORTS: Fix DKIM status importing.
197 LIBOPENDMARC: Fix bug #68: Fix strict/relaxed checking logic when
198 a public suffix list is available. Reported by
199 Andreas Schulze.
200 LIBOPENDMARC: Fixed a bug where in some instances the fetch of the
201 orgainizational domain could wrongly return the from domain.
202 LIBOPENDMARC: Fix call to missing function. Patch from William Orr.
203
204 1.1.3 2013/04/13
205 Fix reporting of nonexistent SPF results. Problem noted by
206 Andrei Ioachim.
207 Fix extraction of data from Received-SPF. Problem noted by
208 Todd Lyons.
209 LIBOPENDMARC: Fix bug #47: Make sure that
210 opendmarc_policy_fetch_utilized_domain() returns the
211 organizational domain if that's the domain whose policy
212 was selected. Reported by John Mears.
213
214 1.1.2 2013/03/27
215 Do Authentication-Results keyword parsing in a case-insensitive
216 manner. Problem noted by Chris Meidinger.
217 If the Authentication-Results for SPF didn't include one of the two
218 expected properties, don't crash. Problem noted by
219 Chris Meidinger.
220 Fix a data load problem with TestDNSData.
221
222 1.1.1 2013/03/18
223 Don't crash when postfix reports no IP address. Problem reported
224 by Andrei Ioachim.
225 Add "TemporaryDirectory" to the list of valid config file items.
226
227 1.1.0 2013/03/08
228 Feature request #34: Add support for local DNS overrides to enable
229 testing without Internet access. Requested by Scott Kitterman.
230 Feature request #35: Add "ForensicReportsOnNone". Requested by
231 Scott Kitterman.
232 Feature request #41: Log the domain name with the result. Requested
233 by Scott Kitterman.
234 Don't fail to start on empty or null configuration files. Problem
235 noted by Steve Jenkins.
236 LIBOPENDMARC: Fix bug #38: Avoid huge retry loops when parsing
237 non-DMARC TXT records, such as wildcards. Problem noted
238 by Andreas Schulze.
239 LIBOPENDMARC: Add opendmarc_policy_fetch_fo(),
240 opendmarc_policy_fetch_rf(), and
241 opendmarc_policy_to_buf().
242 REPORTING: Feature request #39: Add a MySQL script for setting up the
243 reporting tables. Suggested by Scott Kitterman.
244
245 1.0.1 2012/11/16
246 Fall back to lockf() if flock() support isn't available.
247 Fix faulty SPF error logging. Problem noted by Benny Pedersen.
248 REPORTING: Improve temporary file cleanup in opendmarc-reports.
249 CONTRIB: Fixes to configuration file generation in the spec file.
250 Problem noted by Steve Mays.
251
252 1.0.0 2012/10/25
253 Rename "AlwaysDeliver" to "RejectFailures" and flip the logic.
254 Feature request #26: Don't overload "AuthservID"; instead, the list
255 of trusted authserv-ids is now specified by a
256 new "TrustedAuthservIDs" setting. Requested by Andreas Schulze.
257 Feature request #28: Add "CopyFailuresTo" which adds the specified
258 recipient to the message when DMARC failures occur.
259 Requested by Andreas Schulze.
260 Feature request #30: Improve logging by indicating what the return
261 path was when a parse failure occurred, and what the final
262 DMARC result was. Requested by Andreas Schulze.
263 Evaluate based on the envelope sender reported by
264 Authentication-Results and not on what was in the actual
265 envelope.
266 REPORTING: Feature request #27: Add "--nodomain" to opendmarc-reports
267 to skip report generation for specific domains.
268 LIBOPENDMARC: Fix bug #31: Improve From: field parsing. Problem
269 reported by Todd Lyons.
270
271 0.2.2 2012/09/14
272 Fix bug #25: Use locks to co-ordinate between the filter writing
273 to the history file and opendmarc-import consuming it.
274 Problem noted by Marcos Vieira.
275 Don't use dmarcf_dstring_printf() where dmarcf_dstring_cat() suffices.
276 Add Authentication-Results fields honouring AuthservIDWithJobID.
277 Problem noted by Andreas Schulze.
278 Improve logic that identifies usable Authentication-Results fields.
279 Problem noted by Andreas Schulze.
280 REPORTING: Handle multiple "rua" values in both reporting scripts.
281 Problem noted by Andreas Schulze.
282 REPORTING: Get the date range right on reports. Problem noted by
283 Todd Lyons and Andreas Schulze.
284
285 0.2.1 2012/08/31
286 Don't crash during shutdown by accessing freed memory. Problem
287 reported by Todd Lyons.
288 Update the command line usage message, which was terribly outdated.
289 Fix handling of an SPF pass when the envelope doesn't contain a
290 usable domain name.
291 Fix a crash problem having to do with default authserv-ids.
292 Fix an off-by-one string length comparison error when checking for
293 relevant authentication results.
294
295 0.2.0 2012/08/24
296 Feature request #15: If there's no SPF Authentication-Results field,
297 look for a Received-SPF field to get SPF results.
298 Feature request #16: Add "RecordAllMessages" setting to record all
299 messages (the previous default). The new default is to record
300 only those messages whose From: domains had a published
301 DMARC record.
302 Feature request #19: Add "IgnoreMailFrom" setting, allowing mail from
303 specific domains to be ignored.
304 Feature request #20: Allow "AuthservID" to be a comma-separated list
305 of authserv-ids to trust as local. The first one is used
306 in header field generation. Suggested by Andreas Schulze.
307 Fix bug #18: Pass the absence of a "rua" field in a DMARC record
308 to the history file and into the "requests" table.
309 Prevent crashes when parsing horribly malformed From: fields.
310 Problem noted by Todd Lyons.
311 Don't apply a default IgnoreHosts list in test mode. Problem noted
312 by Marcos Vieira.
313 Don't expire request records for stuff that's never been generated
314 yet. Problem noted by Todd Lyons.
315 Register the filter with SMFIF_ADDHDRS not SMFIF_CHGHDRS. Problem
316 noted by Todd Lyons.
317 Fix bounds checking in dmarcf_dstring_printf(). Problem noted by
318 Marcos Vieira.
319 Arrays created in-place from strings don't need to have their elements
320 freed. Problem noted by Andreas Schulze.
321 BUILD: Install non-user scripts under sbin instead of bin. Problem
322 noted by Andreas Schulze.
323 CONTRIB: Add contrib/init/redhat and contents. Provided by Todd Lyons.
324 CONTRIB: Add contrib/spec and contents. Provided by Todd Lyons.
325 DB: Add some indexes to optimize operations. Suggested by Todd Lyons.
326 LIBOPENDMARC: Fix bug #22: Minimal solution to alignment checks when
327 no public suffix list is provided. Problem noted by
328 Todd Lyons.
329 REPORTING: Feature request #17: Add "opendmarc-params" tool, and
330 tie it to opendmarc-import, so that administrators can force
331 reports for specific domains to go to specific destinations
332 regardless of DMARC record contents.
333 REPORTING: Feature request #21: Add "--test" and "--keepfiles" options
334 to opendmarc-reports. Patch from Todd Lyons.
335 REPORTING: Add opendmarc-importstats.
336 REPORTING: Variable verbose levels in opendmarc-report. Patch from
337 Todd Lyons.
338 TOOLS: Feature request #14: Add "openmarc-check" command line tool for
339 translating DMARC records found in the DNS.
340
341 0.1.8 2012/07/30
342 Fix Linux build issue.
343 REPORTING: Patch #13: Have report generation use SMTP directly.
344 Patch from Andreas Schulze.
345
346 0.1.7 2012/07/26
347 Fix bug #5: Add "IgnoreHosts" setting.
348 Fix bug #9: Honour "pct" setting (or its default).
349 REPORTING: Fix bug #6: Add opendmarc-expire script.
350 LIBOPENDMARC: Fix bug #7: Chase down CNAMEs if the resolver doesn't
351 do it for you. Problem noted by Tim Draegen.
352 LIBOPENDMARC: Fix bug #10: When DKIM is in alignment, don't
353 short-circuit past SPF alignment tests. Problem noted by
354 Mike Adkins and Steve Jones.
355 LIBOPENDMARC: Fix bug #12: Fix a false positive alignment problem
356 in the "relaxed" case.
357 CONTRIB: Add a start/stop script. Contributed by Steve Mays.
358
359 0.1.6 2012/07/20
360 Don't report false passes for SPF. Problem noted by Tim Draegen.
361 When opendmarc_policy_query_dmarc() fails, log the domain that was
362 being checked.
363 LIBOPENDMARC: Return DMARC_POLICY_NONE from
364 opendmarc_get_policy_to_enforce() when "p=none" was found.
365 DMARC_POLICY_PASS is only returned if alignment was discovered.
366 REPORTING: Bug #4: Use report begin/end times based on message
367 timestamps rather than last report's time/current time.
368 Reported by Julian Mehnle.
369
370 0.1.5 2012/07/19
371 Add "Auth-Failure" field to forensic reports.
372 LIBOPENDMARC: Fix a bug in "ri" parsing.
373
374 0.1.4 2012/07/15
375 LIBOPENDMARC: Fix a bug in dmarc_dns_get_record(). Reported by
376 Andreas Schulze.
377 LIBOPENDMARC: Fix library build for C++ compilers. Reported by
378 Andrew Birchall.
379 DB: Delete domains.lastsent, as it is unused.
380 REPORTING: Fix column name error in opendmarc-reports. Reported
381 by Andreas Schulze.
382 REPORTING: Fix generated aggregate report header. Patch by
383 Andreas Schulze.
384 REPORTING: Call setlocale() in opendmarc-reports. Requested by
385 Andreas Schulze.
386 CONTRIB: Pull down a new version of rddmarc. From John Levine.
387
388 0.1.3 2012/07/14
389 Fix up the MIME syntax in AFRF reports. Patch from Andreas Schulze.
390 Fix bug #2: Remove dmarcf_dkim_select(); logic has been moved into
391 libopendmarc.
392 Fix Authentication-Results field syntax.
393 Don't generate an AFRF report on other than "reject" and "quarantine"
394 results.
395 Fix a test mode crash condition, and initialize a few minor things
396 before entering test mode so AFRFs come out cleaner.
397 Add "ReportCommand" to the valid configuration file item list.
398 Ignore "header.i" when parsing DKIM authentication results. We only
399 care about "header.d".
400 Check for return status of opendmarc_policy_query_dmarc() and do
401 the right thing with it.
402 BUILD: Include the "db" directory.
403 REPORTING: Fix bug #3: Drop XML::Generator and do it by hand, since we
404 need to generate the array of DKIM signature data (there can
405 be more than one) as a sub-query.
406 LIBOPENDMARC: If the From: domain didn't have a DMARC policy and
407 there's no Organizational Domain available, return the
408 correct result code.
409
410 0.1.2 2012/07/11
411 LIBOPENDMARC: Use strlcat()/strlcpy().
412 BUILD: Add -lresolv where needed in more places (libopendmarc unit
413 tests this time). Problem noted by Andreas Schulze.
414 BUILD: Split filter checks and live library checks into different
415 "--enable" flags. Problem noted by Andreas Schulze.
416 BUILD: Actually do something with "--disable-filter". Problem
417 noted by Andrew Birchall.
418
419 0.1.1 2012/07/10
420 LIBOPENDMARC: Add strlcat() and strlcpy() if not provided in libc.
421 Problem noted by Andreas Schulze.
422 REPORTS: Fix generated XML format ("auth_results" is a sibling of
423 "row", not a child of it). Reported by John Levine.
424 BUILD: Add -lresolv where needed. Problem noted by Andreas Schulze.
425 BUILD: Clean up an errant "configure" line. Problem noted by
426 Andreas Schulze.
427
428 0.1.0 2012/07/09
429 Initial Beta release.
0 # generated automatically by aclocal 1.13.2 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
3
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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17 [m4_warning([this file was generated for autoconf 2.69.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23 # serial 1 (pkg-config-0.24)
24 #
25 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26 #
27 # This program is free software; you can redistribute it and/or modify
28 # it under the terms of the GNU General Public License as published by
29 # the Free Software Foundation; either version 2 of the License, or
30 # (at your option) any later version.
31 #
32 # This program is distributed in the hope that it will be useful, but
33 # WITHOUT ANY WARRANTY; without even the implied warranty of
34 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35 # General Public License for more details.
36 #
37 # You should have received a copy of the GNU General Public License
38 # along with this program; if not, write to the Free Software
39 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #
41 # As a special exception to the GNU General Public License, if you
42 # distribute this file as part of a program that contains a
43 # configuration script generated by Autoconf, you may include it under
44 # the same distribution terms that you use for the rest of that program.
45
46 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
47 # ----------------------------------
48 AC_DEFUN([PKG_PROG_PKG_CONFIG],
49 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
50 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
51 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
52 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
53 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
54
55 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
56 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
57 fi
58 if test -n "$PKG_CONFIG"; then
59 _pkg_min_version=m4_default([$1], [0.9.0])
60 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
61 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
62 AC_MSG_RESULT([yes])
63 else
64 AC_MSG_RESULT([no])
65 PKG_CONFIG=""
66 fi
67 fi[]dnl
68 ])# PKG_PROG_PKG_CONFIG
69
70 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
71 #
72 # Check to see whether a particular set of modules exists. Similar
73 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
74 #
75 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
76 # only at the first occurence in configure.ac, so if the first place
77 # it's called might be skipped (such as if it is within an "if", you
78 # have to call PKG_CHECK_EXISTS manually
79 # --------------------------------------------------------------
80 AC_DEFUN([PKG_CHECK_EXISTS],
81 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
82 if test -n "$PKG_CONFIG" && \
83 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
84 m4_default([$2], [:])
85 m4_ifvaln([$3], [else
86 $3])dnl
87 fi])
88
89 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
90 # ---------------------------------------------
91 m4_define([_PKG_CONFIG],
92 [if test -n "$$1"; then
93 pkg_cv_[]$1="$$1"
94 elif test -n "$PKG_CONFIG"; then
95 PKG_CHECK_EXISTS([$3],
96 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
97 [pkg_failed=yes])
98 else
99 pkg_failed=untried
100 fi[]dnl
101 ])# _PKG_CONFIG
102
103 # _PKG_SHORT_ERRORS_SUPPORTED
104 # -----------------------------
105 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
106 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
107 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
108 _pkg_short_errors_supported=yes
109 else
110 _pkg_short_errors_supported=no
111 fi[]dnl
112 ])# _PKG_SHORT_ERRORS_SUPPORTED
113
114
115 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
116 # [ACTION-IF-NOT-FOUND])
117 #
118 #
119 # Note that if there is a possibility the first call to
120 # PKG_CHECK_MODULES might not happen, you should be sure to include an
121 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
122 #
123 #
124 # --------------------------------------------------------------
125 AC_DEFUN([PKG_CHECK_MODULES],
126 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
127 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
128 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
129
130 pkg_failed=no
131 AC_MSG_CHECKING([for $1])
132
133 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
134 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
135
136 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
137 and $1[]_LIBS to avoid the need to call pkg-config.
138 See the pkg-config man page for more details.])
139
140 if test $pkg_failed = yes; then
141 AC_MSG_RESULT([no])
142 _PKG_SHORT_ERRORS_SUPPORTED
143 if test $_pkg_short_errors_supported = yes; then
144 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
145 else
146 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
147 fi
148 # Put the nasty error message in config.log where it belongs
149 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
150
151 m4_default([$4], [AC_MSG_ERROR(
152 [Package requirements ($2) were not met:
153
154 $$1_PKG_ERRORS
155
156 Consider adjusting the PKG_CONFIG_PATH environment variable if you
157 installed software in a non-standard prefix.
158
159 _PKG_TEXT])[]dnl
160 ])
161 elif test $pkg_failed = untried; then
162 AC_MSG_RESULT([no])
163 m4_default([$4], [AC_MSG_FAILURE(
164 [The pkg-config script could not be found or is too old. Make sure it
165 is in your PATH or set the PKG_CONFIG environment variable to the full
166 path to pkg-config.
167
168 _PKG_TEXT
169
170 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
171 ])
172 else
173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
175 AC_MSG_RESULT([yes])
176 $3
177 fi[]dnl
178 ])# PKG_CHECK_MODULES
179
180 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
181 #
182 # This file is free software; the Free Software Foundation
183 # gives unlimited permission to copy and/or distribute it,
184 # with or without modifications, as long as this notice is preserved.
185
186 # AM_AUTOMAKE_VERSION(VERSION)
187 # ----------------------------
188 # Automake X.Y traces this macro to ensure aclocal.m4 has been
189 # generated from the m4 files accompanying Automake X.Y.
190 # (This private macro should not be called outside this file.)
191 AC_DEFUN([AM_AUTOMAKE_VERSION],
192 [am__api_version='1.13'
193 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
194 dnl require some minimum version. Point them to the right macro.
195 m4_if([$1], [1.13.2], [],
196 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
197 ])
198
199 # _AM_AUTOCONF_VERSION(VERSION)
200 # -----------------------------
201 # aclocal traces this macro to find the Autoconf version.
202 # This is a private macro too. Using m4_define simplifies
203 # the logic in aclocal, which can simply ignore this definition.
204 m4_define([_AM_AUTOCONF_VERSION], [])
205
206 # AM_SET_CURRENT_AUTOMAKE_VERSION
207 # -------------------------------
208 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
209 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
210 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
211 [AM_AUTOMAKE_VERSION([1.13.2])dnl
212 m4_ifndef([AC_AUTOCONF_VERSION],
213 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
214 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
215
216 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
217
218 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
219 #
220 # This file is free software; the Free Software Foundation
221 # gives unlimited permission to copy and/or distribute it,
222 # with or without modifications, as long as this notice is preserved.
223
224 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
225 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
226 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
227 #
228 # Of course, Automake must honor this variable whenever it calls a
229 # tool from the auxiliary directory. The problem is that $srcdir (and
230 # therefore $ac_aux_dir as well) can be either absolute or relative,
231 # depending on how configure is run. This is pretty annoying, since
232 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
233 # source directory, any form will work fine, but in subdirectories a
234 # relative path needs to be adjusted first.
235 #
236 # $ac_aux_dir/missing
237 # fails when called from a subdirectory if $ac_aux_dir is relative
238 # $top_srcdir/$ac_aux_dir/missing
239 # fails if $ac_aux_dir is absolute,
240 # fails when called from a subdirectory in a VPATH build with
241 # a relative $ac_aux_dir
242 #
243 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
244 # are both prefixed by $srcdir. In an in-source build this is usually
245 # harmless because $srcdir is '.', but things will broke when you
246 # start a VPATH build or use an absolute $srcdir.
247 #
248 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
249 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
250 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
251 # and then we would define $MISSING as
252 # MISSING="\${SHELL} $am_aux_dir/missing"
253 # This will work as long as MISSING is not called from configure, because
254 # unfortunately $(top_srcdir) has no meaning in configure.
255 # However there are other variables, like CC, which are often used in
256 # configure, and could therefore not use this "fixed" $ac_aux_dir.
257 #
258 # Another solution, used here, is to always expand $ac_aux_dir to an
259 # absolute PATH. The drawback is that using absolute paths prevent a
260 # configured tree to be moved without reconfiguration.
261
262 AC_DEFUN([AM_AUX_DIR_EXPAND],
263 [dnl Rely on autoconf to set up CDPATH properly.
264 AC_PREREQ([2.50])dnl
265 # expand $ac_aux_dir to an absolute path
266 am_aux_dir=`cd $ac_aux_dir && pwd`
267 ])
268
269 # AM_CONDITIONAL -*- Autoconf -*-
270
271 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
272 #
273 # This file is free software; the Free Software Foundation
274 # gives unlimited permission to copy and/or distribute it,
275 # with or without modifications, as long as this notice is preserved.
276
277 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
278 # -------------------------------------
279 # Define a conditional.
280 AC_DEFUN([AM_CONDITIONAL],
281 [AC_PREREQ([2.52])dnl
282 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
283 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
284 AC_SUBST([$1_TRUE])dnl
285 AC_SUBST([$1_FALSE])dnl
286 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
287 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
288 m4_define([_AM_COND_VALUE_$1], [$2])dnl
289 if $2; then
290 $1_TRUE=
291 $1_FALSE='#'
292 else
293 $1_TRUE='#'
294 $1_FALSE=
295 fi
296 AC_CONFIG_COMMANDS_PRE(
297 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
298 AC_MSG_ERROR([[conditional "$1" was never defined.
299 Usually this means the macro was only invoked conditionally.]])
300 fi])])
301
302 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
303 #
304 # This file is free software; the Free Software Foundation
305 # gives unlimited permission to copy and/or distribute it,
306 # with or without modifications, as long as this notice is preserved.
307
308
309 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
310 # written in clear, in which case automake, when reading aclocal.m4,
311 # will think it sees a *use*, and therefore will trigger all it's
312 # C support machinery. Also note that it means that autoscan, seeing
313 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
314
315
316 # _AM_DEPENDENCIES(NAME)
317 # ----------------------
318 # See how the compiler implements dependency checking.
319 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
320 # We try a few techniques and use that to set a single cache variable.
321 #
322 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
323 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
324 # dependency, and given that the user is not expected to run this macro,
325 # just rely on AC_PROG_CC.
326 AC_DEFUN([_AM_DEPENDENCIES],
327 [AC_REQUIRE([AM_SET_DEPDIR])dnl
328 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
329 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
330 AC_REQUIRE([AM_DEP_TRACK])dnl
331
332 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
333 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
334 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
335 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
336 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
337 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
338 [depcc="$$1" am_compiler_list=])
339
340 AC_CACHE_CHECK([dependency style of $depcc],
341 [am_cv_$1_dependencies_compiler_type],
342 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
343 # We make a subdir and do the tests there. Otherwise we can end up
344 # making bogus files that we don't know about and never remove. For
345 # instance it was reported that on HP-UX the gcc test will end up
346 # making a dummy file named 'D' -- because '-MD' means "put the output
347 # in D".
348 rm -rf conftest.dir
349 mkdir conftest.dir
350 # Copy depcomp to subdir because otherwise we won't find it if we're
351 # using a relative directory.
352 cp "$am_depcomp" conftest.dir
353 cd conftest.dir
354 # We will build objects and dependencies in a subdirectory because
355 # it helps to detect inapplicable dependency modes. For instance
356 # both Tru64's cc and ICC support -MD to output dependencies as a
357 # side effect of compilation, but ICC will put the dependencies in
358 # the current directory while Tru64 will put them in the object
359 # directory.
360 mkdir sub
361
362 am_cv_$1_dependencies_compiler_type=none
363 if test "$am_compiler_list" = ""; then
364 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
365 fi
366 am__universal=false
367 m4_case([$1], [CC],
368 [case " $depcc " in #(
369 *\ -arch\ *\ -arch\ *) am__universal=true ;;
370 esac],
371 [CXX],
372 [case " $depcc " in #(
373 *\ -arch\ *\ -arch\ *) am__universal=true ;;
374 esac])
375
376 for depmode in $am_compiler_list; do
377 # Setup a source with many dependencies, because some compilers
378 # like to wrap large dependency lists on column 80 (with \), and
379 # we should not choose a depcomp mode which is confused by this.
380 #
381 # We need to recreate these files for each test, as the compiler may
382 # overwrite some of them when testing with obscure command lines.
383 # This happens at least with the AIX C compiler.
384 : > sub/conftest.c
385 for i in 1 2 3 4 5 6; do
386 echo '#include "conftst'$i'.h"' >> sub/conftest.c
387 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
388 # Solaris 10 /bin/sh.
389 echo '/* dummy */' > sub/conftst$i.h
390 done
391 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
392
393 # We check with '-c' and '-o' for the sake of the "dashmstdout"
394 # mode. It turns out that the SunPro C++ compiler does not properly
395 # handle '-M -o', and we need to detect this. Also, some Intel
396 # versions had trouble with output in subdirs.
397 am__obj=sub/conftest.${OBJEXT-o}
398 am__minus_obj="-o $am__obj"
399 case $depmode in
400 gcc)
401 # This depmode causes a compiler race in universal mode.
402 test "$am__universal" = false || continue
403 ;;
404 nosideeffect)
405 # After this tag, mechanisms are not by side-effect, so they'll
406 # only be used when explicitly requested.
407 if test "x$enable_dependency_tracking" = xyes; then
408 continue
409 else
410 break
411 fi
412 ;;
413 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
414 # This compiler won't grok '-c -o', but also, the minuso test has
415 # not run yet. These depmodes are late enough in the game, and
416 # so weak that their functioning should not be impacted.
417 am__obj=conftest.${OBJEXT-o}
418 am__minus_obj=
419 ;;
420 none) break ;;
421 esac
422 if depmode=$depmode \
423 source=sub/conftest.c object=$am__obj \
424 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
425 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
426 >/dev/null 2>conftest.err &&
427 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
428 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
429 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
430 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
431 # icc doesn't choke on unknown options, it will just issue warnings
432 # or remarks (even with -Werror). So we grep stderr for any message
433 # that says an option was ignored or not supported.
434 # When given -MP, icc 7.0 and 7.1 complain thusly:
435 # icc: Command line warning: ignoring option '-M'; no argument required
436 # The diagnosis changed in icc 8.0:
437 # icc: Command line remark: option '-MP' not supported
438 if (grep 'ignoring option' conftest.err ||
439 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
440 am_cv_$1_dependencies_compiler_type=$depmode
441 break
442 fi
443 fi
444 done
445
446 cd ..
447 rm -rf conftest.dir
448 else
449 am_cv_$1_dependencies_compiler_type=none
450 fi
451 ])
452 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
453 AM_CONDITIONAL([am__fastdep$1], [
454 test "x$enable_dependency_tracking" != xno \
455 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
456 ])
457
458
459 # AM_SET_DEPDIR
460 # -------------
461 # Choose a directory name for dependency files.
462 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
463 AC_DEFUN([AM_SET_DEPDIR],
464 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
465 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
466 ])
467
468
469 # AM_DEP_TRACK
470 # ------------
471 AC_DEFUN([AM_DEP_TRACK],
472 [AC_ARG_ENABLE([dependency-tracking], [dnl
473 AS_HELP_STRING(
474 [--enable-dependency-tracking],
475 [do not reject slow dependency extractors])
476 AS_HELP_STRING(
477 [--disable-dependency-tracking],
478 [speeds up one-time build])])
479 if test "x$enable_dependency_tracking" != xno; then
480 am_depcomp="$ac_aux_dir/depcomp"
481 AMDEPBACKSLASH='\'
482 am__nodep='_no'
483 fi
484 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
485 AC_SUBST([AMDEPBACKSLASH])dnl
486 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
487 AC_SUBST([am__nodep])dnl
488 _AM_SUBST_NOTMAKE([am__nodep])dnl
489 ])
490
491 # Generate code to set up dependency tracking. -*- Autoconf -*-
492
493 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
494 #
495 # This file is free software; the Free Software Foundation
496 # gives unlimited permission to copy and/or distribute it,
497 # with or without modifications, as long as this notice is preserved.
498
499
500 # _AM_OUTPUT_DEPENDENCY_COMMANDS
501 # ------------------------------
502 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
503 [{
504 # Older Autoconf quotes --file arguments for eval, but not when files
505 # are listed without --file. Let's play safe and only enable the eval
506 # if we detect the quoting.
507 case $CONFIG_FILES in
508 *\'*) eval set x "$CONFIG_FILES" ;;
509 *) set x $CONFIG_FILES ;;
510 esac
511 shift
512 for mf
513 do
514 # Strip MF so we end up with the name of the file.
515 mf=`echo "$mf" | sed -e 's/:.*$//'`
516 # Check whether this is an Automake generated Makefile or not.
517 # We used to match only the files named 'Makefile.in', but
518 # some people rename them; so instead we look at the file content.
519 # Grep'ing the first line is not enough: some people post-process
520 # each Makefile.in and add a new line on top of each file to say so.
521 # Grep'ing the whole file is not good either: AIX grep has a line
522 # limit of 2048, but all sed's we know have understand at least 4000.
523 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
524 dirpart=`AS_DIRNAME("$mf")`
525 else
526 continue
527 fi
528 # Extract the definition of DEPDIR, am__include, and am__quote
529 # from the Makefile without running 'make'.
530 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
531 test -z "$DEPDIR" && continue
532 am__include=`sed -n 's/^am__include = //p' < "$mf"`
533 test -z "$am__include" && continue
534 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
535 # Find all dependency output files, they are included files with
536 # $(DEPDIR) in their names. We invoke sed twice because it is the
537 # simplest approach to changing $(DEPDIR) to its actual value in the
538 # expansion.
539 for file in `sed -n "
540 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
541 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
542 # Make sure the directory exists.
543 test -f "$dirpart/$file" && continue
544 fdir=`AS_DIRNAME(["$file"])`
545 AS_MKDIR_P([$dirpart/$fdir])
546 # echo "creating $dirpart/$file"
547 echo '# dummy' > "$dirpart/$file"
548 done
549 done
550 }
551 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
552
553
554 # AM_OUTPUT_DEPENDENCY_COMMANDS
555 # -----------------------------
556 # This macro should only be invoked once -- use via AC_REQUIRE.
557 #
558 # This code is only required when automatic dependency tracking
559 # is enabled. FIXME. This creates each '.P' file that we will
560 # need in order to bootstrap the dependency handling code.
561 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
562 [AC_CONFIG_COMMANDS([depfiles],
563 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
564 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
565 ])
566
567 # Do all the work for Automake. -*- Autoconf -*-
568
569 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
570 #
571 # This file is free software; the Free Software Foundation
572 # gives unlimited permission to copy and/or distribute it,
573 # with or without modifications, as long as this notice is preserved.
574
575 # This macro actually does too much. Some checks are only needed if
576 # your package does certain things. But this isn't really a big deal.
577
578 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
579 # AM_INIT_AUTOMAKE([OPTIONS])
580 # -----------------------------------------------
581 # The call with PACKAGE and VERSION arguments is the old style
582 # call (pre autoconf-2.50), which is being phased out. PACKAGE
583 # and VERSION should now be passed to AC_INIT and removed from
584 # the call to AM_INIT_AUTOMAKE.
585 # We support both call styles for the transition. After
586 # the next Automake release, Autoconf can make the AC_INIT
587 # arguments mandatory, and then we can depend on a new Autoconf
588 # release and drop the old call support.
589 AC_DEFUN([AM_INIT_AUTOMAKE],
590 [AC_PREREQ([2.65])dnl
591 dnl Autoconf wants to disallow AM_ names. We explicitly allow
592 dnl the ones we care about.
593 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
594 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
595 AC_REQUIRE([AC_PROG_INSTALL])dnl
596 if test "`cd $srcdir && pwd`" != "`pwd`"; then
597 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
598 # is not polluted with repeated "-I."
599 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
600 # test to see if srcdir already configured
601 if test -f $srcdir/config.status; then
602 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
603 fi
604 fi
605
606 # test whether we have cygpath
607 if test -z "$CYGPATH_W"; then
608 if (cygpath --version) >/dev/null 2>/dev/null; then
609 CYGPATH_W='cygpath -w'
610 else
611 CYGPATH_W=echo
612 fi
613 fi
614 AC_SUBST([CYGPATH_W])
615
616 # Define the identity of the package.
617 dnl Distinguish between old-style and new-style calls.
618 m4_ifval([$2],
619 [AC_DIAGNOSE([obsolete],
620 [$0: two- and three-arguments forms are deprecated.])
621 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
622 AC_SUBST([PACKAGE], [$1])dnl
623 AC_SUBST([VERSION], [$2])],
624 [_AM_SET_OPTIONS([$1])dnl
625 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
626 m4_if(
627 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
628 [ok:ok],,
629 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
630 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
631 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
632
633 _AM_IF_OPTION([no-define],,
634 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
635 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
636
637 # Some tools Automake needs.
638 AC_REQUIRE([AM_SANITY_CHECK])dnl
639 AC_REQUIRE([AC_ARG_PROGRAM])dnl
640 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
641 AM_MISSING_PROG([AUTOCONF], [autoconf])
642 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
643 AM_MISSING_PROG([AUTOHEADER], [autoheader])
644 AM_MISSING_PROG([MAKEINFO], [makeinfo])
645 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
646 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
647 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
648 # For better backward compatibility. To be removed once Automake 1.9.x
649 # dies out for good. For more background, see:
650 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
651 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
652 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
653 # We need awk for the "check" target. The system "awk" is bad on
654 # some platforms.
655 AC_REQUIRE([AC_PROG_AWK])dnl
656 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
657 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
658 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
659 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
660 [_AM_PROG_TAR([v7])])])
661 _AM_IF_OPTION([no-dependencies],,
662 [AC_PROVIDE_IFELSE([AC_PROG_CC],
663 [_AM_DEPENDENCIES([CC])],
664 [m4_define([AC_PROG_CC],
665 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
666 AC_PROVIDE_IFELSE([AC_PROG_CXX],
667 [_AM_DEPENDENCIES([CXX])],
668 [m4_define([AC_PROG_CXX],
669 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
670 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
671 [_AM_DEPENDENCIES([OBJC])],
672 [m4_define([AC_PROG_OBJC],
673 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
674 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
675 [_AM_DEPENDENCIES([OBJCXX])],
676 [m4_define([AC_PROG_OBJCXX],
677 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
678 ])
679 AC_REQUIRE([AM_SILENT_RULES])dnl
680 dnl The testsuite driver may need to know about EXEEXT, so add the
681 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
682 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
683 AC_CONFIG_COMMANDS_PRE(dnl
684 [m4_provide_if([_AM_COMPILER_EXEEXT],
685 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
686 ])
687
688 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
689 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
690 dnl mangled by Autoconf and run in a shell conditional statement.
691 m4_define([_AC_COMPILER_EXEEXT],
692 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
693
694
695 # When config.status generates a header, we must update the stamp-h file.
696 # This file resides in the same directory as the config header
697 # that is generated. The stamp files are numbered to have different names.
698
699 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
700 # loop where config.status creates the headers, so we can generate
701 # our stamp files there.
702 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
703 [# Compute $1's index in $config_headers.
704 _am_arg=$1
705 _am_stamp_count=1
706 for _am_header in $config_headers :; do
707 case $_am_header in
708 $_am_arg | $_am_arg:* )
709 break ;;
710 * )
711 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
712 esac
713 done
714 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
715
716 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
717 #
718 # This file is free software; the Free Software Foundation
719 # gives unlimited permission to copy and/or distribute it,
720 # with or without modifications, as long as this notice is preserved.
721
722 # AM_PROG_INSTALL_SH
723 # ------------------
724 # Define $install_sh.
725 AC_DEFUN([AM_PROG_INSTALL_SH],
726 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
727 if test x"${install_sh}" != xset; then
728 case $am_aux_dir in
729 *\ * | *\ *)
730 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
731 *)
732 install_sh="\${SHELL} $am_aux_dir/install-sh"
733 esac
734 fi
735 AC_SUBST([install_sh])])
736
737 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
738 #
739 # This file is free software; the Free Software Foundation
740 # gives unlimited permission to copy and/or distribute it,
741 # with or without modifications, as long as this notice is preserved.
742
743 # Check whether the underlying file-system supports filenames
744 # with a leading dot. For instance MS-DOS doesn't.
745 AC_DEFUN([AM_SET_LEADING_DOT],
746 [rm -rf .tst 2>/dev/null
747 mkdir .tst 2>/dev/null
748 if test -d .tst; then
749 am__leading_dot=.
750 else
751 am__leading_dot=_
752 fi
753 rmdir .tst 2>/dev/null
754 AC_SUBST([am__leading_dot])])
755
756 # Check to see how 'make' treats includes. -*- Autoconf -*-
757
758 # Copyright (C) 2001-2013 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 # AM_MAKE_INCLUDE()
765 # -----------------
766 # Check to see how make treats includes.
767 AC_DEFUN([AM_MAKE_INCLUDE],
768 [am_make=${MAKE-make}
769 cat > confinc << 'END'
770 am__doit:
771 @echo this is the am__doit target
772 .PHONY: am__doit
773 END
774 # If we don't find an include directive, just comment out the code.
775 AC_MSG_CHECKING([for style of include used by $am_make])
776 am__include="#"
777 am__quote=
778 _am_result=none
779 # First try GNU make style include.
780 echo "include confinc" > confmf
781 # Ignore all kinds of additional output from 'make'.
782 case `$am_make -s -f confmf 2> /dev/null` in #(
783 *the\ am__doit\ target*)
784 am__include=include
785 am__quote=
786 _am_result=GNU
787 ;;
788 esac
789 # Now try BSD make style include.
790 if test "$am__include" = "#"; then
791 echo '.include "confinc"' > confmf
792 case `$am_make -s -f confmf 2> /dev/null` in #(
793 *the\ am__doit\ target*)
794 am__include=.include
795 am__quote="\""
796 _am_result=BSD
797 ;;
798 esac
799 fi
800 AC_SUBST([am__include])
801 AC_SUBST([am__quote])
802 AC_MSG_RESULT([$_am_result])
803 rm -f confinc confmf
804 ])
805
806 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
807 #
808 # This file is free software; the Free Software Foundation
809 # gives unlimited permission to copy and/or distribute it,
810 # with or without modifications, as long as this notice is preserved.
811
812 # AM_PROG_CC_C_O
813 # --------------
814 # Like AC_PROG_CC_C_O, but changed for automake.
815 AC_DEFUN([AM_PROG_CC_C_O],
816 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
817 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
818 AC_REQUIRE_AUX_FILE([compile])dnl
819 # FIXME: we rely on the cache variable name because
820 # there is no other way.
821 set dummy $CC
822 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
823 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
824 if test "$am_t" != yes; then
825 # Losing compiler, so override with the script.
826 # FIXME: It is wrong to rewrite CC.
827 # But if we don't then we get into trouble of one sort or another.
828 # A longer-term fix would be to have automake use am__CC in this case,
829 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
830 CC="$am_aux_dir/compile $CC"
831 fi
832 dnl Make sure AC_PROG_CC is never called again, or it will override our
833 dnl setting of CC.
834 m4_define([AC_PROG_CC],
835 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
836 ])
837
838 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
839
840 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
841 #
842 # This file is free software; the Free Software Foundation
843 # gives unlimited permission to copy and/or distribute it,
844 # with or without modifications, as long as this notice is preserved.
845
846 # AM_MISSING_PROG(NAME, PROGRAM)
847 # ------------------------------
848 AC_DEFUN([AM_MISSING_PROG],
849 [AC_REQUIRE([AM_MISSING_HAS_RUN])
850 $1=${$1-"${am_missing_run}$2"}
851 AC_SUBST($1)])
852
853 # AM_MISSING_HAS_RUN
854 # ------------------
855 # Define MISSING if not defined so far and test if it is modern enough.
856 # If it is, set am_missing_run to use it, otherwise, to nothing.
857 AC_DEFUN([AM_MISSING_HAS_RUN],
858 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
859 AC_REQUIRE_AUX_FILE([missing])dnl
860 if test x"${MISSING+set}" != xset; then
861 case $am_aux_dir in
862 *\ * | *\ *)
863 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
864 *)
865 MISSING="\${SHELL} $am_aux_dir/missing" ;;
866 esac
867 fi
868 # Use eval to expand $SHELL
869 if eval "$MISSING --is-lightweight"; then
870 am_missing_run="$MISSING "
871 else
872 am_missing_run=
873 AC_MSG_WARN(['missing' script is too old or missing])
874 fi
875 ])
876
877 # Helper functions for option handling. -*- Autoconf -*-
878
879 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
880 #
881 # This file is free software; the Free Software Foundation
882 # gives unlimited permission to copy and/or distribute it,
883 # with or without modifications, as long as this notice is preserved.
884
885 # _AM_MANGLE_OPTION(NAME)
886 # -----------------------
887 AC_DEFUN([_AM_MANGLE_OPTION],
888 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
889
890 # _AM_SET_OPTION(NAME)
891 # --------------------
892 # Set option NAME. Presently that only means defining a flag for this option.
893 AC_DEFUN([_AM_SET_OPTION],
894 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
895
896 # _AM_SET_OPTIONS(OPTIONS)
897 # ------------------------
898 # OPTIONS is a space-separated list of Automake options.
899 AC_DEFUN([_AM_SET_OPTIONS],
900 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
901
902 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
903 # -------------------------------------------
904 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
905 AC_DEFUN([_AM_IF_OPTION],
906 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
907
908 # Check to make sure that the build environment is sane. -*- Autoconf -*-
909
910 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
911 #
912 # This file is free software; the Free Software Foundation
913 # gives unlimited permission to copy and/or distribute it,
914 # with or without modifications, as long as this notice is preserved.
915
916 # AM_SANITY_CHECK
917 # ---------------
918 AC_DEFUN([AM_SANITY_CHECK],
919 [AC_MSG_CHECKING([whether build environment is sane])
920 # Reject unsafe characters in $srcdir or the absolute working directory
921 # name. Accept space and tab only in the latter.
922 am_lf='
923 '
924 case `pwd` in
925 *[[\\\"\#\$\&\'\`$am_lf]]*)
926 AC_MSG_ERROR([unsafe absolute working directory name]);;
927 esac
928 case $srcdir in
929 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
930 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
931 esac
932
933 # Do 'set' in a subshell so we don't clobber the current shell's
934 # arguments. Must try -L first in case configure is actually a
935 # symlink; some systems play weird games with the mod time of symlinks
936 # (eg FreeBSD returns the mod time of the symlink's containing
937 # directory).
938 if (
939 am_has_slept=no
940 for am_try in 1 2; do
941 echo "timestamp, slept: $am_has_slept" > conftest.file
942 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
943 if test "$[*]" = "X"; then
944 # -L didn't work.
945 set X `ls -t "$srcdir/configure" conftest.file`
946 fi
947 if test "$[*]" != "X $srcdir/configure conftest.file" \
948 && test "$[*]" != "X conftest.file $srcdir/configure"; then
949
950 # If neither matched, then we have a broken ls. This can happen
951 # if, for instance, CONFIG_SHELL is bash and it inherits a
952 # broken ls alias from the environment. This has actually
953 # happened. Such a system could not be considered "sane".
954 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
955 alias in your environment])
956 fi
957 if test "$[2]" = conftest.file || test $am_try -eq 2; then
958 break
959 fi
960 # Just in case.
961 sleep 1
962 am_has_slept=yes
963 done
964 test "$[2]" = conftest.file
965 )
966 then
967 # Ok.
968 :
969 else
970 AC_MSG_ERROR([newly created file is older than distributed files!
971 Check your system clock])
972 fi
973 AC_MSG_RESULT([yes])
974 # If we didn't sleep, we still need to ensure time stamps of config.status and
975 # generated files are strictly newer.
976 am_sleep_pid=
977 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
978 ( sleep 1 ) &
979 am_sleep_pid=$!
980 fi
981 AC_CONFIG_COMMANDS_PRE(
982 [AC_MSG_CHECKING([that generated files are newer than configure])
983 if test -n "$am_sleep_pid"; then
984 # Hide warnings about reused PIDs.
985 wait $am_sleep_pid 2>/dev/null
986 fi
987 AC_MSG_RESULT([done])])
988 rm -f conftest.file
989 ])
990
991 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
992 #
993 # This file is free software; the Free Software Foundation
994 # gives unlimited permission to copy and/or distribute it,
995 # with or without modifications, as long as this notice is preserved.
996
997 # AM_SILENT_RULES([DEFAULT])
998 # --------------------------
999 # Enable less verbose build rules; with the default set to DEFAULT
1000 # ("yes" being less verbose, "no" or empty being verbose).
1001 AC_DEFUN([AM_SILENT_RULES],
1002 [AC_ARG_ENABLE([silent-rules], [dnl
1003 AS_HELP_STRING(
1004 [--enable-silent-rules],
1005 [less verbose build output (undo: "make V=1")])
1006 AS_HELP_STRING(
1007 [--disable-silent-rules],
1008 [verbose build output (undo: "make V=0")])dnl
1009 ])
1010 case $enable_silent_rules in @%:@ (((
1011 yes) AM_DEFAULT_VERBOSITY=0;;
1012 no) AM_DEFAULT_VERBOSITY=1;;
1013 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1014 esac
1015 dnl
1016 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1017 dnl do not support nested variable expansions.
1018 dnl See automake bug#9928 and bug#10237.
1019 am_make=${MAKE-make}
1020 AC_CACHE_CHECK([whether $am_make supports nested variables],
1021 [am_cv_make_support_nested_variables],
1022 [if AS_ECHO([['TRUE=$(BAR$(V))
1023 BAR0=false
1024 BAR1=true
1025 V=1
1026 am__doit:
1027 @$(TRUE)
1028 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1029 am_cv_make_support_nested_variables=yes
1030 else
1031 am_cv_make_support_nested_variables=no
1032 fi])
1033 if test $am_cv_make_support_nested_variables = yes; then
1034 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1035 AM_V='$(V)'
1036 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1037 else
1038 AM_V=$AM_DEFAULT_VERBOSITY
1039 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1040 fi
1041 AC_SUBST([AM_V])dnl
1042 AM_SUBST_NOTMAKE([AM_V])dnl
1043 AC_SUBST([AM_DEFAULT_V])dnl
1044 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1045 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1046 AM_BACKSLASH='\'
1047 AC_SUBST([AM_BACKSLASH])dnl
1048 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1049 ])
1050
1051 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1052 #
1053 # This file is free software; the Free Software Foundation
1054 # gives unlimited permission to copy and/or distribute it,
1055 # with or without modifications, as long as this notice is preserved.
1056
1057 # AM_PROG_INSTALL_STRIP
1058 # ---------------------
1059 # One issue with vendor 'install' (even GNU) is that you can't
1060 # specify the program used to strip binaries. This is especially
1061 # annoying in cross-compiling environments, where the build's strip
1062 # is unlikely to handle the host's binaries.
1063 # Fortunately install-sh will honor a STRIPPROG variable, so we
1064 # always use install-sh in "make install-strip", and initialize
1065 # STRIPPROG with the value of the STRIP variable (set by the user).
1066 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1067 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1068 # Installed binaries are usually stripped using 'strip' when the user
1069 # run "make install-strip". However 'strip' might not be the right
1070 # tool to use in cross-compilation environments, therefore Automake
1071 # will honor the 'STRIP' environment variable to overrule this program.
1072 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1073 if test "$cross_compiling" != no; then
1074 AC_CHECK_TOOL([STRIP], [strip], :)
1075 fi
1076 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1077 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1078
1079 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1080 #
1081 # This file is free software; the Free Software Foundation
1082 # gives unlimited permission to copy and/or distribute it,
1083 # with or without modifications, as long as this notice is preserved.
1084
1085 # _AM_SUBST_NOTMAKE(VARIABLE)
1086 # ---------------------------
1087 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1088 # This macro is traced by Automake.
1089 AC_DEFUN([_AM_SUBST_NOTMAKE])
1090
1091 # AM_SUBST_NOTMAKE(VARIABLE)
1092 # --------------------------
1093 # Public sister of _AM_SUBST_NOTMAKE.
1094 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1095
1096 # Check how to create a tarball. -*- Autoconf -*-
1097
1098 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1099 #
1100 # This file is free software; the Free Software Foundation
1101 # gives unlimited permission to copy and/or distribute it,
1102 # with or without modifications, as long as this notice is preserved.
1103
1104 # _AM_PROG_TAR(FORMAT)
1105 # --------------------
1106 # Check how to create a tarball in format FORMAT.
1107 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1108 #
1109 # Substitute a variable $(am__tar) that is a command
1110 # writing to stdout a FORMAT-tarball containing the directory
1111 # $tardir.
1112 # tardir=directory && $(am__tar) > result.tar
1113 #
1114 # Substitute a variable $(am__untar) that extract such
1115 # a tarball read from stdin.
1116 # $(am__untar) < result.tar
1117 #
1118 AC_DEFUN([_AM_PROG_TAR],
1119 [# Always define AMTAR for backward compatibility. Yes, it's still used
1120 # in the wild :-( We should find a proper way to deprecate it ...
1121 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1122
1123 # We'll loop over all known methods to create a tar archive until one works.
1124 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1125
1126 m4_if([$1], [v7],
1127 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1128
1129 [m4_case([$1],
1130 [ustar],
1131 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1132 # There is notably a 21 bits limit for the UID and the GID. In fact,
1133 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1134 # and bug#13588).
1135 am_max_uid=2097151 # 2^21 - 1
1136 am_max_gid=$am_max_uid
1137 # The $UID and $GID variables are not portable, so we need to resort
1138 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1139 # below are definitely unexpected, so allow the users to see them
1140 # (that is, avoid stderr redirection).
1141 am_uid=`id -u || echo unknown`
1142 am_gid=`id -g || echo unknown`
1143 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1144 if test $am_uid -le $am_max_uid; then
1145 AC_MSG_RESULT([yes])
1146 else
1147 AC_MSG_RESULT([no])
1148 _am_tools=none
1149 fi
1150 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1151 if test $am_gid -le $am_max_gid; then
1152 AC_MSG_RESULT([yes])
1153 else
1154 AC_MSG_RESULT([no])
1155 _am_tools=none
1156 fi],
1157
1158 [pax],
1159 [],
1160
1161 [m4_fatal([Unknown tar format])])
1162
1163 AC_MSG_CHECKING([how to create a $1 tar archive])
1164
1165 # Go ahead even if we have the value already cached. We do so because we
1166 # need to set the values for the 'am__tar' and 'am__untar' variables.
1167 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1168
1169 for _am_tool in $_am_tools; do
1170 case $_am_tool in
1171 gnutar)
1172 for _am_tar in tar gnutar gtar; do
1173 AM_RUN_LOG([$_am_tar --version]) && break
1174 done
1175 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1176 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1177 am__untar="$_am_tar -xf -"
1178 ;;
1179 plaintar)
1180 # Must skip GNU tar: if it does not support --format= it doesn't create
1181 # ustar tarball either.
1182 (tar --version) >/dev/null 2>&1 && continue
1183 am__tar='tar chf - "$$tardir"'
1184 am__tar_='tar chf - "$tardir"'
1185 am__untar='tar xf -'
1186 ;;
1187 pax)
1188 am__tar='pax -L -x $1 -w "$$tardir"'
1189 am__tar_='pax -L -x $1 -w "$tardir"'
1190 am__untar='pax -r'
1191 ;;
1192 cpio)
1193 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1194 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1195 am__untar='cpio -i -H $1 -d'
1196 ;;
1197 none)
1198 am__tar=false
1199 am__tar_=false
1200 am__untar=false
1201 ;;
1202 esac
1203
1204 # If the value was cached, stop now. We just wanted to have am__tar
1205 # and am__untar set.
1206 test -n "${am_cv_prog_tar_$1}" && break
1207
1208 # tar/untar a dummy directory, and stop if the command works.
1209 rm -rf conftest.dir
1210 mkdir conftest.dir
1211 echo GrepMe > conftest.dir/file
1212 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1213 rm -rf conftest.dir
1214 if test -s conftest.tar; then
1215 AM_RUN_LOG([$am__untar <conftest.tar])
1216 AM_RUN_LOG([cat conftest.dir/file])
1217 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1218 fi
1219 done
1220 rm -rf conftest.dir
1221
1222 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1223 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1224
1225 AC_SUBST([am__tar])
1226 AC_SUBST([am__untar])
1227 ]) # _AM_PROG_TAR
1228
1229 m4_include([m4/ac_pthread.m4])
1230 m4_include([m4/libtool.m4])
1231 m4_include([m4/ltoptions.m4])
1232 m4_include([m4/ltsugar.m4])
1233 m4_include([m4/ltversion.m4])
1234 m4_include([m4/lt~obsolete.m4])
0 $Id: README,v 1.1 2009/11/23 05:47:01 cm-msk Exp $
1
2 This directory is a placeholder for scripts generated during or required
3 by the build process.
0 #! /bin/sh
1 # Wrapper for compilers which do not understand `-c -o'.
2
3 scriptversion=2009-10-06.20; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
6 # Foundation, Inc.
7 # Written by Tom Tromey <tromey@cygnus.com>.
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26
27 # This file is maintained in Automake, please report
28 # bugs to <bug-automake@gnu.org> or send patches to
29 # <automake-patches@gnu.org>.
30
31 case $1 in
32 '')
33 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
34 exit 1;
35 ;;
36 -h | --h*)
37 cat <<\EOF
38 Usage: compile [--help] [--version] PROGRAM [ARGS]
39
40 Wrapper for compilers which do not understand `-c -o'.
41 Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
42 arguments, and rename the output as expected.
43
44 If you are trying to build a whole package this is not the
45 right script to run: please start by reading the file `INSTALL'.
46
47 Report bugs to <bug-automake@gnu.org>.
48 EOF
49 exit $?
50 ;;
51 -v | --v*)
52 echo "compile $scriptversion"
53 exit $?
54 ;;
55 esac
56
57 ofile=
58 cfile=
59 eat=
60
61 for arg
62 do
63 if test -n "$eat"; then
64 eat=
65 else
66 case $1 in
67 -o)
68 # configure might choose to run compile as `compile cc -o foo foo.c'.
69 # So we strip `-o arg' only if arg is an object.
70 eat=1
71 case $2 in
72 *.o | *.obj)
73 ofile=$2
74 ;;
75 *)
76 set x "$@" -o "$2"
77 shift
78 ;;
79 esac
80 ;;
81 *.c)
82 cfile=$1
83 set x "$@" "$1"
84 shift
85 ;;
86 *)
87 set x "$@" "$1"
88 shift
89 ;;
90 esac
91 fi
92 shift
93 done
94
95 if test -z "$ofile" || test -z "$cfile"; then
96 # If no `-o' option was seen then we might have been invoked from a
97 # pattern rule where we don't need one. That is ok -- this is a
98 # normal compilation that the losing compiler can handle. If no
99 # `.c' file was seen then we are probably linking. That is also
100 # ok.
101 exec "$@"
102 fi
103
104 # Name of file we expect compiler to create.
105 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
106
107 # Create the lock directory.
108 # Note: use `[/\\:.-]' here to ensure that we don't use the same name
109 # that we are using for the .o file. Also, base the name on the expected
110 # object file name, since that is what matters with a parallel build.
111 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
112 while true; do
113 if mkdir "$lockdir" >/dev/null 2>&1; then
114 break
115 fi
116 sleep 1
117 done
118 # FIXME: race condition here if user kills between mkdir and trap.
119 trap "rmdir '$lockdir'; exit 1" 1 2 15
120
121 # Run the compile.
122 "$@"
123 ret=$?
124
125 if test -f "$cofile"; then
126 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
127 elif test -f "${cofile}bj"; then
128 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
129 fi
130
131 rmdir "$lockdir"
132 exit $ret
133
134 # Local Variables:
135 # mode: shell-script
136 # sh-indentation: 2
137 # eval: (add-hook 'write-file-hooks 'time-stamp)
138 # time-stamp-start: "scriptversion="
139 # time-stamp-format: "%:y-%02m-%02d.%02H"
140 # time-stamp-time-zone: "UTC"
141 # time-stamp-end: "; # UTC"
142 # End:
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 Free Software Foundation, Inc.
4
5 timestamp='2003-07-02'
6
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # Originally written by Per Bothner <per@bothner.com>.
27 # Please send patches to <config-patches@gnu.org>. Submit a context
28 # diff and a properly formatted ChangeLog entry.
29 #
30 # This script attempts to guess a canonical system name similar to
31 # config.sub. If it succeeds, it prints the system name on stdout, and
32 # exits with 0. Otherwise, it exits with 1.
33 #
34 # The plan is that this can be called by configure scripts if you
35 # don't specify an explicit build system type.
36
37 me=`echo "$0" | sed -e 's,.*/,,'`
38
39 usage="\
40 Usage: $0 [OPTION]
41
42 Output the configuration name of the system \`$me' is run on.
43
44 Operation modes:
45 -h, --help print this help, then exit
46 -t, --time-stamp print date of last modification, then exit
47 -v, --version print version number, then exit
48
49 Report bugs and patches to <config-patches@gnu.org>."
50
51 version="\
52 GNU config.guess ($timestamp)
53
54 Originally written by Per Bothner.
55 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
56 Free Software Foundation, Inc.
57
58 This is free software; see the source for copying conditions. There is NO
59 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
60
61 help="
62 Try \`$me --help' for more information."
63
64 # Parse command line
65 while test $# -gt 0 ; do
66 case $1 in
67 --time-stamp | --time* | -t )
68 echo "$timestamp" ; exit 0 ;;
69 --version | -v )
70 echo "$version" ; exit 0 ;;
71 --help | --h* | -h )
72 echo "$usage"; exit 0 ;;
73 -- ) # Stop option processing
74 shift; break ;;
75 - ) # Use stdin as input.
76 break ;;
77 -* )
78 echo "$me: invalid option $1$help" >&2
79 exit 1 ;;
80 * )
81 break ;;
82 esac
83 done
84
85 if test $# != 0; then
86 echo "$me: too many arguments$help" >&2
87 exit 1
88 fi
89
90 trap 'exit 1' 1 2 15
91
92 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
93 # compiler to aid in system detection is discouraged as it requires
94 # temporary files to be created and, as you can see below, it is a
95 # headache to deal with in a portable fashion.
96
97 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
98 # use `HOST_CC' if defined, but it is deprecated.
99
100 # Portable tmp directory creation inspired by the Autoconf team.
101
102 set_cc_for_build='
103 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
104 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
105 : ${TMPDIR=/tmp} ;
106 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
107 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
108 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
110 dummy=$tmp/dummy ;
111 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
112 case $CC_FOR_BUILD,$HOST_CC,$CC in
113 ,,) echo "int x;" > $dummy.c ;
114 for c in cc gcc c89 c99 ; do
115 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
116 CC_FOR_BUILD="$c"; break ;
117 fi ;
118 done ;
119 if test x"$CC_FOR_BUILD" = x ; then
120 CC_FOR_BUILD=no_compiler_found ;
121 fi
122 ;;
123 ,,*) CC_FOR_BUILD=$CC ;;
124 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
125 esac ;'
126
127 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
128 # (ghazi@noc.rutgers.edu 1994-08-24)
129 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
130 PATH=$PATH:/.attbin ; export PATH
131 fi
132
133 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
134 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
135 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
136 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
137
138 # Note: order is significant - the case branches are not exclusive.
139
140 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
141 *:NetBSD:*:*)
142 # NetBSD (nbsd) targets should (where applicable) match one or
143 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
144 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
145 # switched to ELF, *-*-netbsd* would select the old
146 # object file format. This provides both forward
147 # compatibility and a consistent mechanism for selecting the
148 # object file format.
149 #
150 # Note: NetBSD doesn't particularly care about the vendor
151 # portion of the name. We always set it to "unknown".
152 sysctl="sysctl -n hw.machine_arch"
153 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
154 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
155 case "${UNAME_MACHINE_ARCH}" in
156 armeb) machine=armeb-unknown ;;
157 arm*) machine=arm-unknown ;;
158 sh3el) machine=shl-unknown ;;
159 sh3eb) machine=sh-unknown ;;
160 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
161 esac
162 # The Operating System including object format, if it has switched
163 # to ELF recently, or will in the future.
164 case "${UNAME_MACHINE_ARCH}" in
165 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
166 eval $set_cc_for_build
167 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
168 | grep __ELF__ >/dev/null
169 then
170 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
171 # Return netbsd for either. FIX?
172 os=netbsd
173 else
174 os=netbsdelf
175 fi
176 ;;
177 *)
178 os=netbsd
179 ;;
180 esac
181 # The OS release
182 # Debian GNU/NetBSD machines have a different userland, and
183 # thus, need a distinct triplet. However, they do not need
184 # kernel version information, so it can be replaced with a
185 # suitable tag, in the style of linux-gnu.
186 case "${UNAME_VERSION}" in
187 Debian*)
188 release='-gnu'
189 ;;
190 *)
191 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
192 ;;
193 esac
194 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
195 # contains redundant information, the shorter form:
196 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
197 echo "${machine}-${os}${release}"
198 exit 0 ;;
199 amiga:OpenBSD:*:*)
200 echo m68k-unknown-openbsd${UNAME_RELEASE}
201 exit 0 ;;
202 arc:OpenBSD:*:*)
203 echo mipsel-unknown-openbsd${UNAME_RELEASE}
204 exit 0 ;;
205 hp300:OpenBSD:*:*)
206 echo m68k-unknown-openbsd${UNAME_RELEASE}
207 exit 0 ;;
208 mac68k:OpenBSD:*:*)
209 echo m68k-unknown-openbsd${UNAME_RELEASE}
210 exit 0 ;;
211 macppc:OpenBSD:*:*)
212 echo powerpc-unknown-openbsd${UNAME_RELEASE}
213 exit 0 ;;
214 mvme68k:OpenBSD:*:*)
215 echo m68k-unknown-openbsd${UNAME_RELEASE}
216 exit 0 ;;
217 mvme88k:OpenBSD:*:*)
218 echo m88k-unknown-openbsd${UNAME_RELEASE}
219 exit 0 ;;
220 mvmeppc:OpenBSD:*:*)
221 echo powerpc-unknown-openbsd${UNAME_RELEASE}
222 exit 0 ;;
223 pmax:OpenBSD:*:*)
224 echo mipsel-unknown-openbsd${UNAME_RELEASE}
225 exit 0 ;;
226 sgi:OpenBSD:*:*)
227 echo mipseb-unknown-openbsd${UNAME_RELEASE}
228 exit 0 ;;
229 sun3:OpenBSD:*:*)
230 echo m68k-unknown-openbsd${UNAME_RELEASE}
231 exit 0 ;;
232 wgrisc:OpenBSD:*:*)
233 echo mipsel-unknown-openbsd${UNAME_RELEASE}
234 exit 0 ;;
235 *:OpenBSD:*:*)
236 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
237 exit 0 ;;
238 alpha:OSF1:*:*)
239 if test $UNAME_RELEASE = "V4.0"; then
240 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
241 fi
242 # According to Compaq, /usr/sbin/psrinfo has been available on
243 # OSF/1 and Tru64 systems produced since 1995. I hope that
244 # covers most systems running today. This code pipes the CPU
245 # types through head -n 1, so we only detect the type of CPU 0.
246 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
247 case "$ALPHA_CPU_TYPE" in
248 "EV4 (21064)")
249 UNAME_MACHINE="alpha" ;;
250 "EV4.5 (21064)")
251 UNAME_MACHINE="alpha" ;;
252 "LCA4 (21066/21068)")
253 UNAME_MACHINE="alpha" ;;
254 "EV5 (21164)")
255 UNAME_MACHINE="alphaev5" ;;
256 "EV5.6 (21164A)")
257 UNAME_MACHINE="alphaev56" ;;
258 "EV5.6 (21164PC)")
259 UNAME_MACHINE="alphapca56" ;;
260 "EV5.7 (21164PC)")
261 UNAME_MACHINE="alphapca57" ;;
262 "EV6 (21264)")
263 UNAME_MACHINE="alphaev6" ;;
264 "EV6.7 (21264A)")
265 UNAME_MACHINE="alphaev67" ;;
266 "EV6.8CB (21264C)")
267 UNAME_MACHINE="alphaev68" ;;
268 "EV6.8AL (21264B)")
269 UNAME_MACHINE="alphaev68" ;;
270 "EV6.8CX (21264D)")
271 UNAME_MACHINE="alphaev68" ;;
272 "EV6.9A (21264/EV69A)")
273 UNAME_MACHINE="alphaev69" ;;
274 "EV7 (21364)")
275 UNAME_MACHINE="alphaev7" ;;
276 "EV7.9 (21364A)")
277 UNAME_MACHINE="alphaev79" ;;
278 esac
279 # A Vn.n version is a released version.
280 # A Tn.n version is a released field test version.
281 # A Xn.n version is an unreleased experimental baselevel.
282 # 1.2 uses "1.2" for uname -r.
283 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
284 exit 0 ;;
285 Alpha*:OpenVMS:*:*)
286 echo alpha-hp-vms
287 exit 0 ;;
288 Alpha\ *:Windows_NT*:*)
289 # How do we know it's Interix rather than the generic POSIX subsystem?
290 # Should we change UNAME_MACHINE based on the output of uname instead
291 # of the specific Alpha model?
292 echo alpha-pc-interix
293 exit 0 ;;
294 21064:Windows_NT:50:3)
295 echo alpha-dec-winnt3.5
296 exit 0 ;;
297 Amiga*:UNIX_System_V:4.0:*)
298 echo m68k-unknown-sysv4
299 exit 0;;
300 *:[Aa]miga[Oo][Ss]:*:*)
301 echo ${UNAME_MACHINE}-unknown-amigaos
302 exit 0 ;;
303 *:[Mm]orph[Oo][Ss]:*:*)
304 echo ${UNAME_MACHINE}-unknown-morphos
305 exit 0 ;;
306 *:OS/390:*:*)
307 echo i370-ibm-openedition
308 exit 0 ;;
309 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
310 echo arm-acorn-riscix${UNAME_RELEASE}
311 exit 0;;
312 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
313 echo hppa1.1-hitachi-hiuxmpp
314 exit 0;;
315 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
316 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
317 if test "`(/bin/universe) 2>/dev/null`" = att ; then
318 echo pyramid-pyramid-sysv3
319 else
320 echo pyramid-pyramid-bsd
321 fi
322 exit 0 ;;
323 NILE*:*:*:dcosx)
324 echo pyramid-pyramid-svr4
325 exit 0 ;;
326 DRS?6000:unix:4.0:6*)
327 echo sparc-icl-nx6
328 exit 0 ;;
329 DRS?6000:UNIX_SV:4.2*:7*)
330 case `/usr/bin/uname -p` in
331 sparc) echo sparc-icl-nx7 && exit 0 ;;
332 esac ;;
333 sun4H:SunOS:5.*:*)
334 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit 0 ;;
336 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
337 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
338 exit 0 ;;
339 i86pc:SunOS:5.*:*)
340 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
341 exit 0 ;;
342 sun4*:SunOS:6*:*)
343 # According to config.sub, this is the proper way to canonicalize
344 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
345 # it's likely to be more like Solaris than SunOS4.
346 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
347 exit 0 ;;
348 sun4*:SunOS:*:*)
349 case "`/usr/bin/arch -k`" in
350 Series*|S4*)
351 UNAME_RELEASE=`uname -v`
352 ;;
353 esac
354 # Japanese Language versions have a version number like `4.1.3-JL'.
355 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
356 exit 0 ;;
357 sun3*:SunOS:*:*)
358 echo m68k-sun-sunos${UNAME_RELEASE}
359 exit 0 ;;
360 sun*:*:4.2BSD:*)
361 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
362 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
363 case "`/bin/arch`" in
364 sun3)
365 echo m68k-sun-sunos${UNAME_RELEASE}
366 ;;
367 sun4)
368 echo sparc-sun-sunos${UNAME_RELEASE}
369 ;;
370 esac
371 exit 0 ;;
372 aushp:SunOS:*:*)
373 echo sparc-auspex-sunos${UNAME_RELEASE}
374 exit 0 ;;
375 # The situation for MiNT is a little confusing. The machine name
376 # can be virtually everything (everything which is not
377 # "atarist" or "atariste" at least should have a processor
378 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
379 # to the lowercase version "mint" (or "freemint"). Finally
380 # the system name "TOS" denotes a system which is actually not
381 # MiNT. But MiNT is downward compatible to TOS, so this should
382 # be no problem.
383 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
384 echo m68k-atari-mint${UNAME_RELEASE}
385 exit 0 ;;
386 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
387 echo m68k-atari-mint${UNAME_RELEASE}
388 exit 0 ;;
389 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
390 echo m68k-atari-mint${UNAME_RELEASE}
391 exit 0 ;;
392 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
393 echo m68k-milan-mint${UNAME_RELEASE}
394 exit 0 ;;
395 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
396 echo m68k-hades-mint${UNAME_RELEASE}
397 exit 0 ;;
398 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
399 echo m68k-unknown-mint${UNAME_RELEASE}
400 exit 0 ;;
401 powerpc:machten:*:*)
402 echo powerpc-apple-machten${UNAME_RELEASE}
403 exit 0 ;;
404 RISC*:Mach:*:*)
405 echo mips-dec-mach_bsd4.3
406 exit 0 ;;
407 RISC*:ULTRIX:*:*)
408 echo mips-dec-ultrix${UNAME_RELEASE}
409 exit 0 ;;
410 VAX*:ULTRIX*:*:*)
411 echo vax-dec-ultrix${UNAME_RELEASE}
412 exit 0 ;;
413 2020:CLIX:*:* | 2430:CLIX:*:*)
414 echo clipper-intergraph-clix${UNAME_RELEASE}
415 exit 0 ;;
416 mips:*:*:UMIPS | mips:*:*:RISCos)
417 eval $set_cc_for_build
418 sed 's/^ //' << EOF >$dummy.c
419 #ifdef __cplusplus
420 #include <stdio.h> /* for printf() prototype */
421 int main (int argc, char *argv[]) {
422 #else
423 int main (argc, argv) int argc; char *argv[]; {
424 #endif
425 #if defined (host_mips) && defined (MIPSEB)
426 #if defined (SYSTYPE_SYSV)
427 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
428 #endif
429 #if defined (SYSTYPE_SVR4)
430 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
431 #endif
432 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
433 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
434 #endif
435 #endif
436 exit (-1);
437 }
438 EOF
439 $CC_FOR_BUILD -o $dummy $dummy.c \
440 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
441 && exit 0
442 echo mips-mips-riscos${UNAME_RELEASE}
443 exit 0 ;;
444 Motorola:PowerMAX_OS:*:*)
445 echo powerpc-motorola-powermax
446 exit 0 ;;
447 Motorola:*:4.3:PL8-*)
448 echo powerpc-harris-powermax
449 exit 0 ;;
450 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
451 echo powerpc-harris-powermax
452 exit 0 ;;
453 Night_Hawk:Power_UNIX:*:*)
454 echo powerpc-harris-powerunix
455 exit 0 ;;
456 m88k:CX/UX:7*:*)
457 echo m88k-harris-cxux7
458 exit 0 ;;
459 m88k:*:4*:R4*)
460 echo m88k-motorola-sysv4
461 exit 0 ;;
462 m88k:*:3*:R3*)
463 echo m88k-motorola-sysv3
464 exit 0 ;;
465 AViiON:dgux:*:*)
466 # DG/UX returns AViiON for all architectures
467 UNAME_PROCESSOR=`/usr/bin/uname -p`
468 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
469 then
470 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
471 [ ${TARGET_BINARY_INTERFACE}x = x ]
472 then
473 echo m88k-dg-dgux${UNAME_RELEASE}
474 else
475 echo m88k-dg-dguxbcs${UNAME_RELEASE}
476 fi
477 else
478 echo i586-dg-dgux${UNAME_RELEASE}
479 fi
480 exit 0 ;;
481 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
482 echo m88k-dolphin-sysv3
483 exit 0 ;;
484 M88*:*:R3*:*)
485 # Delta 88k system running SVR3
486 echo m88k-motorola-sysv3
487 exit 0 ;;
488 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
489 echo m88k-tektronix-sysv3
490 exit 0 ;;
491 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
492 echo m68k-tektronix-bsd
493 exit 0 ;;
494 *:IRIX*:*:*)
495 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
496 exit 0 ;;
497 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
498 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
499 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
500 i*86:AIX:*:*)
501 echo i386-ibm-aix
502 exit 0 ;;
503 ia64:AIX:*:*)
504 if [ -x /usr/bin/oslevel ] ; then
505 IBM_REV=`/usr/bin/oslevel`
506 else
507 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
508 fi
509 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
510 exit 0 ;;
511 *:AIX:2:3)
512 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
513 eval $set_cc_for_build
514 sed 's/^ //' << EOF >$dummy.c
515 #include <sys/systemcfg.h>
516
517 main()
518 {
519 if (!__power_pc())
520 exit(1);
521 puts("powerpc-ibm-aix3.2.5");
522 exit(0);
523 }
524 EOF
525 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
526 echo rs6000-ibm-aix3.2.5
527 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
528 echo rs6000-ibm-aix3.2.4
529 else
530 echo rs6000-ibm-aix3.2
531 fi
532 exit 0 ;;
533 *:AIX:*:[45])
534 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
535 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
536 IBM_ARCH=rs6000
537 else
538 IBM_ARCH=powerpc
539 fi
540 if [ -x /usr/bin/oslevel ] ; then
541 IBM_REV=`/usr/bin/oslevel`
542 else
543 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
544 fi
545 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
546 exit 0 ;;
547 *:AIX:*:*)
548 echo rs6000-ibm-aix
549 exit 0 ;;
550 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
551 echo romp-ibm-bsd4.4
552 exit 0 ;;
553 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
554 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
555 exit 0 ;; # report: romp-ibm BSD 4.3
556 *:BOSX:*:*)
557 echo rs6000-bull-bosx
558 exit 0 ;;
559 DPX/2?00:B.O.S.:*:*)
560 echo m68k-bull-sysv3
561 exit 0 ;;
562 9000/[34]??:4.3bsd:1.*:*)
563 echo m68k-hp-bsd
564 exit 0 ;;
565 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
566 echo m68k-hp-bsd4.4
567 exit 0 ;;
568 9000/[34678]??:HP-UX:*:*)
569 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
570 case "${UNAME_MACHINE}" in
571 9000/31? ) HP_ARCH=m68000 ;;
572 9000/[34]?? ) HP_ARCH=m68k ;;
573 9000/[678][0-9][0-9])
574 if [ -x /usr/bin/getconf ]; then
575 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
576 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
577 case "${sc_cpu_version}" in
578 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
579 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
580 532) # CPU_PA_RISC2_0
581 case "${sc_kernel_bits}" in
582 32) HP_ARCH="hppa2.0n" ;;
583 64) HP_ARCH="hppa2.0w" ;;
584 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
585 esac ;;
586 esac
587 fi
588 if [ "${HP_ARCH}" = "" ]; then
589 eval $set_cc_for_build
590 sed 's/^ //' << EOF >$dummy.c
591
592 #define _HPUX_SOURCE
593 #include <stdlib.h>
594 #include <unistd.h>
595
596 int main ()
597 {
598 #if defined(_SC_KERNEL_BITS)
599 long bits = sysconf(_SC_KERNEL_BITS);
600 #endif
601 long cpu = sysconf (_SC_CPU_VERSION);
602
603 switch (cpu)
604 {
605 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
606 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
607 case CPU_PA_RISC2_0:
608 #if defined(_SC_KERNEL_BITS)
609 switch (bits)
610 {
611 case 64: puts ("hppa2.0w"); break;
612 case 32: puts ("hppa2.0n"); break;
613 default: puts ("hppa2.0"); break;
614 } break;
615 #else /* !defined(_SC_KERNEL_BITS) */
616 puts ("hppa2.0"); break;
617 #endif
618 default: puts ("hppa1.0"); break;
619 }
620 exit (0);
621 }
622 EOF
623 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
624 test -z "$HP_ARCH" && HP_ARCH=hppa
625 fi ;;
626 esac
627 if [ ${HP_ARCH} = "hppa2.0w" ]
628 then
629 # avoid double evaluation of $set_cc_for_build
630 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
631 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
632 then
633 HP_ARCH="hppa2.0w"
634 else
635 HP_ARCH="hppa64"
636 fi
637 fi
638 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
639 exit 0 ;;
640 ia64:HP-UX:*:*)
641 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
642 echo ia64-hp-hpux${HPUX_REV}
643 exit 0 ;;
644 3050*:HI-UX:*:*)
645 eval $set_cc_for_build
646 sed 's/^ //' << EOF >$dummy.c
647 #include <unistd.h>
648 int
649 main ()
650 {
651 long cpu = sysconf (_SC_CPU_VERSION);
652 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
653 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
654 results, however. */
655 if (CPU_IS_PA_RISC (cpu))
656 {
657 switch (cpu)
658 {
659 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
660 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
661 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
662 default: puts ("hppa-hitachi-hiuxwe2"); break;
663 }
664 }
665 else if (CPU_IS_HP_MC68K (cpu))
666 puts ("m68k-hitachi-hiuxwe2");
667 else puts ("unknown-hitachi-hiuxwe2");
668 exit (0);
669 }
670 EOF
671 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
672 echo unknown-hitachi-hiuxwe2
673 exit 0 ;;
674 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
675 echo hppa1.1-hp-bsd
676 exit 0 ;;
677 9000/8??:4.3bsd:*:*)
678 echo hppa1.0-hp-bsd
679 exit 0 ;;
680 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
681 echo hppa1.0-hp-mpeix
682 exit 0 ;;
683 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
684 echo hppa1.1-hp-osf
685 exit 0 ;;
686 hp8??:OSF1:*:*)
687 echo hppa1.0-hp-osf
688 exit 0 ;;
689 i*86:OSF1:*:*)
690 if [ -x /usr/sbin/sysversion ] ; then
691 echo ${UNAME_MACHINE}-unknown-osf1mk
692 else
693 echo ${UNAME_MACHINE}-unknown-osf1
694 fi
695 exit 0 ;;
696 parisc*:Lites*:*:*)
697 echo hppa1.1-hp-lites
698 exit 0 ;;
699 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
700 echo c1-convex-bsd
701 exit 0 ;;
702 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
703 if getsysinfo -f scalar_acc
704 then echo c32-convex-bsd
705 else echo c2-convex-bsd
706 fi
707 exit 0 ;;
708 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
709 echo c34-convex-bsd
710 exit 0 ;;
711 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
712 echo c38-convex-bsd
713 exit 0 ;;
714 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
715 echo c4-convex-bsd
716 exit 0 ;;
717 CRAY*Y-MP:*:*:*)
718 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
719 exit 0 ;;
720 CRAY*[A-Z]90:*:*:*)
721 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
722 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
723 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
724 -e 's/\.[^.]*$/.X/'
725 exit 0 ;;
726 CRAY*TS:*:*:*)
727 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
728 exit 0 ;;
729 CRAY*T3E:*:*:*)
730 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
731 exit 0 ;;
732 CRAY*SV1:*:*:*)
733 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
734 exit 0 ;;
735 *:UNICOS/mp:*:*)
736 echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
737 exit 0 ;;
738 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
739 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
740 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
741 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
742 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
743 exit 0 ;;
744 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
745 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
746 exit 0 ;;
747 sparc*:BSD/OS:*:*)
748 echo sparc-unknown-bsdi${UNAME_RELEASE}
749 exit 0 ;;
750 *:BSD/OS:*:*)
751 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
752 exit 0 ;;
753 *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
754 # Determine whether the default compiler uses glibc.
755 eval $set_cc_for_build
756 sed 's/^ //' << EOF >$dummy.c
757 #include <features.h>
758 #if __GLIBC__ >= 2
759 LIBC=gnu
760 #else
761 LIBC=
762 #endif
763 EOF
764 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
765 # GNU/FreeBSD systems have a "k" prefix to indicate we are using
766 # FreeBSD's kernel, but not the complete OS.
767 case ${LIBC} in gnu) kernel_only='k' ;; esac
768 echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
769 exit 0 ;;
770 i*:CYGWIN*:*)
771 echo ${UNAME_MACHINE}-pc-cygwin
772 exit 0 ;;
773 i*:MINGW*:*)
774 echo ${UNAME_MACHINE}-pc-mingw32
775 exit 0 ;;
776 i*:PW*:*)
777 echo ${UNAME_MACHINE}-pc-pw32
778 exit 0 ;;
779 x86:Interix*:[34]*)
780 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
781 exit 0 ;;
782 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
783 echo i${UNAME_MACHINE}-pc-mks
784 exit 0 ;;
785 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
786 # How do we know it's Interix rather than the generic POSIX subsystem?
787 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
788 # UNAME_MACHINE based on the output of uname instead of i386?
789 echo i586-pc-interix
790 exit 0 ;;
791 i*:UWIN*:*)
792 echo ${UNAME_MACHINE}-pc-uwin
793 exit 0 ;;
794 p*:CYGWIN*:*)
795 echo powerpcle-unknown-cygwin
796 exit 0 ;;
797 prep*:SunOS:5.*:*)
798 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
799 exit 0 ;;
800 *:GNU:*:*)
801 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
802 exit 0 ;;
803 i*86:Minix:*:*)
804 echo ${UNAME_MACHINE}-pc-minix
805 exit 0 ;;
806 arm*:Linux:*:*)
807 echo ${UNAME_MACHINE}-unknown-linux-gnu
808 exit 0 ;;
809 cris:Linux:*:*)
810 echo cris-axis-linux-gnu
811 exit 0 ;;
812 ia64:Linux:*:*)
813 echo ${UNAME_MACHINE}-unknown-linux-gnu
814 exit 0 ;;
815 m68*:Linux:*:*)
816 echo ${UNAME_MACHINE}-unknown-linux-gnu
817 exit 0 ;;
818 mips:Linux:*:*)
819 eval $set_cc_for_build
820 sed 's/^ //' << EOF >$dummy.c
821 #undef CPU
822 #undef mips
823 #undef mipsel
824 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
825 CPU=mipsel
826 #else
827 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
828 CPU=mips
829 #else
830 CPU=
831 #endif
832 #endif
833 EOF
834 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
835 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
836 ;;
837 mips64:Linux:*:*)
838 eval $set_cc_for_build
839 sed 's/^ //' << EOF >$dummy.c
840 #undef CPU
841 #undef mips64
842 #undef mips64el
843 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
844 CPU=mips64el
845 #else
846 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
847 CPU=mips64
848 #else
849 CPU=
850 #endif
851 #endif
852 EOF
853 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
854 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
855 ;;
856 ppc:Linux:*:*)
857 echo powerpc-unknown-linux-gnu
858 exit 0 ;;
859 ppc64:Linux:*:*)
860 echo powerpc64-unknown-linux-gnu
861 exit 0 ;;
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 ld.so.1 >/dev/null
873 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
874 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
875 exit 0 ;;
876 parisc:Linux:*:* | hppa:Linux:*:*)
877 # Look for CPU level
878 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
879 PA7*) echo hppa1.1-unknown-linux-gnu ;;
880 PA8*) echo hppa2.0-unknown-linux-gnu ;;
881 *) echo hppa-unknown-linux-gnu ;;
882 esac
883 exit 0 ;;
884 parisc64:Linux:*:* | hppa64:Linux:*:*)
885 echo hppa64-unknown-linux-gnu
886 exit 0 ;;
887 s390:Linux:*:* | s390x:Linux:*:*)
888 echo ${UNAME_MACHINE}-ibm-linux
889 exit 0 ;;
890 sh64*:Linux:*:*)
891 echo ${UNAME_MACHINE}-unknown-linux-gnu
892 exit 0 ;;
893 sh*:Linux:*:*)
894 echo ${UNAME_MACHINE}-unknown-linux-gnu
895 exit 0 ;;
896 sparc:Linux:*:* | sparc64:Linux:*:*)
897 echo ${UNAME_MACHINE}-unknown-linux-gnu
898 exit 0 ;;
899 x86_64:Linux:*:*)
900 echo x86_64-unknown-linux-gnu
901 exit 0 ;;
902 i*86:Linux:*:*)
903 # The BFD linker knows what the default object file format is, so
904 # first see if it will tell us. cd to the root directory to prevent
905 # problems with other programs or directories called `ld' in the path.
906 # Set LC_ALL=C to ensure ld outputs messages in English.
907 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
908 | sed -ne '/supported targets:/!d
909 s/[ ][ ]*/ /g
910 s/.*supported targets: *//
911 s/ .*//
912 p'`
913 case "$ld_supported_targets" in
914 elf32-i386)
915 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
916 ;;
917 a.out-i386-linux)
918 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
919 exit 0 ;;
920 coff-i386)
921 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
922 exit 0 ;;
923 "")
924 # Either a pre-BFD a.out linker (linux-gnuoldld) or
925 # one that does not give us useful --help.
926 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
927 exit 0 ;;
928 esac
929 # Determine whether the default compiler is a.out or elf
930 eval $set_cc_for_build
931 sed 's/^ //' << EOF >$dummy.c
932 #include <features.h>
933 #ifdef __ELF__
934 # ifdef __GLIBC__
935 # if __GLIBC__ >= 2
936 LIBC=gnu
937 # else
938 LIBC=gnulibc1
939 # endif
940 # else
941 LIBC=gnulibc1
942 # endif
943 #else
944 #ifdef __INTEL_COMPILER
945 LIBC=gnu
946 #else
947 LIBC=gnuaout
948 #endif
949 #endif
950 EOF
951 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
952 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
953 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
954 ;;
955 i*86:DYNIX/ptx:4*:*)
956 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
957 # earlier versions are messed up and put the nodename in both
958 # sysname and nodename.
959 echo i386-sequent-sysv4
960 exit 0 ;;
961 i*86:UNIX_SV:4.2MP:2.*)
962 # Unixware is an offshoot of SVR4, but it has its own version
963 # number series starting with 2...
964 # I am not positive that other SVR4 systems won't match this,
965 # I just have to hope. -- rms.
966 # Use sysv4.2uw... so that sysv4* matches it.
967 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
968 exit 0 ;;
969 i*86:OS/2:*:*)
970 # If we were able to find `uname', then EMX Unix compatibility
971 # is probably installed.
972 echo ${UNAME_MACHINE}-pc-os2-emx
973 exit 0 ;;
974 i*86:XTS-300:*:STOP)
975 echo ${UNAME_MACHINE}-unknown-stop
976 exit 0 ;;
977 i*86:atheos:*:*)
978 echo ${UNAME_MACHINE}-unknown-atheos
979 exit 0 ;;
980 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
981 echo i386-unknown-lynxos${UNAME_RELEASE}
982 exit 0 ;;
983 i*86:*DOS:*:*)
984 echo ${UNAME_MACHINE}-pc-msdosdjgpp
985 exit 0 ;;
986 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
987 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
988 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
989 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
990 else
991 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
992 fi
993 exit 0 ;;
994 i*86:*:5:[78]*)
995 case `/bin/uname -X | grep "^Machine"` in
996 *486*) UNAME_MACHINE=i486 ;;
997 *Pentium) UNAME_MACHINE=i586 ;;
998 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
999 esac
1000 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1001 exit 0 ;;
1002 i*86:*:3.2:*)
1003 if test -f /usr/options/cb.name; then
1004 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1005 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1006 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1007 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1008 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1009 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1010 && UNAME_MACHINE=i586
1011 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1012 && UNAME_MACHINE=i686
1013 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1014 && UNAME_MACHINE=i686
1015 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1016 else
1017 echo ${UNAME_MACHINE}-pc-sysv32
1018 fi
1019 exit 0 ;;
1020 pc:*:*:*)
1021 # Left here for compatibility:
1022 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1023 # the processor, so we play safe by assuming i386.
1024 echo i386-pc-msdosdjgpp
1025 exit 0 ;;
1026 Intel:Mach:3*:*)
1027 echo i386-pc-mach3
1028 exit 0 ;;
1029 paragon:*:*:*)
1030 echo i860-intel-osf1
1031 exit 0 ;;
1032 i860:*:4.*:*) # i860-SVR4
1033 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1034 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1035 else # Add other i860-SVR4 vendors below as they are discovered.
1036 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1037 fi
1038 exit 0 ;;
1039 mini*:CTIX:SYS*5:*)
1040 # "miniframe"
1041 echo m68010-convergent-sysv
1042 exit 0 ;;
1043 mc68k:UNIX:SYSTEM5:3.51m)
1044 echo m68k-convergent-sysv
1045 exit 0 ;;
1046 M680?0:D-NIX:5.3:*)
1047 echo m68k-diab-dnix
1048 exit 0 ;;
1049 M68*:*:R3V[567]*:*)
1050 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1051 3[34]??:*: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)
1052 OS_REL=''
1053 test -r /etc/.relid \
1054 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1055 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1056 && echo i486-ncr-sysv4.3${OS_REL} && exit 0
1057 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1058 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1059 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1060 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1061 && echo i486-ncr-sysv4 && exit 0 ;;
1062 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1063 echo m68k-unknown-lynxos${UNAME_RELEASE}
1064 exit 0 ;;
1065 mc68030:UNIX_System_V:4.*:*)
1066 echo m68k-atari-sysv4
1067 exit 0 ;;
1068 TSUNAMI:LynxOS:2.*:*)
1069 echo sparc-unknown-lynxos${UNAME_RELEASE}
1070 exit 0 ;;
1071 rs6000:LynxOS:2.*:*)
1072 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1073 exit 0 ;;
1074 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1075 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1076 exit 0 ;;
1077 SM[BE]S:UNIX_SV:*:*)
1078 echo mips-dde-sysv${UNAME_RELEASE}
1079 exit 0 ;;
1080 RM*:ReliantUNIX-*:*:*)
1081 echo mips-sni-sysv4
1082 exit 0 ;;
1083 RM*:SINIX-*:*:*)
1084 echo mips-sni-sysv4
1085 exit 0 ;;
1086 *:SINIX-*:*:*)
1087 if uname -p 2>/dev/null >/dev/null ; then
1088 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1089 echo ${UNAME_MACHINE}-sni-sysv4
1090 else
1091 echo ns32k-sni-sysv
1092 fi
1093 exit 0 ;;
1094 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1095 # says <Richard.M.Bartel@ccMail.Census.GOV>
1096 echo i586-unisys-sysv4
1097 exit 0 ;;
1098 *:UNIX_System_V:4*:FTX*)
1099 # From Gerald Hewes <hewes@openmarket.com>.
1100 # How about differentiating between stratus architectures? -djm
1101 echo hppa1.1-stratus-sysv4
1102 exit 0 ;;
1103 *:*:*:FTX*)
1104 # From seanf@swdc.stratus.com.
1105 echo i860-stratus-sysv4
1106 exit 0 ;;
1107 *:VOS:*:*)
1108 # From Paul.Green@stratus.com.
1109 echo hppa1.1-stratus-vos
1110 exit 0 ;;
1111 mc68*:A/UX:*:*)
1112 echo m68k-apple-aux${UNAME_RELEASE}
1113 exit 0 ;;
1114 news*:NEWS-OS:6*:*)
1115 echo mips-sony-newsos6
1116 exit 0 ;;
1117 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1118 if [ -d /usr/nec ]; then
1119 echo mips-nec-sysv${UNAME_RELEASE}
1120 else
1121 echo mips-unknown-sysv${UNAME_RELEASE}
1122 fi
1123 exit 0 ;;
1124 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1125 echo powerpc-be-beos
1126 exit 0 ;;
1127 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1128 echo powerpc-apple-beos
1129 exit 0 ;;
1130 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1131 echo i586-pc-beos
1132 exit 0 ;;
1133 SX-4:SUPER-UX:*:*)
1134 echo sx4-nec-superux${UNAME_RELEASE}
1135 exit 0 ;;
1136 SX-5:SUPER-UX:*:*)
1137 echo sx5-nec-superux${UNAME_RELEASE}
1138 exit 0 ;;
1139 SX-6:SUPER-UX:*:*)
1140 echo sx6-nec-superux${UNAME_RELEASE}
1141 exit 0 ;;
1142 Power*:Rhapsody:*:*)
1143 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1144 exit 0 ;;
1145 *:Rhapsody:*:*)
1146 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1147 exit 0 ;;
1148 *:Darwin:*:*)
1149 case `uname -p` in
1150 *86) UNAME_PROCESSOR=i686 ;;
1151 powerpc) UNAME_PROCESSOR=powerpc ;;
1152 esac
1153 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1154 exit 0 ;;
1155 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1156 UNAME_PROCESSOR=`uname -p`
1157 if test "$UNAME_PROCESSOR" = "x86"; then
1158 UNAME_PROCESSOR=i386
1159 UNAME_MACHINE=pc
1160 fi
1161 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1162 exit 0 ;;
1163 *:QNX:*:4*)
1164 echo i386-pc-qnx
1165 exit 0 ;;
1166 NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
1167 echo nsr-tandem-nsk${UNAME_RELEASE}
1168 exit 0 ;;
1169 *:NonStop-UX:*:*)
1170 echo mips-compaq-nonstopux
1171 exit 0 ;;
1172 BS2000:POSIX*:*:*)
1173 echo bs2000-siemens-sysv
1174 exit 0 ;;
1175 DS/*:UNIX_System_V:*:*)
1176 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1177 exit 0 ;;
1178 *:Plan9:*:*)
1179 # "uname -m" is not consistent, so use $cputype instead. 386
1180 # is converted to i386 for consistency with other x86
1181 # operating systems.
1182 if test "$cputype" = "386"; then
1183 UNAME_MACHINE=i386
1184 else
1185 UNAME_MACHINE="$cputype"
1186 fi
1187 echo ${UNAME_MACHINE}-unknown-plan9
1188 exit 0 ;;
1189 *:TOPS-10:*:*)
1190 echo pdp10-unknown-tops10
1191 exit 0 ;;
1192 *:TENEX:*:*)
1193 echo pdp10-unknown-tenex
1194 exit 0 ;;
1195 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1196 echo pdp10-dec-tops20
1197 exit 0 ;;
1198 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1199 echo pdp10-xkl-tops20
1200 exit 0 ;;
1201 *:TOPS-20:*:*)
1202 echo pdp10-unknown-tops20
1203 exit 0 ;;
1204 *:ITS:*:*)
1205 echo pdp10-unknown-its
1206 exit 0 ;;
1207 SEI:*:*:SEIUX)
1208 echo mips-sei-seiux${UNAME_RELEASE}
1209 exit 0 ;;
1210 esac
1211
1212 #echo '(No uname command or uname output not recognized.)' 1>&2
1213 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1214
1215 eval $set_cc_for_build
1216 cat >$dummy.c <<EOF
1217 #ifdef _SEQUENT_
1218 # include <sys/types.h>
1219 # include <sys/utsname.h>
1220 #endif
1221 main ()
1222 {
1223 #if defined (sony)
1224 #if defined (MIPSEB)
1225 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1226 I don't know.... */
1227 printf ("mips-sony-bsd\n"); exit (0);
1228 #else
1229 #include <sys/param.h>
1230 printf ("m68k-sony-newsos%s\n",
1231 #ifdef NEWSOS4
1232 "4"
1233 #else
1234 ""
1235 #endif
1236 ); exit (0);
1237 #endif
1238 #endif
1239
1240 #if defined (__arm) && defined (__acorn) && defined (__unix)
1241 printf ("arm-acorn-riscix"); exit (0);
1242 #endif
1243
1244 #if defined (hp300) && !defined (hpux)
1245 printf ("m68k-hp-bsd\n"); exit (0);
1246 #endif
1247
1248 #if defined (NeXT)
1249 #if !defined (__ARCHITECTURE__)
1250 #define __ARCHITECTURE__ "m68k"
1251 #endif
1252 int version;
1253 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1254 if (version < 4)
1255 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1256 else
1257 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1258 exit (0);
1259 #endif
1260
1261 #if defined (MULTIMAX) || defined (n16)
1262 #if defined (UMAXV)
1263 printf ("ns32k-encore-sysv\n"); exit (0);
1264 #else
1265 #if defined (CMU)
1266 printf ("ns32k-encore-mach\n"); exit (0);
1267 #else
1268 printf ("ns32k-encore-bsd\n"); exit (0);
1269 #endif
1270 #endif
1271 #endif
1272
1273 #if defined (__386BSD__)
1274 printf ("i386-pc-bsd\n"); exit (0);
1275 #endif
1276
1277 #if defined (sequent)
1278 #if defined (i386)
1279 printf ("i386-sequent-dynix\n"); exit (0);
1280 #endif
1281 #if defined (ns32000)
1282 printf ("ns32k-sequent-dynix\n"); exit (0);
1283 #endif
1284 #endif
1285
1286 #if defined (_SEQUENT_)
1287 struct utsname un;
1288
1289 uname(&un);
1290
1291 if (strncmp(un.version, "V2", 2) == 0) {
1292 printf ("i386-sequent-ptx2\n"); exit (0);
1293 }
1294 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1295 printf ("i386-sequent-ptx1\n"); exit (0);
1296 }
1297 printf ("i386-sequent-ptx\n"); exit (0);
1298
1299 #endif
1300
1301 #if defined (vax)
1302 # if !defined (ultrix)
1303 # include <sys/param.h>
1304 # if defined (BSD)
1305 # if BSD == 43
1306 printf ("vax-dec-bsd4.3\n"); exit (0);
1307 # else
1308 # if BSD == 199006
1309 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1310 # else
1311 printf ("vax-dec-bsd\n"); exit (0);
1312 # endif
1313 # endif
1314 # else
1315 printf ("vax-dec-bsd\n"); exit (0);
1316 # endif
1317 # else
1318 printf ("vax-dec-ultrix\n"); exit (0);
1319 # endif
1320 #endif
1321
1322 #if defined (alliant) && defined (i860)
1323 printf ("i860-alliant-bsd\n"); exit (0);
1324 #endif
1325
1326 exit (1);
1327 }
1328 EOF
1329
1330 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1331
1332 # Apollos put the system type in the environment.
1333
1334 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
1335
1336 # Convex versions that predate uname can use getsysinfo(1)
1337
1338 if [ -x /usr/convex/getsysinfo ]
1339 then
1340 case `getsysinfo -f cpu_type` in
1341 c1*)
1342 echo c1-convex-bsd
1343 exit 0 ;;
1344 c2*)
1345 if getsysinfo -f scalar_acc
1346 then echo c32-convex-bsd
1347 else echo c2-convex-bsd
1348 fi
1349 exit 0 ;;
1350 c34*)
1351 echo c34-convex-bsd
1352 exit 0 ;;
1353 c38*)
1354 echo c38-convex-bsd
1355 exit 0 ;;
1356 c4*)
1357 echo c4-convex-bsd
1358 exit 0 ;;
1359 esac
1360 fi
1361
1362 cat >&2 <<EOF
1363 $0: unable to guess system type
1364
1365 This script, last modified $timestamp, has failed to recognize
1366 the operating system you are using. It is advised that you
1367 download the most up to date version of the config scripts from
1368
1369 ftp://ftp.gnu.org/pub/gnu/config/
1370
1371 If the version you run ($0) is already up to date, please
1372 send the following data and any information you think might be
1373 pertinent to <config-patches@gnu.org> in order to provide the needed
1374 information to handle your system.
1375
1376 config.guess timestamp = $timestamp
1377
1378 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1379 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1380 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1381 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1382
1383 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1384 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1385
1386 hostinfo = `(hostinfo) 2>/dev/null`
1387 /bin/universe = `(/bin/universe) 2>/dev/null`
1388 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1389 /bin/arch = `(/bin/arch) 2>/dev/null`
1390 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1391 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1392
1393 UNAME_MACHINE = ${UNAME_MACHINE}
1394 UNAME_RELEASE = ${UNAME_RELEASE}
1395 UNAME_SYSTEM = ${UNAME_SYSTEM}
1396 UNAME_VERSION = ${UNAME_VERSION}
1397 EOF
1398
1399 exit 1
1400
1401 # Local variables:
1402 # eval: (add-hook 'write-file-hooks 'time-stamp)
1403 # time-stamp-start: "timestamp='"
1404 # time-stamp-format: "%:y-%02m-%02d"
1405 # time-stamp-end: "'"
1406 # End:
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4
5 timestamp='2003-07-04'
6
7 # This file is (in principle) common to ALL GNU software.
8 # The presence of a machine in this file suggests that SOME GNU software
9 # can handle that machine. It does not imply ALL GNU software can.
10 #
11 # This file is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place - Suite 330,
24 # Boston, MA 02111-1307, USA.
25
26 # As a special exception to the GNU General Public License, if you
27 # distribute this file as part of a program that contains a
28 # configuration script generated by Autoconf, you may include it under
29 # the same distribution terms that you use for the rest of that program.
30
31 # Please send patches to <config-patches@gnu.org>. Submit a context
32 # diff and a properly formatted ChangeLog entry.
33 #
34 # Configuration subroutine to validate and canonicalize a configuration type.
35 # Supply the specified configuration type as an argument.
36 # If it is invalid, we print an error message on stderr and exit with code 1.
37 # Otherwise, we print the canonical config type on stdout and succeed.
38
39 # This file is supposed to be the same for all GNU packages
40 # and recognize all the CPU types, system types and aliases
41 # that are meaningful with *any* GNU software.
42 # Each package is responsible for reporting which valid configurations
43 # it does not support. The user should be able to distinguish
44 # a failure to support a valid configuration from a meaningless
45 # configuration.
46
47 # The goal of this file is to map all the various variations of a given
48 # machine specification into a single specification in the form:
49 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
50 # or in some cases, the newer four-part form:
51 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
52 # It is wrong to echo any other type of specification.
53
54 me=`echo "$0" | sed -e 's,.*/,,'`
55
56 usage="\
57 Usage: $0 [OPTION] CPU-MFR-OPSYS
58 $0 [OPTION] ALIAS
59
60 Canonicalize a configuration name.
61
62 Operation modes:
63 -h, --help print this help, then exit
64 -t, --time-stamp print date of last modification, then exit
65 -v, --version print version number, then exit
66
67 Report bugs and patches to <config-patches@gnu.org>."
68
69 version="\
70 GNU config.sub ($timestamp)
71
72 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
73 Free Software Foundation, Inc.
74
75 This is free software; see the source for copying conditions. There is NO
76 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
77
78 help="
79 Try \`$me --help' for more information."
80
81 # Parse command line
82 while test $# -gt 0 ; do
83 case $1 in
84 --time-stamp | --time* | -t )
85 echo "$timestamp" ; exit 0 ;;
86 --version | -v )
87 echo "$version" ; exit 0 ;;
88 --help | --h* | -h )
89 echo "$usage"; exit 0 ;;
90 -- ) # Stop option processing
91 shift; break ;;
92 - ) # Use stdin as input.
93 break ;;
94 -* )
95 echo "$me: invalid option $1$help"
96 exit 1 ;;
97
98 *local*)
99 # First pass through any local machine types.
100 echo $1
101 exit 0;;
102
103 * )
104 break ;;
105 esac
106 done
107
108 case $# in
109 0) echo "$me: missing argument$help" >&2
110 exit 1;;
111 1) ;;
112 *) echo "$me: too many arguments$help" >&2
113 exit 1;;
114 esac
115
116 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
117 # Here we must recognize all the valid KERNEL-OS combinations.
118 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
119 case $maybe_os in
120 nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
121 os=-$maybe_os
122 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123 ;;
124 *)
125 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
126 if [ $basic_machine != $1 ]
127 then os=`echo $1 | sed 's/.*-/-/'`
128 else os=; fi
129 ;;
130 esac
131
132 ### Let's recognize common machines as not being operating systems so
133 ### that things like config.sub decstation-3100 work. We also
134 ### recognize some manufacturers as not being operating systems, so we
135 ### can provide default operating systems below.
136 case $os in
137 -sun*os*)
138 # Prevent following clause from handling this invalid input.
139 ;;
140 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
141 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
142 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
143 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
144 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
145 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
146 -apple | -axis)
147 os=
148 basic_machine=$1
149 ;;
150 -sim | -cisco | -oki | -wec | -winbond)
151 os=
152 basic_machine=$1
153 ;;
154 -scout)
155 ;;
156 -wrs)
157 os=-vxworks
158 basic_machine=$1
159 ;;
160 -chorusos*)
161 os=-chorusos
162 basic_machine=$1
163 ;;
164 -chorusrdb)
165 os=-chorusrdb
166 basic_machine=$1
167 ;;
168 -hiux*)
169 os=-hiuxwe2
170 ;;
171 -sco5)
172 os=-sco3.2v5
173 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
174 ;;
175 -sco4)
176 os=-sco3.2v4
177 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
178 ;;
179 -sco3.2.[4-9]*)
180 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco3.2v[4-9]*)
184 # Don't forget version if it is 3.2v4 or newer.
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco*)
188 os=-sco3.2v2
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -udk*)
192 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -isc)
195 os=-isc2.2
196 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
197 ;;
198 -clix*)
199 basic_machine=clipper-intergraph
200 ;;
201 -isc*)
202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 ;;
204 -lynx*)
205 os=-lynxos
206 ;;
207 -ptx*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
209 ;;
210 -windowsnt*)
211 os=`echo $os | sed -e 's/windowsnt/winnt/'`
212 ;;
213 -psos*)
214 os=-psos
215 ;;
216 -mint | -mint[0-9]*)
217 basic_machine=m68k-atari
218 os=-mint
219 ;;
220 esac
221
222 # Decode aliases for certain CPU-COMPANY combinations.
223 case $basic_machine in
224 # Recognize the basic CPU types without company name.
225 # Some are omitted here because they have special meanings below.
226 1750a | 580 \
227 | a29k \
228 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
229 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
230 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
231 | c4x | clipper \
232 | d10v | d30v | dlx | dsp16xx \
233 | fr30 | frv \
234 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
235 | i370 | i860 | i960 | ia64 \
236 | ip2k \
237 | m32r | m68000 | m68k | m88k | mcore \
238 | mips | mipsbe | mipseb | mipsel | mipsle \
239 | mips16 \
240 | mips64 | mips64el \
241 | mips64vr | mips64vrel \
242 | mips64orion | mips64orionel \
243 | mips64vr4100 | mips64vr4100el \
244 | mips64vr4300 | mips64vr4300el \
245 | mips64vr5000 | mips64vr5000el \
246 | mipsisa32 | mipsisa32el \
247 | mipsisa32r2 | mipsisa32r2el \
248 | mipsisa64 | mipsisa64el \
249 | mipsisa64sb1 | mipsisa64sb1el \
250 | mipsisa64sr71k | mipsisa64sr71kel \
251 | mipstx39 | mipstx39el \
252 | mn10200 | mn10300 \
253 | msp430 \
254 | ns16k | ns32k \
255 | openrisc | or32 \
256 | pdp10 | pdp11 | pj | pjl \
257 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
258 | pyramid \
259 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
260 | sh64 | sh64le \
261 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
262 | strongarm \
263 | tahoe | thumb | tic4x | tic80 | tron \
264 | v850 | v850e \
265 | we32k \
266 | x86 | xscale | xstormy16 | xtensa \
267 | z8k)
268 basic_machine=$basic_machine-unknown
269 ;;
270 m6811 | m68hc11 | m6812 | m68hc12)
271 # Motorola 68HC11/12.
272 basic_machine=$basic_machine-unknown
273 os=-none
274 ;;
275 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
276 ;;
277
278 # We use `pc' rather than `unknown'
279 # because (1) that's what they normally are, and
280 # (2) the word "unknown" tends to confuse beginning users.
281 i*86 | x86_64)
282 basic_machine=$basic_machine-pc
283 ;;
284 # Object if more than one company name word.
285 *-*-*)
286 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
287 exit 1
288 ;;
289 # Recognize the basic CPU types with company name.
290 580-* \
291 | a29k-* \
292 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
293 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
294 | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \
295 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
296 | avr-* \
297 | bs2000-* \
298 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
299 | clipper-* | cydra-* \
300 | d10v-* | d30v-* | dlx-* \
301 | elxsi-* \
302 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
303 | h8300-* | h8500-* \
304 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
305 | i*86-* | i860-* | i960-* | ia64-* \
306 | ip2k-* \
307 | m32r-* \
308 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
309 | m88110-* | m88k-* | mcore-* \
310 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
311 | mips16-* \
312 | mips64-* | mips64el-* \
313 | mips64vr-* | mips64vrel-* \
314 | mips64orion-* | mips64orionel-* \
315 | mips64vr4100-* | mips64vr4100el-* \
316 | mips64vr4300-* | mips64vr4300el-* \
317 | mips64vr5000-* | mips64vr5000el-* \
318 | mipsisa32-* | mipsisa32el-* \
319 | mipsisa32r2-* | mipsisa32r2el-* \
320 | mipsisa64-* | mipsisa64el-* \
321 | mipsisa64sb1-* | mipsisa64sb1el-* \
322 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
323 | mipstx39-* | mipstx39el-* \
324 | msp430-* \
325 | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
326 | orion-* \
327 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
328 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
329 | pyramid-* \
330 | romp-* | rs6000-* \
331 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
332 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
333 | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
334 | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
335 | tahoe-* | thumb-* \
336 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
337 | tron-* \
338 | v850-* | v850e-* | vax-* \
339 | we32k-* \
340 | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
341 | xtensa-* \
342 | ymp-* \
343 | z8k-*)
344 ;;
345 # Recognize the various machine names and aliases which stand
346 # for a CPU type and a company and sometimes even an OS.
347 386bsd)
348 basic_machine=i386-unknown
349 os=-bsd
350 ;;
351 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
352 basic_machine=m68000-att
353 ;;
354 3b*)
355 basic_machine=we32k-att
356 ;;
357 a29khif)
358 basic_machine=a29k-amd
359 os=-udi
360 ;;
361 adobe68k)
362 basic_machine=m68010-adobe
363 os=-scout
364 ;;
365 alliant | fx80)
366 basic_machine=fx80-alliant
367 ;;
368 altos | altos3068)
369 basic_machine=m68k-altos
370 ;;
371 am29k)
372 basic_machine=a29k-none
373 os=-bsd
374 ;;
375 amd64)
376 basic_machine=x86_64-pc
377 ;;
378 amdahl)
379 basic_machine=580-amdahl
380 os=-sysv
381 ;;
382 amiga | amiga-*)
383 basic_machine=m68k-unknown
384 ;;
385 amigaos | amigados)
386 basic_machine=m68k-unknown
387 os=-amigaos
388 ;;
389 amigaunix | amix)
390 basic_machine=m68k-unknown
391 os=-sysv4
392 ;;
393 apollo68)
394 basic_machine=m68k-apollo
395 os=-sysv
396 ;;
397 apollo68bsd)
398 basic_machine=m68k-apollo
399 os=-bsd
400 ;;
401 aux)
402 basic_machine=m68k-apple
403 os=-aux
404 ;;
405 balance)
406 basic_machine=ns32k-sequent
407 os=-dynix
408 ;;
409 c90)
410 basic_machine=c90-cray
411 os=-unicos
412 ;;
413 convex-c1)
414 basic_machine=c1-convex
415 os=-bsd
416 ;;
417 convex-c2)
418 basic_machine=c2-convex
419 os=-bsd
420 ;;
421 convex-c32)
422 basic_machine=c32-convex
423 os=-bsd
424 ;;
425 convex-c34)
426 basic_machine=c34-convex
427 os=-bsd
428 ;;
429 convex-c38)
430 basic_machine=c38-convex
431 os=-bsd
432 ;;
433 cray | j90)
434 basic_machine=j90-cray
435 os=-unicos
436 ;;
437 crds | unos)
438 basic_machine=m68k-crds
439 ;;
440 cris | cris-* | etrax*)
441 basic_machine=cris-axis
442 ;;
443 da30 | da30-*)
444 basic_machine=m68k-da30
445 ;;
446 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
447 basic_machine=mips-dec
448 ;;
449 decsystem10* | dec10*)
450 basic_machine=pdp10-dec
451 os=-tops10
452 ;;
453 decsystem20* | dec20*)
454 basic_machine=pdp10-dec
455 os=-tops20
456 ;;
457 delta | 3300 | motorola-3300 | motorola-delta \
458 | 3300-motorola | delta-motorola)
459 basic_machine=m68k-motorola
460 ;;
461 delta88)
462 basic_machine=m88k-motorola
463 os=-sysv3
464 ;;
465 dpx20 | dpx20-*)
466 basic_machine=rs6000-bull
467 os=-bosx
468 ;;
469 dpx2* | dpx2*-bull)
470 basic_machine=m68k-bull
471 os=-sysv3
472 ;;
473 ebmon29k)
474 basic_machine=a29k-amd
475 os=-ebmon
476 ;;
477 elxsi)
478 basic_machine=elxsi-elxsi
479 os=-bsd
480 ;;
481 encore | umax | mmax)
482 basic_machine=ns32k-encore
483 ;;
484 es1800 | OSE68k | ose68k | ose | OSE)
485 basic_machine=m68k-ericsson
486 os=-ose
487 ;;
488 fx2800)
489 basic_machine=i860-alliant
490 ;;
491 genix)
492 basic_machine=ns32k-ns
493 ;;
494 gmicro)
495 basic_machine=tron-gmicro
496 os=-sysv
497 ;;
498 go32)
499 basic_machine=i386-pc
500 os=-go32
501 ;;
502 h3050r* | hiux*)
503 basic_machine=hppa1.1-hitachi
504 os=-hiuxwe2
505 ;;
506 h8300hms)
507 basic_machine=h8300-hitachi
508 os=-hms
509 ;;
510 h8300xray)
511 basic_machine=h8300-hitachi
512 os=-xray
513 ;;
514 h8500hms)
515 basic_machine=h8500-hitachi
516 os=-hms
517 ;;
518 harris)
519 basic_machine=m88k-harris
520 os=-sysv3
521 ;;
522 hp300-*)
523 basic_machine=m68k-hp
524 ;;
525 hp300bsd)
526 basic_machine=m68k-hp
527 os=-bsd
528 ;;
529 hp300hpux)
530 basic_machine=m68k-hp
531 os=-hpux
532 ;;
533 hp3k9[0-9][0-9] | hp9[0-9][0-9])
534 basic_machine=hppa1.0-hp
535 ;;
536 hp9k2[0-9][0-9] | hp9k31[0-9])
537 basic_machine=m68000-hp
538 ;;
539 hp9k3[2-9][0-9])
540 basic_machine=m68k-hp
541 ;;
542 hp9k6[0-9][0-9] | hp6[0-9][0-9])
543 basic_machine=hppa1.0-hp
544 ;;
545 hp9k7[0-79][0-9] | hp7[0-79][0-9])
546 basic_machine=hppa1.1-hp
547 ;;
548 hp9k78[0-9] | hp78[0-9])
549 # FIXME: really hppa2.0-hp
550 basic_machine=hppa1.1-hp
551 ;;
552 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
553 # FIXME: really hppa2.0-hp
554 basic_machine=hppa1.1-hp
555 ;;
556 hp9k8[0-9][13679] | hp8[0-9][13679])
557 basic_machine=hppa1.1-hp
558 ;;
559 hp9k8[0-9][0-9] | hp8[0-9][0-9])
560 basic_machine=hppa1.0-hp
561 ;;
562 hppa-next)
563 os=-nextstep3
564 ;;
565 hppaosf)
566 basic_machine=hppa1.1-hp
567 os=-osf
568 ;;
569 hppro)
570 basic_machine=hppa1.1-hp
571 os=-proelf
572 ;;
573 i370-ibm* | ibm*)
574 basic_machine=i370-ibm
575 ;;
576 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
577 i*86v32)
578 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
579 os=-sysv32
580 ;;
581 i*86v4*)
582 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
583 os=-sysv4
584 ;;
585 i*86v)
586 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
587 os=-sysv
588 ;;
589 i*86sol2)
590 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
591 os=-solaris2
592 ;;
593 i386mach)
594 basic_machine=i386-mach
595 os=-mach
596 ;;
597 i386-vsta | vsta)
598 basic_machine=i386-unknown
599 os=-vsta
600 ;;
601 iris | iris4d)
602 basic_machine=mips-sgi
603 case $os in
604 -irix*)
605 ;;
606 *)
607 os=-irix4
608 ;;
609 esac
610 ;;
611 isi68 | isi)
612 basic_machine=m68k-isi
613 os=-sysv
614 ;;
615 m88k-omron*)
616 basic_machine=m88k-omron
617 ;;
618 magnum | m3230)
619 basic_machine=mips-mips
620 os=-sysv
621 ;;
622 merlin)
623 basic_machine=ns32k-utek
624 os=-sysv
625 ;;
626 mingw32)
627 basic_machine=i386-pc
628 os=-mingw32
629 ;;
630 miniframe)
631 basic_machine=m68000-convergent
632 ;;
633 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
634 basic_machine=m68k-atari
635 os=-mint
636 ;;
637 mips3*-*)
638 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
639 ;;
640 mips3*)
641 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
642 ;;
643 mmix*)
644 basic_machine=mmix-knuth
645 os=-mmixware
646 ;;
647 monitor)
648 basic_machine=m68k-rom68k
649 os=-coff
650 ;;
651 morphos)
652 basic_machine=powerpc-unknown
653 os=-morphos
654 ;;
655 msdos)
656 basic_machine=i386-pc
657 os=-msdos
658 ;;
659 mvs)
660 basic_machine=i370-ibm
661 os=-mvs
662 ;;
663 ncr3000)
664 basic_machine=i486-ncr
665 os=-sysv4
666 ;;
667 netbsd386)
668 basic_machine=i386-unknown
669 os=-netbsd
670 ;;
671 netwinder)
672 basic_machine=armv4l-rebel
673 os=-linux
674 ;;
675 news | news700 | news800 | news900)
676 basic_machine=m68k-sony
677 os=-newsos
678 ;;
679 news1000)
680 basic_machine=m68030-sony
681 os=-newsos
682 ;;
683 news-3600 | risc-news)
684 basic_machine=mips-sony
685 os=-newsos
686 ;;
687 necv70)
688 basic_machine=v70-nec
689 os=-sysv
690 ;;
691 next | m*-next )
692 basic_machine=m68k-next
693 case $os in
694 -nextstep* )
695 ;;
696 -ns2*)
697 os=-nextstep2
698 ;;
699 *)
700 os=-nextstep3
701 ;;
702 esac
703 ;;
704 nh3000)
705 basic_machine=m68k-harris
706 os=-cxux
707 ;;
708 nh[45]000)
709 basic_machine=m88k-harris
710 os=-cxux
711 ;;
712 nindy960)
713 basic_machine=i960-intel
714 os=-nindy
715 ;;
716 mon960)
717 basic_machine=i960-intel
718 os=-mon960
719 ;;
720 nonstopux)
721 basic_machine=mips-compaq
722 os=-nonstopux
723 ;;
724 np1)
725 basic_machine=np1-gould
726 ;;
727 nv1)
728 basic_machine=nv1-cray
729 os=-unicosmp
730 ;;
731 nsr-tandem)
732 basic_machine=nsr-tandem
733 ;;
734 op50n-* | op60c-*)
735 basic_machine=hppa1.1-oki
736 os=-proelf
737 ;;
738 or32 | or32-*)
739 basic_machine=or32-unknown
740 os=-coff
741 ;;
742 OSE68000 | ose68000)
743 basic_machine=m68000-ericsson
744 os=-ose
745 ;;
746 os68k)
747 basic_machine=m68k-none
748 os=-os68k
749 ;;
750 pa-hitachi)
751 basic_machine=hppa1.1-hitachi
752 os=-hiuxwe2
753 ;;
754 paragon)
755 basic_machine=i860-intel
756 os=-osf
757 ;;
758 pbd)
759 basic_machine=sparc-tti
760 ;;
761 pbb)
762 basic_machine=m68k-tti
763 ;;
764 pc532 | pc532-*)
765 basic_machine=ns32k-pc532
766 ;;
767 pentium | p5 | k5 | k6 | nexgen | viac3)
768 basic_machine=i586-pc
769 ;;
770 pentiumpro | p6 | 6x86 | athlon | athlon_*)
771 basic_machine=i686-pc
772 ;;
773 pentiumii | pentium2 | pentiumiii | pentium3)
774 basic_machine=i686-pc
775 ;;
776 pentium4)
777 basic_machine=i786-pc
778 ;;
779 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
780 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
781 ;;
782 pentiumpro-* | p6-* | 6x86-* | athlon-*)
783 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
784 ;;
785 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
786 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
787 ;;
788 pentium4-*)
789 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
790 ;;
791 pn)
792 basic_machine=pn-gould
793 ;;
794 power) basic_machine=power-ibm
795 ;;
796 ppc) basic_machine=powerpc-unknown
797 ;;
798 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
799 ;;
800 ppcle | powerpclittle | ppc-le | powerpc-little)
801 basic_machine=powerpcle-unknown
802 ;;
803 ppcle-* | powerpclittle-*)
804 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
805 ;;
806 ppc64) basic_machine=powerpc64-unknown
807 ;;
808 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
809 ;;
810 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
811 basic_machine=powerpc64le-unknown
812 ;;
813 ppc64le-* | powerpc64little-*)
814 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
815 ;;
816 ps2)
817 basic_machine=i386-ibm
818 ;;
819 pw32)
820 basic_machine=i586-unknown
821 os=-pw32
822 ;;
823 rom68k)
824 basic_machine=m68k-rom68k
825 os=-coff
826 ;;
827 rm[46]00)
828 basic_machine=mips-siemens
829 ;;
830 rtpc | rtpc-*)
831 basic_machine=romp-ibm
832 ;;
833 s390 | s390-*)
834 basic_machine=s390-ibm
835 ;;
836 s390x | s390x-*)
837 basic_machine=s390x-ibm
838 ;;
839 sa29200)
840 basic_machine=a29k-amd
841 os=-udi
842 ;;
843 sb1)
844 basic_machine=mipsisa64sb1-unknown
845 ;;
846 sb1el)
847 basic_machine=mipsisa64sb1el-unknown
848 ;;
849 sei)
850 basic_machine=mips-sei
851 os=-seiux
852 ;;
853 sequent)
854 basic_machine=i386-sequent
855 ;;
856 sh)
857 basic_machine=sh-hitachi
858 os=-hms
859 ;;
860 sh64)
861 basic_machine=sh64-unknown
862 ;;
863 sparclite-wrs | simso-wrs)
864 basic_machine=sparclite-wrs
865 os=-vxworks
866 ;;
867 sps7)
868 basic_machine=m68k-bull
869 os=-sysv2
870 ;;
871 spur)
872 basic_machine=spur-unknown
873 ;;
874 st2000)
875 basic_machine=m68k-tandem
876 ;;
877 stratus)
878 basic_machine=i860-stratus
879 os=-sysv4
880 ;;
881 sun2)
882 basic_machine=m68000-sun
883 ;;
884 sun2os3)
885 basic_machine=m68000-sun
886 os=-sunos3
887 ;;
888 sun2os4)
889 basic_machine=m68000-sun
890 os=-sunos4
891 ;;
892 sun3os3)
893 basic_machine=m68k-sun
894 os=-sunos3
895 ;;
896 sun3os4)
897 basic_machine=m68k-sun
898 os=-sunos4
899 ;;
900 sun4os3)
901 basic_machine=sparc-sun
902 os=-sunos3
903 ;;
904 sun4os4)
905 basic_machine=sparc-sun
906 os=-sunos4
907 ;;
908 sun4sol2)
909 basic_machine=sparc-sun
910 os=-solaris2
911 ;;
912 sun3 | sun3-*)
913 basic_machine=m68k-sun
914 ;;
915 sun4)
916 basic_machine=sparc-sun
917 ;;
918 sun386 | sun386i | roadrunner)
919 basic_machine=i386-sun
920 ;;
921 sv1)
922 basic_machine=sv1-cray
923 os=-unicos
924 ;;
925 symmetry)
926 basic_machine=i386-sequent
927 os=-dynix
928 ;;
929 t3e)
930 basic_machine=alphaev5-cray
931 os=-unicos
932 ;;
933 t90)
934 basic_machine=t90-cray
935 os=-unicos
936 ;;
937 tic54x | c54x*)
938 basic_machine=tic54x-unknown
939 os=-coff
940 ;;
941 tic55x | c55x*)
942 basic_machine=tic55x-unknown
943 os=-coff
944 ;;
945 tic6x | c6x*)
946 basic_machine=tic6x-unknown
947 os=-coff
948 ;;
949 tx39)
950 basic_machine=mipstx39-unknown
951 ;;
952 tx39el)
953 basic_machine=mipstx39el-unknown
954 ;;
955 toad1)
956 basic_machine=pdp10-xkl
957 os=-tops20
958 ;;
959 tower | tower-32)
960 basic_machine=m68k-ncr
961 ;;
962 udi29k)
963 basic_machine=a29k-amd
964 os=-udi
965 ;;
966 ultra3)
967 basic_machine=a29k-nyu
968 os=-sym1
969 ;;
970 v810 | necv810)
971 basic_machine=v810-nec
972 os=-none
973 ;;
974 vaxv)
975 basic_machine=vax-dec
976 os=-sysv
977 ;;
978 vms)
979 basic_machine=vax-dec
980 os=-vms
981 ;;
982 vpp*|vx|vx-*)
983 basic_machine=f301-fujitsu
984 ;;
985 vxworks960)
986 basic_machine=i960-wrs
987 os=-vxworks
988 ;;
989 vxworks68)
990 basic_machine=m68k-wrs
991 os=-vxworks
992 ;;
993 vxworks29k)
994 basic_machine=a29k-wrs
995 os=-vxworks
996 ;;
997 w65*)
998 basic_machine=w65-wdc
999 os=-none
1000 ;;
1001 w89k-*)
1002 basic_machine=hppa1.1-winbond
1003 os=-proelf
1004 ;;
1005 xps | xps100)
1006 basic_machine=xps100-honeywell
1007 ;;
1008 ymp)
1009 basic_machine=ymp-cray
1010 os=-unicos
1011 ;;
1012 z8k-*-coff)
1013 basic_machine=z8k-unknown
1014 os=-sim
1015 ;;
1016 none)
1017 basic_machine=none-none
1018 os=-none
1019 ;;
1020
1021 # Here we handle the default manufacturer of certain CPU types. It is in
1022 # some cases the only manufacturer, in others, it is the most popular.
1023 w89k)
1024 basic_machine=hppa1.1-winbond
1025 ;;
1026 op50n)
1027 basic_machine=hppa1.1-oki
1028 ;;
1029 op60c)
1030 basic_machine=hppa1.1-oki
1031 ;;
1032 romp)
1033 basic_machine=romp-ibm
1034 ;;
1035 rs6000)
1036 basic_machine=rs6000-ibm
1037 ;;
1038 vax)
1039 basic_machine=vax-dec
1040 ;;
1041 pdp10)
1042 # there are many clones, so DEC is not a safe bet
1043 basic_machine=pdp10-unknown
1044 ;;
1045 pdp11)
1046 basic_machine=pdp11-dec
1047 ;;
1048 we32k)
1049 basic_machine=we32k-att
1050 ;;
1051 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
1052 basic_machine=sh-unknown
1053 ;;
1054 sh64)
1055 basic_machine=sh64-unknown
1056 ;;
1057 sparc | sparcv9 | sparcv9b)
1058 basic_machine=sparc-sun
1059 ;;
1060 cydra)
1061 basic_machine=cydra-cydrome
1062 ;;
1063 orion)
1064 basic_machine=orion-highlevel
1065 ;;
1066 orion105)
1067 basic_machine=clipper-highlevel
1068 ;;
1069 mac | mpw | mac-mpw)
1070 basic_machine=m68k-apple
1071 ;;
1072 pmac | pmac-mpw)
1073 basic_machine=powerpc-apple
1074 ;;
1075 *-unknown)
1076 # Make sure to match an already-canonicalized machine name.
1077 ;;
1078 *)
1079 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1080 exit 1
1081 ;;
1082 esac
1083
1084 # Here we canonicalize certain aliases for manufacturers.
1085 case $basic_machine in
1086 *-digital*)
1087 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1088 ;;
1089 *-commodore*)
1090 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1091 ;;
1092 *)
1093 ;;
1094 esac
1095
1096 # Decode manufacturer-specific aliases for certain operating systems.
1097
1098 if [ x"$os" != x"" ]
1099 then
1100 case $os in
1101 # First match some system type aliases
1102 # that might get confused with valid system types.
1103 # -solaris* is a basic system type, with this one exception.
1104 -solaris1 | -solaris1.*)
1105 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1106 ;;
1107 -solaris)
1108 os=-solaris2
1109 ;;
1110 -svr4*)
1111 os=-sysv4
1112 ;;
1113 -unixware*)
1114 os=-sysv4.2uw
1115 ;;
1116 -gnu/linux*)
1117 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1118 ;;
1119 # First accept the basic system types.
1120 # The portable systems comes first.
1121 # Each alternative MUST END IN A *, to match a version number.
1122 # -sysv* is not here because it comes later, after sysvr4.
1123 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1124 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1125 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1126 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1127 | -aos* \
1128 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1129 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1130 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
1131 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1132 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1133 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1134 | -chorusos* | -chorusrdb* \
1135 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1136 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
1137 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1138 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1139 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1140 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1141 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1142 | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
1143 # Remember, each alternative MUST END IN *, to match a version number.
1144 ;;
1145 -qnx*)
1146 case $basic_machine in
1147 x86-* | i*86-*)
1148 ;;
1149 *)
1150 os=-nto$os
1151 ;;
1152 esac
1153 ;;
1154 -nto-qnx*)
1155 ;;
1156 -nto*)
1157 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1158 ;;
1159 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1160 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1161 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1162 ;;
1163 -mac*)
1164 os=`echo $os | sed -e 's|mac|macos|'`
1165 ;;
1166 -linux*)
1167 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1168 ;;
1169 -sunos5*)
1170 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1171 ;;
1172 -sunos6*)
1173 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1174 ;;
1175 -opened*)
1176 os=-openedition
1177 ;;
1178 -wince*)
1179 os=-wince
1180 ;;
1181 -osfrose*)
1182 os=-osfrose
1183 ;;
1184 -osf*)
1185 os=-osf
1186 ;;
1187 -utek*)
1188 os=-bsd
1189 ;;
1190 -dynix*)
1191 os=-bsd
1192 ;;
1193 -acis*)
1194 os=-aos
1195 ;;
1196 -atheos*)
1197 os=-atheos
1198 ;;
1199 -386bsd)
1200 os=-bsd
1201 ;;
1202 -ctix* | -uts*)
1203 os=-sysv
1204 ;;
1205 -nova*)
1206 os=-rtmk-nova
1207 ;;
1208 -ns2 )
1209 os=-nextstep2
1210 ;;
1211 -nsk*)
1212 os=-nsk
1213 ;;
1214 # Preserve the version number of sinix5.
1215 -sinix5.*)
1216 os=`echo $os | sed -e 's|sinix|sysv|'`
1217 ;;
1218 -sinix*)
1219 os=-sysv4
1220 ;;
1221 -triton*)
1222 os=-sysv3
1223 ;;
1224 -oss*)
1225 os=-sysv3
1226 ;;
1227 -svr4)
1228 os=-sysv4
1229 ;;
1230 -svr3)
1231 os=-sysv3
1232 ;;
1233 -sysvr4)
1234 os=-sysv4
1235 ;;
1236 # This must come after -sysvr4.
1237 -sysv*)
1238 ;;
1239 -ose*)
1240 os=-ose
1241 ;;
1242 -es1800*)
1243 os=-ose
1244 ;;
1245 -xenix)
1246 os=-xenix
1247 ;;
1248 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1249 os=-mint
1250 ;;
1251 -aros*)
1252 os=-aros
1253 ;;
1254 -kaos*)
1255 os=-kaos
1256 ;;
1257 -none)
1258 ;;
1259 *)
1260 # Get rid of the `-' at the beginning of $os.
1261 os=`echo $os | sed 's/[^-]*-//'`
1262 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1263 exit 1
1264 ;;
1265 esac
1266 else
1267
1268 # Here we handle the default operating systems that come with various machines.
1269 # The value should be what the vendor currently ships out the door with their
1270 # machine or put another way, the most popular os provided with the machine.
1271
1272 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1273 # "-sun"), then you have to tell the case statement up towards the top
1274 # that MANUFACTURER isn't an operating system. Otherwise, code above
1275 # will signal an error saying that MANUFACTURER isn't an operating
1276 # system, and we'll never get to this point.
1277
1278 case $basic_machine in
1279 *-acorn)
1280 os=-riscix1.2
1281 ;;
1282 arm*-rebel)
1283 os=-linux
1284 ;;
1285 arm*-semi)
1286 os=-aout
1287 ;;
1288 c4x-* | tic4x-*)
1289 os=-coff
1290 ;;
1291 # This must come before the *-dec entry.
1292 pdp10-*)
1293 os=-tops20
1294 ;;
1295 pdp11-*)
1296 os=-none
1297 ;;
1298 *-dec | vax-*)
1299 os=-ultrix4.2
1300 ;;
1301 m68*-apollo)
1302 os=-domain
1303 ;;
1304 i386-sun)
1305 os=-sunos4.0.2
1306 ;;
1307 m68000-sun)
1308 os=-sunos3
1309 # This also exists in the configure program, but was not the
1310 # default.
1311 # os=-sunos4
1312 ;;
1313 m68*-cisco)
1314 os=-aout
1315 ;;
1316 mips*-cisco)
1317 os=-elf
1318 ;;
1319 mips*-*)
1320 os=-elf
1321 ;;
1322 or32-*)
1323 os=-coff
1324 ;;
1325 *-tti) # must be before sparc entry or we get the wrong os.
1326 os=-sysv3
1327 ;;
1328 sparc-* | *-sun)
1329 os=-sunos4.1.1
1330 ;;
1331 *-be)
1332 os=-beos
1333 ;;
1334 *-ibm)
1335 os=-aix
1336 ;;
1337 *-wec)
1338 os=-proelf
1339 ;;
1340 *-winbond)
1341 os=-proelf
1342 ;;
1343 *-oki)
1344 os=-proelf
1345 ;;
1346 *-hp)
1347 os=-hpux
1348 ;;
1349 *-hitachi)
1350 os=-hiux
1351 ;;
1352 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1353 os=-sysv
1354 ;;
1355 *-cbm)
1356 os=-amigaos
1357 ;;
1358 *-dg)
1359 os=-dgux
1360 ;;
1361 *-dolphin)
1362 os=-sysv3
1363 ;;
1364 m68k-ccur)
1365 os=-rtu
1366 ;;
1367 m88k-omron*)
1368 os=-luna
1369 ;;
1370 *-next )
1371 os=-nextstep
1372 ;;
1373 *-sequent)
1374 os=-ptx
1375 ;;
1376 *-crds)
1377 os=-unos
1378 ;;
1379 *-ns)
1380 os=-genix
1381 ;;
1382 i370-*)
1383 os=-mvs
1384 ;;
1385 *-next)
1386 os=-nextstep3
1387 ;;
1388 *-gould)
1389 os=-sysv
1390 ;;
1391 *-highlevel)
1392 os=-bsd
1393 ;;
1394 *-encore)
1395 os=-bsd
1396 ;;
1397 *-sgi)
1398 os=-irix
1399 ;;
1400 *-siemens)
1401 os=-sysv4
1402 ;;
1403 *-masscomp)
1404 os=-rtu
1405 ;;
1406 f30[01]-fujitsu | f700-fujitsu)
1407 os=-uxpv
1408 ;;
1409 *-rom68k)
1410 os=-coff
1411 ;;
1412 *-*bug)
1413 os=-coff
1414 ;;
1415 *-apple)
1416 os=-macos
1417 ;;
1418 *-atari*)
1419 os=-mint
1420 ;;
1421 *)
1422 os=-none
1423 ;;
1424 esac
1425 fi
1426
1427 # Here we handle the case where we know the os, and the CPU type, but not the
1428 # manufacturer. We pick the logical manufacturer.
1429 vendor=unknown
1430 case $basic_machine in
1431 *-unknown)
1432 case $os in
1433 -riscix*)
1434 vendor=acorn
1435 ;;
1436 -sunos*)
1437 vendor=sun
1438 ;;
1439 -aix*)
1440 vendor=ibm
1441 ;;
1442 -beos*)
1443 vendor=be
1444 ;;
1445 -hpux*)
1446 vendor=hp
1447 ;;
1448 -mpeix*)
1449 vendor=hp
1450 ;;
1451 -hiux*)
1452 vendor=hitachi
1453 ;;
1454 -unos*)
1455 vendor=crds
1456 ;;
1457 -dgux*)
1458 vendor=dg
1459 ;;
1460 -luna*)
1461 vendor=omron
1462 ;;
1463 -genix*)
1464 vendor=ns
1465 ;;
1466 -mvs* | -opened*)
1467 vendor=ibm
1468 ;;
1469 -ptx*)
1470 vendor=sequent
1471 ;;
1472 -vxsim* | -vxworks* | -windiss*)
1473 vendor=wrs
1474 ;;
1475 -aux*)
1476 vendor=apple
1477 ;;
1478 -hms*)
1479 vendor=hitachi
1480 ;;
1481 -mpw* | -macos*)
1482 vendor=apple
1483 ;;
1484 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1485 vendor=atari
1486 ;;
1487 -vos*)
1488 vendor=stratus
1489 ;;
1490 esac
1491 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1492 ;;
1493 esac
1494
1495 echo $basic_machine$os
1496 exit 0
1497
1498 # Local variables:
1499 # eval: (add-hook 'write-file-hooks 'time-stamp)
1500 # time-stamp-start: "timestamp='"
1501 # time-stamp-format: "%:y-%02m-%02d"
1502 # time-stamp-end: "'"
1503 # End:
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2009-04-28.21; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
6 # Software Foundation, Inc.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU 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, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
27
28 case $1 in
29 '')
30 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
31 exit 1;
32 ;;
33 -h | --h*)
34 cat <<\EOF
35 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
36
37 Run PROGRAMS ARGS to compile a file, generating dependencies
38 as side-effects.
39
40 Environment variables:
41 depmode Dependency tracking mode.
42 source Source file read by `PROGRAMS ARGS'.
43 object Object file output by `PROGRAMS ARGS'.
44 DEPDIR directory where to store dependencies.
45 depfile Dependency file to output.
46 tmpdepfile Temporary file to use when outputing dependencies.
47 libtool Whether libtool is used (yes/no).
48
49 Report bugs to <bug-automake@gnu.org>.
50 EOF
51 exit $?
52 ;;
53 -v | --v*)
54 echo "depcomp $scriptversion"
55 exit $?
56 ;;
57 esac
58
59 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
60 echo "depcomp: Variables source, object and depmode must be set" 1>&2
61 exit 1
62 fi
63
64 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
65 depfile=${depfile-`echo "$object" |
66 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
67 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
68
69 rm -f "$tmpdepfile"
70
71 # Some modes work just like other modes, but use different flags. We
72 # parameterize here, but still list the modes in the big case below,
73 # to make depend.m4 easier to write. Note that we *cannot* use a case
74 # here, because this file can only contain one case statement.
75 if test "$depmode" = hp; then
76 # HP compiler uses -M and no extra arg.
77 gccflag=-M
78 depmode=gcc
79 fi
80
81 if test "$depmode" = dashXmstdout; then
82 # This is just like dashmstdout with a different argument.
83 dashmflag=-xM
84 depmode=dashmstdout
85 fi
86
87 cygpath_u="cygpath -u -f -"
88 if test "$depmode" = msvcmsys; then
89 # This is just like msvisualcpp but w/o cygpath translation.
90 # Just convert the backslash-escaped backslashes to single forward
91 # slashes to satisfy depend.m4
92 cygpath_u="sed s,\\\\\\\\,/,g"
93 depmode=msvisualcpp
94 fi
95
96 case "$depmode" in
97 gcc3)
98 ## gcc 3 implements dependency tracking that does exactly what
99 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
100 ## it if -MD -MP comes after the -MF stuff. Hmm.
101 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
102 ## the command line argument order; so add the flags where they
103 ## appear in depend2.am. Note that the slowdown incurred here
104 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
105 for arg
106 do
107 case $arg in
108 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
109 *) set fnord "$@" "$arg" ;;
110 esac
111 shift # fnord
112 shift # $arg
113 done
114 "$@"
115 stat=$?
116 if test $stat -eq 0; then :
117 else
118 rm -f "$tmpdepfile"
119 exit $stat
120 fi
121 mv "$tmpdepfile" "$depfile"
122 ;;
123
124 gcc)
125 ## There are various ways to get dependency output from gcc. Here's
126 ## why we pick this rather obscure method:
127 ## - Don't want to use -MD because we'd like the dependencies to end
128 ## up in a subdir. Having to rename by hand is ugly.
129 ## (We might end up doing this anyway to support other compilers.)
130 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
131 ## -MM, not -M (despite what the docs say).
132 ## - Using -M directly means running the compiler twice (even worse
133 ## than renaming).
134 if test -z "$gccflag"; then
135 gccflag=-MD,
136 fi
137 "$@" -Wp,"$gccflag$tmpdepfile"
138 stat=$?
139 if test $stat -eq 0; then :
140 else
141 rm -f "$tmpdepfile"
142 exit $stat
143 fi
144 rm -f "$depfile"
145 echo "$object : \\" > "$depfile"
146 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
147 ## The second -e expression handles DOS-style file names with drive letters.
148 sed -e 's/^[^:]*: / /' \
149 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
150 ## This next piece of magic avoids the `deleted header file' problem.
151 ## The problem is that when a header file which appears in a .P file
152 ## is deleted, the dependency causes make to die (because there is
153 ## typically no way to rebuild the header). We avoid this by adding
154 ## dummy dependencies for each header file. Too bad gcc doesn't do
155 ## this for us directly.
156 tr ' ' '
157 ' < "$tmpdepfile" |
158 ## Some versions of gcc put a space before the `:'. On the theory
159 ## that the space means something, we add a space to the output as
160 ## well.
161 ## Some versions of the HPUX 10.20 sed can't process this invocation
162 ## correctly. Breaking it into two sed invocations is a workaround.
163 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
164 rm -f "$tmpdepfile"
165 ;;
166
167 hp)
168 # This case exists only to let depend.m4 do its work. It works by
169 # looking at the text of this script. This case will never be run,
170 # since it is checked for above.
171 exit 1
172 ;;
173
174 sgi)
175 if test "$libtool" = yes; then
176 "$@" "-Wp,-MDupdate,$tmpdepfile"
177 else
178 "$@" -MDupdate "$tmpdepfile"
179 fi
180 stat=$?
181 if test $stat -eq 0; then :
182 else
183 rm -f "$tmpdepfile"
184 exit $stat
185 fi
186 rm -f "$depfile"
187
188 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
189 echo "$object : \\" > "$depfile"
190
191 # Clip off the initial element (the dependent). Don't try to be
192 # clever and replace this with sed code, as IRIX sed won't handle
193 # lines with more than a fixed number of characters (4096 in
194 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
195 # the IRIX cc adds comments like `#:fec' to the end of the
196 # dependency line.
197 tr ' ' '
198 ' < "$tmpdepfile" \
199 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
200 tr '
201 ' ' ' >> "$depfile"
202 echo >> "$depfile"
203
204 # The second pass generates a dummy entry for each header file.
205 tr ' ' '
206 ' < "$tmpdepfile" \
207 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
208 >> "$depfile"
209 else
210 # The sourcefile does not contain any dependencies, so just
211 # store a dummy comment line, to avoid errors with the Makefile
212 # "include basename.Plo" scheme.
213 echo "#dummy" > "$depfile"
214 fi
215 rm -f "$tmpdepfile"
216 ;;
217
218 aix)
219 # The C for AIX Compiler uses -M and outputs the dependencies
220 # in a .u file. In older versions, this file always lives in the
221 # current directory. Also, the AIX compiler puts `$object:' at the
222 # start of each line; $object doesn't have directory information.
223 # Version 6 uses the directory in both cases.
224 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
225 test "x$dir" = "x$object" && dir=
226 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
227 if test "$libtool" = yes; then
228 tmpdepfile1=$dir$base.u
229 tmpdepfile2=$base.u
230 tmpdepfile3=$dir.libs/$base.u
231 "$@" -Wc,-M
232 else
233 tmpdepfile1=$dir$base.u
234 tmpdepfile2=$dir$base.u
235 tmpdepfile3=$dir$base.u
236 "$@" -M
237 fi
238 stat=$?
239
240 if test $stat -eq 0; then :
241 else
242 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
243 exit $stat
244 fi
245
246 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
247 do
248 test -f "$tmpdepfile" && break
249 done
250 if test -f "$tmpdepfile"; then
251 # Each line is of the form `foo.o: dependent.h'.
252 # Do two passes, one to just change these to
253 # `$object: dependent.h' and one to simply `dependent.h:'.
254 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
255 # That's a tab and a space in the [].
256 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
257 else
258 # The sourcefile does not contain any dependencies, so just
259 # store a dummy comment line, to avoid errors with the Makefile
260 # "include basename.Plo" scheme.
261 echo "#dummy" > "$depfile"
262 fi
263 rm -f "$tmpdepfile"
264 ;;
265
266 icc)
267 # Intel's C compiler understands `-MD -MF file'. However on
268 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
269 # ICC 7.0 will fill foo.d with something like
270 # foo.o: sub/foo.c
271 # foo.o: sub/foo.h
272 # which is wrong. We want:
273 # sub/foo.o: sub/foo.c
274 # sub/foo.o: sub/foo.h
275 # sub/foo.c:
276 # sub/foo.h:
277 # ICC 7.1 will output
278 # foo.o: sub/foo.c sub/foo.h
279 # and will wrap long lines using \ :
280 # foo.o: sub/foo.c ... \
281 # sub/foo.h ... \
282 # ...
283
284 "$@" -MD -MF "$tmpdepfile"
285 stat=$?
286 if test $stat -eq 0; then :
287 else
288 rm -f "$tmpdepfile"
289 exit $stat
290 fi
291 rm -f "$depfile"
292 # Each line is of the form `foo.o: dependent.h',
293 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
294 # Do two passes, one to just change these to
295 # `$object: dependent.h' and one to simply `dependent.h:'.
296 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
297 # Some versions of the HPUX 10.20 sed can't process this invocation
298 # correctly. Breaking it into two sed invocations is a workaround.
299 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
300 sed -e 's/$/ :/' >> "$depfile"
301 rm -f "$tmpdepfile"
302 ;;
303
304 hp2)
305 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
306 # compilers, which have integrated preprocessors. The correct option
307 # to use with these is +Maked; it writes dependencies to a file named
308 # 'foo.d', which lands next to the object file, wherever that
309 # happens to be.
310 # Much of this is similar to the tru64 case; see comments there.
311 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
312 test "x$dir" = "x$object" && dir=
313 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
314 if test "$libtool" = yes; then
315 tmpdepfile1=$dir$base.d
316 tmpdepfile2=$dir.libs/$base.d
317 "$@" -Wc,+Maked
318 else
319 tmpdepfile1=$dir$base.d
320 tmpdepfile2=$dir$base.d
321 "$@" +Maked
322 fi
323 stat=$?
324 if test $stat -eq 0; then :
325 else
326 rm -f "$tmpdepfile1" "$tmpdepfile2"
327 exit $stat
328 fi
329
330 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
331 do
332 test -f "$tmpdepfile" && break
333 done
334 if test -f "$tmpdepfile"; then
335 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
336 # Add `dependent.h:' lines.
337 sed -ne '2,${
338 s/^ *//
339 s/ \\*$//
340 s/$/:/
341 p
342 }' "$tmpdepfile" >> "$depfile"
343 else
344 echo "#dummy" > "$depfile"
345 fi
346 rm -f "$tmpdepfile" "$tmpdepfile2"
347 ;;
348
349 tru64)
350 # The Tru64 compiler uses -MD to generate dependencies as a side
351 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
352 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
353 # dependencies in `foo.d' instead, so we check for that too.
354 # Subdirectories are respected.
355 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
356 test "x$dir" = "x$object" && dir=
357 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
358
359 if test "$libtool" = yes; then
360 # With Tru64 cc, shared objects can also be used to make a
361 # static library. This mechanism is used in libtool 1.4 series to
362 # handle both shared and static libraries in a single compilation.
363 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
364 #
365 # With libtool 1.5 this exception was removed, and libtool now
366 # generates 2 separate objects for the 2 libraries. These two
367 # compilations output dependencies in $dir.libs/$base.o.d and
368 # in $dir$base.o.d. We have to check for both files, because
369 # one of the two compilations can be disabled. We should prefer
370 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
371 # automatically cleaned when .libs/ is deleted, while ignoring
372 # the former would cause a distcleancheck panic.
373 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
374 tmpdepfile2=$dir$base.o.d # libtool 1.5
375 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
376 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
377 "$@" -Wc,-MD
378 else
379 tmpdepfile1=$dir$base.o.d
380 tmpdepfile2=$dir$base.d
381 tmpdepfile3=$dir$base.d
382 tmpdepfile4=$dir$base.d
383 "$@" -MD
384 fi
385
386 stat=$?
387 if test $stat -eq 0; then :
388 else
389 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
390 exit $stat
391 fi
392
393 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
394 do
395 test -f "$tmpdepfile" && break
396 done
397 if test -f "$tmpdepfile"; then
398 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
399 # That's a tab and a space in the [].
400 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
401 else
402 echo "#dummy" > "$depfile"
403 fi
404 rm -f "$tmpdepfile"
405 ;;
406
407 #nosideeffect)
408 # This comment above is used by automake to tell side-effect
409 # dependency tracking mechanisms from slower ones.
410
411 dashmstdout)
412 # Important note: in order to support this mode, a compiler *must*
413 # always write the preprocessed file to stdout, regardless of -o.
414 "$@" || exit $?
415
416 # Remove the call to Libtool.
417 if test "$libtool" = yes; then
418 while test "X$1" != 'X--mode=compile'; do
419 shift
420 done
421 shift
422 fi
423
424 # Remove `-o $object'.
425 IFS=" "
426 for arg
427 do
428 case $arg in
429 -o)
430 shift
431 ;;
432 $object)
433 shift
434 ;;
435 *)
436 set fnord "$@" "$arg"
437 shift # fnord
438 shift # $arg
439 ;;
440 esac
441 done
442
443 test -z "$dashmflag" && dashmflag=-M
444 # Require at least two characters before searching for `:'
445 # in the target name. This is to cope with DOS-style filenames:
446 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
447 "$@" $dashmflag |
448 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
449 rm -f "$depfile"
450 cat < "$tmpdepfile" > "$depfile"
451 tr ' ' '
452 ' < "$tmpdepfile" | \
453 ## Some versions of the HPUX 10.20 sed can't process this invocation
454 ## correctly. Breaking it into two sed invocations is a workaround.
455 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
456 rm -f "$tmpdepfile"
457 ;;
458
459 dashXmstdout)
460 # This case only exists to satisfy depend.m4. It is never actually
461 # run, as this mode is specially recognized in the preamble.
462 exit 1
463 ;;
464
465 makedepend)
466 "$@" || exit $?
467 # Remove any Libtool call
468 if test "$libtool" = yes; then
469 while test "X$1" != 'X--mode=compile'; do
470 shift
471 done
472 shift
473 fi
474 # X makedepend
475 shift
476 cleared=no eat=no
477 for arg
478 do
479 case $cleared in
480 no)
481 set ""; shift
482 cleared=yes ;;
483 esac
484 if test $eat = yes; then
485 eat=no
486 continue
487 fi
488 case "$arg" in
489 -D*|-I*)
490 set fnord "$@" "$arg"; shift ;;
491 # Strip any option that makedepend may not understand. Remove
492 # the object too, otherwise makedepend will parse it as a source file.
493 -arch)
494 eat=yes ;;
495 -*|$object)
496 ;;
497 *)
498 set fnord "$@" "$arg"; shift ;;
499 esac
500 done
501 obj_suffix=`echo "$object" | sed 's/^.*\././'`
502 touch "$tmpdepfile"
503 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
504 rm -f "$depfile"
505 cat < "$tmpdepfile" > "$depfile"
506 sed '1,2d' "$tmpdepfile" | tr ' ' '
507 ' | \
508 ## Some versions of the HPUX 10.20 sed can't process this invocation
509 ## correctly. Breaking it into two sed invocations is a workaround.
510 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
511 rm -f "$tmpdepfile" "$tmpdepfile".bak
512 ;;
513
514 cpp)
515 # Important note: in order to support this mode, a compiler *must*
516 # always write the preprocessed file to stdout.
517 "$@" || exit $?
518
519 # Remove the call to Libtool.
520 if test "$libtool" = yes; then
521 while test "X$1" != 'X--mode=compile'; do
522 shift
523 done
524 shift
525 fi
526
527 # Remove `-o $object'.
528 IFS=" "
529 for arg
530 do
531 case $arg in
532 -o)
533 shift
534 ;;
535 $object)
536 shift
537 ;;
538 *)
539 set fnord "$@" "$arg"
540 shift # fnord
541 shift # $arg
542 ;;
543 esac
544 done
545
546 "$@" -E |
547 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
548 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
549 sed '$ s: \\$::' > "$tmpdepfile"
550 rm -f "$depfile"
551 echo "$object : \\" > "$depfile"
552 cat < "$tmpdepfile" >> "$depfile"
553 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
554 rm -f "$tmpdepfile"
555 ;;
556
557 msvisualcpp)
558 # Important note: in order to support this mode, a compiler *must*
559 # always write the preprocessed file to stdout.
560 "$@" || exit $?
561
562 # Remove the call to Libtool.
563 if test "$libtool" = yes; then
564 while test "X$1" != 'X--mode=compile'; do
565 shift
566 done
567 shift
568 fi
569
570 IFS=" "
571 for arg
572 do
573 case "$arg" in
574 -o)
575 shift
576 ;;
577 $object)
578 shift
579 ;;
580 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
581 set fnord "$@"
582 shift
583 shift
584 ;;
585 *)
586 set fnord "$@" "$arg"
587 shift
588 shift
589 ;;
590 esac
591 done
592 "$@" -E 2>/dev/null |
593 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
594 rm -f "$depfile"
595 echo "$object : \\" > "$depfile"
596 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
597 echo " " >> "$depfile"
598 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
599 rm -f "$tmpdepfile"
600 ;;
601
602 msvcmsys)
603 # This case exists only to let depend.m4 do its work. It works by
604 # looking at the text of this script. This case will never be run,
605 # since it is checked for above.
606 exit 1
607 ;;
608
609 none)
610 exec "$@"
611 ;;
612
613 *)
614 echo "Unknown depmode $depmode" 1>&2
615 exit 1
616 ;;
617 esac
618
619 exit 0
620
621 # Local Variables:
622 # mode: shell-script
623 # sh-indentation: 2
624 # eval: (add-hook 'write-file-hooks 'time-stamp)
625 # time-stamp-start: "scriptversion="
626 # time-stamp-format: "%:y-%02m-%02d.%02H"
627 # time-stamp-time-zone: "UTC"
628 # time-stamp-end: "; # UTC"
629 # End:
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2009-04-28.21; # UTC
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # `make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 nl='
44 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
50 doit=${DOITPROG-}
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
56
57 # Put in absolute file names if you don't have them in your path;
58 # or use environment vars.
59
60 chgrpprog=${CHGRPPROG-chgrp}
61 chmodprog=${CHMODPROG-chmod}
62 chownprog=${CHOWNPROG-chown}
63 cmpprog=${CMPPROG-cmp}
64 cpprog=${CPPROG-cp}
65 mkdirprog=${MKDIRPROG-mkdir}
66 mvprog=${MVPROG-mv}
67 rmprog=${RMPROG-rm}
68 stripprog=${STRIPPROG-strip}
69
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
81 posix_mkdir=
82
83 # Desired mode of installed file.
84 mode=0755
85
86 chgrpcmd=
87 chmodcmd=$chmodprog
88 chowncmd=
89 mvcmd=$mvprog
90 rmcmd="$rmprog -f"
91 stripcmd=
92
93 src=
94 dst=
95 dir_arg=
96 dst_arg=
97
98 copy_on_change=false
99 no_target_directory=
100
101 usage="\
102 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
103 or: $0 [OPTION]... SRCFILES... DIRECTORY
104 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
105 or: $0 [OPTION]... -d DIRECTORIES...
106
107 In the 1st form, copy SRCFILE to DSTFILE.
108 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
109 In the 4th, create DIRECTORIES.
110
111 Options:
112 --help display this help and exit.
113 --version display version info and exit.
114
115 -c (ignored)
116 -C install only if different (preserve the last data modification time)
117 -d create directories instead of installing files.
118 -g GROUP $chgrpprog installed files to GROUP.
119 -m MODE $chmodprog installed files to MODE.
120 -o USER $chownprog installed files to USER.
121 -s $stripprog installed files.
122 -t DIRECTORY install into DIRECTORY.
123 -T report an error if DSTFILE is a directory.
124
125 Environment variables override the default commands:
126 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
127 RMPROG STRIPPROG
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *' '* | *'
146 '* | *'*'* | *'?'* | *'['*)
147 echo "$0: invalid mode: $mode" >&2
148 exit 1;;
149 esac
150 shift;;
151
152 -o) chowncmd="$chownprog $2"
153 shift;;
154
155 -s) stripcmd=$stripprog;;
156
157 -t) dst_arg=$2
158 shift;;
159
160 -T) no_target_directory=true;;
161
162 --version) echo "$0 $scriptversion"; exit $?;;
163
164 --) shift
165 break;;
166
167 -*) echo "$0: invalid option: $1" >&2
168 exit 1;;
169
170 *) break;;
171 esac
172 shift
173 done
174
175 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
176 # When -d is used, all remaining arguments are directories to create.
177 # When -t is used, the destination is already specified.
178 # Otherwise, the last argument is the destination. Remove it from $@.
179 for arg
180 do
181 if test -n "$dst_arg"; then
182 # $@ is not empty: it contains at least $arg.
183 set fnord "$@" "$dst_arg"
184 shift # fnord
185 fi
186 shift # arg
187 dst_arg=$arg
188 done
189 fi
190
191 if test $# -eq 0; then
192 if test -z "$dir_arg"; then
193 echo "$0: no input file specified." >&2
194 exit 1
195 fi
196 # It's OK to call `install-sh -d' without argument.
197 # This can happen when creating conditional directories.
198 exit 0
199 fi
200
201 if test -z "$dir_arg"; then
202 trap '(exit $?); exit' 1 2 13 15
203
204 # Set umask so as not to create temps with too-generous modes.
205 # However, 'strip' requires both read and write access to temps.
206 case $mode in
207 # Optimize common cases.
208 *644) cp_umask=133;;
209 *755) cp_umask=22;;
210
211 *[0-7])
212 if test -z "$stripcmd"; then
213 u_plus_rw=
214 else
215 u_plus_rw='% 200'
216 fi
217 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
218 *)
219 if test -z "$stripcmd"; then
220 u_plus_rw=
221 else
222 u_plus_rw=,u+rw
223 fi
224 cp_umask=$mode$u_plus_rw;;
225 esac
226 fi
227
228 for src
229 do
230 # Protect names starting with `-'.
231 case $src in
232 -*) src=./$src;;
233 esac
234
235 if test -n "$dir_arg"; then
236 dst=$src
237 dstdir=$dst
238 test -d "$dstdir"
239 dstdir_status=$?
240 else
241
242 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
243 # might cause directories to be created, which would be especially bad
244 # if $src (and thus $dsttmp) contains '*'.
245 if test ! -f "$src" && test ! -d "$src"; then
246 echo "$0: $src does not exist." >&2
247 exit 1
248 fi
249
250 if test -z "$dst_arg"; then
251 echo "$0: no destination specified." >&2
252 exit 1
253 fi
254
255 dst=$dst_arg
256 # Protect names starting with `-'.
257 case $dst in
258 -*) dst=./$dst;;
259 esac
260
261 # If destination is a directory, append the input filename; won't work
262 # if double slashes aren't ignored.
263 if test -d "$dst"; then
264 if test -n "$no_target_directory"; then
265 echo "$0: $dst_arg: Is a directory" >&2
266 exit 1
267 fi
268 dstdir=$dst
269 dst=$dstdir/`basename "$src"`
270 dstdir_status=0
271 else
272 # Prefer dirname, but fall back on a substitute if dirname fails.
273 dstdir=`
274 (dirname "$dst") 2>/dev/null ||
275 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
276 X"$dst" : 'X\(//\)[^/]' \| \
277 X"$dst" : 'X\(//\)$' \| \
278 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
279 echo X"$dst" |
280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
281 s//\1/
282 q
283 }
284 /^X\(\/\/\)[^/].*/{
285 s//\1/
286 q
287 }
288 /^X\(\/\/\)$/{
289 s//\1/
290 q
291 }
292 /^X\(\/\).*/{
293 s//\1/
294 q
295 }
296 s/.*/./; q'
297 `
298
299 test -d "$dstdir"
300 dstdir_status=$?
301 fi
302 fi
303
304 obsolete_mkdir_used=false
305
306 if test $dstdir_status != 0; then
307 case $posix_mkdir in
308 '')
309 # Create intermediate dirs using mode 755 as modified by the umask.
310 # This is like FreeBSD 'install' as of 1997-10-28.
311 umask=`umask`
312 case $stripcmd.$umask in
313 # Optimize common cases.
314 *[2367][2367]) mkdir_umask=$umask;;
315 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
316
317 *[0-7])
318 mkdir_umask=`expr $umask + 22 \
319 - $umask % 100 % 40 + $umask % 20 \
320 - $umask % 10 % 4 + $umask % 2
321 `;;
322 *) mkdir_umask=$umask,go-w;;
323 esac
324
325 # With -d, create the new directory with the user-specified mode.
326 # Otherwise, rely on $mkdir_umask.
327 if test -n "$dir_arg"; then
328 mkdir_mode=-m$mode
329 else
330 mkdir_mode=
331 fi
332
333 posix_mkdir=false
334 case $umask in
335 *[123567][0-7][0-7])
336 # POSIX mkdir -p sets u+wx bits regardless of umask, which
337 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
338 ;;
339 *)
340 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
341 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
342
343 if (umask $mkdir_umask &&
344 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
345 then
346 if test -z "$dir_arg" || {
347 # Check for POSIX incompatibilities with -m.
348 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
349 # other-writeable bit of parent directory when it shouldn't.
350 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
351 ls_ld_tmpdir=`ls -ld "$tmpdir"`
352 case $ls_ld_tmpdir in
353 d????-?r-*) different_mode=700;;
354 d????-?--*) different_mode=755;;
355 *) false;;
356 esac &&
357 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
358 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
359 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
360 }
361 }
362 then posix_mkdir=:
363 fi
364 rmdir "$tmpdir/d" "$tmpdir"
365 else
366 # Remove any dirs left behind by ancient mkdir implementations.
367 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
368 fi
369 trap '' 0;;
370 esac;;
371 esac
372
373 if
374 $posix_mkdir && (
375 umask $mkdir_umask &&
376 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
377 )
378 then :
379 else
380
381 # The umask is ridiculous, or mkdir does not conform to POSIX,
382 # or it failed possibly due to a race condition. Create the
383 # directory the slow way, step by step, checking for races as we go.
384
385 case $dstdir in
386 /*) prefix='/';;
387 -*) prefix='./';;
388 *) prefix='';;
389 esac
390
391 eval "$initialize_posix_glob"
392
393 oIFS=$IFS
394 IFS=/
395 $posix_glob set -f
396 set fnord $dstdir
397 shift
398 $posix_glob set +f
399 IFS=$oIFS
400
401 prefixes=
402
403 for d
404 do
405 test -z "$d" && continue
406
407 prefix=$prefix$d
408 if test -d "$prefix"; then
409 prefixes=
410 else
411 if $posix_mkdir; then
412 (umask=$mkdir_umask &&
413 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
414 # Don't fail if two instances are running concurrently.
415 test -d "$prefix" || exit 1
416 else
417 case $prefix in
418 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
419 *) qprefix=$prefix;;
420 esac
421 prefixes="$prefixes '$qprefix'"
422 fi
423 fi
424 prefix=$prefix/
425 done
426
427 if test -n "$prefixes"; then
428 # Don't fail if two instances are running concurrently.
429 (umask $mkdir_umask &&
430 eval "\$doit_exec \$mkdirprog $prefixes") ||
431 test -d "$dstdir" || exit 1
432 obsolete_mkdir_used=true
433 fi
434 fi
435 fi
436
437 if test -n "$dir_arg"; then
438 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
439 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
440 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
441 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
442 else
443
444 # Make a couple of temp file names in the proper directory.
445 dsttmp=$dstdir/_inst.$$_
446 rmtmp=$dstdir/_rm.$$_
447
448 # Trap to clean up those temp files at exit.
449 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
450
451 # Copy the file name to the temp name.
452 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
453
454 # and set any options; do chmod last to preserve setuid bits.
455 #
456 # If any of these fail, we abort the whole thing. If we want to
457 # ignore errors from any of these, just make sure not to ignore
458 # errors from the above "$doit $cpprog $src $dsttmp" command.
459 #
460 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
461 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
462 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
463 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
464
465 # If -C, don't bother to copy if it wouldn't change the file.
466 if $copy_on_change &&
467 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
468 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
469
470 eval "$initialize_posix_glob" &&
471 $posix_glob set -f &&
472 set X $old && old=:$2:$4:$5:$6 &&
473 set X $new && new=:$2:$4:$5:$6 &&
474 $posix_glob set +f &&
475
476 test "$old" = "$new" &&
477 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
478 then
479 rm -f "$dsttmp"
480 else
481 # Rename the file to the real destination.
482 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
483
484 # The rename failed, perhaps because mv can't rename something else
485 # to itself, or perhaps because mv is so ancient that it does not
486 # support -f.
487 {
488 # Now remove or move aside any old file at destination location.
489 # We try this two ways since rm can't unlink itself on some
490 # systems and the destination file might be busy for other
491 # reasons. In this case, the final cleanup might fail but the new
492 # file should still install successfully.
493 {
494 test ! -f "$dst" ||
495 $doit $rmcmd -f "$dst" 2>/dev/null ||
496 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
497 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
498 } ||
499 { echo "$0: cannot unlink or rename $dst" >&2
500 (exit 1); exit 1
501 }
502 } &&
503
504 # Now rename the file to the real destination.
505 $doit $mvcmd "$dsttmp" "$dst"
506 }
507 fi || exit 1
508
509 trap '' 0
510 fi
511 done
512
513 # Local variables:
514 # eval: (add-hook 'write-file-hooks 'time-stamp)
515 # time-stamp-start: "scriptversion="
516 # time-stamp-format: "%:y-%02m-%02d.%02H"
517 # time-stamp-time-zone: "UTC"
518 # time-stamp-end: "; # UTC"
519 # End:
0
1 # libtool (GNU libtool) 2.4
2 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
6 # This is free software; see the source for copying conditions. There is NO
7 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8
9 # GNU Libtool is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
13 #
14 # As a special exception to the GNU General Public License,
15 # if you distribute this file as part of a program or library that
16 # is built using GNU Libtool, you may include this file under the
17 # same distribution terms that you use for the rest of that program.
18 #
19 # GNU Libtool is distributed in the hope that it will be useful, but
20 # WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 # General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License
25 # along with GNU Libtool; see the file COPYING. If not, a copy
26 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
27 # or obtained by writing to the Free Software Foundation, Inc.,
28 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
30 # Usage: $progname [OPTION]... [MODE-ARG]...
31 #
32 # Provide generalized library-building support services.
33 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --no-quiet, --no-silent
42 # print informational messages (default)
43 # --tag=TAG use configuration variables from tag TAG
44 # -v, --verbose print more informational messages than default
45 # --no-verbose don't print the extra informational messages
46 # --version print version information
47 # -h, --help, --help-all print short, long, or detailed help message
48 #
49 # MODE must be one of the following:
50 #
51 # clean remove files from the build directory
52 # compile compile a source file into a libtool object
53 # execute automatically set library path, then run a program
54 # finish complete the installation of libtool libraries
55 # install install libraries or executables
56 # link create a library or an executable
57 # uninstall remove libraries from an installed directory
58 #
59 # MODE-ARGS vary depending on the MODE. When passed as first option,
60 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
61 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
62 #
63 # When reporting a bug, please describe a test case to reproduce it and
64 # include the following information:
65 #
66 # host-triplet: $host
67 # shell: $SHELL
68 # compiler: $LTCC
69 # compiler flags: $LTCFLAGS
70 # linker: $LD (gnu? $with_gnu_ld)
71 # $progname: (GNU libtool) 2.4
72 # automake: $automake_version
73 # autoconf: $autoconf_version
74 #
75 # Report bugs to <bug-libtool@gnu.org>.
76 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
77 # General help using GNU software: <http://www.gnu.org/gethelp/>.
78
79 PROGRAM=libtool
80 PACKAGE=libtool
81 VERSION=2.4
82 TIMESTAMP=""
83 package_revision=1.3293
84
85 # Be Bourne compatible
86 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
87 emulate sh
88 NULLCMD=:
89 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
90 # is contrary to our usage. Disable this feature.
91 alias -g '${1+"$@"}'='"$@"'
92 setopt NO_GLOB_SUBST
93 else
94 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
95 fi
96 BIN_SH=xpg4; export BIN_SH # for Tru64
97 DUALCASE=1; export DUALCASE # for MKS sh
98
99 # A function that is used when there is no print builtin or printf.
100 func_fallback_echo ()
101 {
102 eval 'cat <<_LTECHO_EOF
103 $1
104 _LTECHO_EOF'
105 }
106
107 # NLS nuisances: We save the old values to restore during execute mode.
108 lt_user_locale=
109 lt_safe_locale=
110 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
111 do
112 eval "if test \"\${$lt_var+set}\" = set; then
113 save_$lt_var=\$$lt_var
114 $lt_var=C
115 export $lt_var
116 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
117 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
118 fi"
119 done
120 LC_ALL=C
121 LANGUAGE=C
122 export LANGUAGE LC_ALL
123
124 $lt_unset CDPATH
125
126
127 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
128 # is ksh but when the shell is invoked as "sh" and the current value of
129 # the _XPG environment variable is not equal to 1 (one), the special
130 # positional parameter $0, within a function call, is the name of the
131 # function.
132 progpath="$0"
133
134
135
136 : ${CP="cp -f"}
137 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
138 : ${EGREP="grep -E"}
139 : ${FGREP="grep -F"}
140 : ${GREP="grep"}
141 : ${LN_S="ln -s"}
142 : ${MAKE="make"}
143 : ${MKDIR="mkdir"}
144 : ${MV="mv -f"}
145 : ${RM="rm -f"}
146 : ${SED="sed"}
147 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
148 : ${Xsed="$SED -e 1s/^X//"}
149
150 # Global variables:
151 EXIT_SUCCESS=0
152 EXIT_FAILURE=1
153 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
154 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
155
156 exit_status=$EXIT_SUCCESS
157
158 # Make sure IFS has a sensible default
159 lt_nl='
160 '
161 IFS=" $lt_nl"
162
163 dirname="s,/[^/]*$,,"
164 basename="s,^.*/,,"
165
166 # func_dirname file append nondir_replacement
167 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
168 # otherwise set result to NONDIR_REPLACEMENT.
169 func_dirname ()
170 {
171 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
172 if test "X$func_dirname_result" = "X${1}"; then
173 func_dirname_result="${3}"
174 else
175 func_dirname_result="$func_dirname_result${2}"
176 fi
177 } # func_dirname may be replaced by extended shell implementation
178
179
180 # func_basename file
181 func_basename ()
182 {
183 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
184 } # func_basename may be replaced by extended shell implementation
185
186
187 # func_dirname_and_basename file append nondir_replacement
188 # perform func_basename and func_dirname in a single function
189 # call:
190 # dirname: Compute the dirname of FILE. If nonempty,
191 # add APPEND to the result, otherwise set result
192 # to NONDIR_REPLACEMENT.
193 # value returned in "$func_dirname_result"
194 # basename: Compute filename of FILE.
195 # value retuned in "$func_basename_result"
196 # Implementation must be kept synchronized with func_dirname
197 # and func_basename. For efficiency, we do not delegate to
198 # those functions but instead duplicate the functionality here.
199 func_dirname_and_basename ()
200 {
201 # Extract subdirectory from the argument.
202 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
203 if test "X$func_dirname_result" = "X${1}"; then
204 func_dirname_result="${3}"
205 else
206 func_dirname_result="$func_dirname_result${2}"
207 fi
208 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
209 } # func_dirname_and_basename may be replaced by extended shell implementation
210
211
212 # func_stripname prefix suffix name
213 # strip PREFIX and SUFFIX off of NAME.
214 # PREFIX and SUFFIX must not contain globbing or regex special
215 # characters, hashes, percent signs, but SUFFIX may contain a leading
216 # dot (in which case that matches only a dot).
217 # func_strip_suffix prefix name
218 func_stripname ()
219 {
220 case ${2} in
221 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
222 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
223 esac
224 } # func_stripname may be replaced by extended shell implementation
225
226
227 # These SED scripts presuppose an absolute path with a trailing slash.
228 pathcar='s,^/\([^/]*\).*$,\1,'
229 pathcdr='s,^/[^/]*,,'
230 removedotparts=':dotsl
231 s@/\./@/@g
232 t dotsl
233 s,/\.$,/,'
234 collapseslashes='s@/\{1,\}@/@g'
235 finalslash='s,/*$,/,'
236
237 # func_normal_abspath PATH
238 # Remove doubled-up and trailing slashes, "." path components,
239 # and cancel out any ".." path components in PATH after making
240 # it an absolute path.
241 # value returned in "$func_normal_abspath_result"
242 func_normal_abspath ()
243 {
244 # Start from root dir and reassemble the path.
245 func_normal_abspath_result=
246 func_normal_abspath_tpath=$1
247 func_normal_abspath_altnamespace=
248 case $func_normal_abspath_tpath in
249 "")
250 # Empty path, that just means $cwd.
251 func_stripname '' '/' "`pwd`"
252 func_normal_abspath_result=$func_stripname_result
253 return
254 ;;
255 # The next three entries are used to spot a run of precisely
256 # two leading slashes without using negated character classes;
257 # we take advantage of case's first-match behaviour.
258 ///*)
259 # Unusual form of absolute path, do nothing.
260 ;;
261 //*)
262 # Not necessarily an ordinary path; POSIX reserves leading '//'
263 # and for example Cygwin uses it to access remote file shares
264 # over CIFS/SMB, so we conserve a leading double slash if found.
265 func_normal_abspath_altnamespace=/
266 ;;
267 /*)
268 # Absolute path, do nothing.
269 ;;
270 *)
271 # Relative path, prepend $cwd.
272 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
273 ;;
274 esac
275 # Cancel out all the simple stuff to save iterations. We also want
276 # the path to end with a slash for ease of parsing, so make sure
277 # there is one (and only one) here.
278 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
279 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
280 while :; do
281 # Processed it all yet?
282 if test "$func_normal_abspath_tpath" = / ; then
283 # If we ascended to the root using ".." the result may be empty now.
284 if test -z "$func_normal_abspath_result" ; then
285 func_normal_abspath_result=/
286 fi
287 break
288 fi
289 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
290 -e "$pathcar"`
291 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
292 -e "$pathcdr"`
293 # Figure out what to do with it
294 case $func_normal_abspath_tcomponent in
295 "")
296 # Trailing empty path component, ignore it.
297 ;;
298 ..)
299 # Parent dir; strip last assembled component from result.
300 func_dirname "$func_normal_abspath_result"
301 func_normal_abspath_result=$func_dirname_result
302 ;;
303 *)
304 # Actual path component, append it.
305 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
306 ;;
307 esac
308 done
309 # Restore leading double-slash if one was found on entry.
310 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
311 }
312
313 # func_relative_path SRCDIR DSTDIR
314 # generates a relative path from SRCDIR to DSTDIR, with a trailing
315 # slash if non-empty, suitable for immediately appending a filename
316 # without needing to append a separator.
317 # value returned in "$func_relative_path_result"
318 func_relative_path ()
319 {
320 func_relative_path_result=
321 func_normal_abspath "$1"
322 func_relative_path_tlibdir=$func_normal_abspath_result
323 func_normal_abspath "$2"
324 func_relative_path_tbindir=$func_normal_abspath_result
325
326 # Ascend the tree starting from libdir
327 while :; do
328 # check if we have found a prefix of bindir
329 case $func_relative_path_tbindir in
330 $func_relative_path_tlibdir)
331 # found an exact match
332 func_relative_path_tcancelled=
333 break
334 ;;
335 $func_relative_path_tlibdir*)
336 # found a matching prefix
337 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
338 func_relative_path_tcancelled=$func_stripname_result
339 if test -z "$func_relative_path_result"; then
340 func_relative_path_result=.
341 fi
342 break
343 ;;
344 *)
345 func_dirname $func_relative_path_tlibdir
346 func_relative_path_tlibdir=${func_dirname_result}
347 if test "x$func_relative_path_tlibdir" = x ; then
348 # Have to descend all the way to the root!
349 func_relative_path_result=../$func_relative_path_result
350 func_relative_path_tcancelled=$func_relative_path_tbindir
351 break
352 fi
353 func_relative_path_result=../$func_relative_path_result
354 ;;
355 esac
356 done
357
358 # Now calculate path; take care to avoid doubling-up slashes.
359 func_stripname '' '/' "$func_relative_path_result"
360 func_relative_path_result=$func_stripname_result
361 func_stripname '/' '/' "$func_relative_path_tcancelled"
362 if test "x$func_stripname_result" != x ; then
363 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
364 fi
365
366 # Normalisation. If bindir is libdir, return empty string,
367 # else relative path ending with a slash; either way, target
368 # file name can be directly appended.
369 if test ! -z "$func_relative_path_result"; then
370 func_stripname './' '' "$func_relative_path_result/"
371 func_relative_path_result=$func_stripname_result
372 fi
373 }
374
375 # The name of this program:
376 func_dirname_and_basename "$progpath"
377 progname=$func_basename_result
378
379 # Make sure we have an absolute path for reexecution:
380 case $progpath in
381 [\\/]*|[A-Za-z]:\\*) ;;
382 *[\\/]*)
383 progdir=$func_dirname_result
384 progdir=`cd "$progdir" && pwd`
385 progpath="$progdir/$progname"
386 ;;
387 *)
388 save_IFS="$IFS"
389 IFS=:
390 for progdir in $PATH; do
391 IFS="$save_IFS"
392 test -x "$progdir/$progname" && break
393 done
394 IFS="$save_IFS"
395 test -n "$progdir" || progdir=`pwd`
396 progpath="$progdir/$progname"
397 ;;
398 esac
399
400 # Sed substitution that helps us do robust quoting. It backslashifies
401 # metacharacters that are still active within double-quoted strings.
402 Xsed="${SED}"' -e 1s/^X//'
403 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
404
405 # Same as above, but do not quote variable references.
406 double_quote_subst='s/\(["`\\]\)/\\\1/g'
407
408 # Sed substitution that turns a string into a regex matching for the
409 # string literally.
410 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
411
412 # Sed substitution that converts a w32 file name or path
413 # which contains forward slashes, into one that contains
414 # (escaped) backslashes. A very naive implementation.
415 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
416
417 # Re-`\' parameter expansions in output of double_quote_subst that were
418 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
419 # in input to double_quote_subst, that '$' was protected from expansion.
420 # Since each input `\' is now two `\'s, look for any number of runs of
421 # four `\'s followed by two `\'s and then a '$'. `\' that '$'.
422 bs='\\'
423 bs2='\\\\'
424 bs4='\\\\\\\\'
425 dollar='\$'
426 sed_double_backslash="\
427 s/$bs4/&\\
428 /g
429 s/^$bs2$dollar/$bs&/
430 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
431 s/\n//g"
432
433 # Standard options:
434 opt_dry_run=false
435 opt_help=false
436 opt_quiet=false
437 opt_verbose=false
438 opt_warning=:
439
440 # func_echo arg...
441 # Echo program name prefixed message, along with the current mode
442 # name if it has been set yet.
443 func_echo ()
444 {
445 $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
446 }
447
448 # func_verbose arg...
449 # Echo program name prefixed message in verbose mode only.
450 func_verbose ()
451 {
452 $opt_verbose && func_echo ${1+"$@"}
453
454 # A bug in bash halts the script if the last line of a function
455 # fails when set -e is in force, so we need another command to
456 # work around that:
457 :
458 }
459
460 # func_echo_all arg...
461 # Invoke $ECHO with all args, space-separated.
462 func_echo_all ()
463 {
464 $ECHO "$*"
465 }
466
467 # func_error arg...
468 # Echo program name prefixed message to standard error.
469 func_error ()
470 {
471 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
472 }
473
474 # func_warning arg...
475 # Echo program name prefixed warning message to standard error.
476 func_warning ()
477 {
478 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
479
480 # bash bug again:
481 :
482 }
483
484 # func_fatal_error arg...
485 # Echo program name prefixed message to standard error, and exit.
486 func_fatal_error ()
487 {
488 func_error ${1+"$@"}
489 exit $EXIT_FAILURE
490 }
491
492 # func_fatal_help arg...
493 # Echo program name prefixed message to standard error, followed by
494 # a help hint, and exit.
495 func_fatal_help ()
496 {
497 func_error ${1+"$@"}
498 func_fatal_error "$help"
499 }
500 help="Try \`$progname --help' for more information." ## default
501
502
503 # func_grep expression filename
504 # Check whether EXPRESSION matches any line of FILENAME, without output.
505 func_grep ()
506 {
507 $GREP "$1" "$2" >/dev/null 2>&1
508 }
509
510
511 # func_mkdir_p directory-path
512 # Make sure the entire path to DIRECTORY-PATH is available.
513 func_mkdir_p ()
514 {
515 my_directory_path="$1"
516 my_dir_list=
517
518 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
519
520 # Protect directory names starting with `-'
521 case $my_directory_path in
522 -*) my_directory_path="./$my_directory_path" ;;
523 esac
524
525 # While some portion of DIR does not yet exist...
526 while test ! -d "$my_directory_path"; do
527 # ...make a list in topmost first order. Use a colon delimited
528 # list incase some portion of path contains whitespace.
529 my_dir_list="$my_directory_path:$my_dir_list"
530
531 # If the last portion added has no slash in it, the list is done
532 case $my_directory_path in */*) ;; *) break ;; esac
533
534 # ...otherwise throw away the child directory and loop
535 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
536 done
537 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
538
539 save_mkdir_p_IFS="$IFS"; IFS=':'
540 for my_dir in $my_dir_list; do
541 IFS="$save_mkdir_p_IFS"
542 # mkdir can fail with a `File exist' error if two processes
543 # try to create one of the directories concurrently. Don't
544 # stop in that case!
545 $MKDIR "$my_dir" 2>/dev/null || :
546 done
547 IFS="$save_mkdir_p_IFS"
548
549 # Bail out if we (or some other process) failed to create a directory.
550 test -d "$my_directory_path" || \
551 func_fatal_error "Failed to create \`$1'"
552 fi
553 }
554
555
556 # func_mktempdir [string]
557 # Make a temporary directory that won't clash with other running
558 # libtool processes, and avoids race conditions if possible. If
559 # given, STRING is the basename for that directory.
560 func_mktempdir ()
561 {
562 my_template="${TMPDIR-/tmp}/${1-$progname}"
563
564 if test "$opt_dry_run" = ":"; then
565 # Return a directory name, but don't create it in dry-run mode
566 my_tmpdir="${my_template}-$$"
567 else
568
569 # If mktemp works, use that first and foremost
570 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
571
572 if test ! -d "$my_tmpdir"; then
573 # Failing that, at least try and use $RANDOM to avoid a race
574 my_tmpdir="${my_template}-${RANDOM-0}$$"
575
576 save_mktempdir_umask=`umask`
577 umask 0077
578 $MKDIR "$my_tmpdir"
579 umask $save_mktempdir_umask
580 fi
581
582 # If we're not in dry-run mode, bomb out on failure
583 test -d "$my_tmpdir" || \
584 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
585 fi
586
587 $ECHO "$my_tmpdir"
588 }
589
590
591 # func_quote_for_eval arg
592 # Aesthetically quote ARG to be evaled later.
593 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
594 # is double-quoted, suitable for a subsequent eval, whereas
595 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
596 # which are still active within double quotes backslashified.
597 func_quote_for_eval ()
598 {
599 case $1 in
600 *[\\\`\"\$]*)
601 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
602 *)
603 func_quote_for_eval_unquoted_result="$1" ;;
604 esac
605
606 case $func_quote_for_eval_unquoted_result in
607 # Double-quote args containing shell metacharacters to delay
608 # word splitting, command substitution and and variable
609 # expansion for a subsequent eval.
610 # Many Bourne shells cannot handle close brackets correctly
611 # in scan sets, so we specify it separately.
612 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
613 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
614 ;;
615 *)
616 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
617 esac
618 }
619
620
621 # func_quote_for_expand arg
622 # Aesthetically quote ARG to be evaled later; same as above,
623 # but do not quote variable references.
624 func_quote_for_expand ()
625 {
626 case $1 in
627 *[\\\`\"]*)
628 my_arg=`$ECHO "$1" | $SED \
629 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
630 *)
631 my_arg="$1" ;;
632 esac
633
634 case $my_arg in
635 # Double-quote args containing shell metacharacters to delay
636 # word splitting and command substitution for a subsequent eval.
637 # Many Bourne shells cannot handle close brackets correctly
638 # in scan sets, so we specify it separately.
639 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
640 my_arg="\"$my_arg\""
641 ;;
642 esac
643
644 func_quote_for_expand_result="$my_arg"
645 }
646
647
648 # func_show_eval cmd [fail_exp]
649 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
650 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
651 # is given, then evaluate it.
652 func_show_eval ()
653 {
654 my_cmd="$1"
655 my_fail_exp="${2-:}"
656
657 ${opt_silent-false} || {
658 func_quote_for_expand "$my_cmd"
659 eval "func_echo $func_quote_for_expand_result"
660 }
661
662 if ${opt_dry_run-false}; then :; else
663 eval "$my_cmd"
664 my_status=$?
665 if test "$my_status" -eq 0; then :; else
666 eval "(exit $my_status); $my_fail_exp"
667 fi
668 fi
669 }
670
671
672 # func_show_eval_locale cmd [fail_exp]
673 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
674 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
675 # is given, then evaluate it. Use the saved locale for evaluation.
676 func_show_eval_locale ()
677 {
678 my_cmd="$1"
679 my_fail_exp="${2-:}"
680
681 ${opt_silent-false} || {
682 func_quote_for_expand "$my_cmd"
683 eval "func_echo $func_quote_for_expand_result"
684 }
685
686 if ${opt_dry_run-false}; then :; else
687 eval "$lt_user_locale
688 $my_cmd"
689 my_status=$?
690 eval "$lt_safe_locale"
691 if test "$my_status" -eq 0; then :; else
692 eval "(exit $my_status); $my_fail_exp"
693 fi
694 fi
695 }
696
697 # func_tr_sh
698 # Turn $1 into a string suitable for a shell variable name.
699 # Result is stored in $func_tr_sh_result. All characters
700 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
701 # if $1 begins with a digit, a '_' is prepended as well.
702 func_tr_sh ()
703 {
704 case $1 in
705 [0-9]* | *[!a-zA-Z0-9_]*)
706 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
707 ;;
708 * )
709 func_tr_sh_result=$1
710 ;;
711 esac
712 }
713
714
715 # func_version
716 # Echo version message to standard output and exit.
717 func_version ()
718 {
719 $opt_debug
720
721 $SED -n '/(C)/!b go
722 :more
723 /\./!{
724 N
725 s/\n# / /
726 b more
727 }
728 :go
729 /^# '$PROGRAM' (GNU /,/# warranty; / {
730 s/^# //
731 s/^# *$//
732 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
733 p
734 }' < "$progpath"
735 exit $?
736 }
737
738 # func_usage
739 # Echo short help message to standard output and exit.
740 func_usage ()
741 {
742 $opt_debug
743
744 $SED -n '/^# Usage:/,/^# *.*--help/ {
745 s/^# //
746 s/^# *$//
747 s/\$progname/'$progname'/
748 p
749 }' < "$progpath"
750 echo
751 $ECHO "run \`$progname --help | more' for full usage"
752 exit $?
753 }
754
755 # func_help [NOEXIT]
756 # Echo long help message to standard output and exit,
757 # unless 'noexit' is passed as argument.
758 func_help ()
759 {
760 $opt_debug
761
762 $SED -n '/^# Usage:/,/# Report bugs to/ {
763 :print
764 s/^# //
765 s/^# *$//
766 s*\$progname*'$progname'*
767 s*\$host*'"$host"'*
768 s*\$SHELL*'"$SHELL"'*
769 s*\$LTCC*'"$LTCC"'*
770 s*\$LTCFLAGS*'"$LTCFLAGS"'*
771 s*\$LD*'"$LD"'*
772 s/\$with_gnu_ld/'"$with_gnu_ld"'/
773 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
774 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
775 p
776 d
777 }
778 /^# .* home page:/b print
779 /^# General help using/b print
780 ' < "$progpath"
781 ret=$?
782 if test -z "$1"; then
783 exit $ret
784 fi
785 }
786
787 # func_missing_arg argname
788 # Echo program name prefixed message to standard error and set global
789 # exit_cmd.
790 func_missing_arg ()
791 {
792 $opt_debug
793
794 func_error "missing argument for $1."
795 exit_cmd=exit
796 }
797
798
799 # func_split_short_opt shortopt
800 # Set func_split_short_opt_name and func_split_short_opt_arg shell
801 # variables after splitting SHORTOPT after the 2nd character.
802 func_split_short_opt ()
803 {
804 my_sed_short_opt='1s/^\(..\).*$/\1/;q'
805 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
806
807 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
808 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
809 } # func_split_short_opt may be replaced by extended shell implementation
810
811
812 # func_split_long_opt longopt
813 # Set func_split_long_opt_name and func_split_long_opt_arg shell
814 # variables after splitting LONGOPT at the `=' sign.
815 func_split_long_opt ()
816 {
817 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
818 my_sed_long_arg='1s/^--[^=]*=//'
819
820 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
821 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
822 } # func_split_long_opt may be replaced by extended shell implementation
823
824 exit_cmd=:
825
826
827
828
829
830 magic="%%%MAGIC variable%%%"
831 magic_exe="%%%MAGIC EXE variable%%%"
832
833 # Global variables.
834 nonopt=
835 preserve_args=
836 lo2o="s/\\.lo\$/.${objext}/"
837 o2lo="s/\\.${objext}\$/.lo/"
838 extracted_archives=
839 extracted_serial=0
840
841 # If this variable is set in any of the actions, the command in it
842 # will be execed at the end. This prevents here-documents from being
843 # left over by shells.
844 exec_cmd=
845
846 # func_append var value
847 # Append VALUE to the end of shell variable VAR.
848 func_append ()
849 {
850 eval "${1}=\$${1}\${2}"
851 } # func_append may be replaced by extended shell implementation
852
853 # func_append_quoted var value
854 # Quote VALUE and append to the end of shell variable VAR, separated
855 # by a space.
856 func_append_quoted ()
857 {
858 func_quote_for_eval "${2}"
859 eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
860 } # func_append_quoted may be replaced by extended shell implementation
861
862
863 # func_arith arithmetic-term...
864 func_arith ()
865 {
866 func_arith_result=`expr "${@}"`
867 } # func_arith may be replaced by extended shell implementation
868
869
870 # func_len string
871 # STRING may not start with a hyphen.
872 func_len ()
873 {
874 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
875 } # func_len may be replaced by extended shell implementation
876
877
878 # func_lo2o object
879 func_lo2o ()
880 {
881 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
882 } # func_lo2o may be replaced by extended shell implementation
883
884
885 # func_xform libobj-or-source
886 func_xform ()
887 {
888 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
889 } # func_xform may be replaced by extended shell implementation
890
891
892 # func_fatal_configuration arg...
893 # Echo program name prefixed message to standard error, followed by
894 # a configuration failure hint, and exit.
895 func_fatal_configuration ()
896 {
897 func_error ${1+"$@"}
898 func_error "See the $PACKAGE documentation for more information."
899 func_fatal_error "Fatal configuration error."
900 }
901
902
903 # func_config
904 # Display the configuration for all the tags in this script.
905 func_config ()
906 {
907 re_begincf='^# ### BEGIN LIBTOOL'
908 re_endcf='^# ### END LIBTOOL'
909
910 # Default configuration.
911 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
912
913 # Now print the configurations for the tags.
914 for tagname in $taglist; do
915 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
916 done
917
918 exit $?
919 }
920
921 # func_features
922 # Display the features supported by this script.
923 func_features ()
924 {
925 echo "host: $host"
926 if test "$build_libtool_libs" = yes; then
927 echo "enable shared libraries"
928 else
929 echo "disable shared libraries"
930 fi
931 if test "$build_old_libs" = yes; then
932 echo "enable static libraries"
933 else
934 echo "disable static libraries"
935 fi
936
937 exit $?
938 }
939
940 # func_enable_tag tagname
941 # Verify that TAGNAME is valid, and either flag an error and exit, or
942 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
943 # variable here.
944 func_enable_tag ()
945 {
946 # Global variable:
947 tagname="$1"
948
949 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
950 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
951 sed_extractcf="/$re_begincf/,/$re_endcf/p"
952
953 # Validate tagname.
954 case $tagname in
955 *[!-_A-Za-z0-9,/]*)
956 func_fatal_error "invalid tag name: $tagname"
957 ;;
958 esac
959
960 # Don't test for the "default" C tag, as we know it's
961 # there but not specially marked.
962 case $tagname in
963 CC) ;;
964 *)
965 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
966 taglist="$taglist $tagname"
967
968 # Evaluate the configuration. Be careful to quote the path
969 # and the sed script, to avoid splitting on whitespace, but
970 # also don't use non-portable quotes within backquotes within
971 # quotes we have to do it in 2 steps:
972 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
973 eval "$extractedcf"
974 else
975 func_error "ignoring unknown tag $tagname"
976 fi
977 ;;
978 esac
979 }
980
981 # func_check_version_match
982 # Ensure that we are using m4 macros, and libtool script from the same
983 # release of libtool.
984 func_check_version_match ()
985 {
986 if test "$package_revision" != "$macro_revision"; then
987 if test "$VERSION" != "$macro_version"; then
988 if test -z "$macro_version"; then
989 cat >&2 <<_LT_EOF
990 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
991 $progname: definition of this LT_INIT comes from an older release.
992 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
993 $progname: and run autoconf again.
994 _LT_EOF
995 else
996 cat >&2 <<_LT_EOF
997 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
998 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
999 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
1000 $progname: and run autoconf again.
1001 _LT_EOF
1002 fi
1003 else
1004 cat >&2 <<_LT_EOF
1005 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
1006 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
1007 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
1008 $progname: of $PACKAGE $VERSION and run autoconf again.
1009 _LT_EOF
1010 fi
1011
1012 exit $EXIT_MISMATCH
1013 fi
1014 }
1015
1016
1017 # Shorthand for --mode=foo, only valid as the first argument
1018 case $1 in
1019 clean|clea|cle|cl)
1020 shift; set dummy --mode clean ${1+"$@"}; shift
1021 ;;
1022 compile|compil|compi|comp|com|co|c)
1023 shift; set dummy --mode compile ${1+"$@"}; shift
1024 ;;
1025 execute|execut|execu|exec|exe|ex|e)
1026 shift; set dummy --mode execute ${1+"$@"}; shift
1027 ;;
1028 finish|finis|fini|fin|fi|f)
1029 shift; set dummy --mode finish ${1+"$@"}; shift
1030 ;;
1031 install|instal|insta|inst|ins|in|i)
1032 shift; set dummy --mode install ${1+"$@"}; shift
1033 ;;
1034 link|lin|li|l)
1035 shift; set dummy --mode link ${1+"$@"}; shift
1036 ;;
1037 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1038 shift; set dummy --mode uninstall ${1+"$@"}; shift
1039 ;;
1040 esac
1041
1042
1043
1044 # Option defaults:
1045 opt_debug=:
1046 opt_dry_run=false
1047 opt_config=false
1048 opt_preserve_dup_deps=false
1049 opt_features=false
1050 opt_finish=false
1051 opt_help=false
1052 opt_help_all=false
1053 opt_silent=:
1054 opt_verbose=:
1055 opt_silent=false
1056 opt_verbose=false
1057
1058
1059 # Parse options once, thoroughly. This comes as soon as possible in the
1060 # script to make things like `--version' happen as quickly as we can.
1061 {
1062 # this just eases exit handling
1063 while test $# -gt 0; do
1064 opt="$1"
1065 shift
1066 case $opt in
1067 --debug|-x) opt_debug='set -x'
1068 func_echo "enabling shell trace mode"
1069 $opt_debug
1070 ;;
1071 --dry-run|--dryrun|-n)
1072 opt_dry_run=:
1073 ;;
1074 --config)
1075 opt_config=:
1076 func_config
1077 ;;
1078 --dlopen|-dlopen)
1079 optarg="$1"
1080 opt_dlopen="${opt_dlopen+$opt_dlopen
1081 }$optarg"
1082 shift
1083 ;;
1084 --preserve-dup-deps)
1085 opt_preserve_dup_deps=:
1086 ;;
1087 --features)
1088 opt_features=:
1089 func_features
1090 ;;
1091 --finish)
1092 opt_finish=:
1093 set dummy --mode finish ${1+"$@"}; shift
1094 ;;
1095 --help)
1096 opt_help=:
1097 ;;
1098 --help-all)
1099 opt_help_all=:
1100 opt_help=': help-all'
1101 ;;
1102 --mode)
1103 test $# = 0 && func_missing_arg $opt && break
1104 optarg="$1"
1105 opt_mode="$optarg"
1106 case $optarg in
1107 # Valid mode arguments:
1108 clean|compile|execute|finish|install|link|relink|uninstall) ;;
1109
1110 # Catch anything else as an error
1111 *) func_error "invalid argument for $opt"
1112 exit_cmd=exit
1113 break
1114 ;;
1115 esac
1116 shift
1117 ;;
1118 --no-silent|--no-quiet)
1119 opt_silent=false
1120 func_append preserve_args " $opt"
1121 ;;
1122 --no-verbose)
1123 opt_verbose=false
1124 func_append preserve_args " $opt"
1125 ;;
1126 --silent|--quiet)
1127 opt_silent=:
1128 func_append preserve_args " $opt"
1129 opt_verbose=false
1130 ;;
1131 --verbose|-v)
1132 opt_verbose=:
1133 func_append preserve_args " $opt"
1134 opt_silent=false
1135 ;;
1136 --tag)
1137 test $# = 0 && func_missing_arg $opt && break
1138 optarg="$1"
1139 opt_tag="$optarg"
1140 func_append preserve_args " $opt $optarg"
1141 func_enable_tag "$optarg"
1142 shift
1143 ;;
1144
1145 -\?|-h) func_usage ;;
1146 --help) func_help ;;
1147 --version) func_version ;;
1148
1149 # Separate optargs to long options:
1150 --*=*)
1151 func_split_long_opt "$opt"
1152 set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1153 shift
1154 ;;
1155
1156 # Separate non-argument short options:
1157 -\?*|-h*|-n*|-v*)
1158 func_split_short_opt "$opt"
1159 set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1160 shift
1161 ;;
1162
1163 --) break ;;
1164 -*) func_fatal_help "unrecognized option \`$opt'" ;;
1165 *) set dummy "$opt" ${1+"$@"}; shift; break ;;
1166 esac
1167 done
1168
1169 # Validate options:
1170
1171 # save first non-option argument
1172 if test "$#" -gt 0; then
1173 nonopt="$opt"
1174 shift
1175 fi
1176
1177 # preserve --debug
1178 test "$opt_debug" = : || func_append preserve_args " --debug"
1179
1180 case $host in
1181 *cygwin* | *mingw* | *pw32* | *cegcc*)
1182 # don't eliminate duplications in $postdeps and $predeps
1183 opt_duplicate_compiler_generated_deps=:
1184 ;;
1185 *)
1186 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1187 ;;
1188 esac
1189
1190 $opt_help || {
1191 # Sanity checks first:
1192 func_check_version_match
1193
1194 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1195 func_fatal_configuration "not configured to build any kind of library"
1196 fi
1197
1198 # Darwin sucks
1199 eval std_shrext=\"$shrext_cmds\"
1200
1201 # Only execute mode is allowed to have -dlopen flags.
1202 if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1203 func_error "unrecognized option \`-dlopen'"
1204 $ECHO "$help" 1>&2
1205 exit $EXIT_FAILURE
1206 fi
1207
1208 # Change the help message to a mode-specific one.
1209 generic_help="$help"
1210 help="Try \`$progname --help --mode=$opt_mode' for more information."
1211 }
1212
1213
1214 # Bail if the options were screwed
1215 $exit_cmd $EXIT_FAILURE
1216 }
1217
1218
1219
1220
1221 ## ----------- ##
1222 ## Main. ##
1223 ## ----------- ##
1224
1225 # func_lalib_p file
1226 # True iff FILE is a libtool `.la' library or `.lo' object file.
1227 # This function is only a basic sanity check; it will hardly flush out
1228 # determined imposters.
1229 func_lalib_p ()
1230 {
1231 test -f "$1" &&
1232 $SED -e 4q "$1" 2>/dev/null \
1233 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
1234 }
1235
1236 # func_lalib_unsafe_p file
1237 # True iff FILE is a libtool `.la' library or `.lo' object file.
1238 # This function implements the same check as func_lalib_p without
1239 # resorting to external programs. To this end, it redirects stdin and
1240 # closes it afterwards, without saving the original file descriptor.
1241 # As a safety measure, use it only where a negative result would be
1242 # fatal anyway. Works if `file' does not exist.
1243 func_lalib_unsafe_p ()
1244 {
1245 lalib_p=no
1246 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
1247 for lalib_p_l in 1 2 3 4
1248 do
1249 read lalib_p_line
1250 case "$lalib_p_line" in
1251 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
1252 esac
1253 done
1254 exec 0<&5 5<&-
1255 fi
1256 test "$lalib_p" = yes
1257 }
1258
1259 # func_ltwrapper_script_p file
1260 # True iff FILE is a libtool wrapper script
1261 # This function is only a basic sanity check; it will hardly flush out
1262 # determined imposters.
1263 func_ltwrapper_script_p ()
1264 {
1265 func_lalib_p "$1"
1266 }
1267
1268 # func_ltwrapper_executable_p file
1269 # True iff FILE is a libtool wrapper executable
1270 # This function is only a basic sanity check; it will hardly flush out
1271 # determined imposters.
1272 func_ltwrapper_executable_p ()
1273 {
1274 func_ltwrapper_exec_suffix=
1275 case $1 in
1276 *.exe) ;;
1277 *) func_ltwrapper_exec_suffix=.exe ;;
1278 esac
1279 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
1280 }
1281
1282 # func_ltwrapper_scriptname file
1283 # Assumes file is an ltwrapper_executable
1284 # uses $file to determine the appropriate filename for a
1285 # temporary ltwrapper_script.
1286 func_ltwrapper_scriptname ()
1287 {
1288 func_dirname_and_basename "$1" "" "."
1289 func_stripname '' '.exe' "$func_basename_result"
1290 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
1291 }
1292
1293 # func_ltwrapper_p file
1294 # True iff FILE is a libtool wrapper script or wrapper executable
1295 # This function is only a basic sanity check; it will hardly flush out
1296 # determined imposters.
1297 func_ltwrapper_p ()
1298 {
1299 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
1300 }
1301
1302
1303 # func_execute_cmds commands fail_cmd
1304 # Execute tilde-delimited COMMANDS.
1305 # If FAIL_CMD is given, eval that upon failure.
1306 # FAIL_CMD may read-access the current command in variable CMD!
1307 func_execute_cmds ()
1308 {
1309 $opt_debug
1310 save_ifs=$IFS; IFS='~'
1311 for cmd in $1; do
1312 IFS=$save_ifs
1313 eval cmd=\"$cmd\"
1314 func_show_eval "$cmd" "${2-:}"
1315 done
1316 IFS=$save_ifs
1317 }
1318
1319
1320 # func_source file
1321 # Source FILE, adding directory component if necessary.
1322 # Note that it is not necessary on cygwin/mingw to append a dot to
1323 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
1324 # behavior happens only for exec(3), not for open(2)! Also, sourcing
1325 # `FILE.' does not work on cygwin managed mounts.
1326 func_source ()
1327 {
1328 $opt_debug
1329 case $1 in
1330 */* | *\\*) . "$1" ;;
1331 *) . "./$1" ;;
1332 esac
1333 }
1334
1335
1336 # func_resolve_sysroot PATH
1337 # Replace a leading = in PATH with a sysroot. Store the result into
1338 # func_resolve_sysroot_result
1339 func_resolve_sysroot ()
1340 {
1341 func_resolve_sysroot_result=$1
1342 case $func_resolve_sysroot_result in
1343 =*)
1344 func_stripname '=' '' "$func_resolve_sysroot_result"
1345 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
1346 ;;
1347 esac
1348 }
1349
1350 # func_replace_sysroot PATH
1351 # If PATH begins with the sysroot, replace it with = and
1352 # store the result into func_replace_sysroot_result.
1353 func_replace_sysroot ()
1354 {
1355 case "$lt_sysroot:$1" in
1356 ?*:"$lt_sysroot"*)
1357 func_stripname "$lt_sysroot" '' "$1"
1358 func_replace_sysroot_result="=$func_stripname_result"
1359 ;;
1360 *)
1361 # Including no sysroot.
1362 func_replace_sysroot_result=$1
1363 ;;
1364 esac
1365 }
1366
1367 # func_infer_tag arg
1368 # Infer tagged configuration to use if any are available and
1369 # if one wasn't chosen via the "--tag" command line option.
1370 # Only attempt this if the compiler in the base compile
1371 # command doesn't match the default compiler.
1372 # arg is usually of the form 'gcc ...'
1373 func_infer_tag ()
1374 {
1375 $opt_debug
1376
1377 # FreeBSD-specific: where we install compilers with non-standard names
1378 tag_compilers_CC="*cc cc* *gcc gcc* clang"
1379 tag_compilers_CXX="*c++ c++* *g++ g++* clang++"
1380 base_compiler=`set -- "$@"; echo $1`
1381
1382 # If $tagname isn't set, then try to infer if the default "CC" tag applies
1383 if test -z "$tagname"; then
1384 for zp in $tag_compilers_CC; do
1385 case $base_compiler in
1386 $zp) tagname="CC"; break;;
1387 esac
1388 done
1389 fi
1390
1391 if test -n "$available_tags" && test -z "$tagname"; then
1392 CC_quoted=
1393 for arg in $CC; do
1394 func_append_quoted CC_quoted "$arg"
1395 done
1396 CC_expanded=`func_echo_all $CC`
1397 CC_quoted_expanded=`func_echo_all $CC_quoted`
1398 case $@ in
1399 # Blanks in the command may have been stripped by the calling shell,
1400 # but not from the CC environment variable when configure was run.
1401 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1402 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
1403 # Blanks at the start of $base_compile will cause this to fail
1404 # if we don't check for them as well.
1405 *)
1406 for z in $available_tags; do
1407 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
1408 # Evaluate the configuration.
1409 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
1410 CC_quoted=
1411 for arg in $CC; do
1412 # Double-quote args containing other shell metacharacters.
1413 func_append_quoted CC_quoted "$arg"
1414 done
1415 CC_expanded=`func_echo_all $CC`
1416 CC_quoted_expanded=`func_echo_all $CC_quoted`
1417 case "$@ " in
1418 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1419 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
1420 # The compiler in the base compile command matches
1421 # the one in the tagged configuration.
1422 # Assume this is the tagged configuration we want.
1423 tagname=$z
1424 break
1425 ;;
1426 esac
1427
1428 # FreeBSD-specific: try compilers based on inferred tag
1429 if test -z "$tagname"; then
1430 eval "tag_compilers=\$tag_compilers_${z}"
1431 if test -n "$tag_compilers"; then
1432 for zp in $tag_compilers; do
1433 case $base_compiler in
1434 $zp) tagname=$z; break;;
1435 esac
1436 done
1437 if test -n "$tagname"; then
1438 break
1439 fi
1440 fi
1441 fi
1442 fi
1443 done
1444 # If $tagname still isn't set, then no tagged configuration
1445 # was found and let the user know that the "--tag" command
1446 # line option must be used.
1447 if test -z "$tagname"; then
1448 func_echo "unable to infer tagged configuration"
1449 func_fatal_error "specify a tag with \`--tag'"
1450 # else
1451 # func_verbose "using $tagname tagged configuration"
1452 fi
1453 ;;
1454 esac
1455 fi
1456 }
1457
1458
1459
1460 # func_write_libtool_object output_name pic_name nonpic_name
1461 # Create a libtool object file (analogous to a ".la" file),
1462 # but don't create it if we're doing a dry run.
1463 func_write_libtool_object ()
1464 {
1465 write_libobj=${1}
1466 if test "$build_libtool_libs" = yes; then
1467 write_lobj=\'${2}\'
1468 else
1469 write_lobj=none
1470 fi
1471
1472 if test "$build_old_libs" = yes; then
1473 write_oldobj=\'${3}\'
1474 else
1475 write_oldobj=none
1476 fi
1477
1478 $opt_dry_run || {
1479 cat >${write_libobj}T <<EOF
1480 # $write_libobj - a libtool object file
1481 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1482 #
1483 # Please DO NOT delete this file!
1484 # It is necessary for linking the library.
1485
1486 # Name of the PIC object.
1487 pic_object=$write_lobj
1488
1489 # Name of the non-PIC object
1490 non_pic_object=$write_oldobj
1491
1492 EOF
1493 $MV "${write_libobj}T" "${write_libobj}"
1494 }
1495 }
1496
1497
1498 ##################################################
1499 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1500 ##################################################
1501
1502 # func_convert_core_file_wine_to_w32 ARG
1503 # Helper function used by file name conversion functions when $build is *nix,
1504 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
1505 # correctly configured wine environment available, with the winepath program
1506 # in $build's $PATH.
1507 #
1508 # ARG is the $build file name to be converted to w32 format.
1509 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
1510 # be empty on error (or when ARG is empty)
1511 func_convert_core_file_wine_to_w32 ()
1512 {
1513 $opt_debug
1514 func_convert_core_file_wine_to_w32_result="$1"
1515 if test -n "$1"; then
1516 # Unfortunately, winepath does not exit with a non-zero error code, so we
1517 # are forced to check the contents of stdout. On the other hand, if the
1518 # command is not found, the shell will set an exit code of 127 and print
1519 # *an error message* to stdout. So we must check for both error code of
1520 # zero AND non-empty stdout, which explains the odd construction:
1521 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1522 if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1523 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1524 $SED -e "$lt_sed_naive_backslashify"`
1525 else
1526 func_convert_core_file_wine_to_w32_result=
1527 fi
1528 fi
1529 }
1530 # end: func_convert_core_file_wine_to_w32
1531
1532
1533 # func_convert_core_path_wine_to_w32 ARG
1534 # Helper function used by path conversion functions when $build is *nix, and
1535 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1536 # configured wine environment available, with the winepath program in $build's
1537 # $PATH. Assumes ARG has no leading or trailing path separator characters.
1538 #
1539 # ARG is path to be converted from $build format to win32.
1540 # Result is available in $func_convert_core_path_wine_to_w32_result.
1541 # Unconvertible file (directory) names in ARG are skipped; if no directory names
1542 # are convertible, then the result may be empty.
1543 func_convert_core_path_wine_to_w32 ()
1544 {
1545 $opt_debug
1546 # unfortunately, winepath doesn't convert paths, only file names
1547 func_convert_core_path_wine_to_w32_result=""
1548 if test -n "$1"; then
1549 oldIFS=$IFS
1550 IFS=:
1551 for func_convert_core_path_wine_to_w32_f in $1; do
1552 IFS=$oldIFS
1553 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1554 if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1555 if test -z "$func_convert_core_path_wine_to_w32_result"; then
1556 func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1557 else
1558 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1559 fi
1560 fi
1561 done
1562 IFS=$oldIFS
1563 fi
1564 }
1565 # end: func_convert_core_path_wine_to_w32
1566
1567
1568 # func_cygpath ARGS...
1569 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1570 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1571 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1572 # (2), returns the Cygwin file name or path in func_cygpath_result (input
1573 # file name or path is assumed to be in w32 format, as previously converted
1574 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
1575 # or path in func_cygpath_result (input file name or path is assumed to be in
1576 # Cygwin format). Returns an empty string on error.
1577 #
1578 # ARGS are passed to cygpath, with the last one being the file name or path to
1579 # be converted.
1580 #
1581 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1582 # environment variable; do not put it in $PATH.
1583 func_cygpath ()
1584 {
1585 $opt_debug
1586 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1587 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1588 if test "$?" -ne 0; then
1589 # on failure, ensure result is empty
1590 func_cygpath_result=
1591 fi
1592 else
1593 func_cygpath_result=
1594 func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1595 fi
1596 }
1597 #end: func_cygpath
1598
1599
1600 # func_convert_core_msys_to_w32 ARG
1601 # Convert file name or path ARG from MSYS format to w32 format. Return
1602 # result in func_convert_core_msys_to_w32_result.
1603 func_convert_core_msys_to_w32 ()
1604 {
1605 $opt_debug
1606 # awkward: cmd appends spaces to result
1607 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1608 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1609 }
1610 #end: func_convert_core_msys_to_w32
1611
1612
1613 # func_convert_file_check ARG1 ARG2
1614 # Verify that ARG1 (a file name in $build format) was converted to $host
1615 # format in ARG2. Otherwise, emit an error message, but continue (resetting
1616 # func_to_host_file_result to ARG1).
1617 func_convert_file_check ()
1618 {
1619 $opt_debug
1620 if test -z "$2" && test -n "$1" ; then
1621 func_error "Could not determine host file name corresponding to"
1622 func_error " \`$1'"
1623 func_error "Continuing, but uninstalled executables may not work."
1624 # Fallback:
1625 func_to_host_file_result="$1"
1626 fi
1627 }
1628 # end func_convert_file_check
1629
1630
1631 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1632 # Verify that FROM_PATH (a path in $build format) was converted to $host
1633 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1634 # func_to_host_file_result to a simplistic fallback value (see below).
1635 func_convert_path_check ()
1636 {
1637 $opt_debug
1638 if test -z "$4" && test -n "$3"; then
1639 func_error "Could not determine the host path corresponding to"
1640 func_error " \`$3'"
1641 func_error "Continuing, but uninstalled executables may not work."
1642 # Fallback. This is a deliberately simplistic "conversion" and
1643 # should not be "improved". See libtool.info.
1644 if test "x$1" != "x$2"; then
1645 lt_replace_pathsep_chars="s|$1|$2|g"
1646 func_to_host_path_result=`echo "$3" |
1647 $SED -e "$lt_replace_pathsep_chars"`
1648 else
1649 func_to_host_path_result="$3"
1650 fi
1651 fi
1652 }
1653 # end func_convert_path_check
1654
1655
1656 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1657 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1658 # and appending REPL if ORIG matches BACKPAT.
1659 func_convert_path_front_back_pathsep ()
1660 {
1661 $opt_debug
1662 case $4 in
1663 $1 ) func_to_host_path_result="$3$func_to_host_path_result"
1664 ;;
1665 esac
1666 case $4 in
1667 $2 ) func_append func_to_host_path_result "$3"
1668 ;;
1669 esac
1670 }
1671 # end func_convert_path_front_back_pathsep
1672
1673
1674 ##################################################
1675 # $build to $host FILE NAME CONVERSION FUNCTIONS #
1676 ##################################################
1677 # invoked via `$to_host_file_cmd ARG'
1678 #
1679 # In each case, ARG is the path to be converted from $build to $host format.
1680 # Result will be available in $func_to_host_file_result.
1681
1682
1683 # func_to_host_file ARG
1684 # Converts the file name ARG from $build format to $host format. Return result
1685 # in func_to_host_file_result.
1686 func_to_host_file ()
1687 {
1688 $opt_debug
1689 $to_host_file_cmd "$1"
1690 }
1691 # end func_to_host_file
1692
1693
1694 # func_to_tool_file ARG LAZY
1695 # converts the file name ARG from $build format to toolchain format. Return
1696 # result in func_to_tool_file_result. If the conversion in use is listed
1697 # in (the comma separated) LAZY, no conversion takes place.
1698 func_to_tool_file ()
1699 {
1700 $opt_debug
1701 case ,$2, in
1702 *,"$to_tool_file_cmd",*)
1703 func_to_tool_file_result=$1
1704 ;;
1705 *)
1706 $to_tool_file_cmd "$1"
1707 func_to_tool_file_result=$func_to_host_file_result
1708 ;;
1709 esac
1710 }
1711 # end func_to_tool_file
1712
1713
1714 # func_convert_file_noop ARG
1715 # Copy ARG to func_to_host_file_result.
1716 func_convert_file_noop ()
1717 {
1718 func_to_host_file_result="$1"
1719 }
1720 # end func_convert_file_noop
1721
1722
1723 # func_convert_file_msys_to_w32 ARG
1724 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1725 # conversion to w32 is not available inside the cwrapper. Returns result in
1726 # func_to_host_file_result.
1727 func_convert_file_msys_to_w32 ()
1728 {
1729 $opt_debug
1730 func_to_host_file_result="$1"
1731 if test -n "$1"; then
1732 func_convert_core_msys_to_w32 "$1"
1733 func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1734 fi
1735 func_convert_file_check "$1" "$func_to_host_file_result"
1736 }
1737 # end func_convert_file_msys_to_w32
1738
1739
1740 # func_convert_file_cygwin_to_w32 ARG
1741 # Convert file name ARG from Cygwin to w32 format. Returns result in
1742 # func_to_host_file_result.
1743 func_convert_file_cygwin_to_w32 ()
1744 {
1745 $opt_debug
1746 func_to_host_file_result="$1"
1747 if test -n "$1"; then
1748 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1749 # LT_CYGPATH in this case.
1750 func_to_host_file_result=`cygpath -m "$1"`
1751 fi
1752 func_convert_file_check "$1" "$func_to_host_file_result"
1753 }
1754 # end func_convert_file_cygwin_to_w32
1755
1756
1757 # func_convert_file_nix_to_w32 ARG
1758 # Convert file name ARG from *nix to w32 format. Requires a wine environment
1759 # and a working winepath. Returns result in func_to_host_file_result.
1760 func_convert_file_nix_to_w32 ()
1761 {
1762 $opt_debug
1763 func_to_host_file_result="$1"
1764 if test -n "$1"; then
1765 func_convert_core_file_wine_to_w32 "$1"
1766 func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1767 fi
1768 func_convert_file_check "$1" "$func_to_host_file_result"
1769 }
1770 # end func_convert_file_nix_to_w32
1771
1772
1773 # func_convert_file_msys_to_cygwin ARG
1774 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1775 # Returns result in func_to_host_file_result.
1776 func_convert_file_msys_to_cygwin ()
1777 {
1778 $opt_debug
1779 func_to_host_file_result="$1"
1780 if test -n "$1"; then
1781 func_convert_core_msys_to_w32 "$1"
1782 func_cygpath -u "$func_convert_core_msys_to_w32_result"
1783 func_to_host_file_result="$func_cygpath_result"
1784 fi
1785 func_convert_file_check "$1" "$func_to_host_file_result"
1786 }
1787 # end func_convert_file_msys_to_cygwin
1788
1789
1790 # func_convert_file_nix_to_cygwin ARG
1791 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1792 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1793 # in func_to_host_file_result.
1794 func_convert_file_nix_to_cygwin ()
1795 {
1796 $opt_debug
1797 func_to_host_file_result="$1"
1798 if test -n "$1"; then
1799 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1800 func_convert_core_file_wine_to_w32 "$1"
1801 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1802 func_to_host_file_result="$func_cygpath_result"
1803 fi
1804 func_convert_file_check "$1" "$func_to_host_file_result"
1805 }
1806 # end func_convert_file_nix_to_cygwin
1807
1808
1809 #############################################
1810 # $build to $host PATH CONVERSION FUNCTIONS #
1811 #############################################
1812 # invoked via `$to_host_path_cmd ARG'
1813 #
1814 # In each case, ARG is the path to be converted from $build to $host format.
1815 # The result will be available in $func_to_host_path_result.
1816 #
1817 # Path separators are also converted from $build format to $host format. If
1818 # ARG begins or ends with a path separator character, it is preserved (but
1819 # converted to $host format) on output.
1820 #
1821 # All path conversion functions are named using the following convention:
1822 # file name conversion function : func_convert_file_X_to_Y ()
1823 # path conversion function : func_convert_path_X_to_Y ()
1824 # where, for any given $build/$host combination the 'X_to_Y' value is the
1825 # same. If conversion functions are added for new $build/$host combinations,
1826 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
1827 # will break.
1828
1829
1830 # func_init_to_host_path_cmd
1831 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
1832 # appropriate value, based on the value of $to_host_file_cmd.
1833 to_host_path_cmd=
1834 func_init_to_host_path_cmd ()
1835 {
1836 $opt_debug
1837 if test -z "$to_host_path_cmd"; then
1838 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1839 to_host_path_cmd="func_convert_path_${func_stripname_result}"
1840 fi
1841 }
1842
1843
1844 # func_to_host_path ARG
1845 # Converts the path ARG from $build format to $host format. Return result
1846 # in func_to_host_path_result.
1847 func_to_host_path ()
1848 {
1849 $opt_debug
1850 func_init_to_host_path_cmd
1851 $to_host_path_cmd "$1"
1852 }
1853 # end func_to_host_path
1854
1855
1856 # func_convert_path_noop ARG
1857 # Copy ARG to func_to_host_path_result.
1858 func_convert_path_noop ()
1859 {
1860 func_to_host_path_result="$1"
1861 }
1862 # end func_convert_path_noop
1863
1864
1865 # func_convert_path_msys_to_w32 ARG
1866 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1867 # conversion to w32 is not available inside the cwrapper. Returns result in
1868 # func_to_host_path_result.
1869 func_convert_path_msys_to_w32 ()
1870 {
1871 $opt_debug
1872 func_to_host_path_result="$1"
1873 if test -n "$1"; then
1874 # Remove leading and trailing path separator characters from ARG. MSYS
1875 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1876 # and winepath ignores them completely.
1877 func_stripname : : "$1"
1878 func_to_host_path_tmp1=$func_stripname_result
1879 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1880 func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1881 func_convert_path_check : ";" \
1882 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1883 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1884 fi
1885 }
1886 # end func_convert_path_msys_to_w32
1887
1888
1889 # func_convert_path_cygwin_to_w32 ARG
1890 # Convert path ARG from Cygwin to w32 format. Returns result in
1891 # func_to_host_file_result.
1892 func_convert_path_cygwin_to_w32 ()
1893 {
1894 $opt_debug
1895 func_to_host_path_result="$1"
1896 if test -n "$1"; then
1897 # See func_convert_path_msys_to_w32:
1898 func_stripname : : "$1"
1899 func_to_host_path_tmp1=$func_stripname_result
1900 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1901 func_convert_path_check : ";" \
1902 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1903 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1904 fi
1905 }
1906 # end func_convert_path_cygwin_to_w32
1907
1908
1909 # func_convert_path_nix_to_w32 ARG
1910 # Convert path ARG from *nix to w32 format. Requires a wine environment and
1911 # a working winepath. Returns result in func_to_host_file_result.
1912 func_convert_path_nix_to_w32 ()
1913 {
1914 $opt_debug
1915 func_to_host_path_result="$1"
1916 if test -n "$1"; then
1917 # See func_convert_path_msys_to_w32:
1918 func_stripname : : "$1"
1919 func_to_host_path_tmp1=$func_stripname_result
1920 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1921 func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1922 func_convert_path_check : ";" \
1923 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1924 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1925 fi
1926 }
1927 # end func_convert_path_nix_to_w32
1928
1929
1930 # func_convert_path_msys_to_cygwin ARG
1931 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1932 # Returns result in func_to_host_file_result.
1933 func_convert_path_msys_to_cygwin ()
1934 {
1935 $opt_debug
1936 func_to_host_path_result="$1"
1937 if test -n "$1"; then
1938 # See func_convert_path_msys_to_w32:
1939 func_stripname : : "$1"
1940 func_to_host_path_tmp1=$func_stripname_result
1941 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1942 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1943 func_to_host_path_result="$func_cygpath_result"
1944 func_convert_path_check : : \
1945 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1946 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1947 fi
1948 }
1949 # end func_convert_path_msys_to_cygwin
1950
1951
1952 # func_convert_path_nix_to_cygwin ARG
1953 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1954 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1955 # func_to_host_file_result.
1956 func_convert_path_nix_to_cygwin ()
1957 {
1958 $opt_debug
1959 func_to_host_path_result="$1"
1960 if test -n "$1"; then
1961 # Remove leading and trailing path separator characters from
1962 # ARG. msys behavior is inconsistent here, cygpath turns them
1963 # into '.;' and ';.', and winepath ignores them completely.
1964 func_stripname : : "$1"
1965 func_to_host_path_tmp1=$func_stripname_result
1966 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1967 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1968 func_to_host_path_result="$func_cygpath_result"
1969 func_convert_path_check : : \
1970 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1971 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1972 fi
1973 }
1974 # end func_convert_path_nix_to_cygwin
1975
1976
1977 # func_mode_compile arg...
1978 func_mode_compile ()
1979 {
1980 $opt_debug
1981 # Get the compilation command and the source file.
1982 base_compile=
1983 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1984 suppress_opt=yes
1985 suppress_output=
1986 arg_mode=normal
1987 libobj=
1988 later=
1989 pie_flag=
1990
1991 for arg
1992 do
1993 case $arg_mode in
1994 arg )
1995 # do not "continue". Instead, add this to base_compile
1996 lastarg="$arg"
1997 arg_mode=normal
1998 ;;
1999
2000 target )
2001 libobj="$arg"
2002 arg_mode=normal
2003 continue
2004 ;;
2005
2006 normal )
2007 # Accept any command-line options.
2008 case $arg in
2009 -o)
2010 test -n "$libobj" && \
2011 func_fatal_error "you cannot specify \`-o' more than once"
2012 arg_mode=target
2013 continue
2014 ;;
2015
2016 -pie | -fpie | -fPIE)
2017 func_append pie_flag " $arg"
2018 continue
2019 ;;
2020
2021 -shared | -static | -prefer-pic | -prefer-non-pic)
2022 func_append later " $arg"
2023 continue
2024 ;;
2025
2026 -no-suppress)
2027 suppress_opt=no
2028 continue
2029 ;;
2030
2031 -Xcompiler)
2032 arg_mode=arg # the next one goes into the "base_compile" arg list
2033 continue # The current "srcfile" will either be retained or
2034 ;; # replaced later. I would guess that would be a bug.
2035
2036 -Wc,*)
2037 func_stripname '-Wc,' '' "$arg"
2038 args=$func_stripname_result
2039 lastarg=
2040 save_ifs="$IFS"; IFS=','
2041 for arg in $args; do
2042 IFS="$save_ifs"
2043 func_append_quoted lastarg "$arg"
2044 done
2045 IFS="$save_ifs"
2046 func_stripname ' ' '' "$lastarg"
2047 lastarg=$func_stripname_result
2048
2049 # Add the arguments to base_compile.
2050 func_append base_compile " $lastarg"
2051 continue
2052 ;;
2053
2054 *)
2055 # Accept the current argument as the source file.
2056 # The previous "srcfile" becomes the current argument.
2057 #
2058 lastarg="$srcfile"
2059 srcfile="$arg"
2060 ;;
2061 esac # case $arg
2062 ;;
2063 esac # case $arg_mode
2064
2065 # Aesthetically quote the previous argument.
2066 func_append_quoted base_compile "$lastarg"
2067 done # for arg
2068
2069 case $arg_mode in
2070 arg)
2071 func_fatal_error "you must specify an argument for -Xcompile"
2072 ;;
2073 target)
2074 func_fatal_error "you must specify a target with \`-o'"
2075 ;;
2076 *)
2077 # Get the name of the library object.
2078 test -z "$libobj" && {
2079 func_basename "$srcfile"
2080 libobj="$func_basename_result"
2081 }
2082 ;;
2083 esac
2084
2085 # Recognize several different file suffixes.
2086 # If the user specifies -o file.o, it is replaced with file.lo
2087 case $libobj in
2088 *.[cCFSifmso] | \
2089 *.ada | *.adb | *.ads | *.asm | \
2090 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
2091 *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
2092 func_xform "$libobj"
2093 libobj=$func_xform_result
2094 ;;
2095 esac
2096
2097 case $libobj in
2098 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
2099 *)
2100 func_fatal_error "cannot determine name of library object from \`$libobj'"
2101 ;;
2102 esac
2103
2104 func_infer_tag $base_compile
2105
2106 for arg in $later; do
2107 case $arg in
2108 -shared)
2109 test "$build_libtool_libs" != yes && \
2110 func_fatal_configuration "can not build a shared library"
2111 build_old_libs=no
2112 continue
2113 ;;
2114
2115 -static)
2116 build_libtool_libs=no
2117 build_old_libs=yes
2118 continue
2119 ;;
2120
2121 -prefer-pic)
2122 pic_mode=yes
2123 continue
2124 ;;
2125
2126 -prefer-non-pic)
2127 pic_mode=no
2128 continue
2129 ;;
2130 esac
2131 done
2132
2133 func_quote_for_eval "$libobj"
2134 test "X$libobj" != "X$func_quote_for_eval_result" \
2135 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
2136 && func_warning "libobj name \`$libobj' may not contain shell special characters."
2137 func_dirname_and_basename "$obj" "/" ""
2138 objname="$func_basename_result"
2139 xdir="$func_dirname_result"
2140 lobj=${xdir}$objdir/$objname
2141
2142 test -z "$base_compile" && \
2143 func_fatal_help "you must specify a compilation command"
2144
2145 # Delete any leftover library objects.
2146 if test "$build_old_libs" = yes; then
2147 removelist="$obj $lobj $libobj ${libobj}T"
2148 else
2149 removelist="$lobj $libobj ${libobj}T"
2150 fi
2151
2152 # On Cygwin there's no "real" PIC flag so we must build both object types
2153 case $host_os in
2154 cygwin* | mingw* | pw32* | os2* | cegcc*)
2155 pic_mode=default
2156 ;;
2157 esac
2158 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
2159 # non-PIC code in shared libraries is not supported
2160 pic_mode=default
2161 fi
2162
2163 # Calculate the filename of the output object if compiler does
2164 # not support -o with -c
2165 if test "$compiler_c_o" = no; then
2166 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
2167 lockfile="$output_obj.lock"
2168 else
2169 output_obj=
2170 need_locks=no
2171 lockfile=
2172 fi
2173
2174 # Lock this critical section if it is needed
2175 # We use this script file to make the link, it avoids creating a new file
2176 if test "$need_locks" = yes; then
2177 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
2178 func_echo "Waiting for $lockfile to be removed"
2179 sleep 2
2180 done
2181 elif test "$need_locks" = warn; then
2182 if test -f "$lockfile"; then
2183 $ECHO "\
2184 *** ERROR, $lockfile exists and contains:
2185 `cat $lockfile 2>/dev/null`
2186
2187 This indicates that another process is trying to use the same
2188 temporary object file, and libtool could not work around it because
2189 your compiler does not support \`-c' and \`-o' together. If you
2190 repeat this compilation, it may succeed, by chance, but you had better
2191 avoid parallel builds (make -j) in this platform, or get a better
2192 compiler."
2193
2194 $opt_dry_run || $RM $removelist
2195 exit $EXIT_FAILURE
2196 fi
2197 func_append removelist " $output_obj"
2198 $ECHO "$srcfile" > "$lockfile"
2199 fi
2200
2201 $opt_dry_run || $RM $removelist
2202 func_append removelist " $lockfile"
2203 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
2204
2205 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
2206 srcfile=$func_to_tool_file_result
2207 func_quote_for_eval "$srcfile"
2208 qsrcfile=$func_quote_for_eval_result
2209
2210 # Only build a PIC object if we are building libtool libraries.
2211 if test "$build_libtool_libs" = yes; then
2212 # Without this assignment, base_compile gets emptied.
2213 fbsd_hideous_sh_bug=$base_compile
2214
2215 if test "$pic_mode" != no; then
2216 command="$base_compile $qsrcfile $pic_flag"
2217 else
2218 # Don't build PIC code
2219 command="$base_compile $qsrcfile"
2220 fi
2221
2222 func_mkdir_p "$xdir$objdir"
2223
2224 if test -z "$output_obj"; then
2225 # Place PIC objects in $objdir
2226 func_append command " -o $lobj"
2227 fi
2228
2229 func_show_eval_locale "$command" \
2230 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
2231
2232 if test "$need_locks" = warn &&
2233 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
2234 $ECHO "\
2235 *** ERROR, $lockfile contains:
2236 `cat $lockfile 2>/dev/null`
2237
2238 but it should contain:
2239 $srcfile
2240
2241 This indicates that another process is trying to use the same
2242 temporary object file, and libtool could not work around it because
2243 your compiler does not support \`-c' and \`-o' together. If you
2244 repeat this compilation, it may succeed, by chance, but you had better
2245 avoid parallel builds (make -j) in this platform, or get a better
2246 compiler."
2247
2248 $opt_dry_run || $RM $removelist
2249 exit $EXIT_FAILURE
2250 fi
2251
2252 # Just move the object if needed, then go on to compile the next one
2253 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
2254 func_show_eval '$MV "$output_obj" "$lobj"' \
2255 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
2256 fi
2257
2258 # Allow error messages only from the first compilation.
2259 if test "$suppress_opt" = yes; then
2260 suppress_output=' >/dev/null 2>&1'
2261 fi
2262 fi
2263
2264 # Only build a position-dependent object if we build old libraries.
2265 if test "$build_old_libs" = yes; then
2266 if test "$pic_mode" != yes; then
2267 # Don't build PIC code
2268 command="$base_compile $qsrcfile$pie_flag"
2269 else
2270 command="$base_compile $qsrcfile $pic_flag"
2271 fi
2272 if test "$compiler_c_o" = yes; then
2273 func_append command " -o $obj"
2274 fi
2275
2276 # Suppress compiler output if we already did a PIC compilation.
2277 func_append command "$suppress_output"
2278 func_show_eval_locale "$command" \
2279 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
2280
2281 if test "$need_locks" = warn &&
2282 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
2283 $ECHO "\
2284 *** ERROR, $lockfile contains:
2285 `cat $lockfile 2>/dev/null`
2286
2287 but it should contain:
2288 $srcfile
2289
2290 This indicates that another process is trying to use the same
2291 temporary object file, and libtool could not work around it because
2292 your compiler does not support \`-c' and \`-o' together. If you
2293 repeat this compilation, it may succeed, by chance, but you had better
2294 avoid parallel builds (make -j) in this platform, or get a better
2295 compiler."
2296
2297 $opt_dry_run || $RM $removelist
2298 exit $EXIT_FAILURE
2299 fi
2300
2301 # Just move the object if needed
2302 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
2303 func_show_eval '$MV "$output_obj" "$obj"' \
2304 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
2305 fi
2306 fi
2307
2308 $opt_dry_run || {
2309 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
2310
2311 # Unlock the critical section if it was locked
2312 if test "$need_locks" != no; then
2313 removelist=$lockfile
2314 $RM "$lockfile"
2315 fi
2316 }
2317
2318 exit $EXIT_SUCCESS
2319 }
2320
2321 $opt_help || {
2322 test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
2323 }
2324
2325 func_mode_help ()
2326 {
2327 # We need to display help for each of the modes.
2328 case $opt_mode in
2329 "")
2330 # Generic help is extracted from the usage comments
2331 # at the start of this file.
2332 func_help
2333 ;;
2334
2335 clean)
2336 $ECHO \
2337 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
2338
2339 Remove files from the build directory.
2340
2341 RM is the name of the program to use to delete files associated with each FILE
2342 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
2343 to RM.
2344
2345 If FILE is a libtool library, object or program, all the files associated
2346 with it are deleted. Otherwise, only FILE itself is deleted using RM."
2347 ;;
2348
2349 compile)
2350 $ECHO \
2351 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
2352
2353 Compile a source file into a libtool library object.
2354
2355 This mode accepts the following additional options:
2356
2357 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
2358 -no-suppress do not suppress compiler output for multiple passes
2359 -prefer-pic try to build PIC objects only
2360 -prefer-non-pic try to build non-PIC objects only
2361 -shared do not build a \`.o' file suitable for static linking
2362 -static only build a \`.o' file suitable for static linking
2363 -Wc,FLAG pass FLAG directly to the compiler
2364
2365 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
2366 from the given SOURCEFILE.
2367
2368 The output file name is determined by removing the directory component from
2369 SOURCEFILE, then substituting the C source code suffix \`.c' with the
2370 library object suffix, \`.lo'."
2371 ;;
2372
2373 execute)
2374 $ECHO \
2375 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
2376
2377 Automatically set library path, then run a program.
2378
2379 This mode accepts the following additional options:
2380
2381 -dlopen FILE add the directory containing FILE to the library path
2382
2383 This mode sets the library path environment variable according to \`-dlopen'
2384 flags.
2385
2386 If any of the ARGS are libtool executable wrappers, then they are translated
2387 into their corresponding uninstalled binary, and any of their required library
2388 directories are added to the library path.
2389
2390 Then, COMMAND is executed, with ARGS as arguments."
2391 ;;
2392
2393 finish)
2394 $ECHO \
2395 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
2396
2397 Complete the installation of libtool libraries.
2398
2399 Each LIBDIR is a directory that contains libtool libraries.
2400
2401 The commands that this mode executes may require superuser privileges. Use
2402 the \`--dry-run' option if you just want to see what would be executed."
2403 ;;
2404
2405 install)
2406 $ECHO \
2407 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
2408
2409 Install executables or libraries.
2410
2411 INSTALL-COMMAND is the installation command. The first component should be
2412 either the \`install' or \`cp' program.
2413
2414 The following components of INSTALL-COMMAND are treated specially:
2415
2416 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
2417
2418 The rest of the components are interpreted as arguments to that command (only
2419 BSD-compatible install options are recognized)."
2420 ;;
2421
2422 link)
2423 $ECHO \
2424 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
2425
2426 Link object files or libraries together to form another library, or to
2427 create an executable program.
2428
2429 LINK-COMMAND is a command using the C compiler that you would use to create
2430 a program from several object files.
2431
2432 The following components of LINK-COMMAND are treated specially:
2433
2434 -all-static do not do any dynamic linking at all
2435 -avoid-version do not add a version suffix if possible
2436 -bindir BINDIR specify path to binaries directory (for systems where
2437 libraries must be found in the PATH setting at runtime)
2438 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
2439 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
2440 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
2441 -export-symbols SYMFILE
2442 try to export only the symbols listed in SYMFILE
2443 -export-symbols-regex REGEX
2444 try to export only the symbols matching REGEX
2445 -LLIBDIR search LIBDIR for required installed libraries
2446 -lNAME OUTPUT-FILE requires the installed library libNAME
2447 -module build a library that can dlopened
2448 -no-fast-install disable the fast-install mode
2449 -no-install link a not-installable executable
2450 -no-undefined declare that a library does not refer to external symbols
2451 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
2452 -objectlist FILE Use a list of object files found in FILE to specify objects
2453 -precious-files-regex REGEX
2454 don't remove output files matching REGEX
2455 -release RELEASE specify package release information
2456 -rpath LIBDIR the created library will eventually be installed in LIBDIR
2457 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
2458 -shared only do dynamic linking of libtool libraries
2459 -shrext SUFFIX override the standard shared library file extension
2460 -static do not do any dynamic linking of uninstalled libtool libraries
2461 -static-libtool-libs
2462 do not do any dynamic linking of libtool libraries
2463 -version-info CURRENT[:REVISION[:AGE]]
2464 specify library version info [each variable defaults to 0]
2465 -weak LIBNAME declare that the target provides the LIBNAME interface
2466 -Wc,FLAG
2467 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
2468 -Wl,FLAG
2469 -Xlinker FLAG pass linker-specific FLAG directly to the linker
2470 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
2471
2472 All other options (arguments beginning with \`-') are ignored.
2473
2474 Every other argument is treated as a filename. Files ending in \`.la' are
2475 treated as uninstalled libtool libraries, other files are standard or library
2476 object files.
2477
2478 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
2479 only library objects (\`.lo' files) may be specified, and \`-rpath' is
2480 required, except when creating a convenience library.
2481
2482 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
2483 using \`ar' and \`ranlib', or on Windows using \`lib'.
2484
2485 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
2486 is created, otherwise an executable program is created."
2487 ;;
2488
2489 uninstall)
2490 $ECHO \
2491 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
2492
2493 Remove libraries from an installation directory.
2494
2495 RM is the name of the program to use to delete files associated with each FILE
2496 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
2497 to RM.
2498
2499 If FILE is a libtool library, all the files associated with it are deleted.
2500 Otherwise, only FILE itself is deleted using RM."
2501 ;;
2502
2503 *)
2504 func_fatal_help "invalid operation mode \`$opt_mode'"
2505 ;;
2506 esac
2507
2508 echo
2509 $ECHO "Try \`$progname --help' for more information about other modes."
2510 }
2511
2512 # Now that we've collected a possible --mode arg, show help if necessary
2513 if $opt_help; then
2514 if test "$opt_help" = :; then
2515 func_mode_help
2516 else
2517 {
2518 func_help noexit
2519 for opt_mode in compile link execute install finish uninstall clean; do
2520 func_mode_help
2521 done
2522 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
2523 {
2524 func_help noexit
2525 for opt_mode in compile link execute install finish uninstall clean; do
2526 echo
2527 func_mode_help
2528 done
2529 } |
2530 sed '1d
2531 /^When reporting/,/^Report/{
2532 H
2533 d
2534 }
2535 $x
2536 /information about other modes/d
2537 /more detailed .*MODE/d
2538 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
2539 fi
2540 exit $?
2541 fi
2542
2543
2544 # func_mode_execute arg...
2545 func_mode_execute ()
2546 {
2547 $opt_debug
2548 # The first argument is the command name.
2549 cmd="$nonopt"
2550 test -z "$cmd" && \
2551 func_fatal_help "you must specify a COMMAND"
2552
2553 # Handle -dlopen flags immediately.
2554 for file in $opt_dlopen; do
2555 test -f "$file" \
2556 || func_fatal_help "\`$file' is not a file"
2557
2558 dir=
2559 case $file in
2560 *.la)
2561 func_resolve_sysroot "$file"
2562 file=$func_resolve_sysroot_result
2563
2564 # Check to see that this really is a libtool archive.
2565 func_lalib_unsafe_p "$file" \
2566 || func_fatal_help "\`$lib' is not a valid libtool archive"
2567
2568 # Read the libtool library.
2569 dlname=
2570 library_names=
2571 func_source "$file"
2572
2573 # Skip this library if it cannot be dlopened.
2574 if test -z "$dlname"; then
2575 # Warn if it was a shared library.
2576 test -n "$library_names" && \
2577 func_warning "\`$file' was not linked with \`-export-dynamic'"
2578 continue
2579 fi
2580
2581 func_dirname "$file" "" "."
2582 dir="$func_dirname_result"
2583
2584 if test -f "$dir/$objdir/$dlname"; then
2585 func_append dir "/$objdir"
2586 else
2587 if test ! -f "$dir/$dlname"; then
2588 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
2589 fi
2590 fi
2591 ;;
2592
2593 *.lo)
2594 # Just add the directory containing the .lo file.
2595 func_dirname "$file" "" "."
2596 dir="$func_dirname_result"
2597 ;;
2598
2599 *)
2600 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
2601 continue
2602 ;;
2603 esac
2604
2605 # Get the absolute pathname.
2606 absdir=`cd "$dir" && pwd`
2607 test -n "$absdir" && dir="$absdir"
2608
2609 # Now add the directory to shlibpath_var.
2610 if eval "test -z \"\$$shlibpath_var\""; then
2611 eval "$shlibpath_var=\"\$dir\""
2612 else
2613 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
2614 fi
2615 done
2616
2617 # This variable tells wrapper scripts just to set shlibpath_var
2618 # rather than running their programs.
2619 libtool_execute_magic="$magic"
2620
2621 # Check if any of the arguments is a wrapper script.
2622 args=
2623 for file
2624 do
2625 case $file in
2626 -* | *.la | *.lo ) ;;
2627 *)
2628 # Do a test to see if this is really a libtool program.
2629 if func_ltwrapper_script_p "$file"; then
2630 func_source "$file"
2631 # Transform arg to wrapped name.
2632 file="$progdir/$program"
2633 elif func_ltwrapper_executable_p "$file"; then
2634 func_ltwrapper_scriptname "$file"
2635 func_source "$func_ltwrapper_scriptname_result"
2636 # Transform arg to wrapped name.
2637 file="$progdir/$program"
2638 fi
2639 ;;
2640 esac
2641 # Quote arguments (to preserve shell metacharacters).
2642 func_append_quoted args "$file"
2643 done
2644
2645 if test "X$opt_dry_run" = Xfalse; then
2646 if test -n "$shlibpath_var"; then
2647 # Export the shlibpath_var.
2648 eval "export $shlibpath_var"
2649 fi
2650
2651 # Restore saved environment variables
2652 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
2653 do
2654 eval "if test \"\${save_$lt_var+set}\" = set; then
2655 $lt_var=\$save_$lt_var; export $lt_var
2656 else
2657 $lt_unset $lt_var
2658 fi"
2659 done
2660
2661 # Now prepare to actually exec the command.
2662 exec_cmd="\$cmd$args"
2663 else
2664 # Display what would be done.
2665 if test -n "$shlibpath_var"; then
2666 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
2667 echo "export $shlibpath_var"
2668 fi
2669 $ECHO "$cmd$args"
2670 exit $EXIT_SUCCESS
2671 fi
2672 }
2673
2674 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
2675
2676
2677 # func_mode_finish arg...
2678 func_mode_finish ()
2679 {
2680 $opt_debug
2681 libs=
2682 libdirs=
2683 admincmds=
2684
2685 for opt in "$nonopt" ${1+"$@"}
2686 do
2687 if test -d "$opt"; then
2688 func_append libdirs " $opt"
2689
2690 elif test -f "$opt"; then
2691 if func_lalib_unsafe_p "$opt"; then
2692 func_append libs " $opt"
2693 else
2694 func_warning "\`$opt' is not a valid libtool archive"
2695 fi
2696
2697 else
2698 func_fatal_error "invalid argument \`$opt'"
2699 fi
2700 done
2701
2702 if test -n "$libs"; then
2703 if test -n "$lt_sysroot"; then
2704 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
2705 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
2706 else
2707 sysroot_cmd=
2708 fi
2709
2710 # Remove sysroot references
2711 if $opt_dry_run; then
2712 for lib in $libs; do
2713 echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
2714 done
2715 else
2716 tmpdir=`func_mktempdir`
2717 for lib in $libs; do
2718 sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
2719 > $tmpdir/tmp-la
2720 mv -f $tmpdir/tmp-la $lib
2721 done
2722 ${RM}r "$tmpdir"
2723 fi
2724 fi
2725
2726 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2727 for libdir in $libdirs; do
2728 if test -n "$finish_cmds"; then
2729 # Do each command in the finish commands.
2730 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
2731 '"$cmd"'"'
2732 fi
2733 if test -n "$finish_eval"; then
2734 # Do the single finish_eval.
2735 eval cmds=\"$finish_eval\"
2736 $opt_dry_run || eval "$cmds" || func_append admincmds "
2737 $cmds"
2738 fi
2739 done
2740 fi
2741
2742 # Exit here if they wanted silent mode.
2743 $opt_silent && exit $EXIT_SUCCESS
2744
2745 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2746 echo "----------------------------------------------------------------------"
2747 echo "Libraries have been installed in:"
2748 for libdir in $libdirs; do
2749 $ECHO " $libdir"
2750 done
2751 echo
2752 echo "If you ever happen to want to link against installed libraries"
2753 echo "in a given directory, LIBDIR, you must either use libtool, and"
2754 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2755 echo "flag during linking and do at least one of the following:"
2756 if test -n "$shlibpath_var"; then
2757 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2758 echo " during execution"
2759 fi
2760 if test -n "$runpath_var"; then
2761 echo " - add LIBDIR to the \`$runpath_var' environment variable"
2762 echo " during linking"
2763 fi
2764 if test -n "$hardcode_libdir_flag_spec"; then
2765 libdir=LIBDIR
2766 eval flag=\"$hardcode_libdir_flag_spec\"
2767
2768 $ECHO " - use the \`$flag' linker flag"
2769 fi
2770 if test -n "$admincmds"; then
2771 $ECHO " - have your system administrator run these commands:$admincmds"
2772 fi
2773 if test -f /etc/ld.so.conf; then
2774 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2775 fi
2776 echo
2777
2778 echo "See any operating system documentation about shared libraries for"
2779 case $host in
2780 solaris2.[6789]|solaris2.1[0-9])
2781 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2782 echo "pages."
2783 ;;
2784 *)
2785 echo "more information, such as the ld(1) and ld.so(8) manual pages."
2786 ;;
2787 esac
2788 echo "----------------------------------------------------------------------"
2789 fi
2790 exit $EXIT_SUCCESS
2791 }
2792
2793 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
2794
2795
2796 # func_mode_install arg...
2797 func_mode_install ()
2798 {
2799 $opt_debug
2800 # There may be an optional sh(1) argument at the beginning of
2801 # install_prog (especially on Windows NT).
2802 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
2803 # Allow the use of GNU shtool's install command.
2804 case $nonopt in *shtool*) :;; *) false;; esac; then
2805 # Aesthetically quote it.
2806 func_quote_for_eval "$nonopt"
2807 install_prog="$func_quote_for_eval_result "
2808 arg=$1
2809 shift
2810 else
2811 install_prog=
2812 arg=$nonopt
2813 fi
2814
2815 # The real first argument should be the name of the installation program.
2816 # Aesthetically quote it.
2817 func_quote_for_eval "$arg"
2818 func_append install_prog "$func_quote_for_eval_result"
2819 install_shared_prog=$install_prog
2820 case " $install_prog " in
2821 *[\\\ /]cp\ *) install_cp=: ;;
2822 *) install_cp=false ;;
2823 esac
2824
2825 # We need to accept at least all the BSD install flags.
2826 dest=
2827 files=
2828 opts=
2829 prev=
2830 install_type=
2831 isdir=no
2832 stripme=
2833 no_mode=:
2834 for arg
2835 do
2836 arg2=
2837 if test -n "$dest"; then
2838 func_append files " $dest"
2839 dest=$arg
2840 continue
2841 fi
2842
2843 case $arg in
2844 -d) isdir=yes ;;
2845 -f)
2846 if $install_cp; then :; else
2847 prev=$arg
2848 fi
2849 ;;
2850 -g | -m | -o)
2851 prev=$arg
2852 ;;
2853 -s)
2854 stripme=" -s"
2855 continue
2856 ;;
2857 -*)
2858 ;;
2859 *)
2860 # If the previous option needed an argument, then skip it.
2861 if test -n "$prev"; then
2862 if test "x$prev" = x-m && test -n "$install_override_mode"; then
2863 arg2=$install_override_mode
2864 no_mode=false
2865 fi
2866 prev=
2867 else
2868 dest=$arg
2869 continue
2870 fi
2871 ;;
2872 esac
2873
2874 # Aesthetically quote the argument.
2875 func_quote_for_eval "$arg"
2876 func_append install_prog " $func_quote_for_eval_result"
2877 if test -n "$arg2"; then
2878 func_quote_for_eval "$arg2"
2879 fi
2880 func_append install_shared_prog " $func_quote_for_eval_result"
2881 done
2882
2883 test -z "$install_prog" && \
2884 func_fatal_help "you must specify an install program"
2885
2886 test -n "$prev" && \
2887 func_fatal_help "the \`$prev' option requires an argument"
2888
2889 if test -n "$install_override_mode" && $no_mode; then
2890 if $install_cp; then :; else
2891 func_quote_for_eval "$install_override_mode"
2892 func_append install_shared_prog " -m $func_quote_for_eval_result"
2893 fi
2894 fi
2895
2896 if test -z "$files"; then
2897 if test -z "$dest"; then
2898 func_fatal_help "no file or destination specified"
2899 else
2900 func_fatal_help "you must specify a destination"
2901 fi
2902 fi
2903
2904 # Strip any trailing slash from the destination.
2905 func_stripname '' '/' "$dest"
2906 dest=$func_stripname_result
2907
2908 # Check to see that the destination is a directory.
2909 test -d "$dest" && isdir=yes
2910 if test "$isdir" = yes; then
2911 destdir="$dest"
2912 destname=
2913 else
2914 func_dirname_and_basename "$dest" "" "."
2915 destdir="$func_dirname_result"
2916 destname="$func_basename_result"
2917
2918 # Not a directory, so check to see that there is only one file specified.
2919 set dummy $files; shift
2920 test "$#" -gt 1 && \
2921 func_fatal_help "\`$dest' is not a directory"
2922 fi
2923 case $destdir in
2924 [\\/]* | [A-Za-z]:[\\/]*) ;;
2925 *)
2926 for file in $files; do
2927 case $file in
2928 *.lo) ;;
2929 *)
2930 func_fatal_help "\`$destdir' must be an absolute directory name"
2931 ;;
2932 esac
2933 done
2934 ;;
2935 esac
2936
2937 # This variable tells wrapper scripts just to set variables rather
2938 # than running their programs.
2939 libtool_install_magic="$magic"
2940
2941 staticlibs=
2942 future_libdirs=
2943 current_libdirs=
2944 for file in $files; do
2945
2946 # Do each installation.
2947 case $file in
2948 *.$libext)
2949 # Do the static libraries later.
2950 func_append staticlibs " $file"
2951 ;;
2952
2953 *.la)
2954 func_resolve_sysroot "$file"
2955 file=$func_resolve_sysroot_result
2956
2957 # Check to see that this really is a libtool archive.
2958 func_lalib_unsafe_p "$file" \
2959 || func_fatal_help "\`$file' is not a valid libtool archive"
2960
2961 library_names=
2962 old_library=
2963 relink_command=
2964 func_source "$file"
2965
2966 # Add the libdir to current_libdirs if it is the destination.
2967 if test "X$destdir" = "X$libdir"; then
2968 case "$current_libdirs " in
2969 *" $libdir "*) ;;
2970 *) func_append current_libdirs " $libdir" ;;
2971 esac
2972 else
2973 # Note the libdir as a future libdir.
2974 case "$future_libdirs " in
2975 *" $libdir "*) ;;
2976 *) func_append future_libdirs " $libdir" ;;
2977 esac
2978 fi
2979
2980 func_dirname "$file" "/" ""
2981 dir="$func_dirname_result"
2982 func_append dir "$objdir"
2983
2984 if test -n "$relink_command"; then
2985 # Determine the prefix the user has applied to our future dir.
2986 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
2987
2988 # Don't allow the user to place us outside of our expected
2989 # location b/c this prevents finding dependent libraries that
2990 # are installed to the same prefix.
2991 # At present, this check doesn't affect windows .dll's that
2992 # are installed into $libdir/../bin (currently, that works fine)
2993 # but it's something to keep an eye on.
2994 test "$inst_prefix_dir" = "$destdir" && \
2995 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
2996
2997 if test -n "$inst_prefix_dir"; then
2998 # Stick the inst_prefix_dir data into the link command.
2999 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
3000 else
3001 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
3002 fi
3003
3004 func_warning "relinking \`$file'"
3005 func_show_eval "$relink_command" \
3006 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
3007 fi
3008
3009 # See the names of the shared library.
3010 set dummy $library_names; shift
3011 if test -n "$1"; then
3012 realname="$1"
3013 shift
3014
3015 srcname="$realname"
3016 test -n "$relink_command" && srcname="$realname"T
3017
3018 # Install the shared library and build the symlinks.
3019 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
3020 'exit $?'
3021 tstripme="$stripme"
3022 case $host_os in
3023 cygwin* | mingw* | pw32* | cegcc*)
3024 case $realname in
3025 *.dll.a)
3026 tstripme=""
3027 ;;
3028 esac
3029 ;;
3030 esac
3031 if test -n "$tstripme" && test -n "$striplib"; then
3032 func_show_eval "$striplib $destdir/$realname" 'exit $?'
3033 fi
3034
3035 if test "$#" -gt 0; then
3036 # Delete the old symlinks, and create new ones.
3037 # Try `ln -sf' first, because the `ln' binary might depend on
3038 # the symlink we replace! Solaris /bin/ln does not understand -f,
3039 # so we also need to try rm && ln -s.
3040 for linkname
3041 do
3042 test "$linkname" != "$realname" \
3043 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
3044 done
3045 fi
3046
3047 # Do each command in the postinstall commands.
3048 lib="$destdir/$realname"
3049 func_execute_cmds "$postinstall_cmds" 'exit $?'
3050 fi
3051
3052 # Install the pseudo-library for information purposes.
3053 func_basename "$file"
3054 name="$func_basename_result"
3055 instname="$dir/$name"i
3056 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
3057
3058 # Maybe install the static library, too.
3059 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
3060 ;;
3061
3062 *.lo)
3063 # Install (i.e. copy) a libtool object.
3064
3065 # Figure out destination file name, if it wasn't already specified.
3066 if test -n "$destname"; then
3067 destfile="$destdir/$destname"
3068 else
3069 func_basename "$file"
3070 destfile="$func_basename_result"
3071 destfile="$destdir/$destfile"
3072 fi
3073
3074 # Deduce the name of the destination old-style object file.
3075 case $destfile in
3076 *.lo)
3077 func_lo2o "$destfile"
3078 staticdest=$func_lo2o_result
3079 ;;
3080 *.$objext)
3081 staticdest="$destfile"
3082 destfile=
3083 ;;
3084 *)
3085 func_fatal_help "cannot copy a libtool object to \`$destfile'"
3086 ;;
3087 esac
3088
3089 # Install the libtool object if requested.
3090 test -n "$destfile" && \
3091 func_show_eval "$install_prog $file $destfile" 'exit $?'
3092
3093 # Install the old object if enabled.
3094 if test "$build_old_libs" = yes; then
3095 # Deduce the name of the old-style object file.
3096 func_lo2o "$file"
3097 staticobj=$func_lo2o_result
3098 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
3099 fi
3100 exit $EXIT_SUCCESS
3101 ;;
3102
3103 *)
3104 # Figure out destination file name, if it wasn't already specified.
3105 if test -n "$destname"; then
3106 destfile="$destdir/$destname"
3107 else
3108 func_basename "$file"
3109 destfile="$func_basename_result"
3110 destfile="$destdir/$destfile"
3111 fi
3112
3113 # If the file is missing, and there is a .exe on the end, strip it
3114 # because it is most likely a libtool script we actually want to
3115 # install
3116 stripped_ext=""
3117 case $file in
3118 *.exe)
3119 if test ! -f "$file"; then
3120 func_stripname '' '.exe' "$file"
3121 file=$func_stripname_result
3122 stripped_ext=".exe"
3123 fi
3124 ;;
3125 esac
3126
3127 # Do a test to see if this is really a libtool program.
3128 case $host in
3129 *cygwin* | *mingw*)
3130 if func_ltwrapper_executable_p "$file"; then
3131 func_ltwrapper_scriptname "$file"
3132 wrapper=$func_ltwrapper_scriptname_result
3133 else
3134 func_stripname '' '.exe' "$file"
3135 wrapper=$func_stripname_result
3136 fi
3137 ;;
3138 *)
3139 wrapper=$file
3140 ;;
3141 esac
3142 if func_ltwrapper_script_p "$wrapper"; then
3143 notinst_deplibs=
3144 relink_command=
3145
3146 func_source "$wrapper"
3147
3148 # Check the variables that should have been set.
3149 test -z "$generated_by_libtool_version" && \
3150 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
3151
3152 finalize=yes
3153 for lib in $notinst_deplibs; do
3154 # Check to see that each library is installed.
3155 libdir=
3156 if test -f "$lib"; then
3157 func_source "$lib"
3158 fi
3159 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
3160 if test -n "$libdir" && test ! -f "$libfile"; then
3161 func_warning "\`$lib' has not been installed in \`$libdir'"
3162 finalize=no
3163 fi
3164 done
3165
3166 relink_command=
3167 func_source "$wrapper"
3168
3169 outputname=
3170 if test "$fast_install" = no && test -n "$relink_command"; then
3171 $opt_dry_run || {
3172 if test "$finalize" = yes; then
3173 tmpdir=`func_mktempdir`
3174 func_basename "$file$stripped_ext"
3175 file="$func_basename_result"
3176 outputname="$tmpdir/$file"
3177 # Replace the output file specification.
3178 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
3179
3180 $opt_silent || {
3181 func_quote_for_expand "$relink_command"
3182 eval "func_echo $func_quote_for_expand_result"
3183 }
3184 if eval "$relink_command"; then :
3185 else
3186 func_error "error: relink \`$file' with the above command before installing it"
3187 $opt_dry_run || ${RM}r "$tmpdir"
3188 continue
3189 fi
3190 file="$outputname"
3191 else
3192 func_warning "cannot relink \`$file'"
3193 fi
3194 }
3195 else
3196 # Install the binary that we compiled earlier.
3197 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
3198 fi
3199 fi
3200
3201 # remove .exe since cygwin /usr/bin/install will append another
3202 # one anyway
3203 case $install_prog,$host in
3204 */usr/bin/install*,*cygwin*)
3205 case $file:$destfile in
3206 *.exe:*.exe)
3207 # this is ok
3208 ;;
3209 *.exe:*)
3210 destfile=$destfile.exe
3211 ;;
3212 *:*.exe)
3213 func_stripname '' '.exe' "$destfile"
3214 destfile=$func_stripname_result
3215 ;;
3216 esac
3217 ;;
3218 esac
3219 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
3220 $opt_dry_run || if test -n "$outputname"; then
3221 ${RM}r "$tmpdir"
3222 fi
3223 ;;
3224 esac
3225 done
3226
3227 for file in $staticlibs; do
3228 func_basename "$file"
3229 name="$func_basename_result"
3230
3231 # Set up the ranlib parameters.
3232 oldlib="$destdir/$name"
3233
3234 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
3235
3236 if test -n "$stripme" && test -n "$old_striplib"; then
3237 func_show_eval "$old_striplib $oldlib" 'exit $?'
3238 fi
3239
3240 # Do each command in the postinstall commands.
3241 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
3242 done
3243
3244 test -n "$future_libdirs" && \
3245 func_warning "remember to run \`$progname --finish$future_libdirs'"
3246
3247 if test -n "$current_libdirs"; then
3248 # Maybe just do a dry run.
3249 $opt_dry_run && current_libdirs=" -n$current_libdirs"
3250 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
3251 else
3252 exit $EXIT_SUCCESS
3253 fi
3254 }
3255
3256 test "$opt_mode" = install && func_mode_install ${1+"$@"}
3257
3258
3259 # func_generate_dlsyms outputname originator pic_p
3260 # Extract symbols from dlprefiles and create ${outputname}S.o with
3261 # a dlpreopen symbol table.
3262 func_generate_dlsyms ()
3263 {
3264 $opt_debug
3265 my_outputname="$1"
3266 my_originator="$2"
3267 my_pic_p="${3-no}"
3268 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
3269 my_dlsyms=
3270
3271 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3272 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3273 my_dlsyms="${my_outputname}S.c"
3274 else
3275 func_error "not configured to extract global symbols from dlpreopened files"
3276 fi
3277 fi
3278
3279 if test -n "$my_dlsyms"; then
3280 case $my_dlsyms in
3281 "") ;;
3282 *.c)
3283 # Discover the nlist of each of the dlfiles.
3284 nlist="$output_objdir/${my_outputname}.nm"
3285
3286 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
3287
3288 # Parse the name list into a source file.
3289 func_verbose "creating $output_objdir/$my_dlsyms"
3290
3291 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
3292 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
3293 /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
3294
3295 #ifdef __cplusplus
3296 extern \"C\" {
3297 #endif
3298
3299 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
3300 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3301 #endif
3302
3303 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3304 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3305 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3306 relocations are performed -- see ld's documentation on pseudo-relocs. */
3307 # define LT_DLSYM_CONST
3308 #elif defined(__osf__)
3309 /* This system does not cope well with relocations in const data. */
3310 # define LT_DLSYM_CONST
3311 #else
3312 # define LT_DLSYM_CONST const
3313 #endif
3314
3315 /* External symbol declarations for the compiler. */\
3316 "
3317
3318 if test "$dlself" = yes; then
3319 func_verbose "generating symbol list for \`$output'"
3320
3321 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
3322
3323 # Add our own program objects to the symbol list.
3324 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
3325 for progfile in $progfiles; do
3326 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3327 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3328 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
3329 done
3330
3331 if test -n "$exclude_expsyms"; then
3332 $opt_dry_run || {
3333 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3334 eval '$MV "$nlist"T "$nlist"'
3335 }
3336 fi
3337
3338 if test -n "$export_symbols_regex"; then
3339 $opt_dry_run || {
3340 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3341 eval '$MV "$nlist"T "$nlist"'
3342 }
3343 fi
3344
3345 # Prepare the list of exported symbols
3346 if test -z "$export_symbols"; then
3347 export_symbols="$output_objdir/$outputname.exp"
3348 $opt_dry_run || {
3349 $RM $export_symbols
3350 eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3351 case $host in
3352 *cygwin* | *mingw* | *cegcc* )
3353 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3354 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
3355 ;;
3356 esac
3357 }
3358 else
3359 $opt_dry_run || {
3360 eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
3361 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
3362 eval '$MV "$nlist"T "$nlist"'
3363 case $host in
3364 *cygwin* | *mingw* | *cegcc* )
3365 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3366 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
3367 ;;
3368 esac
3369 }
3370 fi
3371 fi
3372
3373 for dlprefile in $dlprefiles; do
3374 func_verbose "extracting global C symbols from \`$dlprefile'"
3375 func_basename "$dlprefile"
3376 name="$func_basename_result"
3377 case $host in
3378 *cygwin* | *mingw* | *cegcc* )
3379 # if an import library, we need to obtain dlname
3380 if func_win32_import_lib_p "$dlprefile"; then
3381 func_tr_sh "$dlprefile"
3382 eval "curr_lafile=\$libfile_$func_tr_sh_result"
3383 dlprefile_dlbasename=""
3384 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3385 # Use subshell, to avoid clobbering current variable values
3386 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3387 if test -n "$dlprefile_dlname" ; then
3388 func_basename "$dlprefile_dlname"
3389 dlprefile_dlbasename="$func_basename_result"
3390 else
3391 # no lafile. user explicitly requested -dlpreopen <import library>.
3392 $sharedlib_from_linklib_cmd "$dlprefile"
3393 dlprefile_dlbasename=$sharedlib_from_linklib_result
3394 fi
3395 fi
3396 $opt_dry_run || {
3397 if test -n "$dlprefile_dlbasename" ; then
3398 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3399 else
3400 func_warning "Could not compute DLL name from $name"
3401 eval '$ECHO ": $name " >> "$nlist"'
3402 fi
3403 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3404 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3405 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3406 }
3407 else # not an import lib
3408 $opt_dry_run || {
3409 eval '$ECHO ": $name " >> "$nlist"'
3410 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3411 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3412 }
3413 fi
3414 ;;
3415 *)
3416 $opt_dry_run || {
3417 eval '$ECHO ": $name " >> "$nlist"'
3418 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3419 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3420 }
3421 ;;
3422 esac
3423 done
3424
3425 $opt_dry_run || {
3426 # Make sure we have at least an empty file.
3427 test -f "$nlist" || : > "$nlist"
3428
3429 if test -n "$exclude_expsyms"; then
3430 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3431 $MV "$nlist"T "$nlist"
3432 fi
3433
3434 # Try sorting and uniquifying the output.
3435 if $GREP -v "^: " < "$nlist" |
3436 if sort -k 3 </dev/null >/dev/null 2>&1; then
3437 sort -k 3
3438 else
3439 sort +2
3440 fi |
3441 uniq > "$nlist"S; then
3442 :
3443 else
3444 $GREP -v "^: " < "$nlist" > "$nlist"S
3445 fi
3446
3447 if test -f "$nlist"S; then
3448 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
3449 else
3450 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
3451 fi
3452
3453 echo >> "$output_objdir/$my_dlsyms" "\
3454
3455 /* The mapping between symbol names and symbols. */
3456 typedef struct {
3457 const char *name;
3458 void *address;
3459 } lt_dlsymlist;
3460 extern LT_DLSYM_CONST lt_dlsymlist
3461 lt_${my_prefix}_LTX_preloaded_symbols[];
3462 LT_DLSYM_CONST lt_dlsymlist
3463 lt_${my_prefix}_LTX_preloaded_symbols[] =
3464 {\
3465 { \"$my_originator\", (void *) 0 },"
3466
3467 case $need_lib_prefix in
3468 no)
3469 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
3470 ;;
3471 *)
3472 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
3473 ;;
3474 esac
3475 echo >> "$output_objdir/$my_dlsyms" "\
3476 {0, (void *) 0}
3477 };
3478
3479 /* This works around a problem in FreeBSD linker */
3480 #ifdef FREEBSD_WORKAROUND
3481 static const void *lt_preloaded_setup() {
3482 return lt_${my_prefix}_LTX_preloaded_symbols;
3483 }
3484 #endif
3485
3486 #ifdef __cplusplus
3487 }
3488 #endif\
3489 "
3490 } # !$opt_dry_run
3491
3492 pic_flag_for_symtable=
3493 case "$compile_command " in
3494 *" -static "*) ;;
3495 *)
3496 case $host in
3497 # compiling the symbol table file with pic_flag works around
3498 # a FreeBSD bug that causes programs to crash when -lm is
3499 # linked before any other PIC object. But we must not use
3500 # pic_flag when linking with -static. The problem exists in
3501 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3502 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3503 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
3504 *-*-hpux*)
3505 pic_flag_for_symtable=" $pic_flag" ;;
3506 *)
3507 if test "X$my_pic_p" != Xno; then
3508 pic_flag_for_symtable=" $pic_flag"
3509 fi
3510 ;;
3511 esac
3512 ;;
3513 esac
3514 symtab_cflags=
3515 for arg in $LTCFLAGS; do
3516 case $arg in
3517 -pie | -fpie | -fPIE) ;;
3518 *) func_append symtab_cflags " $arg" ;;
3519 esac
3520 done
3521
3522 # Now compile the dynamic symbol file.
3523 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
3524
3525 # Clean up the generated files.
3526 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
3527
3528 # Transform the symbol file into the correct name.
3529 symfileobj="$output_objdir/${my_outputname}S.$objext"
3530 case $host in
3531 *cygwin* | *mingw* | *cegcc* )
3532 if test -f "$output_objdir/$my_outputname.def"; then
3533 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3534 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3535 else
3536 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3537 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3538 fi
3539 ;;
3540 *)
3541 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3542 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3543 ;;
3544 esac
3545 ;;
3546 *-*-freebsd*)
3547 # FreeBSD doesn't need this...
3548 ;;
3549 *)
3550 func_fatal_error "unknown suffix for \`$my_dlsyms'"
3551 ;;
3552 esac
3553 else
3554 # We keep going just in case the user didn't refer to
3555 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3556 # really was required.
3557
3558 # Nullify the symbol file.
3559 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
3560 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
3561 fi
3562 }
3563
3564 # func_win32_libid arg
3565 # return the library type of file 'arg'
3566 #
3567 # Need a lot of goo to handle *both* DLLs and import libs
3568 # Has to be a shell function in order to 'eat' the argument
3569 # that is supplied when $file_magic_command is called.
3570 # Despite the name, also deal with 64 bit binaries.
3571 func_win32_libid ()
3572 {
3573 $opt_debug
3574 win32_libid_type="unknown"
3575 win32_fileres=`file -L $1 2>/dev/null`
3576 case $win32_fileres in
3577 *ar\ archive\ import\ library*) # definitely import
3578 win32_libid_type="x86 archive import"
3579 ;;
3580 *ar\ archive*) # could be an import, or static
3581 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
3582 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
3583 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3584 func_to_tool_file "$1" func_convert_file_msys_to_w32
3585 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
3586 $SED -n -e '
3587 1,100{
3588 / I /{
3589 s,.*,import,
3590 p
3591 q
3592 }
3593 }'`
3594 case $win32_nmres in
3595 import*) win32_libid_type="x86 archive import";;
3596 *) win32_libid_type="x86 archive static";;
3597 esac
3598 fi
3599 ;;
3600 *DLL*)
3601 win32_libid_type="x86 DLL"
3602 ;;
3603 *executable*) # but shell scripts are "executable" too...
3604 case $win32_fileres in
3605 *MS\ Windows\ PE\ Intel*)
3606 win32_libid_type="x86 DLL"
3607 ;;
3608 esac
3609 ;;
3610 esac
3611 $ECHO "$win32_libid_type"
3612 }
3613
3614 # func_cygming_dll_for_implib ARG
3615 #
3616 # Platform-specific function to extract the
3617 # name of the DLL associated with the specified
3618 # import library ARG.
3619 # Invoked by eval'ing the libtool variable
3620 # $sharedlib_from_linklib_cmd
3621 # Result is available in the variable
3622 # $sharedlib_from_linklib_result
3623 func_cygming_dll_for_implib ()
3624 {
3625 $opt_debug
3626 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3627 }
3628
3629 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3630 #
3631 # The is the core of a fallback implementation of a
3632 # platform-specific function to extract the name of the
3633 # DLL associated with the specified import library LIBNAME.
3634 #
3635 # SECTION_NAME is either .idata$6 or .idata$7, depending
3636 # on the platform and compiler that created the implib.
3637 #
3638 # Echos the name of the DLL associated with the
3639 # specified import library.
3640 func_cygming_dll_for_implib_fallback_core ()
3641 {
3642 $opt_debug
3643 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3644 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3645 $SED '/^Contents of section '"$match_literal"':/{
3646 # Place marker at beginning of archive member dllname section
3647 s/.*/====MARK====/
3648 p
3649 d
3650 }
3651 # These lines can sometimes be longer than 43 characters, but
3652 # are always uninteresting
3653 /:[ ]*file format pe[i]\{,1\}-/d
3654 /^In archive [^:]*:/d
3655 # Ensure marker is printed
3656 /^====MARK====/p
3657 # Remove all lines with less than 43 characters
3658 /^.\{43\}/!d
3659 # From remaining lines, remove first 43 characters
3660 s/^.\{43\}//' |
3661 $SED -n '
3662 # Join marker and all lines until next marker into a single line
3663 /^====MARK====/ b para
3664 H
3665 $ b para
3666 b
3667 :para
3668 x
3669 s/\n//g
3670 # Remove the marker
3671 s/^====MARK====//
3672 # Remove trailing dots and whitespace
3673 s/[\. \t]*$//
3674 # Print
3675 /./p' |
3676 # we now have a list, one entry per line, of the stringified
3677 # contents of the appropriate section of all members of the
3678 # archive which possess that section. Heuristic: eliminate
3679 # all those which have a first or second character that is
3680 # a '.' (that is, objdump's representation of an unprintable
3681 # character.) This should work for all archives with less than
3682 # 0x302f exports -- but will fail for DLLs whose name actually
3683 # begins with a literal '.' or a single character followed by
3684 # a '.'.
3685 #
3686 # Of those that remain, print the first one.
3687 $SED -e '/^\./d;/^.\./d;q'
3688 }
3689
3690 # func_cygming_gnu_implib_p ARG
3691 # This predicate returns with zero status (TRUE) if
3692 # ARG is a GNU/binutils-style import library. Returns
3693 # with nonzero status (FALSE) otherwise.
3694 func_cygming_gnu_implib_p ()
3695 {
3696 $opt_debug
3697 func_to_tool_file "$1" func_convert_file_msys_to_w32
3698 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3699 test -n "$func_cygming_gnu_implib_tmp"
3700 }
3701
3702 # func_cygming_ms_implib_p ARG
3703 # This predicate returns with zero status (TRUE) if
3704 # ARG is an MS-style import library. Returns
3705 # with nonzero status (FALSE) otherwise.
3706 func_cygming_ms_implib_p ()
3707 {
3708 $opt_debug
3709 func_to_tool_file "$1" func_convert_file_msys_to_w32
3710 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3711 test -n "$func_cygming_ms_implib_tmp"
3712 }
3713
3714 # func_cygming_dll_for_implib_fallback ARG
3715 # Platform-specific function to extract the
3716 # name of the DLL associated with the specified
3717 # import library ARG.
3718 #
3719 # This fallback implementation is for use when $DLLTOOL
3720 # does not support the --identify-strict option.
3721 # Invoked by eval'ing the libtool variable
3722 # $sharedlib_from_linklib_cmd
3723 # Result is available in the variable
3724 # $sharedlib_from_linklib_result
3725 func_cygming_dll_for_implib_fallback ()
3726 {
3727 $opt_debug
3728 if func_cygming_gnu_implib_p "$1" ; then
3729 # binutils import library
3730 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3731 elif func_cygming_ms_implib_p "$1" ; then
3732 # ms-generated import library
3733 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3734 else
3735 # unknown
3736 sharedlib_from_linklib_result=""
3737 fi
3738 }
3739
3740
3741 # func_extract_an_archive dir oldlib
3742 func_extract_an_archive ()
3743 {
3744 $opt_debug
3745 f_ex_an_ar_dir="$1"; shift
3746 f_ex_an_ar_oldlib="$1"
3747 if test "$lock_old_archive_extraction" = yes; then
3748 lockfile=$f_ex_an_ar_oldlib.lock
3749 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3750 func_echo "Waiting for $lockfile to be removed"
3751 sleep 2
3752 done
3753 fi
3754 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
3755 'stat=$?; rm -f "$lockfile"; exit $stat'
3756 if test "$lock_old_archive_extraction" = yes; then
3757 $opt_dry_run || rm -f "$lockfile"
3758 fi
3759 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
3760 :
3761 else
3762 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
3763 fi
3764 }
3765
3766
3767 # func_extract_archives gentop oldlib ...
3768 func_extract_archives ()
3769 {
3770 $opt_debug
3771 my_gentop="$1"; shift
3772 my_oldlibs=${1+"$@"}
3773 my_oldobjs=""
3774 my_xlib=""
3775 my_xabs=""
3776 my_xdir=""
3777
3778 for my_xlib in $my_oldlibs; do
3779 # Extract the objects.
3780 case $my_xlib in
3781 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
3782 *) my_xabs=`pwd`"/$my_xlib" ;;
3783 esac
3784 func_basename "$my_xlib"
3785 my_xlib="$func_basename_result"
3786 my_xlib_u=$my_xlib
3787 while :; do
3788 case " $extracted_archives " in
3789 *" $my_xlib_u "*)
3790 func_arith $extracted_serial + 1
3791 extracted_serial=$func_arith_result
3792 my_xlib_u=lt$extracted_serial-$my_xlib ;;
3793 *) break ;;
3794 esac
3795 done
3796 extracted_archives="$extracted_archives $my_xlib_u"
3797 my_xdir="$my_gentop/$my_xlib_u"
3798
3799 func_mkdir_p "$my_xdir"
3800
3801 case $host in
3802 *-darwin*)
3803 func_verbose "Extracting $my_xabs"
3804 # Do not bother doing anything if just a dry run
3805 $opt_dry_run || {
3806 darwin_orig_dir=`pwd`
3807 cd $my_xdir || exit $?
3808 darwin_archive=$my_xabs
3809 darwin_curdir=`pwd`
3810 darwin_base_archive=`basename "$darwin_archive"`
3811 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
3812 if test -n "$darwin_arches"; then
3813 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
3814 darwin_arch=
3815 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
3816 for darwin_arch in $darwin_arches ; do
3817 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3818 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
3819 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3820 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
3821 cd "$darwin_curdir"
3822 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
3823 done # $darwin_arches
3824 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
3825 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
3826 darwin_file=
3827 darwin_files=
3828 for darwin_file in $darwin_filelist; do
3829 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
3830 $LIPO -create -output "$darwin_file" $darwin_files
3831 done # $darwin_filelist
3832 $RM -rf unfat-$$
3833 cd "$darwin_orig_dir"
3834 else
3835 cd $darwin_orig_dir
3836 func_extract_an_archive "$my_xdir" "$my_xabs"
3837 fi # $darwin_arches
3838 } # !$opt_dry_run
3839 ;;
3840 *)
3841 func_extract_an_archive "$my_xdir" "$my_xabs"
3842 ;;
3843 esac
3844 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
3845 done
3846
3847 func_extract_archives_result="$my_oldobjs"
3848 }
3849
3850
3851 # func_emit_wrapper [arg=no]
3852 #
3853 # Emit a libtool wrapper script on stdout.
3854 # Don't directly open a file because we may want to
3855 # incorporate the script contents within a cygwin/mingw
3856 # wrapper executable. Must ONLY be called from within
3857 # func_mode_link because it depends on a number of variables
3858 # set therein.
3859 #
3860 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
3861 # variable will take. If 'yes', then the emitted script
3862 # will assume that the directory in which it is stored is
3863 # the $objdir directory. This is a cygwin/mingw-specific
3864 # behavior.
3865 func_emit_wrapper ()
3866 {
3867 func_emit_wrapper_arg1=${1-no}
3868
3869 $ECHO "\
3870 #! $SHELL
3871
3872 # $output - temporary wrapper script for $objdir/$outputname
3873 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
3874 #
3875 # The $output program cannot be directly executed until all the libtool
3876 # libraries that it depends on are installed.
3877 #
3878 # This wrapper script should never be moved out of the build directory.
3879 # If it is, it will not operate correctly.
3880
3881 # Sed substitution that helps us do robust quoting. It backslashifies
3882 # metacharacters that are still active within double-quoted strings.
3883 sed_quote_subst='$sed_quote_subst'
3884
3885 # Be Bourne compatible
3886 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
3887 emulate sh
3888 NULLCMD=:
3889 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
3890 # is contrary to our usage. Disable this feature.
3891 alias -g '\${1+\"\$@\"}'='\"\$@\"'
3892 setopt NO_GLOB_SUBST
3893 else
3894 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
3895 fi
3896 BIN_SH=xpg4; export BIN_SH # for Tru64
3897 DUALCASE=1; export DUALCASE # for MKS sh
3898
3899 # The HP-UX ksh and POSIX shell print the target directory to stdout
3900 # if CDPATH is set.
3901 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3902
3903 relink_command=\"$relink_command\"
3904
3905 # This environment variable determines our operation mode.
3906 if test \"\$libtool_install_magic\" = \"$magic\"; then
3907 # install mode needs the following variables:
3908 generated_by_libtool_version='$macro_version'
3909 notinst_deplibs='$notinst_deplibs'
3910 else
3911 # When we are sourced in execute mode, \$file and \$ECHO are already set.
3912 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3913 file=\"\$0\""
3914
3915 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
3916 $ECHO "\
3917
3918 # A function that is used when there is no print builtin or printf.
3919 func_fallback_echo ()
3920 {
3921 eval 'cat <<_LTECHO_EOF
3922 \$1
3923 _LTECHO_EOF'
3924 }
3925 ECHO=\"$qECHO\"
3926 fi
3927
3928 # Very basic option parsing. These options are (a) specific to
3929 # the libtool wrapper, (b) are identical between the wrapper
3930 # /script/ and the wrapper /executable/ which is used only on
3931 # windows platforms, and (c) all begin with the string "--lt-"
3932 # (application programs are unlikely to have options which match
3933 # this pattern).
3934 #
3935 # There are only two supported options: --lt-debug and
3936 # --lt-dump-script. There is, deliberately, no --lt-help.
3937 #
3938 # The first argument to this parsing function should be the
3939 # script's $0 value, followed by "$@".
3940 lt_option_debug=
3941 func_parse_lt_options ()
3942 {
3943 lt_script_arg0=\$0
3944 shift
3945 for lt_opt
3946 do
3947 case \"\$lt_opt\" in
3948 --lt-debug) lt_option_debug=1 ;;
3949 --lt-dump-script)
3950 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
3951 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
3952 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
3953 cat \"\$lt_dump_D/\$lt_dump_F\"
3954 exit 0
3955 ;;
3956 --lt-*)
3957 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
3958 exit 1
3959 ;;
3960 esac
3961 done
3962
3963 # Print the debug banner immediately:
3964 if test -n \"\$lt_option_debug\"; then
3965 echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
3966 fi
3967 }
3968
3969 # Used when --lt-debug. Prints its arguments to stdout
3970 # (redirection is the responsibility of the caller)
3971 func_lt_dump_args ()
3972 {
3973 lt_dump_args_N=1;
3974 for lt_arg
3975 do
3976 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
3977 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
3978 done
3979 }
3980
3981 # Core function for launching the target application
3982 func_exec_program_core ()
3983 {
3984 "
3985 case $host in
3986 # Backslashes separate directories on plain windows
3987 *-*-mingw | *-*-os2* | *-cegcc*)
3988 $ECHO "\
3989 if test -n \"\$lt_option_debug\"; then
3990 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
3991 func_lt_dump_args \${1+\"\$@\"} 1>&2
3992 fi
3993 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
3994 "
3995 ;;
3996
3997 *)
3998 $ECHO "\
3999 if test -n \"\$lt_option_debug\"; then
4000 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
4001 func_lt_dump_args \${1+\"\$@\"} 1>&2
4002 fi
4003 exec \"\$progdir/\$program\" \${1+\"\$@\"}
4004 "
4005 ;;
4006 esac
4007 $ECHO "\
4008 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
4009 exit 1
4010 }
4011
4012 # A function to encapsulate launching the target application
4013 # Strips options in the --lt-* namespace from \$@ and
4014 # launches target application with the remaining arguments.
4015 func_exec_program ()
4016 {
4017 for lt_wr_arg
4018 do
4019 case \$lt_wr_arg in
4020 --lt-*) ;;
4021 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
4022 esac
4023 shift
4024 done
4025 func_exec_program_core \${1+\"\$@\"}
4026 }
4027
4028 # Parse options
4029 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
4030
4031 # Find the directory that this script lives in.
4032 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
4033 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4034
4035 # Follow symbolic links until we get to the real thisdir.
4036 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
4037 while test -n \"\$file\"; do
4038 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
4039
4040 # If there was a directory component, then change thisdir.
4041 if test \"x\$destdir\" != \"x\$file\"; then
4042 case \"\$destdir\" in
4043 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4044 *) thisdir=\"\$thisdir/\$destdir\" ;;
4045 esac
4046 fi
4047
4048 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
4049 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
4050 done
4051
4052 # Usually 'no', except on cygwin/mingw when embedded into
4053 # the cwrapper.
4054 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
4055 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
4056 # special case for '.'
4057 if test \"\$thisdir\" = \".\"; then
4058 thisdir=\`pwd\`
4059 fi
4060 # remove .libs from thisdir
4061 case \"\$thisdir\" in
4062 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
4063 $objdir ) thisdir=. ;;
4064 esac
4065 fi
4066
4067 # Try to get the absolute directory name.
4068 absdir=\`cd \"\$thisdir\" && pwd\`
4069 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4070 "
4071
4072 if test "$fast_install" = yes; then
4073 $ECHO "\
4074 program=lt-'$outputname'$exeext
4075 progdir=\"\$thisdir/$objdir\"
4076
4077 if test ! -f \"\$progdir/\$program\" ||
4078 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
4079 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4080
4081 file=\"\$\$-\$program\"
4082
4083 if test ! -d \"\$progdir\"; then
4084 $MKDIR \"\$progdir\"
4085 else
4086 $RM \"\$progdir/\$file\"
4087 fi"
4088
4089 $ECHO "\
4090
4091 # relink executable if necessary
4092 if test -n \"\$relink_command\"; then
4093 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
4094 else
4095 $ECHO \"\$relink_command_output\" >&2
4096 $RM \"\$progdir/\$file\"
4097 exit 1
4098 fi
4099 fi
4100
4101 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4102 { $RM \"\$progdir/\$program\";
4103 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4104 $RM \"\$progdir/\$file\"
4105 fi"
4106 else
4107 $ECHO "\
4108 program='$outputname'
4109 progdir=\"\$thisdir/$objdir\"
4110 "
4111 fi
4112
4113 $ECHO "\
4114
4115 if test -f \"\$progdir/\$program\"; then"
4116
4117 # fixup the dll searchpath if we need to.
4118 #
4119 # Fix the DLL searchpath if we need to. Do this before prepending
4120 # to shlibpath, because on Windows, both are PATH and uninstalled
4121 # libraries must come first.
4122 if test -n "$dllsearchpath"; then
4123 $ECHO "\
4124 # Add the dll search path components to the executable PATH
4125 PATH=$dllsearchpath:\$PATH
4126 "
4127 fi
4128
4129 # Export our shlibpath_var if we have one.
4130 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4131 $ECHO "\
4132 # Add our own library path to $shlibpath_var
4133 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4134
4135 # Some systems cannot cope with colon-terminated $shlibpath_var
4136 # The second colon is a workaround for a bug in BeOS R4 sed
4137 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
4138
4139 export $shlibpath_var
4140 "
4141 fi
4142
4143 $ECHO "\
4144 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4145 # Run the actual program with our arguments.
4146 func_exec_program \${1+\"\$@\"}
4147 fi
4148 else
4149 # The program doesn't exist.
4150 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4151 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
4152 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
4153 exit 1
4154 fi
4155 fi\
4156 "
4157 }
4158
4159
4160 # func_emit_cwrapperexe_src
4161 # emit the source code for a wrapper executable on stdout
4162 # Must ONLY be called from within func_mode_link because
4163 # it depends on a number of variable set therein.
4164 func_emit_cwrapperexe_src ()
4165 {
4166 cat <<EOF
4167
4168 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4169 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
4170
4171 The $output program cannot be directly executed until all the libtool
4172 libraries that it depends on are installed.
4173
4174 This wrapper executable should never be moved out of the build directory.
4175 If it is, it will not operate correctly.
4176 */
4177 EOF
4178 cat <<"EOF"
4179 #ifdef _MSC_VER
4180 # define _CRT_SECURE_NO_DEPRECATE 1
4181 #endif
4182 #include <stdio.h>
4183 #include <stdlib.h>
4184 #ifdef _MSC_VER
4185 # include <direct.h>
4186 # include <process.h>
4187 # include <io.h>
4188 #else
4189 # include <unistd.h>
4190 # include <stdint.h>
4191 # ifdef __CYGWIN__
4192 # include <io.h>
4193 # endif
4194 #endif
4195 #include <malloc.h>
4196 #include <stdarg.h>
4197 #include <assert.h>
4198 #include <string.h>
4199 #include <ctype.h>
4200 #include <errno.h>
4201 #include <fcntl.h>
4202 #include <sys/stat.h>
4203
4204 /* declarations of non-ANSI functions */
4205 #if defined(__MINGW32__)
4206 # ifdef __STRICT_ANSI__
4207 int _putenv (const char *);
4208 # endif
4209 #elif defined(__CYGWIN__)
4210 # ifdef __STRICT_ANSI__
4211 char *realpath (const char *, char *);
4212 int putenv (char *);
4213 int setenv (const char *, const char *, int);
4214 # endif
4215 /* #elif defined (other platforms) ... */
4216 #endif
4217
4218 /* portability defines, excluding path handling macros */
4219 #if defined(_MSC_VER)
4220 # define setmode _setmode
4221 # define stat _stat
4222 # define chmod _chmod
4223 # define getcwd _getcwd
4224 # define putenv _putenv
4225 # define S_IXUSR _S_IEXEC
4226 # ifndef _INTPTR_T_DEFINED
4227 # define _INTPTR_T_DEFINED
4228 # define intptr_t int
4229 # endif
4230 #elif defined(__MINGW32__)
4231 # define setmode _setmode
4232 # define stat _stat
4233 # define chmod _chmod
4234 # define getcwd _getcwd
4235 # define putenv _putenv
4236 #elif defined(__CYGWIN__)
4237 # define HAVE_SETENV
4238 # define FOPEN_WB "wb"
4239 /* #elif defined (other platforms) ... */
4240 #endif
4241
4242 #if defined(PATH_MAX)
4243 # define LT_PATHMAX PATH_MAX
4244 #elif defined(MAXPATHLEN)
4245 # define LT_PATHMAX MAXPATHLEN
4246 #else
4247 # define LT_PATHMAX 1024
4248 #endif
4249
4250 #ifndef S_IXOTH
4251 # define S_IXOTH 0
4252 #endif
4253 #ifndef S_IXGRP
4254 # define S_IXGRP 0
4255 #endif
4256
4257 /* path handling portability macros */
4258 #ifndef DIR_SEPARATOR
4259 # define DIR_SEPARATOR '/'
4260 # define PATH_SEPARATOR ':'
4261 #endif
4262
4263 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4264 defined (__OS2__)
4265 # define HAVE_DOS_BASED_FILE_SYSTEM
4266 # define FOPEN_WB "wb"
4267 # ifndef DIR_SEPARATOR_2
4268 # define DIR_SEPARATOR_2 '\\'
4269 # endif
4270 # ifndef PATH_SEPARATOR_2
4271 # define PATH_SEPARATOR_2 ';'
4272 # endif
4273 #endif
4274
4275 #ifndef DIR_SEPARATOR_2
4276 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4277 #else /* DIR_SEPARATOR_2 */
4278 # define IS_DIR_SEPARATOR(ch) \
4279 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4280 #endif /* DIR_SEPARATOR_2 */
4281
4282 #ifndef PATH_SEPARATOR_2
4283 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4284 #else /* PATH_SEPARATOR_2 */
4285 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4286 #endif /* PATH_SEPARATOR_2 */
4287
4288 #ifndef FOPEN_WB
4289 # define FOPEN_WB "w"
4290 #endif
4291 #ifndef _O_BINARY
4292 # define _O_BINARY 0
4293 #endif
4294
4295 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4296 #define XFREE(stale) do { \
4297 if (stale) { free ((void *) stale); stale = 0; } \
4298 } while (0)
4299
4300 #if defined(LT_DEBUGWRAPPER)
4301 static int lt_debug = 1;
4302 #else
4303 static int lt_debug = 0;
4304 #endif
4305
4306 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
4307
4308 void *xmalloc (size_t num);
4309 char *xstrdup (const char *string);
4310 const char *base_name (const char *name);
4311 char *find_executable (const char *wrapper);
4312 char *chase_symlinks (const char *pathspec);
4313 int make_executable (const char *path);
4314 int check_executable (const char *path);
4315 char *strendzap (char *str, const char *pat);
4316 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
4317 void lt_fatal (const char *file, int line, const char *message, ...);
4318 static const char *nonnull (const char *s);
4319 static const char *nonempty (const char *s);
4320 void lt_setenv (const char *name, const char *value);
4321 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
4322 void lt_update_exe_path (const char *name, const char *value);
4323 void lt_update_lib_path (const char *name, const char *value);
4324 char **prepare_spawn (char **argv);
4325 void lt_dump_script (FILE *f);
4326 EOF
4327
4328 cat <<EOF
4329 volatile const char * MAGIC_EXE = "$magic_exe";
4330 const char * LIB_PATH_VARNAME = "$shlibpath_var";
4331 EOF
4332
4333 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4334 func_to_host_path "$temp_rpath"
4335 cat <<EOF
4336 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
4337 EOF
4338 else
4339 cat <<"EOF"
4340 const char * LIB_PATH_VALUE = "";
4341 EOF
4342 fi
4343
4344 if test -n "$dllsearchpath"; then
4345 func_to_host_path "$dllsearchpath:"
4346 cat <<EOF
4347 const char * EXE_PATH_VARNAME = "PATH";
4348 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
4349 EOF
4350 else
4351 cat <<"EOF"
4352 const char * EXE_PATH_VARNAME = "";
4353 const char * EXE_PATH_VALUE = "";
4354 EOF
4355 fi
4356
4357 if test "$fast_install" = yes; then
4358 cat <<EOF
4359 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
4360 EOF
4361 else
4362 cat <<EOF
4363 const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
4364 EOF
4365 fi
4366
4367
4368 cat <<"EOF"
4369
4370 #define LTWRAPPER_OPTION_PREFIX "--lt-"
4371
4372 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
4373 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
4374 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
4375
4376 int
4377 main (int argc, char *argv[])
4378 {
4379 char **newargz;
4380 int newargc;
4381 char *tmp_pathspec;
4382 char *actual_cwrapper_path;
4383 char *actual_cwrapper_name;
4384 char *target_name;
4385 char *lt_argv_zero;
4386 intptr_t rval = 127;
4387
4388 int i;
4389
4390 program_name = (char *) xstrdup (base_name (argv[0]));
4391 newargz = XMALLOC (char *, argc + 1);
4392
4393 /* very simple arg parsing; don't want to rely on getopt
4394 * also, copy all non cwrapper options to newargz, except
4395 * argz[0], which is handled differently
4396 */
4397 newargc=0;
4398 for (i = 1; i < argc; i++)
4399 {
4400 if (strcmp (argv[i], dumpscript_opt) == 0)
4401 {
4402 EOF
4403 case "$host" in
4404 *mingw* | *cygwin* )
4405 # make stdout use "unix" line endings
4406 echo " setmode(1,_O_BINARY);"
4407 ;;
4408 esac
4409
4410 cat <<"EOF"
4411 lt_dump_script (stdout);
4412 return 0;
4413 }
4414 if (strcmp (argv[i], debug_opt) == 0)
4415 {
4416 lt_debug = 1;
4417 continue;
4418 }
4419 if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
4420 {
4421 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4422 namespace, but it is not one of the ones we know about and
4423 have already dealt with, above (inluding dump-script), then
4424 report an error. Otherwise, targets might begin to believe
4425 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4426 namespace. The first time any user complains about this, we'll
4427 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4428 or a configure.ac-settable value.
4429 */
4430 lt_fatal (__FILE__, __LINE__,
4431 "unrecognized %s option: '%s'",
4432 ltwrapper_option_prefix, argv[i]);
4433 }
4434 /* otherwise ... */
4435 newargz[++newargc] = xstrdup (argv[i]);
4436 }
4437 newargz[++newargc] = NULL;
4438
4439 EOF
4440 cat <<EOF
4441 /* The GNU banner must be the first non-error debug message */
4442 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
4443 EOF
4444 cat <<"EOF"
4445 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
4446 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
4447
4448 tmp_pathspec = find_executable (argv[0]);
4449 if (tmp_pathspec == NULL)
4450 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
4451 lt_debugprintf (__FILE__, __LINE__,
4452 "(main) found exe (before symlink chase) at: %s\n",
4453 tmp_pathspec);
4454
4455 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
4456 lt_debugprintf (__FILE__, __LINE__,
4457 "(main) found exe (after symlink chase) at: %s\n",
4458 actual_cwrapper_path);
4459 XFREE (tmp_pathspec);
4460
4461 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
4462 strendzap (actual_cwrapper_path, actual_cwrapper_name);
4463
4464 /* wrapper name transforms */
4465 strendzap (actual_cwrapper_name, ".exe");
4466 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
4467 XFREE (actual_cwrapper_name);
4468 actual_cwrapper_name = tmp_pathspec;
4469 tmp_pathspec = 0;
4470
4471 /* target_name transforms -- use actual target program name; might have lt- prefix */
4472 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
4473 strendzap (target_name, ".exe");
4474 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
4475 XFREE (target_name);
4476 target_name = tmp_pathspec;
4477 tmp_pathspec = 0;
4478
4479 lt_debugprintf (__FILE__, __LINE__,
4480 "(main) libtool target name: %s\n",
4481 target_name);
4482 EOF
4483
4484 cat <<EOF
4485 newargz[0] =
4486 XMALLOC (char, (strlen (actual_cwrapper_path) +
4487 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
4488 strcpy (newargz[0], actual_cwrapper_path);
4489 strcat (newargz[0], "$objdir");
4490 strcat (newargz[0], "/");
4491 EOF
4492
4493 cat <<"EOF"
4494 /* stop here, and copy so we don't have to do this twice */
4495 tmp_pathspec = xstrdup (newargz[0]);
4496
4497 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
4498 strcat (newargz[0], actual_cwrapper_name);
4499
4500 /* DO want the lt- prefix here if it exists, so use target_name */
4501 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
4502 XFREE (tmp_pathspec);
4503 tmp_pathspec = NULL;
4504 EOF
4505
4506 case $host_os in
4507 mingw*)
4508 cat <<"EOF"
4509 {
4510 char* p;
4511 while ((p = strchr (newargz[0], '\\')) != NULL)
4512 {
4513 *p = '/';
4514 }
4515 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
4516 {
4517 *p = '/';
4518 }
4519 }
4520 EOF
4521 ;;
4522 esac
4523
4524 cat <<"EOF"
4525 XFREE (target_name);
4526 XFREE (actual_cwrapper_path);
4527 XFREE (actual_cwrapper_name);
4528
4529 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
4530 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
4531 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
4532 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4533 because on Windows, both *_VARNAMEs are PATH but uninstalled
4534 libraries must come first. */
4535 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
4536 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
4537
4538 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
4539 nonnull (lt_argv_zero));
4540 for (i = 0; i < newargc; i++)
4541 {
4542 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
4543 i, nonnull (newargz[i]));
4544 }
4545
4546 EOF
4547
4548 case $host_os in
4549 mingw*)
4550 cat <<"EOF"
4551 /* execv doesn't actually work on mingw as expected on unix */
4552 newargz = prepare_spawn (newargz);
4553 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
4554 if (rval == -1)
4555 {
4556 /* failed to start process */
4557 lt_debugprintf (__FILE__, __LINE__,
4558 "(main) failed to launch target \"%s\": %s\n",
4559 lt_argv_zero, nonnull (strerror (errno)));
4560 return 127;
4561 }
4562 return rval;
4563 EOF
4564 ;;
4565 *)
4566 cat <<"EOF"
4567 execv (lt_argv_zero, newargz);
4568 return rval; /* =127, but avoids unused variable warning */
4569 EOF
4570 ;;
4571 esac
4572
4573 cat <<"EOF"
4574 }
4575
4576 void *
4577 xmalloc (size_t num)
4578 {
4579 void *p = (void *) malloc (num);
4580 if (!p)
4581 lt_fatal (__FILE__, __LINE__, "memory exhausted");
4582
4583 return p;
4584 }
4585
4586 char *
4587 xstrdup (const char *string)
4588 {
4589 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
4590 string) : NULL;
4591 }
4592
4593 const char *
4594 base_name (const char *name)
4595 {
4596 const char *base;
4597
4598 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4599 /* Skip over the disk name in MSDOS pathnames. */
4600 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
4601 name += 2;
4602 #endif
4603
4604 for (base = name; *name; name++)
4605 if (IS_DIR_SEPARATOR (*name))
4606 base = name + 1;
4607 return base;
4608 }
4609
4610 int
4611 check_executable (const char *path)
4612 {
4613 struct stat st;
4614
4615 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
4616 nonempty (path));
4617 if ((!path) || (!*path))
4618 return 0;
4619
4620 if ((stat (path, &st) >= 0)
4621 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
4622 return 1;
4623 else
4624 return 0;
4625 }
4626
4627 int
4628 make_executable (const char *path)
4629 {
4630 int rval = 0;
4631 struct stat st;
4632
4633 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
4634 nonempty (path));
4635 if ((!path) || (!*path))
4636 return 0;
4637
4638 if (stat (path, &st) >= 0)
4639 {
4640 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
4641 }
4642 return rval;
4643 }
4644
4645 /* Searches for the full path of the wrapper. Returns
4646 newly allocated full path name if found, NULL otherwise
4647 Does not chase symlinks, even on platforms that support them.
4648 */
4649 char *
4650 find_executable (const char *wrapper)
4651 {
4652 int has_slash = 0;
4653 const char *p;
4654 const char *p_next;
4655 /* static buffer for getcwd */
4656 char tmp[LT_PATHMAX + 1];
4657 int tmp_len;
4658 char *concat_name;
4659
4660 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
4661 nonempty (wrapper));
4662
4663 if ((wrapper == NULL) || (*wrapper == '\0'))
4664 return NULL;
4665
4666 /* Absolute path? */
4667 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4668 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
4669 {
4670 concat_name = xstrdup (wrapper);
4671 if (check_executable (concat_name))
4672 return concat_name;
4673 XFREE (concat_name);
4674 }
4675 else
4676 {
4677 #endif
4678 if (IS_DIR_SEPARATOR (wrapper[0]))
4679 {
4680 concat_name = xstrdup (wrapper);
4681 if (check_executable (concat_name))
4682 return concat_name;
4683 XFREE (concat_name);
4684 }
4685 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4686 }
4687 #endif
4688
4689 for (p = wrapper; *p; p++)
4690 if (*p == '/')
4691 {
4692 has_slash = 1;
4693 break;
4694 }
4695 if (!has_slash)
4696 {
4697 /* no slashes; search PATH */
4698 const char *path = getenv ("PATH");
4699 if (path != NULL)
4700 {
4701 for (p = path; *p; p = p_next)
4702 {
4703 const char *q;
4704 size_t p_len;
4705 for (q = p; *q; q++)
4706 if (IS_PATH_SEPARATOR (*q))
4707 break;
4708 p_len = q - p;
4709 p_next = (*q == '\0' ? q : q + 1);
4710 if (p_len == 0)
4711 {
4712 /* empty path: current directory */
4713 if (getcwd (tmp, LT_PATHMAX) == NULL)
4714 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4715 nonnull (strerror (errno)));
4716 tmp_len = strlen (tmp);
4717 concat_name =
4718 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
4719 memcpy (concat_name, tmp, tmp_len);
4720 concat_name[tmp_len] = '/';
4721 strcpy (concat_name + tmp_len + 1, wrapper);
4722 }
4723 else
4724 {
4725 concat_name =
4726 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
4727 memcpy (concat_name, p, p_len);
4728 concat_name[p_len] = '/';
4729 strcpy (concat_name + p_len + 1, wrapper);
4730 }
4731 if (check_executable (concat_name))
4732 return concat_name;
4733 XFREE (concat_name);
4734 }
4735 }
4736 /* not found in PATH; assume curdir */
4737 }
4738 /* Relative path | not found in path: prepend cwd */
4739 if (getcwd (tmp, LT_PATHMAX) == NULL)
4740 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4741 nonnull (strerror (errno)));
4742 tmp_len = strlen (tmp);
4743 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
4744 memcpy (concat_name, tmp, tmp_len);
4745 concat_name[tmp_len] = '/';
4746 strcpy (concat_name + tmp_len + 1, wrapper);
4747
4748 if (check_executable (concat_name))
4749 return concat_name;
4750 XFREE (concat_name);
4751 return NULL;
4752 }
4753
4754 char *
4755 chase_symlinks (const char *pathspec)
4756 {
4757 #ifndef S_ISLNK
4758 return xstrdup (pathspec);
4759 #else
4760 char buf[LT_PATHMAX];
4761 struct stat s;
4762 char *tmp_pathspec = xstrdup (pathspec);
4763 char *p;
4764 int has_symlinks = 0;
4765 while (strlen (tmp_pathspec) && !has_symlinks)
4766 {
4767 lt_debugprintf (__FILE__, __LINE__,
4768 "checking path component for symlinks: %s\n",
4769 tmp_pathspec);
4770 if (lstat (tmp_pathspec, &s) == 0)
4771 {
4772 if (S_ISLNK (s.st_mode) != 0)
4773 {
4774 has_symlinks = 1;
4775 break;
4776 }
4777
4778 /* search backwards for last DIR_SEPARATOR */
4779 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
4780 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
4781 p--;
4782 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
4783 {
4784 /* no more DIR_SEPARATORS left */
4785 break;
4786 }
4787 *p = '\0';
4788 }
4789 else
4790 {
4791 lt_fatal (__FILE__, __LINE__,
4792 "error accessing file \"%s\": %s",
4793 tmp_pathspec, nonnull (strerror (errno)));
4794 }
4795 }
4796 XFREE (tmp_pathspec);
4797
4798 if (!has_symlinks)
4799 {
4800 return xstrdup (pathspec);
4801 }
4802
4803 tmp_pathspec = realpath (pathspec, buf);
4804 if (tmp_pathspec == 0)
4805 {
4806 lt_fatal (__FILE__, __LINE__,
4807 "could not follow symlinks for %s", pathspec);
4808 }
4809 return xstrdup (tmp_pathspec);
4810 #endif
4811 }
4812
4813 char *
4814 strendzap (char *str, const char *pat)
4815 {
4816 size_t len, patlen;
4817
4818 assert (str != NULL);
4819 assert (pat != NULL);
4820
4821 len = strlen (str);
4822 patlen = strlen (pat);
4823
4824 if (patlen <= len)
4825 {
4826 str += len - patlen;
4827 if (strcmp (str, pat) == 0)
4828 *str = '\0';
4829 }
4830 return str;
4831 }
4832
4833 void
4834 lt_debugprintf (const char *file, int line, const char *fmt, ...)
4835 {
4836 va_list args;
4837 if (lt_debug)
4838 {
4839 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
4840 va_start (args, fmt);
4841 (void) vfprintf (stderr, fmt, args);
4842 va_end (args);
4843 }
4844 }
4845
4846 static void
4847 lt_error_core (int exit_status, const char *file,
4848 int line, const char *mode,
4849 const char *message, va_list ap)
4850 {
4851 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
4852 vfprintf (stderr, message, ap);
4853 fprintf (stderr, ".\n");
4854
4855 if (exit_status >= 0)
4856 exit (exit_status);
4857 }
4858
4859 void
4860 lt_fatal (const char *file, int line, const char *message, ...)
4861 {
4862 va_list ap;
4863 va_start (ap, message);
4864 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
4865 va_end (ap);
4866 }
4867
4868 static const char *
4869 nonnull (const char *s)
4870 {
4871 return s ? s : "(null)";
4872 }
4873
4874 static const char *
4875 nonempty (const char *s)
4876 {
4877 return (s && !*s) ? "(empty)" : nonnull (s);
4878 }
4879
4880 void
4881 lt_setenv (const char *name, const char *value)
4882 {
4883 lt_debugprintf (__FILE__, __LINE__,
4884 "(lt_setenv) setting '%s' to '%s'\n",
4885 nonnull (name), nonnull (value));
4886 {
4887 #ifdef HAVE_SETENV
4888 /* always make a copy, for consistency with !HAVE_SETENV */
4889 char *str = xstrdup (value);
4890 setenv (name, str, 1);
4891 #else
4892 int len = strlen (name) + 1 + strlen (value) + 1;
4893 char *str = XMALLOC (char, len);
4894 sprintf (str, "%s=%s", name, value);
4895 if (putenv (str) != EXIT_SUCCESS)
4896 {
4897 XFREE (str);
4898 }
4899 #endif
4900 }
4901 }
4902
4903 char *
4904 lt_extend_str (const char *orig_value, const char *add, int to_end)
4905 {
4906 char *new_value;
4907 if (orig_value && *orig_value)
4908 {
4909 int orig_value_len = strlen (orig_value);
4910 int add_len = strlen (add);
4911 new_value = XMALLOC (char, add_len + orig_value_len + 1);
4912 if (to_end)
4913 {
4914 strcpy (new_value, orig_value);
4915 strcpy (new_value + orig_value_len, add);
4916 }
4917 else
4918 {
4919 strcpy (new_value, add);
4920 strcpy (new_value + add_len, orig_value);
4921 }
4922 }
4923 else
4924 {
4925 new_value = xstrdup (add);
4926 }
4927 return new_value;
4928 }
4929
4930 void
4931 lt_update_exe_path (const char *name, const char *value)
4932 {
4933 lt_debugprintf (__FILE__, __LINE__,
4934 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4935 nonnull (name), nonnull (value));
4936
4937 if (name && *name && value && *value)
4938 {
4939 char *new_value = lt_extend_str (getenv (name), value, 0);
4940 /* some systems can't cope with a ':'-terminated path #' */
4941 int len = strlen (new_value);
4942 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
4943 {
4944 new_value[len-1] = '\0';
4945 }
4946 lt_setenv (name, new_value);
4947 XFREE (new_value);
4948 }
4949 }
4950
4951 void
4952 lt_update_lib_path (const char *name, const char *value)
4953 {
4954 lt_debugprintf (__FILE__, __LINE__,
4955 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4956 nonnull (name), nonnull (value));
4957
4958 if (name && *name && value && *value)
4959 {
4960 char *new_value = lt_extend_str (getenv (name), value, 0);
4961 lt_setenv (name, new_value);
4962 XFREE (new_value);
4963 }
4964 }
4965
4966 EOF
4967 case $host_os in
4968 mingw*)
4969 cat <<"EOF"
4970
4971 /* Prepares an argument vector before calling spawn().
4972 Note that spawn() does not by itself call the command interpreter
4973 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
4974 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
4975 GetVersionEx(&v);
4976 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
4977 }) ? "cmd.exe" : "command.com").
4978 Instead it simply concatenates the arguments, separated by ' ', and calls
4979 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
4980 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
4981 special way:
4982 - Space and tab are interpreted as delimiters. They are not treated as
4983 delimiters if they are surrounded by double quotes: "...".
4984 - Unescaped double quotes are removed from the input. Their only effect is
4985 that within double quotes, space and tab are treated like normal
4986 characters.
4987 - Backslashes not followed by double quotes are not special.
4988 - But 2*n+1 backslashes followed by a double quote become
4989 n backslashes followed by a double quote (n >= 0):
4990 \" -> "
4991 \\\" -> \"
4992 \\\\\" -> \\"
4993 */
4994 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4995 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4996 char **
4997 prepare_spawn (char **argv)
4998 {
4999 size_t argc;
5000 char **new_argv;
5001 size_t i;
5002
5003 /* Count number of arguments. */
5004 for (argc = 0; argv[argc] != NULL; argc++)
5005 ;
5006
5007 /* Allocate new argument vector. */
5008 new_argv = XMALLOC (char *, argc + 1);
5009
5010 /* Put quoted arguments into the new argument vector. */
5011 for (i = 0; i < argc; i++)
5012 {
5013 const char *string = argv[i];
5014
5015 if (string[0] == '\0')
5016 new_argv[i] = xstrdup ("\"\"");
5017 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
5018 {
5019 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
5020 size_t length;
5021 unsigned int backslashes;
5022 const char *s;
5023 char *quoted_string;
5024 char *p;
5025
5026 length = 0;
5027 backslashes = 0;
5028 if (quote_around)
5029 length++;
5030 for (s = string; *s != '\0'; s++)
5031 {
5032 char c = *s;
5033 if (c == '"')
5034 length += backslashes + 1;
5035 length++;
5036 if (c == '\\')
5037 backslashes++;
5038 else
5039 backslashes = 0;
5040 }
5041 if (quote_around)
5042 length += backslashes + 1;
5043
5044 quoted_string = XMALLOC (char, length + 1);
5045
5046 p = quoted_string;
5047 backslashes = 0;
5048 if (quote_around)
5049 *p++ = '"';
5050 for (s = string; *s != '\0'; s++)
5051 {
5052 char c = *s;
5053 if (c == '"')
5054 {
5055 unsigned int j;
5056 for (j = backslashes + 1; j > 0; j--)
5057 *p++ = '\\';
5058 }
5059 *p++ = c;
5060 if (c == '\\')
5061 backslashes++;
5062 else
5063 backslashes = 0;
5064 }
5065 if (quote_around)
5066 {
5067 unsigned int j;
5068 for (j = backslashes; j > 0; j--)
5069 *p++ = '\\';
5070 *p++ = '"';
5071 }
5072 *p = '\0';
5073
5074 new_argv[i] = quoted_string;
5075 }
5076 else
5077 new_argv[i] = (char *) string;
5078 }
5079 new_argv[argc] = NULL;
5080
5081 return new_argv;
5082 }
5083 EOF
5084 ;;
5085 esac
5086
5087 cat <<"EOF"
5088 void lt_dump_script (FILE* f)
5089 {
5090 EOF
5091 func_emit_wrapper yes |
5092 $SED -e 's/\([\\"]\)/\\\1/g' \
5093 -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
5094
5095 cat <<"EOF"
5096 }
5097 EOF
5098 }
5099 # end: func_emit_cwrapperexe_src
5100
5101 # func_win32_import_lib_p ARG
5102 # True if ARG is an import lib, as indicated by $file_magic_cmd
5103 func_win32_import_lib_p ()
5104 {
5105 $opt_debug
5106 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
5107 *import*) : ;;
5108 *) false ;;
5109 esac
5110 }
5111
5112 # func_mode_link arg...
5113 func_mode_link ()
5114 {
5115 $opt_debug
5116 case $host in
5117 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
5118 # It is impossible to link a dll without this setting, and
5119 # we shouldn't force the makefile maintainer to figure out
5120 # which system we are compiling for in order to pass an extra
5121 # flag for every libtool invocation.
5122 # allow_undefined=no
5123
5124 # FIXME: Unfortunately, there are problems with the above when trying
5125 # to make a dll which has undefined symbols, in which case not
5126 # even a static library is built. For now, we need to specify
5127 # -no-undefined on the libtool link line when we can be certain
5128 # that all symbols are satisfied, otherwise we get a static library.
5129 allow_undefined=yes
5130 ;;
5131 *)
5132 allow_undefined=yes
5133 ;;
5134 esac
5135 libtool_args=$nonopt
5136 base_compile="$nonopt $@"
5137 compile_command=$nonopt
5138 finalize_command=$nonopt
5139
5140 compile_rpath=
5141 finalize_rpath=
5142 compile_shlibpath=
5143 finalize_shlibpath=
5144 convenience=
5145 old_convenience=
5146 deplibs=
5147 old_deplibs=
5148 compiler_flags=
5149 linker_flags=
5150 dllsearchpath=
5151 lib_search_path=`pwd`
5152 inst_prefix_dir=
5153 new_inherited_linker_flags=
5154
5155 avoid_version=no
5156 bindir=
5157 dlfiles=
5158 dlprefiles=
5159 dlself=no
5160 export_dynamic=no
5161 export_symbols=
5162 export_symbols_regex=
5163 generated=
5164 libobjs=
5165 ltlibs=
5166 module=no
5167 no_install=no
5168 objs=
5169 non_pic_objects=
5170 precious_files_regex=
5171 prefer_static_libs=no
5172 preload=no
5173 prev=
5174 prevarg=
5175 release=
5176 rpath=
5177 xrpath=
5178 perm_rpath=
5179 temp_rpath=
5180 thread_safe=no
5181 vinfo=
5182 vinfo_number=no
5183 weak_libs=
5184 single_module="${wl}-single_module"
5185 func_infer_tag $base_compile
5186
5187 # We need to know -static, to get the right output filenames.
5188 for arg
5189 do
5190 case $arg in
5191 -shared)
5192 test "$build_libtool_libs" != yes && \
5193 func_fatal_configuration "can not build a shared library"
5194 build_old_libs=no
5195 break
5196 ;;
5197 -all-static | -static | -static-libtool-libs)
5198 case $arg in
5199 -all-static)
5200 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
5201 func_warning "complete static linking is impossible in this configuration"
5202 fi
5203 if test -n "$link_static_flag"; then
5204 dlopen_self=$dlopen_self_static
5205 fi
5206 prefer_static_libs=yes
5207 ;;
5208 -static)
5209 if test -z "$pic_flag" && test -n "$link_static_flag"; then
5210 dlopen_self=$dlopen_self_static
5211 fi
5212 prefer_static_libs=built
5213 ;;
5214 -static-libtool-libs)
5215 if test -z "$pic_flag" && test -n "$link_static_flag"; then
5216 dlopen_self=$dlopen_self_static
5217 fi
5218 prefer_static_libs=yes
5219 ;;
5220 esac
5221 build_libtool_libs=no
5222 build_old_libs=yes
5223 break
5224 ;;
5225 esac
5226 done
5227
5228 # See if our shared archives depend on static archives.
5229 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
5230
5231 # Go through the arguments, transforming them on the way.
5232 while test "$#" -gt 0; do
5233 arg="$1"
5234 shift
5235 func_quote_for_eval "$arg"
5236 qarg=$func_quote_for_eval_unquoted_result
5237 func_append libtool_args " $func_quote_for_eval_result"
5238
5239 # If the previous option needs an argument, assign it.
5240 if test -n "$prev"; then
5241 case $prev in
5242 output)
5243 func_append compile_command " @OUTPUT@"
5244 func_append finalize_command " @OUTPUT@"
5245 ;;
5246 esac
5247
5248 case $prev in
5249 bindir)
5250 bindir="$arg"
5251 prev=
5252 continue
5253 ;;
5254 dlfiles|dlprefiles)
5255 if test "$preload" = no; then
5256 # Add the symbol object into the linking commands.
5257 func_append compile_command " @SYMFILE@"
5258 func_append finalize_command " @SYMFILE@"
5259 preload=yes
5260 fi
5261 case $arg in
5262 *.la | *.lo) ;; # We handle these cases below.
5263 force)
5264 if test "$dlself" = no; then
5265 dlself=needless
5266 export_dynamic=yes
5267 fi
5268 prev=
5269 continue
5270 ;;
5271 self)
5272 if test "$prev" = dlprefiles; then
5273 dlself=yes
5274 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
5275 dlself=yes
5276 else
5277 dlself=needless
5278 export_dynamic=yes
5279 fi
5280 prev=
5281 continue
5282 ;;
5283 *)
5284 if test "$prev" = dlfiles; then
5285 func_append dlfiles " $arg"
5286 else
5287 func_append dlprefiles " $arg"
5288 fi
5289 prev=
5290 continue
5291 ;;
5292 esac
5293 ;;
5294 expsyms)
5295 export_symbols="$arg"
5296 test -f "$arg" \
5297 || func_fatal_error "symbol file \`$arg' does not exist"
5298 prev=
5299 continue
5300 ;;
5301 expsyms_regex)
5302 export_symbols_regex="$arg"
5303 prev=
5304 continue
5305 ;;
5306 framework)
5307 case $host in
5308 *-*-darwin*)
5309 case "$deplibs " in
5310 *" $qarg.ltframework "*) ;;
5311 *) func_append deplibs " $qarg.ltframework" # this is fixed later
5312 ;;
5313 esac
5314 ;;
5315 esac
5316 prev=
5317 continue
5318 ;;
5319 inst_prefix)
5320 inst_prefix_dir="$arg"
5321 prev=
5322 continue
5323 ;;
5324 objectlist)
5325 if test -f "$arg"; then
5326 save_arg=$arg
5327 moreargs=
5328 for fil in `cat "$save_arg"`
5329 do
5330 # func_append moreargs " $fil"
5331 arg=$fil
5332 # A libtool-controlled object.
5333
5334 # Check to see that this really is a libtool object.
5335 if func_lalib_unsafe_p "$arg"; then
5336 pic_object=
5337 non_pic_object=
5338
5339 # Read the .lo file
5340 func_source "$arg"
5341
5342 if test -z "$pic_object" ||
5343 test -z "$non_pic_object" ||
5344 test "$pic_object" = none &&
5345 test "$non_pic_object" = none; then
5346 func_fatal_error "cannot find name of object for \`$arg'"
5347 fi
5348
5349 # Extract subdirectory from the argument.
5350 func_dirname "$arg" "/" ""
5351 xdir="$func_dirname_result"
5352
5353 if test "$pic_object" != none; then
5354 # Prepend the subdirectory the object is found in.
5355 pic_object="$xdir$pic_object"
5356
5357 if test "$prev" = dlfiles; then
5358 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5359 func_append dlfiles " $pic_object"
5360 prev=
5361 continue
5362 else
5363 # If libtool objects are unsupported, then we need to preload.
5364 prev=dlprefiles
5365 fi
5366 fi
5367
5368 # CHECK ME: I think I busted this. -Ossama
5369 if test "$prev" = dlprefiles; then
5370 # Preload the old-style object.
5371 func_append dlprefiles " $pic_object"
5372 prev=
5373 fi
5374
5375 # A PIC object.
5376 func_append libobjs " $pic_object"
5377 arg="$pic_object"
5378 fi
5379
5380 # Non-PIC object.
5381 if test "$non_pic_object" != none; then
5382 # Prepend the subdirectory the object is found in.
5383 non_pic_object="$xdir$non_pic_object"
5384
5385 # A standard non-PIC object
5386 func_append non_pic_objects " $non_pic_object"
5387 if test -z "$pic_object" || test "$pic_object" = none ; then
5388 arg="$non_pic_object"
5389 fi
5390 else
5391 # If the PIC object exists, use it instead.
5392 # $xdir was prepended to $pic_object above.
5393 non_pic_object="$pic_object"
5394 func_append non_pic_objects " $non_pic_object"
5395 fi
5396 else
5397 # Only an error if not doing a dry-run.
5398 if $opt_dry_run; then
5399 # Extract subdirectory from the argument.
5400 func_dirname "$arg" "/" ""
5401 xdir="$func_dirname_result"
5402
5403 func_lo2o "$arg"
5404 pic_object=$xdir$objdir/$func_lo2o_result
5405 non_pic_object=$xdir$func_lo2o_result
5406 func_append libobjs " $pic_object"
5407 func_append non_pic_objects " $non_pic_object"
5408 else
5409 func_fatal_error "\`$arg' is not a valid libtool object"
5410 fi
5411 fi
5412 done
5413 else
5414 func_fatal_error "link input file \`$arg' does not exist"
5415 fi
5416 arg=$save_arg
5417 prev=
5418 continue
5419 ;;
5420 precious_regex)
5421 precious_files_regex="$arg"
5422 prev=
5423 continue
5424 ;;
5425 release)
5426 release="-$arg"
5427 prev=
5428 continue
5429 ;;
5430 rpath | xrpath)
5431 # We need an absolute path.
5432 case $arg in
5433 [\\/]* | [A-Za-z]:[\\/]*) ;;
5434 *)
5435 func_fatal_error "only absolute run-paths are allowed"
5436 ;;
5437 esac
5438 if test "$prev" = rpath; then
5439 case "$rpath " in
5440 *" $arg "*) ;;
5441 *) func_append rpath " $arg" ;;
5442 esac
5443 else
5444 case "$xrpath " in
5445 *" $arg "*) ;;
5446 *) func_append xrpath " $arg" ;;
5447 esac
5448 fi
5449 prev=
5450 continue
5451 ;;
5452 shrext)
5453 shrext_cmds="$arg"
5454 prev=
5455 continue
5456 ;;
5457 weak)
5458 func_append weak_libs " $arg"
5459 prev=
5460 continue
5461 ;;
5462 xcclinker)
5463 func_append linker_flags " $qarg"
5464 func_append compiler_flags " $qarg"
5465 prev=
5466 func_append compile_command " $qarg"
5467 func_append finalize_command " $qarg"
5468 continue
5469 ;;
5470 xcompiler)
5471 func_append compiler_flags " $qarg"
5472 prev=
5473 func_append compile_command " $qarg"
5474 func_append finalize_command " $qarg"
5475 continue
5476 ;;
5477 xlinker)
5478 func_append linker_flags " $qarg"
5479 func_append compiler_flags " $wl$qarg"
5480 prev=
5481 func_append compile_command " $wl$qarg"
5482 func_append finalize_command " $wl$qarg"
5483 continue
5484 ;;
5485 *)
5486 eval "$prev=\"\$arg\""
5487 prev=
5488 continue
5489 ;;
5490 esac
5491 fi # test -n "$prev"
5492
5493 prevarg="$arg"
5494
5495 case $arg in
5496 -all-static)
5497 if test -n "$link_static_flag"; then
5498 # See comment for -static flag below, for more details.
5499 func_append compile_command " $link_static_flag"
5500 func_append finalize_command " $link_static_flag"
5501 fi
5502 continue
5503 ;;
5504
5505 -allow-undefined)
5506 # FIXME: remove this flag sometime in the future.
5507 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
5508 ;;
5509
5510 -avoid-version)
5511 avoid_version=yes
5512 continue
5513 ;;
5514
5515 -bindir)
5516 prev=bindir
5517 continue
5518 ;;
5519
5520 -dlopen)
5521 prev=dlfiles
5522 continue
5523 ;;
5524
5525 -dlpreopen)
5526 prev=dlprefiles
5527 continue
5528 ;;
5529
5530 -export-dynamic)
5531 export_dynamic=yes
5532 continue
5533 ;;
5534
5535 -export-symbols | -export-symbols-regex)
5536 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
5537 func_fatal_error "more than one -exported-symbols argument is not allowed"
5538 fi
5539 if test "X$arg" = "X-export-symbols"; then
5540 prev=expsyms
5541 else
5542 prev=expsyms_regex
5543 fi
5544 continue
5545 ;;
5546
5547 -framework)
5548 prev=framework
5549 continue
5550 ;;
5551
5552 -inst-prefix-dir)
5553 prev=inst_prefix
5554 continue
5555 ;;
5556
5557 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
5558 # so, if we see these flags be careful not to treat them like -L
5559 -L[A-Z][A-Z]*:*)
5560 case $with_gcc/$host in
5561 no/*-*-irix* | /*-*-irix*)
5562 func_append compile_command " $arg"
5563 func_append finalize_command " $arg"
5564 ;;
5565 esac
5566 continue
5567 ;;
5568
5569 -L*)
5570 func_stripname "-L" '' "$arg"
5571 if test -z "$func_stripname_result"; then
5572 if test "$#" -gt 0; then
5573 func_fatal_error "require no space between \`-L' and \`$1'"
5574 else
5575 func_fatal_error "need path for \`-L' option"
5576 fi
5577 fi
5578 func_resolve_sysroot "$func_stripname_result"
5579 dir=$func_resolve_sysroot_result
5580 # We need an absolute path.
5581 case $dir in
5582 [\\/]* | [A-Za-z]:[\\/]*) ;;
5583 *)
5584 absdir=`cd "$dir" && pwd`
5585 test -z "$absdir" && \
5586 func_fatal_error "cannot determine absolute directory name of \`$dir'"
5587 dir="$absdir"
5588 ;;
5589 esac
5590 case "$deplibs " in
5591 *" -L$dir "* | *" $arg "*)
5592 # Will only happen for absolute or sysroot arguments
5593 ;;
5594 *)
5595 # Preserve sysroot, but never include relative directories
5596 case $dir in
5597 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
5598 *) func_append deplibs " -L$dir" ;;
5599 esac
5600 func_append lib_search_path " $dir"
5601 ;;
5602 esac
5603 case $host in
5604 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
5605 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
5606 case :$dllsearchpath: in
5607 *":$dir:"*) ;;
5608 ::) dllsearchpath=$dir;;
5609 *) func_append dllsearchpath ":$dir";;
5610 esac
5611 case :$dllsearchpath: in
5612 *":$testbindir:"*) ;;
5613 ::) dllsearchpath=$testbindir;;
5614 *) func_append dllsearchpath ":$testbindir";;
5615 esac
5616 ;;
5617 esac
5618 deplibs="$deplibs $arg"
5619 continue
5620 ;;
5621
5622 -l*)
5623 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
5624 case $host in
5625 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
5626 # These systems don't actually have a C or math library (as such)
5627 continue
5628 ;;
5629 *-*-os2*)
5630 # These systems don't actually have a C library (as such)
5631 test "X$arg" = "X-lc" && continue
5632 ;;
5633 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
5634 # Do not include libc due to us having libc/libc_r.
5635 test "X$arg" = "X-lc" && continue
5636 ;;
5637 *-*-rhapsody* | *-*-darwin1.[012])
5638 # Rhapsody C and math libraries are in the System framework
5639 func_append deplibs " System.ltframework"
5640 continue
5641 ;;
5642 *-*-sco3.2v5* | *-*-sco5v6*)
5643 # Causes problems with __ctype
5644 test "X$arg" = "X-lc" && continue
5645 ;;
5646 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
5647 # Compiler inserts libc in the correct place for threads to work
5648 test "X$arg" = "X-lc" && continue
5649 ;;
5650 esac
5651 elif test "X$arg" = "X-lc_r"; then
5652 case $host in
5653 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
5654 # Do not include libc_r directly, use -pthread flag.
5655 continue
5656 ;;
5657 esac
5658 fi
5659 func_append deplibs " $arg"
5660 continue
5661 ;;
5662
5663 -module)
5664 module=yes
5665 continue
5666 ;;
5667
5668 # Tru64 UNIX uses -model [arg] to determine the layout of C++
5669 # classes, name mangling, and exception handling.
5670 # Darwin uses the -arch flag to determine output architecture.
5671 -model|-arch|-isysroot|--sysroot)
5672 func_append compiler_flags " $arg"
5673 func_append compile_command " $arg"
5674 func_append finalize_command " $arg"
5675 prev=xcompiler
5676 continue
5677 ;;
5678
5679 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5680 func_append compiler_flags " $arg"
5681 func_append compile_command " $arg"
5682 func_append finalize_command " $arg"
5683 case "$new_inherited_linker_flags " in
5684 *" $arg "*) ;;
5685 * ) func_append new_inherited_linker_flags " $arg" ;;
5686 esac
5687 continue
5688 ;;
5689
5690 -multi_module)
5691 single_module="${wl}-multi_module"
5692 continue
5693 ;;
5694
5695 -no-fast-install)
5696 fast_install=no
5697 continue
5698 ;;
5699
5700 -no-install)
5701 case $host in
5702 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
5703 # The PATH hackery in wrapper scripts is required on Windows
5704 # and Darwin in order for the loader to find any dlls it needs.
5705 func_warning "\`-no-install' is ignored for $host"
5706 func_warning "assuming \`-no-fast-install' instead"
5707 fast_install=no
5708 ;;
5709 *) no_install=yes ;;
5710 esac
5711 continue
5712 ;;
5713
5714 -no-undefined)
5715 allow_undefined=no
5716 continue
5717 ;;
5718
5719 -objectlist)
5720 prev=objectlist
5721 continue
5722 ;;
5723
5724 -o) prev=output ;;
5725
5726 -precious-files-regex)
5727 prev=precious_regex
5728 continue
5729 ;;
5730
5731 -release)
5732 prev=release
5733 continue
5734 ;;
5735
5736 -rpath)
5737 prev=rpath
5738 continue
5739 ;;
5740
5741 -R)
5742 prev=xrpath
5743 continue
5744 ;;
5745
5746 -R*)
5747 func_stripname '-R' '' "$arg"
5748 dir=$func_stripname_result
5749 # We need an absolute path.
5750 case $dir in
5751 [\\/]* | [A-Za-z]:[\\/]*) ;;
5752 =*)
5753 func_stripname '=' '' "$dir"
5754 dir=$lt_sysroot$func_stripname_result
5755 ;;
5756 *)
5757 func_fatal_error "only absolute run-paths are allowed"
5758 ;;
5759 esac
5760 case "$xrpath " in
5761 *" $dir "*) ;;
5762 *) func_append xrpath " $dir" ;;
5763 esac
5764 continue
5765 ;;
5766
5767 -shared)
5768 # The effects of -shared are defined in a previous loop.
5769 continue
5770 ;;
5771
5772 -shrext)
5773 prev=shrext
5774 continue
5775 ;;
5776
5777 -static | -static-libtool-libs)
5778 # The effects of -static are defined in a previous loop.
5779 # We used to do the same as -all-static on platforms that
5780 # didn't have a PIC flag, but the assumption that the effects
5781 # would be equivalent was wrong. It would break on at least
5782 # Digital Unix and AIX.
5783 continue
5784 ;;
5785
5786 -thread-safe)
5787 thread_safe=yes
5788 continue
5789 ;;
5790
5791 -version-info)
5792 prev=vinfo
5793 continue
5794 ;;
5795
5796 -version-number)
5797 prev=vinfo
5798 vinfo_number=yes
5799 continue
5800 ;;
5801
5802 -weak)
5803 prev=weak
5804 continue
5805 ;;
5806
5807 -Wc,*)
5808 func_stripname '-Wc,' '' "$arg"
5809 args=$func_stripname_result
5810 arg=
5811 save_ifs="$IFS"; IFS=','
5812 for flag in $args; do
5813 IFS="$save_ifs"
5814 func_quote_for_eval "$flag"
5815 func_append arg " $func_quote_for_eval_result"
5816 func_append compiler_flags " $func_quote_for_eval_result"
5817 done
5818 IFS="$save_ifs"
5819 func_stripname ' ' '' "$arg"
5820 arg=$func_stripname_result
5821 ;;
5822
5823 -Wl,*)
5824 func_stripname '-Wl,' '' "$arg"
5825 args=$func_stripname_result
5826 arg=
5827 save_ifs="$IFS"; IFS=','
5828 for flag in $args; do
5829 IFS="$save_ifs"
5830 func_quote_for_eval "$flag"
5831 func_append arg " $wl$func_quote_for_eval_result"
5832 func_append compiler_flags " $wl$func_quote_for_eval_result"
5833 func_append linker_flags " $func_quote_for_eval_result"
5834 done
5835 IFS="$save_ifs"
5836 func_stripname ' ' '' "$arg"
5837 arg=$func_stripname_result
5838 ;;
5839
5840 -Xcompiler)
5841 prev=xcompiler
5842 continue
5843 ;;
5844
5845 -Xlinker)
5846 prev=xlinker
5847 continue
5848 ;;
5849
5850 -XCClinker)
5851 prev=xcclinker
5852 continue
5853 ;;
5854
5855 # -msg_* for osf cc
5856 -msg_*)
5857 func_quote_for_eval "$arg"
5858 arg="$func_quote_for_eval_result"
5859 ;;
5860
5861 # Flags to be passed through unchanged, with rationale:
5862 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
5863 # -r[0-9][0-9]* specify processor for the SGI compiler
5864 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
5865 # +DA*, +DD* enable 64-bit mode for the HP compiler
5866 # -q* compiler args for the IBM compiler
5867 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
5868 # -F/path path to uninstalled frameworks, gcc on darwin
5869 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5870 # @file GCC response files
5871 # -tp=* Portland pgcc target processor selection
5872 # --sysroot=* for sysroot support
5873 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
5874 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
5875 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5876 -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
5877 func_quote_for_eval "$arg"
5878 arg="$func_quote_for_eval_result"
5879 func_append compile_command " $arg"
5880 func_append finalize_command " $arg"
5881 func_append compiler_flags " $arg"
5882 continue
5883 ;;
5884
5885 # Some other compiler flag.
5886 -* | +*)
5887 func_quote_for_eval "$arg"
5888 arg="$func_quote_for_eval_result"
5889 ;;
5890
5891 *.$objext)
5892 # A standard object.
5893 func_append objs " $arg"
5894 ;;
5895
5896 *.lo)
5897 # A libtool-controlled object.
5898
5899 # Check to see that this really is a libtool object.
5900 if func_lalib_unsafe_p "$arg"; then
5901 pic_object=
5902 non_pic_object=
5903
5904 # Read the .lo file
5905 func_source "$arg"
5906
5907 if test -z "$pic_object" ||
5908 test -z "$non_pic_object" ||
5909 test "$pic_object" = none &&
5910 test "$non_pic_object" = none; then
5911 func_fatal_error "cannot find name of object for \`$arg'"
5912 fi
5913
5914 # Extract subdirectory from the argument.
5915 func_dirname "$arg" "/" ""
5916 xdir="$func_dirname_result"
5917
5918 if test "$pic_object" != none; then
5919 # Prepend the subdirectory the object is found in.
5920 pic_object="$xdir$pic_object"
5921
5922 if test "$prev" = dlfiles; then
5923 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5924 func_append dlfiles " $pic_object"
5925 prev=
5926 continue
5927 else
5928 # If libtool objects are unsupported, then we need to preload.
5929 prev=dlprefiles
5930 fi
5931 fi
5932
5933 # CHECK ME: I think I busted this. -Ossama
5934 if test "$prev" = dlprefiles; then
5935 # Preload the old-style object.
5936 func_append dlprefiles " $pic_object"
5937 prev=
5938 fi
5939
5940 # A PIC object.
5941 func_append libobjs " $pic_object"
5942 arg="$pic_object"
5943 fi
5944
5945 # Non-PIC object.
5946 if test "$non_pic_object" != none; then
5947 # Prepend the subdirectory the object is found in.
5948 non_pic_object="$xdir$non_pic_object"
5949
5950 # A standard non-PIC object
5951 func_append non_pic_objects " $non_pic_object"
5952 if test -z "$pic_object" || test "$pic_object" = none ; then
5953 arg="$non_pic_object"
5954 fi
5955 else
5956 # If the PIC object exists, use it instead.
5957 # $xdir was prepended to $pic_object above.
5958 non_pic_object="$pic_object"
5959 func_append non_pic_objects " $non_pic_object"
5960 fi
5961 else
5962 # Only an error if not doing a dry-run.
5963 if $opt_dry_run; then
5964 # Extract subdirectory from the argument.
5965 func_dirname "$arg" "/" ""
5966 xdir="$func_dirname_result"
5967
5968 func_lo2o "$arg"
5969 pic_object=$xdir$objdir/$func_lo2o_result
5970 non_pic_object=$xdir$func_lo2o_result
5971 func_append libobjs " $pic_object"
5972 func_append non_pic_objects " $non_pic_object"
5973 else
5974 func_fatal_error "\`$arg' is not a valid libtool object"
5975 fi
5976 fi
5977 ;;
5978
5979 *.$libext)
5980 # An archive.
5981 func_append deplibs " $arg"
5982 func_append old_deplibs " $arg"
5983 continue
5984 ;;
5985
5986 *.la)
5987 # A libtool-controlled library.
5988
5989 func_resolve_sysroot "$arg"
5990 if test "$prev" = dlfiles; then
5991 # This library was specified with -dlopen.
5992 func_append dlfiles " $func_resolve_sysroot_result"
5993 prev=
5994 elif test "$prev" = dlprefiles; then
5995 # The library was specified with -dlpreopen.
5996 func_append dlprefiles " $func_resolve_sysroot_result"
5997 prev=
5998 else
5999 func_append deplibs " $func_resolve_sysroot_result"
6000 fi
6001 continue
6002 ;;
6003
6004 # Some other compiler argument.
6005 *)
6006 # Unknown arguments in both finalize_command and compile_command need
6007 # to be aesthetically quoted because they are evaled later.
6008 func_quote_for_eval "$arg"
6009 arg="$func_quote_for_eval_result"
6010 ;;
6011 esac # arg
6012
6013 # Now actually substitute the argument into the commands.
6014 if test -n "$arg"; then
6015 func_append compile_command " $arg"
6016 func_append finalize_command " $arg"
6017 fi
6018 done # argument parsing loop
6019
6020 test -n "$prev" && \
6021 func_fatal_help "the \`$prevarg' option requires an argument"
6022
6023 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
6024 eval arg=\"$export_dynamic_flag_spec\"
6025 func_append compile_command " $arg"
6026 func_append finalize_command " $arg"
6027 fi
6028
6029 oldlibs=
6030 # calculate the name of the file, without its directory
6031 func_basename "$output"
6032 outputname="$func_basename_result"
6033 libobjs_save="$libobjs"
6034
6035 if test -n "$shlibpath_var"; then
6036 # get the directories listed in $shlibpath_var
6037 eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
6038 else
6039 shlib_search_path=
6040 fi
6041 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
6042 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
6043
6044 func_dirname "$output" "/" ""
6045 output_objdir="$func_dirname_result$objdir"
6046 func_to_tool_file "$output_objdir/"
6047 tool_output_objdir=$func_to_tool_file_result
6048 # Create the object directory.
6049 func_mkdir_p "$output_objdir"
6050
6051 # Determine the type of output
6052 case $output in
6053 "")
6054 func_fatal_help "you must specify an output file"
6055 ;;
6056 *.$libext) linkmode=oldlib ;;
6057 *.lo | *.$objext) linkmode=obj ;;
6058 *.la) linkmode=lib ;;
6059 *) linkmode=prog ;; # Anything else should be a program.
6060 esac
6061
6062 specialdeplibs=
6063
6064 libs=
6065 # Find all interdependent deplibs by searching for libraries
6066 # that are linked more than once (e.g. -la -lb -la)
6067 for deplib in $deplibs; do
6068 if $opt_preserve_dup_deps ; then
6069 case "$libs " in
6070 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6071 esac
6072 fi
6073 func_append libs " $deplib"
6074 done
6075
6076 if test "$linkmode" = lib; then
6077 libs="$predeps $libs $compiler_lib_search_path $postdeps"
6078
6079 # Compute libraries that are listed more than once in $predeps
6080 # $postdeps and mark them as special (i.e., whose duplicates are
6081 # not to be eliminated).
6082 pre_post_deps=
6083 if $opt_duplicate_compiler_generated_deps; then
6084 for pre_post_dep in $predeps $postdeps; do
6085 case "$pre_post_deps " in
6086 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
6087 esac
6088 func_append pre_post_deps " $pre_post_dep"
6089 done
6090 fi
6091 pre_post_deps=
6092 fi
6093
6094 deplibs=
6095 newdependency_libs=
6096 newlib_search_path=
6097 need_relink=no # whether we're linking any uninstalled libtool libraries
6098 notinst_deplibs= # not-installed libtool libraries
6099 notinst_path= # paths that contain not-installed libtool libraries
6100
6101 case $linkmode in
6102 lib)
6103 passes="conv dlpreopen link"
6104 for file in $dlfiles $dlprefiles; do
6105 case $file in
6106 *.la) ;;
6107 *)
6108 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
6109 ;;
6110 esac
6111 done
6112 ;;
6113 prog)
6114 compile_deplibs=
6115 finalize_deplibs=
6116 alldeplibs=no
6117 newdlfiles=
6118 newdlprefiles=
6119 passes="conv scan dlopen dlpreopen link"
6120 ;;
6121 *) passes="conv"
6122 ;;
6123 esac
6124
6125 for pass in $passes; do
6126 # The preopen pass in lib mode reverses $deplibs; put it back here
6127 # so that -L comes before libs that need it for instance...
6128 if test "$linkmode,$pass" = "lib,link"; then
6129 ## FIXME: Find the place where the list is rebuilt in the wrong
6130 ## order, and fix it there properly
6131 tmp_deplibs=
6132 for deplib in $deplibs; do
6133 tmp_deplibs="$deplib $tmp_deplibs"
6134 done
6135 deplibs="$tmp_deplibs"
6136 fi
6137
6138 if test "$linkmode,$pass" = "lib,link" ||
6139 test "$linkmode,$pass" = "prog,scan"; then
6140 libs="$deplibs"
6141 deplibs=
6142 fi
6143 if test "$linkmode" = prog; then
6144 case $pass in
6145 dlopen) libs="$dlfiles" ;;
6146 dlpreopen) libs="$dlprefiles" ;;
6147 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
6148 esac
6149 fi
6150 if test "$linkmode,$pass" = "lib,dlpreopen"; then
6151 # Collect and forward deplibs of preopened libtool libs
6152 for lib in $dlprefiles; do
6153 # Ignore non-libtool-libs
6154 dependency_libs=
6155 func_resolve_sysroot "$lib"
6156 case $lib in
6157 *.la) func_source "$func_resolve_sysroot_result" ;;
6158 esac
6159
6160 # Collect preopened libtool deplibs, except any this library
6161 # has declared as weak libs
6162 for deplib in $dependency_libs; do
6163 func_basename "$deplib"
6164 deplib_base=$func_basename_result
6165 case " $weak_libs " in
6166 *" $deplib_base "*) ;;
6167 *) func_append deplibs " $deplib" ;;
6168 esac
6169 done
6170 done
6171 libs="$dlprefiles"
6172 fi
6173 if test "$pass" = dlopen; then
6174 # Collect dlpreopened libraries
6175 save_deplibs="$deplibs"
6176 deplibs=
6177 fi
6178
6179 for deplib in $libs; do
6180 lib=
6181 found=no
6182 case $deplib in
6183 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
6184 if test "$linkmode,$pass" = "prog,link"; then
6185 compile_deplibs="$deplib $compile_deplibs"
6186 finalize_deplibs="$deplib $finalize_deplibs"
6187 else
6188 func_append compiler_flags " $deplib"
6189 fi
6190
6191 case $linkmode in
6192 lib)
6193 deplibs="$deplib $deplibs"
6194 test "$pass" = conv && continue
6195 newdependency_libs="$deplib $newdependency_libs"
6196 ;;
6197 prog)
6198 if test "$pass" = conv; then
6199 deplibs="$deplib $deplibs"
6200 continue
6201 fi
6202 if test "$pass" = scan; then
6203 deplibs="$deplib $deplibs"
6204 else
6205 compile_deplibs="$deplib $compile_deplibs"
6206 finalize_deplibs="$deplib $finalize_deplibs"
6207 fi
6208 ;;
6209 *)
6210 ;;
6211 esac # linkmode
6212
6213 continue
6214 ;;
6215 -l*)
6216 if test "$linkmode" != lib && test "$linkmode" != prog; then
6217 func_warning "\`-l' is ignored for archives/objects"
6218 continue
6219 fi
6220 func_stripname '-l' '' "$deplib"
6221 name=$func_stripname_result
6222 if test "$linkmode" = lib; then
6223 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
6224 else
6225 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
6226 fi
6227 for searchdir in $searchdirs; do
6228 for search_ext in .la $std_shrext .so .a; do
6229 # Search the libtool library
6230 lib="$searchdir/lib${name}${search_ext}"
6231 if test -f "$lib"; then
6232 if test "$search_ext" = ".la"; then
6233 found=yes
6234 else
6235 found=no
6236 fi
6237 break 2
6238 fi
6239 done
6240 done
6241 if test "$found" != yes; then
6242 # deplib doesn't seem to be a libtool library
6243 if test "$linkmode,$pass" = "prog,link"; then
6244 compile_deplibs="$deplib $compile_deplibs"
6245 finalize_deplibs="$deplib $finalize_deplibs"
6246 else
6247 deplibs="$deplib $deplibs"
6248 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
6249 fi
6250 continue
6251 else # deplib is a libtool library
6252 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
6253 # We need to do some special things here, and not later.
6254 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6255 case " $predeps $postdeps " in
6256 *" $deplib "*)
6257 if func_lalib_p "$lib"; then
6258 library_names=
6259 old_library=
6260 func_source "$lib"
6261 for l in $old_library $library_names; do
6262 ll="$l"
6263 done
6264 if test "X$ll" = "X$old_library" ; then # only static version available
6265 found=no
6266 func_dirname "$lib" "" "."
6267 ladir="$func_dirname_result"
6268 lib=$ladir/$old_library
6269 if test "$linkmode,$pass" = "prog,link"; then
6270 compile_deplibs="$deplib $compile_deplibs"
6271 finalize_deplibs="$deplib $finalize_deplibs"
6272 else
6273 deplibs="$deplib $deplibs"
6274 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
6275 fi
6276 continue
6277 fi
6278 fi
6279 ;;
6280 *) ;;
6281 esac
6282 fi
6283 fi
6284 ;; # -l
6285 *.ltframework)
6286 if test "$linkmode,$pass" = "prog,link"; then
6287 compile_deplibs="$deplib $compile_deplibs"
6288 finalize_deplibs="$deplib $finalize_deplibs"
6289 else
6290 deplibs="$deplib $deplibs"
6291 if test "$linkmode" = lib ; then
6292 case "$new_inherited_linker_flags " in
6293 *" $deplib "*) ;;
6294 * ) func_append new_inherited_linker_flags " $deplib" ;;
6295 esac
6296 fi
6297 fi
6298 continue
6299 ;;
6300 -L*)
6301 case $linkmode in
6302 lib)
6303 deplibs="$deplib $deplibs"
6304 test "$pass" = conv && continue
6305 newdependency_libs="$deplib $newdependency_libs"
6306 func_stripname '-L' '' "$deplib"
6307 func_resolve_sysroot "$func_stripname_result"
6308 func_append newlib_search_path " $func_resolve_sysroot_result"
6309 ;;
6310 prog)
6311 if test "$pass" = conv; then
6312 deplibs="$deplib $deplibs"
6313 continue
6314 fi
6315 if test "$pass" = scan; then
6316 deplibs="$deplib $deplibs"
6317 else
6318 compile_deplibs="$deplib $compile_deplibs"
6319 finalize_deplibs="$deplib $finalize_deplibs"
6320 fi
6321 func_stripname '-L' '' "$deplib"
6322 func_resolve_sysroot "$func_stripname_result"
6323 func_append newlib_search_path " $func_resolve_sysroot_result"
6324 ;;
6325 *)
6326 func_warning "\`-L' is ignored for archives/objects"
6327 ;;
6328 esac # linkmode
6329 continue
6330 ;; # -L
6331 -R*)
6332 if test "$pass" = link; then
6333 func_stripname '-R' '' "$deplib"
6334 func_resolve_sysroot "$func_stripname_result"
6335 dir=$func_resolve_sysroot_result
6336 # Make sure the xrpath contains only unique directories.
6337 case "$xrpath " in
6338 *" $dir "*) ;;
6339 *) func_append xrpath " $dir" ;;
6340 esac
6341 fi
6342 deplibs="$deplib $deplibs"
6343 continue
6344 ;;
6345 *.la)
6346 func_resolve_sysroot "$deplib"
6347 lib=$func_resolve_sysroot_result
6348 ;;
6349 *.$libext)
6350 if test "$pass" = conv; then
6351 deplibs="$deplib $deplibs"
6352 continue
6353 fi
6354 case $linkmode in
6355 lib)
6356 # Linking convenience modules into shared libraries is allowed,
6357 # but linking other static libraries is non-portable.
6358 case " $dlpreconveniencelibs " in
6359 *" $deplib "*) ;;
6360 *)
6361 valid_a_lib=no
6362 case $deplibs_check_method in
6363 match_pattern*)
6364 set dummy $deplibs_check_method; shift
6365 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6366 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
6367 | $EGREP "$match_pattern_regex" > /dev/null; then
6368 valid_a_lib=yes
6369 fi
6370 ;;
6371 pass_all)
6372 valid_a_lib=yes
6373 ;;
6374 esac
6375 if test "$valid_a_lib" != yes; then
6376 echo
6377 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
6378 echo "*** I have the capability to make that library automatically link in when"
6379 echo "*** you link to this library. But I can only do this if you have a"
6380 echo "*** shared version of the library, which you do not appear to have"
6381 echo "*** because the file extensions .$libext of this argument makes me believe"
6382 echo "*** that it is just a static archive that I should not use here."
6383 else
6384 echo
6385 $ECHO "*** Warning: Linking the shared library $output against the"
6386 $ECHO "*** static library $deplib is not portable!"
6387 deplibs="$deplib $deplibs"
6388 fi
6389 ;;
6390 esac
6391 continue
6392 ;;
6393 prog)
6394 if test "$pass" != link; then
6395 deplibs="$deplib $deplibs"
6396 else
6397 compile_deplibs="$deplib $compile_deplibs"
6398 finalize_deplibs="$deplib $finalize_deplibs"
6399 fi
6400 continue
6401 ;;
6402 esac # linkmode
6403 ;; # *.$libext
6404 *.lo | *.$objext)
6405 if test "$pass" = conv; then
6406 deplibs="$deplib $deplibs"
6407 elif test "$linkmode" = prog; then
6408 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
6409 # If there is no dlopen support or we're linking statically,
6410 # we need to preload.
6411 func_append newdlprefiles " $deplib"
6412 compile_deplibs="$deplib $compile_deplibs"
6413 finalize_deplibs="$deplib $finalize_deplibs"
6414 else
6415 func_append newdlfiles " $deplib"
6416 fi
6417 fi
6418 continue
6419 ;;
6420 %DEPLIBS%)
6421 alldeplibs=yes
6422 continue
6423 ;;
6424 esac # case $deplib
6425
6426 if test "$found" = yes || test -f "$lib"; then :
6427 else
6428 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
6429 fi
6430
6431 # Check to see that this really is a libtool archive.
6432 func_lalib_unsafe_p "$lib" \
6433 || func_fatal_error "\`$lib' is not a valid libtool archive"
6434
6435 func_dirname "$lib" "" "."
6436 ladir="$func_dirname_result"
6437
6438 dlname=
6439 dlopen=
6440 dlpreopen=
6441 libdir=
6442 library_names=
6443 old_library=
6444 inherited_linker_flags=
6445 # If the library was installed with an old release of libtool,
6446 # it will not redefine variables installed, or shouldnotlink
6447 installed=yes
6448 shouldnotlink=no
6449 avoidtemprpath=
6450
6451
6452 # Read the .la file
6453 func_source "$lib"
6454
6455 # Convert "-framework foo" to "foo.ltframework"
6456 if test -n "$inherited_linker_flags"; then
6457 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
6458 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
6459 case " $new_inherited_linker_flags " in
6460 *" $tmp_inherited_linker_flag "*) ;;
6461 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
6462 esac
6463 done
6464 fi
6465 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
6466 if test "$linkmode,$pass" = "lib,link" ||
6467 test "$linkmode,$pass" = "prog,scan" ||
6468 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
6469 test -n "$dlopen" && func_append dlfiles " $dlopen"
6470 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
6471 fi
6472
6473 if test "$pass" = conv; then
6474 # Only check for convenience libraries
6475 deplibs="$lib $deplibs"
6476 if test -z "$libdir"; then
6477 if test -z "$old_library"; then
6478 func_fatal_error "cannot find name of link library for \`$lib'"
6479 fi
6480 # It is a libtool convenience library, so add in its objects.
6481 func_append convenience " $ladir/$objdir/$old_library"
6482 func_append old_convenience " $ladir/$objdir/$old_library"
6483 elif test "$linkmode" != prog && test "$linkmode" != lib; then
6484 func_fatal_error "\`$lib' is not a convenience library"
6485 fi
6486 tmp_libs=
6487 for deplib in $dependency_libs; do
6488 deplibs="$deplib $deplibs"
6489 if $opt_preserve_dup_deps ; then
6490 case "$tmp_libs " in
6491 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6492 esac
6493 fi
6494 func_append tmp_libs " $deplib"
6495 done
6496 continue
6497 fi # $pass = conv
6498
6499
6500 # Get the name of the library we link against.
6501 linklib=
6502 if test -n "$old_library" &&
6503 { test "$prefer_static_libs" = yes ||
6504 test "$prefer_static_libs,$installed" = "built,no"; }; then
6505 linklib=$old_library
6506 else
6507 for l in $old_library $library_names; do
6508 linklib="$l"
6509 done
6510 fi
6511 if test -z "$linklib"; then
6512 func_fatal_error "cannot find name of link library for \`$lib'"
6513 fi
6514
6515 # This library was specified with -dlopen.
6516 if test "$pass" = dlopen; then
6517 if test -z "$libdir"; then
6518 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
6519 fi
6520 if test -z "$dlname" ||
6521 test "$dlopen_support" != yes ||
6522 test "$build_libtool_libs" = no; then
6523 # If there is no dlname, no dlopen support or we're linking
6524 # statically, we need to preload. We also need to preload any
6525 # dependent libraries so libltdl's deplib preloader doesn't
6526 # bomb out in the load deplibs phase.
6527 func_append dlprefiles " $lib $dependency_libs"
6528 else
6529 func_append newdlfiles " $lib"
6530 fi
6531 continue
6532 fi # $pass = dlopen
6533
6534 # We need an absolute path.
6535 case $ladir in
6536 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
6537 *)
6538 abs_ladir=`cd "$ladir" && pwd`
6539 if test -z "$abs_ladir"; then
6540 func_warning "cannot determine absolute directory name of \`$ladir'"
6541 func_warning "passing it literally to the linker, although it might fail"
6542 abs_ladir="$ladir"
6543 fi
6544 ;;
6545 esac
6546 func_basename "$lib"
6547 laname="$func_basename_result"
6548
6549 # Find the relevant object directory and library name.
6550 if test "X$installed" = Xyes; then
6551 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6552 func_warning "library \`$lib' was moved."
6553 dir="$ladir"
6554 absdir="$abs_ladir"
6555 libdir="$abs_ladir"
6556 else
6557 dir="$lt_sysroot$libdir"
6558 absdir="$lt_sysroot$libdir"
6559 fi
6560 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
6561 else
6562 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6563 dir="$ladir"
6564 absdir="$abs_ladir"
6565 # Remove this search path later
6566 func_append notinst_path " $abs_ladir"
6567 else
6568 dir="$ladir/$objdir"
6569 absdir="$abs_ladir/$objdir"
6570 # Remove this search path later
6571 func_append notinst_path " $abs_ladir"
6572 fi
6573 fi # $installed = yes
6574 func_stripname 'lib' '.la' "$laname"
6575 name=$func_stripname_result
6576
6577 # This library was specified with -dlpreopen.
6578 if test "$pass" = dlpreopen; then
6579 if test -z "$libdir" && test "$linkmode" = prog; then
6580 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
6581 fi
6582 case "$host" in
6583 # special handling for platforms with PE-DLLs.
6584 *cygwin* | *mingw* | *cegcc* )
6585 # Linker will automatically link against shared library if both
6586 # static and shared are present. Therefore, ensure we extract
6587 # symbols from the import library if a shared library is present
6588 # (otherwise, the dlopen module name will be incorrect). We do
6589 # this by putting the import library name into $newdlprefiles.
6590 # We recover the dlopen module name by 'saving' the la file
6591 # name in a special purpose variable, and (later) extracting the
6592 # dlname from the la file.
6593 if test -n "$dlname"; then
6594 func_tr_sh "$dir/$linklib"
6595 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
6596 func_append newdlprefiles " $dir/$linklib"
6597 else
6598 func_append newdlprefiles " $dir/$old_library"
6599 # Keep a list of preopened convenience libraries to check
6600 # that they are being used correctly in the link pass.
6601 test -z "$libdir" && \
6602 func_append dlpreconveniencelibs " $dir/$old_library"
6603 fi
6604 ;;
6605 * )
6606 # Prefer using a static library (so that no silly _DYNAMIC symbols
6607 # are required to link).
6608 if test -n "$old_library"; then
6609 func_append newdlprefiles " $dir/$old_library"
6610 # Keep a list of preopened convenience libraries to check
6611 # that they are being used correctly in the link pass.
6612 test -z "$libdir" && \
6613 func_append dlpreconveniencelibs " $dir/$old_library"
6614 # Otherwise, use the dlname, so that lt_dlopen finds it.
6615 elif test -n "$dlname"; then
6616 func_append newdlprefiles " $dir/$dlname"
6617 else
6618 func_append newdlprefiles " $dir/$linklib"
6619 fi
6620 ;;
6621 esac
6622 fi # $pass = dlpreopen
6623
6624 if test -z "$libdir"; then
6625 # Link the convenience library
6626 if test "$linkmode" = lib; then
6627 deplibs="$dir/$old_library $deplibs"
6628 elif test "$linkmode,$pass" = "prog,link"; then
6629 compile_deplibs="$dir/$old_library $compile_deplibs"
6630 finalize_deplibs="$dir/$old_library $finalize_deplibs"
6631 else
6632 deplibs="$lib $deplibs" # used for prog,scan pass
6633 fi
6634 continue
6635 fi
6636
6637
6638 if test "$linkmode" = prog && test "$pass" != link; then
6639 func_append newlib_search_path " $ladir"
6640 deplibs="$lib $deplibs"
6641
6642 linkalldeplibs=no
6643 if test "$link_all_deplibs" != no || test -z "$library_names" ||
6644 test "$build_libtool_libs" = no; then
6645 linkalldeplibs=yes
6646 fi
6647
6648 tmp_libs=
6649 for deplib in $dependency_libs; do
6650 case $deplib in
6651 -L*) func_stripname '-L' '' "$deplib"
6652 func_resolve_sysroot "$func_stripname_result"
6653 func_append newlib_search_path " $func_resolve_sysroot_result"
6654 ;;
6655 esac
6656 # Need to link against all dependency_libs?
6657 if test "$linkalldeplibs" = yes; then
6658 deplibs="$deplib $deplibs"
6659 else
6660 # Need to hardcode shared library paths
6661 # or/and link against static libraries
6662 newdependency_libs="$deplib $newdependency_libs"
6663 fi
6664 if $opt_preserve_dup_deps ; then
6665 case "$tmp_libs " in
6666 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6667 esac
6668 fi
6669 func_append tmp_libs " $deplib"
6670 done # for deplib
6671 continue
6672 fi # $linkmode = prog...
6673
6674 if test "$linkmode,$pass" = "prog,link"; then
6675 if test -n "$library_names" &&
6676 { { test "$prefer_static_libs" = no ||
6677 test "$prefer_static_libs,$installed" = "built,yes"; } ||
6678 test -z "$old_library"; }; then
6679 # We need to hardcode the library path
6680 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
6681 # Make sure the rpath contains only unique directories.
6682 case "$temp_rpath:" in
6683 *"$absdir:"*) ;;
6684 *) func_append temp_rpath "$absdir:" ;;
6685 esac
6686 fi
6687
6688 # Hardcode the library path.
6689 # Skip directories that are in the system default run-time
6690 # search path.
6691 case " $sys_lib_dlsearch_path " in
6692 *" $absdir "*) ;;
6693 *)
6694 case "$compile_rpath " in
6695 *" $absdir "*) ;;
6696 *) func_append compile_rpath " $absdir" ;;
6697 esac
6698 ;;
6699 esac
6700 case " $sys_lib_dlsearch_path " in
6701 *" $libdir "*) ;;
6702 *)
6703 case "$finalize_rpath " in
6704 *" $libdir "*) ;;
6705 *) func_append finalize_rpath " $libdir" ;;
6706 esac
6707 ;;
6708 esac
6709 fi # $linkmode,$pass = prog,link...
6710
6711 if test "$alldeplibs" = yes &&
6712 { test "$deplibs_check_method" = pass_all ||
6713 { test "$build_libtool_libs" = yes &&
6714 test -n "$library_names"; }; }; then
6715 # We only need to search for static libraries
6716 continue
6717 fi
6718 fi
6719
6720 link_static=no # Whether the deplib will be linked statically
6721 use_static_libs=$prefer_static_libs
6722 if test "$use_static_libs" = built && test "$installed" = yes; then
6723 use_static_libs=no
6724 fi
6725 if test -n "$library_names" &&
6726 { test "$use_static_libs" = no || test -z "$old_library"; }; then
6727 case $host in
6728 *cygwin* | *mingw* | *cegcc*)
6729 # No point in relinking DLLs because paths are not encoded
6730 func_append notinst_deplibs " $lib"
6731 need_relink=no
6732 ;;
6733 *)
6734 if test "$installed" = no; then
6735 func_append notinst_deplibs " $lib"
6736 need_relink=yes
6737 fi
6738 ;;
6739 esac
6740 # This is a shared library
6741
6742 # Warn about portability, can't link against -module's on some
6743 # systems (darwin). Don't bleat about dlopened modules though!
6744 dlopenmodule=""
6745 for dlpremoduletest in $dlprefiles; do
6746 if test "X$dlpremoduletest" = "X$lib"; then
6747 dlopenmodule="$dlpremoduletest"
6748 break
6749 fi
6750 done
6751 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
6752 echo
6753 if test "$linkmode" = prog; then
6754 $ECHO "*** Warning: Linking the executable $output against the loadable module"
6755 else
6756 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
6757 fi
6758 $ECHO "*** $linklib is not portable!"
6759 fi
6760 if test "$linkmode" = lib &&
6761 test "$hardcode_into_libs" = yes; then
6762 # Hardcode the library path.
6763 # Skip directories that are in the system default run-time
6764 # search path.
6765 case " $sys_lib_dlsearch_path " in
6766 *" $absdir "*) ;;
6767 *)
6768 case "$compile_rpath " in
6769 *" $absdir "*) ;;
6770 *) func_append compile_rpath " $absdir" ;;
6771 esac
6772 ;;
6773 esac
6774 case " $sys_lib_dlsearch_path " in
6775 *" $libdir "*) ;;
6776 *)
6777 case "$finalize_rpath " in
6778 *" $libdir "*) ;;
6779 *) func_append finalize_rpath " $libdir" ;;
6780 esac
6781 ;;
6782 esac
6783 fi
6784
6785 if test -n "$old_archive_from_expsyms_cmds"; then
6786 # figure out the soname
6787 set dummy $library_names
6788 shift
6789 realname="$1"
6790 shift
6791 libname=`eval "\\$ECHO \"$libname_spec\""`
6792 # use dlname if we got it. it's perfectly good, no?
6793 if test -n "$dlname"; then
6794 soname="$dlname"
6795 elif test -n "$soname_spec"; then
6796 # bleh windows
6797 case $host in
6798 *cygwin* | mingw* | *cegcc*)
6799 func_arith $current - $age
6800 major=$func_arith_result
6801 versuffix="-$major"
6802 ;;
6803 esac
6804 eval soname=\"$soname_spec\"
6805 else
6806 soname="$realname"
6807 fi
6808
6809 # Make a new name for the extract_expsyms_cmds to use
6810 soroot="$soname"
6811 func_basename "$soroot"
6812 soname="$func_basename_result"
6813 func_stripname 'lib' '.dll' "$soname"
6814 newlib=libimp-$func_stripname_result.a
6815
6816 # If the library has no export list, then create one now
6817 if test -f "$output_objdir/$soname-def"; then :
6818 else
6819 func_verbose "extracting exported symbol list from \`$soname'"
6820 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
6821 fi
6822
6823 # Create $newlib
6824 if test -f "$output_objdir/$newlib"; then :; else
6825 func_verbose "generating import library for \`$soname'"
6826 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
6827 fi
6828 # make sure the library variables are pointing to the new library
6829 dir=$output_objdir
6830 linklib=$newlib
6831 fi # test -n "$old_archive_from_expsyms_cmds"
6832
6833 if test "$linkmode" = prog || test "$opt_mode" != relink; then
6834 add_shlibpath=
6835 add_dir=
6836 add=
6837 lib_linked=yes
6838 case $hardcode_action in
6839 immediate | unsupported)
6840 if test "$hardcode_direct" = no; then
6841 add="$dir/$linklib"
6842 case $host in
6843 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
6844 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
6845 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
6846 *-*-unixware7*) add_dir="-L$dir" ;;
6847 *-*-darwin* )
6848 # if the lib is a (non-dlopened) module then we can not
6849 # link against it, someone is ignoring the earlier warnings
6850 if /usr/bin/file -L $add 2> /dev/null |
6851 $GREP ": [^:]* bundle" >/dev/null ; then
6852 if test "X$dlopenmodule" != "X$lib"; then
6853 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
6854 if test -z "$old_library" ; then
6855 echo
6856 echo "*** And there doesn't seem to be a static archive available"
6857 echo "*** The link will probably fail, sorry"
6858 else
6859 add="$dir/$old_library"
6860 fi
6861 elif test -n "$old_library"; then
6862 add="$dir/$old_library"
6863 fi
6864 fi
6865 esac
6866 elif test "$hardcode_minus_L" = no; then
6867 case $host in
6868 *-*-sunos*) add_shlibpath="$dir" ;;
6869 esac
6870 add_dir="-L$dir"
6871 add="-l$name"
6872 elif test "$hardcode_shlibpath_var" = no; then
6873 add_shlibpath="$dir"
6874 add="-l$name"
6875 else
6876 lib_linked=no
6877 fi
6878 ;;
6879 relink)
6880 if test "$hardcode_direct" = yes &&
6881 test "$hardcode_direct_absolute" = no; then
6882 add="$dir/$linklib"
6883 elif test "$hardcode_minus_L" = yes; then
6884 add_dir="-L$dir"
6885 # Try looking first in the location we're being installed to.
6886 if test -n "$inst_prefix_dir"; then
6887 case $libdir in
6888 [\\/]*)
6889 func_append add_dir " -L$inst_prefix_dir$libdir"
6890 ;;
6891 esac
6892 fi
6893 add="-l$name"
6894 elif test "$hardcode_shlibpath_var" = yes; then
6895 add_shlibpath="$dir"
6896 add="-l$name"
6897 else
6898 lib_linked=no
6899 fi
6900 ;;
6901 *) lib_linked=no ;;
6902 esac
6903
6904 if test "$lib_linked" != yes; then
6905 func_fatal_configuration "unsupported hardcode properties"
6906 fi
6907
6908 if test -n "$add_shlibpath"; then
6909 case :$compile_shlibpath: in
6910 *":$add_shlibpath:"*) ;;
6911 *) func_append compile_shlibpath "$add_shlibpath:" ;;
6912 esac
6913 fi
6914 if test "$linkmode" = prog; then
6915 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
6916 test -n "$add" && compile_deplibs="$add $compile_deplibs"
6917 else
6918 test -n "$add_dir" && deplibs="$add_dir $deplibs"
6919 test -n "$add" && deplibs="$add $deplibs"
6920 if test "$hardcode_direct" != yes &&
6921 test "$hardcode_minus_L" != yes &&
6922 test "$hardcode_shlibpath_var" = yes; then
6923 case :$finalize_shlibpath: in
6924 *":$libdir:"*) ;;
6925 *) func_append finalize_shlibpath "$libdir:" ;;
6926 esac
6927 fi
6928 fi
6929 fi
6930
6931 if test "$linkmode" = prog || test "$opt_mode" = relink; then
6932 add_shlibpath=
6933 add_dir=
6934 add=
6935 # Finalize command for both is simple: just hardcode it.
6936 if test "$hardcode_direct" = yes &&
6937 test "$hardcode_direct_absolute" = no; then
6938 add="$libdir/$linklib"
6939 elif test "$hardcode_minus_L" = yes; then
6940 add_dir="-L$libdir"
6941 add="-l$name"
6942 elif test "$hardcode_shlibpath_var" = yes; then
6943 case :$finalize_shlibpath: in
6944 *":$libdir:"*) ;;
6945 *) func_append finalize_shlibpath "$libdir:" ;;
6946 esac
6947 add="-l$name"
6948 elif test "$hardcode_automatic" = yes; then
6949 if test -n "$inst_prefix_dir" &&
6950 test -f "$inst_prefix_dir$libdir/$linklib" ; then
6951 add="$inst_prefix_dir$libdir/$linklib"
6952 else
6953 add="$libdir/$linklib"
6954 fi
6955 else
6956 # We cannot seem to hardcode it, guess we'll fake it.
6957 add_dir="-L$libdir"
6958 # Try looking first in the location we're being installed to.
6959 if test -n "$inst_prefix_dir"; then
6960 case $libdir in
6961 [\\/]*)
6962 func_append add_dir " -L$inst_prefix_dir$libdir"
6963 ;;
6964 esac
6965 fi
6966 add="-l$name"
6967 fi
6968
6969 if test "$linkmode" = prog; then
6970 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
6971 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
6972 else
6973 test -n "$add_dir" && deplibs="$add_dir $deplibs"
6974 test -n "$add" && deplibs="$add $deplibs"
6975 fi
6976 fi
6977 elif test "$linkmode" = prog; then
6978 # Here we assume that one of hardcode_direct or hardcode_minus_L
6979 # is not unsupported. This is valid on all known static and
6980 # shared platforms.
6981 if test "$hardcode_direct" != unsupported; then
6982 test -n "$old_library" && linklib="$old_library"
6983 compile_deplibs="$dir/$linklib $compile_deplibs"
6984 finalize_deplibs="$dir/$linklib $finalize_deplibs"
6985 else
6986 compile_deplibs="-l$name -L$dir $compile_deplibs"
6987 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
6988 fi
6989 elif test "$build_libtool_libs" = yes; then
6990 # Not a shared library
6991 if test "$deplibs_check_method" != pass_all; then
6992 # We're trying link a shared library against a static one
6993 # but the system doesn't support it.
6994
6995 # Just print a warning and add the library to dependency_libs so
6996 # that the program can be linked against the static library.
6997 echo
6998 $ECHO "*** Warning: This system can not link to static lib archive $lib."
6999 echo "*** I have the capability to make that library automatically link in when"
7000 echo "*** you link to this library. But I can only do this if you have a"
7001 echo "*** shared version of the library, which you do not appear to have."
7002 if test "$module" = yes; then
7003 echo "*** But as you try to build a module library, libtool will still create "
7004 echo "*** a static module, that should work as long as the dlopening application"
7005 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
7006 if test -z "$global_symbol_pipe"; then
7007 echo
7008 echo "*** However, this would only work if libtool was able to extract symbol"
7009 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7010 echo "*** not find such a program. So, this module is probably useless."
7011 echo "*** \`nm' from GNU binutils and a full rebuild may help."
7012 fi
7013 if test "$build_old_libs" = no; then
7014 build_libtool_libs=module
7015 build_old_libs=yes
7016 else
7017 build_libtool_libs=no
7018 fi
7019 fi
7020 else
7021 deplibs="$dir/$old_library $deplibs"
7022 link_static=yes
7023 fi
7024 fi # link shared/static library?
7025
7026 if test "$linkmode" = lib; then
7027 if test -n "$dependency_libs" &&
7028 { test "$hardcode_into_libs" != yes ||
7029 test "$build_old_libs" = yes ||
7030 test "$link_static" = yes; }; then
7031 # Extract -R from dependency_libs
7032 temp_deplibs=
7033 for libdir in $dependency_libs; do
7034 case $libdir in
7035 -R*) func_stripname '-R' '' "$libdir"
7036 temp_xrpath=$func_stripname_result
7037 case " $xrpath " in
7038 *" $temp_xrpath "*) ;;
7039 *) func_append xrpath " $temp_xrpath";;
7040 esac;;
7041 *) func_append temp_deplibs " $libdir";;
7042 esac
7043 done
7044 dependency_libs="$temp_deplibs"
7045 fi
7046
7047 func_append newlib_search_path " $absdir"
7048 # Link against this library
7049 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
7050 # ... and its dependency_libs
7051 tmp_libs=
7052 for deplib in $dependency_libs; do
7053 newdependency_libs="$deplib $newdependency_libs"
7054 case $deplib in
7055 -L*) func_stripname '-L' '' "$deplib"
7056 func_resolve_sysroot "$func_stripname_result";;
7057 *) func_resolve_sysroot "$deplib" ;;
7058 esac
7059 if $opt_preserve_dup_deps ; then
7060 case "$tmp_libs " in
7061 *" $func_resolve_sysroot_result "*)
7062 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
7063 esac
7064 fi
7065 func_append tmp_libs " $func_resolve_sysroot_result"
7066 done
7067
7068 if test "$link_all_deplibs" != no; then
7069 # Add the search paths of all dependency libraries
7070 for deplib in $dependency_libs; do
7071 path=
7072 case $deplib in
7073 -L*) path="$deplib" ;;
7074 *.la)
7075 func_resolve_sysroot "$deplib"
7076 deplib=$func_resolve_sysroot_result
7077 func_dirname "$deplib" "" "."
7078 dir=$func_dirname_result
7079 # We need an absolute path.
7080 case $dir in
7081 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
7082 *)
7083 absdir=`cd "$dir" && pwd`
7084 if test -z "$absdir"; then
7085 func_warning "cannot determine absolute directory name of \`$dir'"
7086 absdir="$dir"
7087 fi
7088 ;;
7089 esac
7090 if $GREP "^installed=no" $deplib > /dev/null; then
7091 case $host in
7092 *-*-darwin*)
7093 depdepl=
7094 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
7095 if test -n "$deplibrary_names" ; then
7096 for tmp in $deplibrary_names ; do
7097 depdepl=$tmp
7098 done
7099 if test -f "$absdir/$objdir/$depdepl" ; then
7100 depdepl="$absdir/$objdir/$depdepl"
7101 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
7102 if test -z "$darwin_install_name"; then
7103 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
7104 fi
7105 func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7106 func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
7107 path=
7108 fi
7109 fi
7110 ;;
7111 *)
7112 path="-L$absdir/$objdir"
7113 ;;
7114 esac
7115 else
7116 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
7117 test -z "$libdir" && \
7118 func_fatal_error "\`$deplib' is not a valid libtool archive"
7119 test "$absdir" != "$libdir" && \
7120 func_warning "\`$deplib' seems to be moved"
7121
7122 path="-L$absdir"
7123 fi
7124 ;;
7125 esac
7126 case " $deplibs " in
7127 *" $path "*) ;;
7128 *) deplibs="$path $deplibs" ;;
7129 esac
7130 done
7131 fi # link_all_deplibs != no
7132 fi # linkmode = lib
7133 done # for deplib in $libs
7134 if test "$pass" = link; then
7135 if test "$linkmode" = "prog"; then
7136 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
7137 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
7138 else
7139 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7140 fi
7141 fi
7142 dependency_libs="$newdependency_libs"
7143 if test "$pass" = dlpreopen; then
7144 # Link the dlpreopened libraries before other libraries
7145 for deplib in $save_deplibs; do
7146 deplibs="$deplib $deplibs"
7147 done
7148 fi
7149 if test "$pass" != dlopen; then
7150 if test "$pass" != conv; then
7151 # Make sure lib_search_path contains only unique directories.
7152 lib_search_path=
7153 for dir in $newlib_search_path; do
7154 case "$lib_search_path " in
7155 *" $dir "*) ;;
7156 *) func_append lib_search_path " $dir" ;;
7157 esac
7158 done
7159 newlib_search_path=
7160 fi
7161
7162 if test "$linkmode,$pass" != "prog,link"; then
7163 vars="deplibs"
7164 else
7165 vars="compile_deplibs finalize_deplibs"
7166 fi
7167 for var in $vars dependency_libs; do
7168 # Add libraries to $var in reverse order
7169 eval tmp_libs=\"\$$var\"
7170 new_libs=
7171 for deplib in $tmp_libs; do
7172 # FIXME: Pedantically, this is the right thing to do, so
7173 # that some nasty dependency loop isn't accidentally
7174 # broken:
7175 #new_libs="$deplib $new_libs"
7176 # Pragmatically, this seems to cause very few problems in
7177 # practice:
7178 case $deplib in
7179 -L*) new_libs="$deplib $new_libs" ;;
7180 -R*) ;;
7181 *)
7182 # And here is the reason: when a library appears more
7183 # than once as an explicit dependence of a library, or
7184 # is implicitly linked in more than once by the
7185 # compiler, it is considered special, and multiple
7186 # occurrences thereof are not removed. Compare this
7187 # with having the same library being listed as a
7188 # dependency of multiple other libraries: in this case,
7189 # we know (pedantically, we assume) the library does not
7190 # need to be listed more than once, so we keep only the
7191 # last copy. This is not always right, but it is rare
7192 # enough that we require users that really mean to play
7193 # such unportable linking tricks to link the library
7194 # using -Wl,-lname, so that libtool does not consider it
7195 # for duplicate removal.
7196 case " $specialdeplibs " in
7197 *" $deplib "*) new_libs="$deplib $new_libs" ;;
7198 *)
7199 case " $new_libs " in
7200 *" $deplib "*) ;;
7201 *) new_libs="$deplib $new_libs" ;;
7202 esac
7203 ;;
7204 esac
7205 ;;
7206 esac
7207 done
7208 tmp_libs=
7209 for deplib in $new_libs; do
7210 case $deplib in
7211 -L*)
7212 case " $tmp_libs " in
7213 *" $deplib "*) ;;
7214 *) func_append tmp_libs " $deplib" ;;
7215 esac
7216 ;;
7217 *) func_append tmp_libs " $deplib" ;;
7218 esac
7219 done
7220 eval $var=\"$tmp_libs\"
7221 done # for var
7222 fi
7223 # Last step: remove runtime libs from dependency_libs
7224 # (they stay in deplibs)
7225 tmp_libs=
7226 for i in $dependency_libs ; do
7227 case " $predeps $postdeps $compiler_lib_search_path " in
7228 *" $i "*)
7229 i=""
7230 ;;
7231 esac
7232 if test -n "$i" ; then
7233 func_append tmp_libs " $i"
7234 fi
7235 done
7236 dependency_libs=$tmp_libs
7237 done # for pass
7238 if test "$linkmode" = prog; then
7239 dlfiles="$newdlfiles"
7240 fi
7241 if test "$linkmode" = prog || test "$linkmode" = lib; then
7242 dlprefiles="$newdlprefiles"
7243 fi
7244
7245 case $linkmode in
7246 oldlib)
7247 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7248 func_warning "\`-dlopen' is ignored for archives"
7249 fi
7250
7251 case " $deplibs" in
7252 *\ -l* | *\ -L*)
7253 func_warning "\`-l' and \`-L' are ignored for archives" ;;
7254 esac
7255
7256 test -n "$rpath" && \
7257 func_warning "\`-rpath' is ignored for archives"
7258
7259 test -n "$xrpath" && \
7260 func_warning "\`-R' is ignored for archives"
7261
7262 test -n "$vinfo" && \
7263 func_warning "\`-version-info/-version-number' is ignored for archives"
7264
7265 test -n "$release" && \
7266 func_warning "\`-release' is ignored for archives"
7267
7268 test -n "$export_symbols$export_symbols_regex" && \
7269 func_warning "\`-export-symbols' is ignored for archives"
7270
7271 # Now set the variables for building old libraries.
7272 build_libtool_libs=no
7273 oldlibs="$output"
7274 func_append objs "$old_deplibs"
7275 ;;
7276
7277 lib)
7278 # Make sure we only generate libraries of the form `libNAME.la'.
7279 case $outputname in
7280 lib*)
7281 func_stripname 'lib' '.la' "$outputname"
7282 name=$func_stripname_result
7283 eval shared_ext=\"$shrext_cmds\"
7284 eval libname=\"$libname_spec\"
7285 ;;
7286 *)
7287 test "$module" = no && \
7288 func_fatal_help "libtool library \`$output' must begin with \`lib'"
7289
7290 if test "$need_lib_prefix" != no; then
7291 # Add the "lib" prefix for modules if required
7292 func_stripname '' '.la' "$outputname"
7293 name=$func_stripname_result
7294 eval shared_ext=\"$shrext_cmds\"
7295 eval libname=\"$libname_spec\"
7296 else
7297 func_stripname '' '.la' "$outputname"
7298 libname=$func_stripname_result
7299 fi
7300 ;;
7301 esac
7302
7303 if test -n "$objs"; then
7304 if test "$deplibs_check_method" != pass_all; then
7305 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
7306 else
7307 echo
7308 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
7309 $ECHO "*** objects $objs is not portable!"
7310 func_append libobjs " $objs"
7311 fi
7312 fi
7313
7314 test "$dlself" != no && \
7315 func_warning "\`-dlopen self' is ignored for libtool libraries"
7316
7317 set dummy $rpath
7318 shift
7319 test "$#" -gt 1 && \
7320 func_warning "ignoring multiple \`-rpath's for a libtool library"
7321
7322 install_libdir="$1"
7323
7324 oldlibs=
7325 if test -z "$rpath"; then
7326 if test "$build_libtool_libs" = yes; then
7327 # Building a libtool convenience library.
7328 # Some compilers have problems with a `.al' extension so
7329 # convenience libraries should have the same extension an
7330 # archive normally would.
7331 oldlibs="$output_objdir/$libname.$libext $oldlibs"
7332 build_libtool_libs=convenience
7333 build_old_libs=yes
7334 fi
7335
7336 test -n "$vinfo" && \
7337 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
7338
7339 test -n "$release" && \
7340 func_warning "\`-release' is ignored for convenience libraries"
7341 else
7342
7343 # Parse the version information argument.
7344 save_ifs="$IFS"; IFS=':'
7345 set dummy $vinfo 0 0 0
7346 shift
7347 IFS="$save_ifs"
7348
7349 test -n "$7" && \
7350 func_fatal_help "too many parameters to \`-version-info'"
7351
7352 # convert absolute version numbers to libtool ages
7353 # this retains compatibility with .la files and attempts
7354 # to make the code below a bit more comprehensible
7355
7356 case $vinfo_number in
7357 yes)
7358 number_major="$1"
7359 number_minor="$2"
7360 number_revision="$3"
7361 #
7362 # There are really only two kinds -- those that
7363 # use the current revision as the major version
7364 # and those that subtract age and use age as
7365 # a minor version. But, then there is irix
7366 # which has an extra 1 added just for fun
7367 #
7368 case $version_type in
7369 darwin|linux|osf|windows|none)
7370 func_arith $number_major + $number_minor
7371 current=$func_arith_result
7372 age="$number_minor"
7373 revision="$number_revision"
7374 ;;
7375 freebsd-aout|freebsd-elf|qnx|sunos)
7376 current="$number_major"
7377 revision="$number_minor"
7378 age="0"
7379 ;;
7380 irix|nonstopux)
7381 func_arith $number_major + $number_minor
7382 current=$func_arith_result
7383 age="$number_minor"
7384 revision="$number_minor"
7385 lt_irix_increment=no
7386 ;;
7387 esac
7388 ;;
7389 no)
7390 current="$1"
7391 revision="$2"
7392 age="$3"
7393 ;;
7394 esac
7395
7396 # Check that each of the things are valid numbers.
7397 case $current in
7398 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
7399 *)
7400 func_error "CURRENT \`$current' must be a nonnegative integer"
7401 func_fatal_error "\`$vinfo' is not valid version information"
7402 ;;
7403 esac
7404
7405 case $revision in
7406 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
7407 *)
7408 func_error "REVISION \`$revision' must be a nonnegative integer"
7409 func_fatal_error "\`$vinfo' is not valid version information"
7410 ;;
7411 esac
7412
7413 case $age in
7414 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
7415 *)
7416 func_error "AGE \`$age' must be a nonnegative integer"
7417 func_fatal_error "\`$vinfo' is not valid version information"
7418 ;;
7419 esac
7420
7421 if test "$age" -gt "$current"; then
7422 func_error "AGE \`$age' is greater than the current interface number \`$current'"
7423 func_fatal_error "\`$vinfo' is not valid version information"
7424 fi
7425
7426 # Calculate the version variables.
7427 major=
7428 versuffix=
7429 verstring=
7430 case $version_type in
7431 none) ;;
7432
7433 darwin)
7434 # Like Linux, but with the current version available in
7435 # verstring for coding it into the library header
7436 func_arith $current - $age
7437 major=.$func_arith_result
7438 versuffix="$major.$age.$revision"
7439 # Darwin ld doesn't like 0 for these options...
7440 func_arith $current + 1
7441 minor_current=$func_arith_result
7442 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
7443 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
7444 ;;
7445
7446 freebsd-aout)
7447 major=".$current"
7448 versuffix=".$current.$revision";
7449 ;;
7450
7451 freebsd-elf)
7452 major=".$current"
7453 versuffix=".$current"
7454 ;;
7455
7456 irix | nonstopux)
7457 if test "X$lt_irix_increment" = "Xno"; then
7458 func_arith $current - $age
7459 else
7460 func_arith $current - $age + 1
7461 fi
7462 major=$func_arith_result
7463
7464 case $version_type in
7465 nonstopux) verstring_prefix=nonstopux ;;
7466 *) verstring_prefix=sgi ;;
7467 esac
7468 verstring="$verstring_prefix$major.$revision"
7469
7470 # Add in all the interfaces that we are compatible with.
7471 loop=$revision
7472 while test "$loop" -ne 0; do
7473 func_arith $revision - $loop
7474 iface=$func_arith_result
7475 func_arith $loop - 1
7476 loop=$func_arith_result
7477 verstring="$verstring_prefix$major.$iface:$verstring"
7478 done
7479
7480 # Before this point, $major must not contain `.'.
7481 major=.$major
7482 versuffix="$major.$revision"
7483 ;;
7484
7485 linux)
7486 func_arith $current - $age
7487 major=.$func_arith_result
7488 versuffix="$major.$age.$revision"
7489 ;;
7490
7491 osf)
7492 func_arith $current - $age
7493 major=.$func_arith_result
7494 versuffix=".$current.$age.$revision"
7495 verstring="$current.$age.$revision"
7496
7497 # Add in all the interfaces that we are compatible with.
7498 loop=$age
7499 while test "$loop" -ne 0; do
7500 func_arith $current - $loop
7501 iface=$func_arith_result
7502 func_arith $loop - 1
7503 loop=$func_arith_result
7504 verstring="$verstring:${iface}.0"
7505 done
7506
7507 # Make executables depend on our current version.
7508 func_append verstring ":${current}.0"
7509 ;;
7510
7511 qnx)
7512 major=".$current"
7513 versuffix=".$current"
7514 ;;
7515
7516 sunos)
7517 major=".$current"
7518 versuffix=".$current.$revision"
7519 ;;
7520
7521 windows)
7522 # Use '-' rather than '.', since we only want one
7523 # extension on DOS 8.3 filesystems.
7524 func_arith $current - $age
7525 major=$func_arith_result
7526 versuffix="-$major"
7527 ;;
7528
7529 *)
7530 func_fatal_configuration "unknown library version type \`$version_type'"
7531 ;;
7532 esac
7533
7534 # Clear the version info if we defaulted, and they specified a release.
7535 if test -z "$vinfo" && test -n "$release"; then
7536 major=
7537 case $version_type in
7538 darwin)
7539 # we can't check for "0.0" in archive_cmds due to quoting
7540 # problems, so we reset it completely
7541 verstring=
7542 ;;
7543 *)
7544 verstring="0.0"
7545 ;;
7546 esac
7547 if test "$need_version" = no; then
7548 versuffix=
7549 else
7550 versuffix=".0.0"
7551 fi
7552 fi
7553
7554 # Remove version info from name if versioning should be avoided
7555 if test "$avoid_version" = yes && test "$need_version" = no; then
7556 major=
7557 versuffix=
7558 verstring=""
7559 fi
7560
7561 # Check to see if the archive will have undefined symbols.
7562 if test "$allow_undefined" = yes; then
7563 if test "$allow_undefined_flag" = unsupported; then
7564 func_warning "undefined symbols not allowed in $host shared libraries"
7565 build_libtool_libs=no
7566 build_old_libs=yes
7567 fi
7568 else
7569 # Don't allow undefined symbols.
7570 allow_undefined_flag="$no_undefined_flag"
7571 fi
7572
7573 fi
7574
7575 func_generate_dlsyms "$libname" "$libname" "yes"
7576 func_append libobjs " $symfileobj"
7577 test "X$libobjs" = "X " && libobjs=
7578
7579 if test "$opt_mode" != relink; then
7580 # Remove our outputs, but don't remove object files since they
7581 # may have been created when compiling PIC objects.
7582 removelist=
7583 tempremovelist=`$ECHO "$output_objdir/*"`
7584 for p in $tempremovelist; do
7585 case $p in
7586 *.$objext | *.gcno)
7587 ;;
7588 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
7589 if test "X$precious_files_regex" != "X"; then
7590 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
7591 then
7592 continue
7593 fi
7594 fi
7595 func_append removelist " $p"
7596 ;;
7597 *) ;;
7598 esac
7599 done
7600 test -n "$removelist" && \
7601 func_show_eval "${RM}r \$removelist"
7602 fi
7603
7604 # Now set the variables for building old libraries.
7605 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
7606 func_append oldlibs " $output_objdir/$libname.$libext"
7607
7608 # Transform .lo files to .o files.
7609 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
7610 fi
7611
7612 # Eliminate all temporary directories.
7613 #for path in $notinst_path; do
7614 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
7615 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
7616 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
7617 #done
7618
7619 if test -n "$xrpath"; then
7620 # If the user specified any rpath flags, then add them.
7621 temp_xrpath=
7622 for libdir in $xrpath; do
7623 func_replace_sysroot "$libdir"
7624 func_append temp_xrpath " -R$func_replace_sysroot_result"
7625 case "$finalize_rpath " in
7626 *" $libdir "*) ;;
7627 *) func_append finalize_rpath " $libdir" ;;
7628 esac
7629 done
7630 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
7631 dependency_libs="$temp_xrpath $dependency_libs"
7632 fi
7633 fi
7634
7635 # Make sure dlfiles contains only unique files that won't be dlpreopened
7636 old_dlfiles="$dlfiles"
7637 dlfiles=
7638 for lib in $old_dlfiles; do
7639 case " $dlprefiles $dlfiles " in
7640 *" $lib "*) ;;
7641 *) func_append dlfiles " $lib" ;;
7642 esac
7643 done
7644
7645 # Make sure dlprefiles contains only unique files
7646 old_dlprefiles="$dlprefiles"
7647 dlprefiles=
7648 for lib in $old_dlprefiles; do
7649 case "$dlprefiles " in
7650 *" $lib "*) ;;
7651 *) func_append dlprefiles " $lib" ;;
7652 esac
7653 done
7654
7655 if test "$build_libtool_libs" = yes; then
7656 if test -n "$rpath"; then
7657 case $host in
7658 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
7659 # these systems don't actually have a c library (as such)!
7660 ;;
7661 *-*-rhapsody* | *-*-darwin1.[012])
7662 # Rhapsody C library is in the System framework
7663 func_append deplibs " System.ltframework"
7664 ;;
7665 *-*-netbsd*)
7666 # Don't link with libc until the a.out ld.so is fixed.
7667 ;;
7668 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
7669 # Do not include libc due to us having libc/libc_r.
7670 ;;
7671 *-*-sco3.2v5* | *-*-sco5v6*)
7672 # Causes problems with __ctype
7673 ;;
7674 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
7675 # Compiler inserts libc in the correct place for threads to work
7676 ;;
7677 *)
7678 # Add libc to deplibs on all other systems if necessary.
7679 if test "$build_libtool_need_lc" = "yes"; then
7680 func_append deplibs " -lc"
7681 fi
7682 ;;
7683 esac
7684 fi
7685
7686 # Transform deplibs into only deplibs that can be linked in shared.
7687 name_save=$name
7688 libname_save=$libname
7689 release_save=$release
7690 versuffix_save=$versuffix
7691 major_save=$major
7692 # I'm not sure if I'm treating the release correctly. I think
7693 # release should show up in the -l (ie -lgmp5) so we don't want to
7694 # add it in twice. Is that correct?
7695 release=""
7696 versuffix=""
7697 major=""
7698 newdeplibs=
7699 droppeddeps=no
7700 case $deplibs_check_method in
7701 pass_all)
7702 # Don't check for shared/static. Everything works.
7703 # This might be a little naive. We might want to check
7704 # whether the library exists or not. But this is on
7705 # osf3 & osf4 and I'm not really sure... Just
7706 # implementing what was already the behavior.
7707 newdeplibs=$deplibs
7708 ;;
7709 test_compile)
7710 # This code stresses the "libraries are programs" paradigm to its
7711 # limits. Maybe even breaks it. We compile a program, linking it
7712 # against the deplibs as a proxy for the library. Then we can check
7713 # whether they linked in statically or dynamically with ldd.
7714 $opt_dry_run || $RM conftest.c
7715 cat > conftest.c <<EOF
7716 int main() { return 0; }
7717 EOF
7718 $opt_dry_run || $RM conftest
7719 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
7720 ldd_output=`ldd conftest`
7721 for i in $deplibs; do
7722 case $i in
7723 -l*)
7724 func_stripname -l '' "$i"
7725 name=$func_stripname_result
7726 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7727 case " $predeps $postdeps " in
7728 *" $i "*)
7729 func_append newdeplibs " $i"
7730 i=""
7731 ;;
7732 esac
7733 fi
7734 if test -n "$i" ; then
7735 libname=`eval "\\$ECHO \"$libname_spec\""`
7736 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
7737 set dummy $deplib_matches; shift
7738 deplib_match=$1
7739 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7740 func_append newdeplibs " $i"
7741 else
7742 droppeddeps=yes
7743 echo
7744 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
7745 echo "*** I have the capability to make that library automatically link in when"
7746 echo "*** you link to this library. But I can only do this if you have a"
7747 echo "*** shared version of the library, which I believe you do not have"
7748 echo "*** because a test_compile did reveal that the linker did not use it for"
7749 echo "*** its dynamic dependency list that programs get resolved with at runtime."
7750 fi
7751 fi
7752 ;;
7753 *)
7754 func_append newdeplibs " $i"
7755 ;;
7756 esac
7757 done
7758 else
7759 # Error occurred in the first compile. Let's try to salvage
7760 # the situation: Compile a separate program for each library.
7761 for i in $deplibs; do
7762 case $i in
7763 -l*)
7764 func_stripname -l '' "$i"
7765 name=$func_stripname_result
7766 $opt_dry_run || $RM conftest
7767 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
7768 ldd_output=`ldd conftest`
7769 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7770 case " $predeps $postdeps " in
7771 *" $i "*)
7772 func_append newdeplibs " $i"
7773 i=""
7774 ;;
7775 esac
7776 fi
7777 if test -n "$i" ; then
7778 libname=`eval "\\$ECHO \"$libname_spec\""`
7779 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
7780 set dummy $deplib_matches; shift
7781 deplib_match=$1
7782 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7783 func_append newdeplibs " $i"
7784 else
7785 droppeddeps=yes
7786 echo
7787 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
7788 echo "*** I have the capability to make that library automatically link in when"
7789 echo "*** you link to this library. But I can only do this if you have a"
7790 echo "*** shared version of the library, which you do not appear to have"
7791 echo "*** because a test_compile did reveal that the linker did not use this one"
7792 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
7793 fi
7794 fi
7795 else
7796 droppeddeps=yes
7797 echo
7798 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
7799 echo "*** make it link in! You will probably need to install it or some"
7800 echo "*** library that it depends on before this library will be fully"
7801 echo "*** functional. Installing it before continuing would be even better."
7802 fi
7803 ;;
7804 *)
7805 func_append newdeplibs " $i"
7806 ;;
7807 esac
7808 done
7809 fi
7810 ;;
7811 file_magic*)
7812 set dummy $deplibs_check_method; shift
7813 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7814 for a_deplib in $deplibs; do
7815 case $a_deplib in
7816 -l*)
7817 func_stripname -l '' "$a_deplib"
7818 name=$func_stripname_result
7819 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7820 case " $predeps $postdeps " in
7821 *" $a_deplib "*)
7822 func_append newdeplibs " $a_deplib"
7823 a_deplib=""
7824 ;;
7825 esac
7826 fi
7827 if test -n "$a_deplib" ; then
7828 libname=`eval "\\$ECHO \"$libname_spec\""`
7829 if test -n "$file_magic_glob"; then
7830 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
7831 else
7832 libnameglob=$libname
7833 fi
7834 test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
7835 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7836 if test "$want_nocaseglob" = yes; then
7837 shopt -s nocaseglob
7838 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7839 $nocaseglob
7840 else
7841 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7842 fi
7843 for potent_lib in $potential_libs; do
7844 # Follow soft links.
7845 if ls -lLd "$potent_lib" 2>/dev/null |
7846 $GREP " -> " >/dev/null; then
7847 continue
7848 fi
7849 # The statement above tries to avoid entering an
7850 # endless loop below, in case of cyclic links.
7851 # We might still enter an endless loop, since a link
7852 # loop can be closed while we follow links,
7853 # but so what?
7854 potlib="$potent_lib"
7855 while test -h "$potlib" 2>/dev/null; do
7856 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
7857 case $potliblink in
7858 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
7859 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
7860 esac
7861 done
7862 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
7863 $SED -e 10q |
7864 $EGREP "$file_magic_regex" > /dev/null; then
7865 func_append newdeplibs " $a_deplib"
7866 a_deplib=""
7867 break 2
7868 fi
7869 done
7870 done
7871 fi
7872 if test -n "$a_deplib" ; then
7873 droppeddeps=yes
7874 echo
7875 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
7876 echo "*** I have the capability to make that library automatically link in when"
7877 echo "*** you link to this library. But I can only do this if you have a"
7878 echo "*** shared version of the library, which you do not appear to have"
7879 echo "*** because I did check the linker path looking for a file starting"
7880 if test -z "$potlib" ; then
7881 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
7882 else
7883 $ECHO "*** with $libname and none of the candidates passed a file format test"
7884 $ECHO "*** using a file magic. Last file checked: $potlib"
7885 fi
7886 fi
7887 ;;
7888 *)
7889 # Add a -L argument.
7890 func_append newdeplibs " $a_deplib"
7891 ;;
7892 esac
7893 done # Gone through all deplibs.
7894 ;;
7895 match_pattern*)
7896 set dummy $deplibs_check_method; shift
7897 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7898 for a_deplib in $deplibs; do
7899 case $a_deplib in
7900 -l*)
7901 func_stripname -l '' "$a_deplib"
7902 name=$func_stripname_result
7903 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7904 case " $predeps $postdeps " in
7905 *" $a_deplib "*)
7906 func_append newdeplibs " $a_deplib"
7907 a_deplib=""
7908 ;;
7909 esac
7910 fi
7911 if test -n "$a_deplib" ; then
7912 libname=`eval "\\$ECHO \"$libname_spec\""`
7913 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7914 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7915 for potent_lib in $potential_libs; do
7916 potlib="$potent_lib" # see symlink-check above in file_magic test
7917 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
7918 $EGREP "$match_pattern_regex" > /dev/null; then
7919 func_append newdeplibs " $a_deplib"
7920 a_deplib=""
7921 break 2
7922 fi
7923 done
7924 done
7925 fi
7926 if test -n "$a_deplib" ; then
7927 droppeddeps=yes
7928 echo
7929 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
7930 echo "*** I have the capability to make that library automatically link in when"
7931 echo "*** you link to this library. But I can only do this if you have a"
7932 echo "*** shared version of the library, which you do not appear to have"
7933 echo "*** because I did check the linker path looking for a file starting"
7934 if test -z "$potlib" ; then
7935 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
7936 else
7937 $ECHO "*** with $libname and none of the candidates passed a file format test"
7938 $ECHO "*** using a regex pattern. Last file checked: $potlib"
7939 fi
7940 fi
7941 ;;
7942 *)
7943 # Add a -L argument.
7944 func_append newdeplibs " $a_deplib"
7945 ;;
7946 esac
7947 done # Gone through all deplibs.
7948 ;;
7949 none | unknown | *)
7950 newdeplibs=""
7951 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
7952 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7953 for i in $predeps $postdeps ; do
7954 # can't use Xsed below, because $i might contain '/'
7955 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
7956 done
7957 fi
7958 case $tmp_deplibs in
7959 *[!\ \ ]*)
7960 echo
7961 if test "X$deplibs_check_method" = "Xnone"; then
7962 echo "*** Warning: inter-library dependencies are not supported in this platform."
7963 else
7964 echo "*** Warning: inter-library dependencies are not known to be supported."
7965 fi
7966 echo "*** All declared inter-library dependencies are being dropped."
7967 droppeddeps=yes
7968 ;;
7969 esac
7970 ;;
7971 esac
7972 versuffix=$versuffix_save
7973 major=$major_save
7974 release=$release_save
7975 libname=$libname_save
7976 name=$name_save
7977
7978 case $host in
7979 *-*-rhapsody* | *-*-darwin1.[012])
7980 # On Rhapsody replace the C library with the System framework
7981 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
7982 ;;
7983 esac
7984
7985 if test "$droppeddeps" = yes; then
7986 if test "$module" = yes; then
7987 echo
7988 echo "*** Warning: libtool could not satisfy all declared inter-library"
7989 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
7990 echo "*** a static module, that should work as long as the dlopening"
7991 echo "*** application is linked with the -dlopen flag."
7992 if test -z "$global_symbol_pipe"; then
7993 echo
7994 echo "*** However, this would only work if libtool was able to extract symbol"
7995 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7996 echo "*** not find such a program. So, this module is probably useless."
7997 echo "*** \`nm' from GNU binutils and a full rebuild may help."
7998 fi
7999 if test "$build_old_libs" = no; then
8000 oldlibs="$output_objdir/$libname.$libext"
8001 build_libtool_libs=module
8002 build_old_libs=yes
8003 else
8004 build_libtool_libs=no
8005 fi
8006 else
8007 echo "*** The inter-library dependencies that have been dropped here will be"
8008 echo "*** automatically added whenever a program is linked with this library"
8009 echo "*** or is declared to -dlopen it."
8010
8011 if test "$allow_undefined" = no; then
8012 echo
8013 echo "*** Since this library must not contain undefined symbols,"
8014 echo "*** because either the platform does not support them or"
8015 echo "*** it was explicitly requested with -no-undefined,"
8016 echo "*** libtool will only create a static version of it."
8017 if test "$build_old_libs" = no; then
8018 oldlibs="$output_objdir/$libname.$libext"
8019 build_libtool_libs=module
8020 build_old_libs=yes
8021 else
8022 build_libtool_libs=no
8023 fi
8024 fi
8025 fi
8026 fi
8027 # Done checking deplibs!
8028 deplibs=$newdeplibs
8029 fi
8030 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
8031 case $host in
8032 *-*-darwin*)
8033 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8034 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8035 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8036 ;;
8037 esac
8038
8039 # move library search paths that coincide with paths to not yet
8040 # installed libraries to the beginning of the library search list
8041 new_libs=
8042 for path in $notinst_path; do
8043 case " $new_libs " in
8044 *" -L$path/$objdir "*) ;;
8045 *)
8046 case " $deplibs " in
8047 *" -L$path/$objdir "*)
8048 func_append new_libs " -L$path/$objdir" ;;
8049 esac
8050 ;;
8051 esac
8052 done
8053 for deplib in $deplibs; do
8054 case $deplib in
8055 -L*)
8056 case " $new_libs " in
8057 *" $deplib "*) ;;
8058 *) func_append new_libs " $deplib" ;;
8059 esac
8060 ;;
8061 *) func_append new_libs " $deplib" ;;
8062 esac
8063 done
8064 deplibs="$new_libs"
8065
8066 # All the library-specific variables (install_libdir is set above).
8067 library_names=
8068 old_library=
8069 dlname=
8070
8071 # Test again, we may have decided not to build it any more
8072 if test "$build_libtool_libs" = yes; then
8073 if test "$hardcode_into_libs" = yes; then
8074 # Hardcode the library paths
8075 hardcode_libdirs=
8076 dep_rpath=
8077 rpath="$finalize_rpath"
8078 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
8079 for libdir in $rpath; do
8080 if test -n "$hardcode_libdir_flag_spec"; then
8081 if test -n "$hardcode_libdir_separator"; then
8082 func_replace_sysroot "$libdir"
8083 libdir=$func_replace_sysroot_result
8084 if test -z "$hardcode_libdirs"; then
8085 hardcode_libdirs="$libdir"
8086 else
8087 # Just accumulate the unique libdirs.
8088 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8089 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8090 ;;
8091 *)
8092 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8093 ;;
8094 esac
8095 fi
8096 else
8097 eval flag=\"$hardcode_libdir_flag_spec\"
8098 func_append dep_rpath " $flag"
8099 fi
8100 elif test -n "$runpath_var"; then
8101 case "$perm_rpath " in
8102 *" $libdir "*) ;;
8103 *) func_apped perm_rpath " $libdir" ;;
8104 esac
8105 fi
8106 done
8107 # Substitute the hardcoded libdirs into the rpath.
8108 if test -n "$hardcode_libdir_separator" &&
8109 test -n "$hardcode_libdirs"; then
8110 libdir="$hardcode_libdirs"
8111 if test -n "$hardcode_libdir_flag_spec_ld"; then
8112 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
8113 else
8114 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
8115 fi
8116 fi
8117 if test -n "$runpath_var" && test -n "$perm_rpath"; then
8118 # We should set the runpath_var.
8119 rpath=
8120 for dir in $perm_rpath; do
8121 func_append rpath "$dir:"
8122 done
8123 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
8124 fi
8125 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
8126 fi
8127
8128 shlibpath="$finalize_shlibpath"
8129 test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
8130 if test -n "$shlibpath"; then
8131 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
8132 fi
8133
8134 # Get the real and link names of the library.
8135 eval shared_ext=\"$shrext_cmds\"
8136 eval library_names=\"$library_names_spec\"
8137 set dummy $library_names
8138 shift
8139 realname="$1"
8140 shift
8141
8142 if test -n "$soname_spec"; then
8143 eval soname=\"$soname_spec\"
8144 else
8145 soname="$realname"
8146 fi
8147 if test -z "$dlname"; then
8148 dlname=$soname
8149 fi
8150
8151 lib="$output_objdir/$realname"
8152 linknames=
8153 for link
8154 do
8155 func_append linknames " $link"
8156 done
8157
8158 # Use standard objects if they are pic
8159 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
8160 test "X$libobjs" = "X " && libobjs=
8161
8162 delfiles=
8163 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8164 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
8165 export_symbols="$output_objdir/$libname.uexp"
8166 func_append delfiles " $export_symbols"
8167 fi
8168
8169 orig_export_symbols=
8170 case $host_os in
8171 cygwin* | mingw* | cegcc*)
8172 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
8173 # exporting using user supplied symfile
8174 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
8175 # and it's NOT already a .def file. Must figure out
8176 # which of the given symbols are data symbols and tag
8177 # them as such. So, trigger use of export_symbols_cmds.
8178 # export_symbols gets reassigned inside the "prepare
8179 # the list of exported symbols" if statement, so the
8180 # include_expsyms logic still works.
8181 orig_export_symbols="$export_symbols"
8182 export_symbols=
8183 always_export_symbols=yes
8184 fi
8185 fi
8186 ;;
8187 esac
8188
8189 # Prepare the list of exported symbols
8190 if test -z "$export_symbols"; then
8191 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
8192 func_verbose "generating symbol list for \`$libname.la'"
8193 export_symbols="$output_objdir/$libname.exp"
8194 $opt_dry_run || $RM $export_symbols
8195 cmds=$export_symbols_cmds
8196 save_ifs="$IFS"; IFS='~'
8197 for cmd1 in $cmds; do
8198 IFS="$save_ifs"
8199 # Take the normal branch if the nm_file_list_spec branch
8200 # doesn't work or if tool conversion is not needed.
8201 case $nm_file_list_spec~$to_tool_file_cmd in
8202 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
8203 try_normal_branch=yes
8204 eval cmd=\"$cmd1\"
8205 func_len " $cmd"
8206 len=$func_len_result
8207 ;;
8208 *)
8209 try_normal_branch=no
8210 ;;
8211 esac
8212 if test "$try_normal_branch" = yes \
8213 && { test "$len" -lt "$max_cmd_len" \
8214 || test "$max_cmd_len" -le -1; }
8215 then
8216 func_show_eval "$cmd" 'exit $?'
8217 skipped_export=false
8218 elif test -n "$nm_file_list_spec"; then
8219 func_basename "$output"
8220 output_la=$func_basename_result
8221 save_libobjs=$libobjs
8222 save_output=$output
8223 output=${output_objdir}/${output_la}.nm
8224 func_to_tool_file "$output"
8225 libobjs=$nm_file_list_spec$func_to_tool_file_result
8226 func_append delfiles " $output"
8227 func_verbose "creating $NM input file list: $output"
8228 for obj in $save_libobjs; do
8229 func_to_tool_file "$obj"
8230 $ECHO "$func_to_tool_file_result"
8231 done > "$output"
8232 eval cmd=\"$cmd1\"
8233 func_show_eval "$cmd" 'exit $?'
8234 output=$save_output
8235 libobjs=$save_libobjs
8236 skipped_export=false
8237 else
8238 # The command line is too long to execute in one step.
8239 func_verbose "using reloadable object file for export list..."
8240 skipped_export=:
8241 # Break out early, otherwise skipped_export may be
8242 # set to false by a later but shorter cmd.
8243 break
8244 fi
8245 done
8246 IFS="$save_ifs"
8247 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
8248 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
8249 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
8250 fi
8251 fi
8252 fi
8253
8254 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8255 tmp_export_symbols="$export_symbols"
8256 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
8257 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
8258 fi
8259
8260 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
8261 # The given exports_symbols file has to be filtered, so filter it.
8262 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
8263 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8264 # 's' commands which not all seds can handle. GNU sed should be fine
8265 # though. Also, the filter scales superlinearly with the number of
8266 # global variables. join(1) would be nice here, but unfortunately
8267 # isn't a blessed tool.
8268 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
8269 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
8270 export_symbols=$output_objdir/$libname.def
8271 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
8272 fi
8273
8274 tmp_deplibs=
8275 for test_deplib in $deplibs; do
8276 case " $convenience " in
8277 *" $test_deplib "*) ;;
8278 *)
8279 func_append tmp_deplibs " $test_deplib"
8280 ;;
8281 esac
8282 done
8283 deplibs="$tmp_deplibs"
8284
8285 if test -n "$convenience"; then
8286 if test -n "$whole_archive_flag_spec" &&
8287 test "$compiler_needs_object" = yes &&
8288 test -z "$libobjs"; then
8289 # extract the archives, so we have objects to list.
8290 # TODO: could optimize this to just extract one archive.
8291 whole_archive_flag_spec=
8292 fi
8293 if test -n "$whole_archive_flag_spec"; then
8294 save_libobjs=$libobjs
8295 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
8296 test "X$libobjs" = "X " && libobjs=
8297 else
8298 gentop="$output_objdir/${outputname}x"
8299 func_append generated " $gentop"
8300
8301 func_extract_archives $gentop $convenience
8302 func_append libobjs " $func_extract_archives_result"
8303 test "X$libobjs" = "X " && libobjs=
8304 fi
8305 fi
8306
8307 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
8308 eval flag=\"$thread_safe_flag_spec\"
8309 func_append linker_flags " $flag"
8310 fi
8311
8312 # Make a backup of the uninstalled library when relinking
8313 if test "$opt_mode" = relink; then
8314 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
8315 fi
8316
8317 # Do each of the archive commands.
8318 if test "$module" = yes && test -n "$module_cmds" ; then
8319 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
8320 eval test_cmds=\"$module_expsym_cmds\"
8321 cmds=$module_expsym_cmds
8322 else
8323 eval test_cmds=\"$module_cmds\"
8324 cmds=$module_cmds
8325 fi
8326 else
8327 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
8328 eval test_cmds=\"$archive_expsym_cmds\"
8329 cmds=$archive_expsym_cmds
8330 else
8331 eval test_cmds=\"$archive_cmds\"
8332 cmds=$archive_cmds
8333 fi
8334 fi
8335
8336 if test "X$skipped_export" != "X:" &&
8337 func_len " $test_cmds" &&
8338 len=$func_len_result &&
8339 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
8340 :
8341 else
8342 # The command line is too long to link in one step, link piecewise
8343 # or, if using GNU ld and skipped_export is not :, use a linker
8344 # script.
8345
8346 # Save the value of $output and $libobjs because we want to
8347 # use them later. If we have whole_archive_flag_spec, we
8348 # want to use save_libobjs as it was before
8349 # whole_archive_flag_spec was expanded, because we can't
8350 # assume the linker understands whole_archive_flag_spec.
8351 # This may have to be revisited, in case too many
8352 # convenience libraries get linked in and end up exceeding
8353 # the spec.
8354 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
8355 save_libobjs=$libobjs
8356 fi
8357 save_output=$output
8358 func_basename "$output"
8359 output_la=$func_basename_result
8360
8361 # Clear the reloadable object creation command queue and
8362 # initialize k to one.
8363 test_cmds=
8364 concat_cmds=
8365 objlist=
8366 last_robj=
8367 k=1
8368
8369 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
8370 output=${output_objdir}/${output_la}.lnkscript
8371 func_verbose "creating GNU ld script: $output"
8372 echo 'INPUT (' > $output
8373 for obj in $save_libobjs
8374 do
8375 func_to_tool_file "$obj"
8376 $ECHO "$func_to_tool_file_result" >> $output
8377 done
8378 echo ')' >> $output
8379 func_append delfiles " $output"
8380 func_to_tool_file "$output"
8381 output=$func_to_tool_file_result
8382 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
8383 output=${output_objdir}/${output_la}.lnk
8384 func_verbose "creating linker input file list: $output"
8385 : > $output
8386 set x $save_libobjs
8387 shift
8388 firstobj=
8389 if test "$compiler_needs_object" = yes; then
8390 firstobj="$1 "
8391 shift
8392 fi
8393 for obj
8394 do
8395 func_to_tool_file "$obj"
8396 $ECHO "$func_to_tool_file_result" >> $output
8397 done
8398 func_append delfiles " $output"
8399 func_to_tool_file "$output"
8400 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
8401 else
8402 if test -n "$save_libobjs"; then
8403 func_verbose "creating reloadable object files..."
8404 output=$output_objdir/$output_la-${k}.$objext
8405 eval test_cmds=\"$reload_cmds\"
8406 func_len " $test_cmds"
8407 len0=$func_len_result
8408 len=$len0
8409
8410 # Loop over the list of objects to be linked.
8411 for obj in $save_libobjs
8412 do
8413 func_len " $obj"
8414 func_arith $len + $func_len_result
8415 len=$func_arith_result
8416 if test "X$objlist" = X ||
8417 test "$len" -lt "$max_cmd_len"; then
8418 func_append objlist " $obj"
8419 else
8420 # The command $test_cmds is almost too long, add a
8421 # command to the queue.
8422 if test "$k" -eq 1 ; then
8423 # The first file doesn't have a previous command to add.
8424 reload_objs=$objlist
8425 eval concat_cmds=\"$reload_cmds\"
8426 else
8427 # All subsequent reloadable object files will link in
8428 # the last one created.
8429 reload_objs="$objlist $last_robj"
8430 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
8431 fi
8432 last_robj=$output_objdir/$output_la-${k}.$objext
8433 func_arith $k + 1
8434 k=$func_arith_result
8435 output=$output_objdir/$output_la-${k}.$objext
8436 objlist=" $obj"
8437 func_len " $last_robj"
8438 func_arith $len0 + $func_len_result
8439 len=$func_arith_result
8440 fi
8441 done
8442 # Handle the remaining objects by creating one last
8443 # reloadable object file. All subsequent reloadable object
8444 # files will link in the last one created.
8445 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8446 reload_objs="$objlist $last_robj"
8447 eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
8448 if test -n "$last_robj"; then
8449 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
8450 fi
8451 func_append delfiles " $output"
8452
8453 else
8454 output=
8455 fi
8456
8457 if ${skipped_export-false}; then
8458 func_verbose "generating symbol list for \`$libname.la'"
8459 export_symbols="$output_objdir/$libname.exp"
8460 $opt_dry_run || $RM $export_symbols
8461 libobjs=$output
8462 # Append the command to create the export file.
8463 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8464 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
8465 if test -n "$last_robj"; then
8466 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
8467 fi
8468 fi
8469
8470 test -n "$save_libobjs" &&
8471 func_verbose "creating a temporary reloadable object file: $output"
8472
8473 # Loop through the commands generated above and execute them.
8474 save_ifs="$IFS"; IFS='~'
8475 for cmd in $concat_cmds; do
8476 IFS="$save_ifs"
8477 $opt_silent || {
8478 func_quote_for_expand "$cmd"
8479 eval "func_echo $func_quote_for_expand_result"
8480 }
8481 $opt_dry_run || eval "$cmd" || {
8482 lt_exit=$?
8483
8484 # Restore the uninstalled library and exit
8485 if test "$opt_mode" = relink; then
8486 ( cd "$output_objdir" && \
8487 $RM "${realname}T" && \
8488 $MV "${realname}U" "$realname" )
8489 fi
8490
8491 exit $lt_exit
8492 }
8493 done
8494 IFS="$save_ifs"
8495
8496 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
8497 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
8498 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
8499 fi
8500 fi
8501
8502 if ${skipped_export-false}; then
8503 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8504 tmp_export_symbols="$export_symbols"
8505 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
8506 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
8507 fi
8508
8509 if test -n "$orig_export_symbols"; then
8510 # The given exports_symbols file has to be filtered, so filter it.
8511 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
8512 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8513 # 's' commands which not all seds can handle. GNU sed should be fine
8514 # though. Also, the filter scales superlinearly with the number of
8515 # global variables. join(1) would be nice here, but unfortunately
8516 # isn't a blessed tool.
8517 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
8518 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
8519 export_symbols=$output_objdir/$libname.def
8520 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
8521 fi
8522 fi
8523
8524 libobjs=$output
8525 # Restore the value of output.
8526 output=$save_output
8527
8528 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
8529 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
8530 test "X$libobjs" = "X " && libobjs=
8531 fi
8532 # Expand the library linking commands again to reset the
8533 # value of $libobjs for piecewise linking.
8534
8535 # Do each of the archive commands.
8536 if test "$module" = yes && test -n "$module_cmds" ; then
8537 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
8538 cmds=$module_expsym_cmds
8539 else
8540 cmds=$module_cmds
8541 fi
8542 else
8543 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
8544 cmds=$archive_expsym_cmds
8545 else
8546 cmds=$archive_cmds
8547 fi
8548 fi
8549 fi
8550
8551 if test -n "$delfiles"; then
8552 # Append the command to remove temporary files to $cmds.
8553 eval cmds=\"\$cmds~\$RM $delfiles\"
8554 fi
8555
8556 # Add any objects from preloaded convenience libraries
8557 if test -n "$dlprefiles"; then
8558 gentop="$output_objdir/${outputname}x"
8559 func_append generated " $gentop"
8560
8561 func_extract_archives $gentop $dlprefiles
8562 func_append libobjs " $func_extract_archives_result"
8563 test "X$libobjs" = "X " && libobjs=
8564 fi
8565
8566 save_ifs="$IFS"; IFS='~'
8567 for cmd in $cmds; do
8568 IFS="$save_ifs"
8569 eval cmd=\"$cmd\"
8570 $opt_silent || {
8571 func_quote_for_expand "$cmd"
8572 eval "func_echo $func_quote_for_expand_result"
8573 }
8574 $opt_dry_run || eval "$cmd" || {
8575 lt_exit=$?
8576
8577 # Restore the uninstalled library and exit
8578 if test "$opt_mode" = relink; then
8579 ( cd "$output_objdir" && \
8580 $RM "${realname}T" && \
8581 $MV "${realname}U" "$realname" )
8582 fi
8583
8584 exit $lt_exit
8585 }
8586 done
8587 IFS="$save_ifs"
8588
8589 # Restore the uninstalled library and exit
8590 if test "$opt_mode" = relink; then
8591 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
8592
8593 if test -n "$convenience"; then
8594 if test -z "$whole_archive_flag_spec"; then
8595 func_show_eval '${RM}r "$gentop"'
8596 fi
8597 fi
8598
8599 exit $EXIT_SUCCESS
8600 fi
8601
8602 # Create links to the real library.
8603 for linkname in $linknames; do
8604 if test "$realname" != "$linkname"; then
8605 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
8606 fi
8607 done
8608
8609 # If -module or -export-dynamic was specified, set the dlname.
8610 if test "$module" = yes || test "$export_dynamic" = yes; then
8611 # On all known operating systems, these are identical.
8612 dlname="$soname"
8613 fi
8614 fi
8615 ;;
8616
8617 obj)
8618 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
8619 func_warning "\`-dlopen' is ignored for objects"
8620 fi
8621
8622 case " $deplibs" in
8623 *\ -l* | *\ -L*)
8624 func_warning "\`-l' and \`-L' are ignored for objects" ;;
8625 esac
8626
8627 test -n "$rpath" && \
8628 func_warning "\`-rpath' is ignored for objects"
8629
8630 test -n "$xrpath" && \
8631 func_warning "\`-R' is ignored for objects"
8632
8633 test -n "$vinfo" && \
8634 func_warning "\`-version-info' is ignored for objects"
8635
8636 test -n "$release" && \
8637 func_warning "\`-release' is ignored for objects"
8638
8639 case $output in
8640 *.lo)
8641 test -n "$objs$old_deplibs" && \
8642 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
8643
8644 libobj=$output
8645 func_lo2o "$libobj"
8646 obj=$func_lo2o_result
8647 ;;
8648 *)
8649 libobj=
8650 obj="$output"
8651 ;;
8652 esac
8653
8654 # Delete the old objects.
8655 $opt_dry_run || $RM $obj $libobj
8656
8657 # Objects from convenience libraries. This assumes
8658 # single-version convenience libraries. Whenever we create
8659 # different ones for PIC/non-PIC, this we'll have to duplicate
8660 # the extraction.
8661 reload_conv_objs=
8662 gentop=
8663 # reload_cmds runs $LD directly, so let us get rid of
8664 # -Wl from whole_archive_flag_spec and hope we can get by with
8665 # turning comma into space..
8666 wl=
8667
8668 if test -n "$convenience"; then
8669 if test -n "$whole_archive_flag_spec"; then
8670 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
8671 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
8672 else
8673 gentop="$output_objdir/${obj}x"
8674 func_append generated " $gentop"
8675
8676 func_extract_archives $gentop $convenience
8677 reload_conv_objs="$reload_objs $func_extract_archives_result"
8678 fi
8679 fi
8680
8681 # If we're not building shared, we need to use non_pic_objs
8682 test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
8683
8684 # Create the old-style object.
8685 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
8686
8687 output="$obj"
8688 func_execute_cmds "$reload_cmds" 'exit $?'
8689
8690 # Exit if we aren't doing a library object file.
8691 if test -z "$libobj"; then
8692 if test -n "$gentop"; then
8693 func_show_eval '${RM}r "$gentop"'
8694 fi
8695
8696 exit $EXIT_SUCCESS
8697 fi
8698
8699 if test "$build_libtool_libs" != yes; then
8700 if test -n "$gentop"; then
8701 func_show_eval '${RM}r "$gentop"'
8702 fi
8703
8704 # Create an invalid libtool object if no PIC, so that we don't
8705 # accidentally link it into a program.
8706 # $show "echo timestamp > $libobj"
8707 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
8708 exit $EXIT_SUCCESS
8709 fi
8710
8711 if test -n "$pic_flag" || test "$pic_mode" != default; then
8712 # Only do commands if we really have different PIC objects.
8713 reload_objs="$libobjs $reload_conv_objs"
8714 output="$libobj"
8715 func_execute_cmds "$reload_cmds" 'exit $?'
8716 fi
8717
8718 if test -n "$gentop"; then
8719 func_show_eval '${RM}r "$gentop"'
8720 fi
8721
8722 exit $EXIT_SUCCESS
8723 ;;
8724
8725 prog)
8726 case $host in
8727 *cygwin*) func_stripname '' '.exe' "$output"
8728 output=$func_stripname_result.exe;;
8729 esac
8730 test -n "$vinfo" && \
8731 func_warning "\`-version-info' is ignored for programs"
8732
8733 test -n "$release" && \
8734 func_warning "\`-release' is ignored for programs"
8735
8736 test "$preload" = yes \
8737 && test "$dlopen_support" = unknown \
8738 && test "$dlopen_self" = unknown \
8739 && test "$dlopen_self_static" = unknown && \
8740 func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
8741
8742 case $host in
8743 *-*-rhapsody* | *-*-darwin1.[012])
8744 # On Rhapsody replace the C library is the System framework
8745 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
8746 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
8747 ;;
8748 esac
8749
8750 case $host in
8751 *-*-darwin*)
8752 # Don't allow lazy linking, it breaks C++ global constructors
8753 # But is supposedly fixed on 10.4 or later (yay!).
8754 if test "$tagname" = CXX ; then
8755 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
8756 10.[0123])
8757 func_append compile_command " ${wl}-bind_at_load"
8758 func_append finalize_command " ${wl}-bind_at_load"
8759 ;;
8760 esac
8761 fi
8762 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
8763 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8764 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8765 ;;
8766 esac
8767
8768
8769 # move library search paths that coincide with paths to not yet
8770 # installed libraries to the beginning of the library search list
8771 new_libs=
8772 for path in $notinst_path; do
8773 case " $new_libs " in
8774 *" -L$path/$objdir "*) ;;
8775 *)
8776 case " $compile_deplibs " in
8777 *" -L$path/$objdir "*)
8778 func_append new_libs " -L$path/$objdir" ;;
8779 esac
8780 ;;
8781 esac
8782 done
8783 for deplib in $compile_deplibs; do
8784 case $deplib in
8785 -L*)
8786 case " $new_libs " in
8787 *" $deplib "*) ;;
8788 *) func_append new_libs " $deplib" ;;
8789 esac
8790 ;;
8791 *) func_append new_libs " $deplib" ;;
8792 esac
8793 done
8794 compile_deplibs="$new_libs"
8795
8796
8797 func_append compile_command " $compile_deplibs"
8798 func_append finalize_command " $finalize_deplibs"
8799
8800 if test -n "$rpath$xrpath"; then
8801 # If the user specified any rpath flags, then add them.
8802 for libdir in $rpath $xrpath; do
8803 # This is the magic to use -rpath.
8804 case "$finalize_rpath " in
8805 *" $libdir "*) ;;
8806 *) func_append finalize_rpath " $libdir" ;;
8807 esac
8808 done
8809 fi
8810
8811 # Now hardcode the library paths
8812 rpath=
8813 hardcode_libdirs=
8814 for libdir in $compile_rpath $finalize_rpath; do
8815 if test -n "$hardcode_libdir_flag_spec"; then
8816 if test -n "$hardcode_libdir_separator"; then
8817 if test -z "$hardcode_libdirs"; then
8818 hardcode_libdirs="$libdir"
8819 else
8820 # Just accumulate the unique libdirs.
8821 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8822 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8823 ;;
8824 *)
8825 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8826 ;;
8827 esac
8828 fi
8829 else
8830 eval flag=\"$hardcode_libdir_flag_spec\"
8831 func_append rpath " $flag"
8832 fi
8833 elif test -n "$runpath_var"; then
8834 case "$perm_rpath " in
8835 *" $libdir "*) ;;
8836 *) func_append perm_rpath " $libdir" ;;
8837 esac
8838 fi
8839 case $host in
8840 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
8841 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
8842 case :$dllsearchpath: in
8843 *":$libdir:"*) ;;
8844 ::) dllsearchpath=$libdir;;
8845 *) func_append dllsearchpath ":$libdir";;
8846 esac
8847 case :$dllsearchpath: in
8848 *":$testbindir:"*) ;;
8849 ::) dllsearchpath=$testbindir;;
8850 *) func_append dllsearchpath ":$testbindir";;
8851 esac
8852 ;;
8853 esac
8854 done
8855 # Substitute the hardcoded libdirs into the rpath.
8856 if test -n "$hardcode_libdir_separator" &&
8857 test -n "$hardcode_libdirs"; then
8858 libdir="$hardcode_libdirs"
8859 eval rpath=\" $hardcode_libdir_flag_spec\"
8860 fi
8861 compile_rpath="$rpath"
8862
8863 rpath=
8864 hardcode_libdirs=
8865 for libdir in $finalize_rpath; do
8866 if test -n "$hardcode_libdir_flag_spec"; then
8867 if test -n "$hardcode_libdir_separator"; then
8868 if test -z "$hardcode_libdirs"; then
8869 hardcode_libdirs="$libdir"
8870 else
8871 # Just accumulate the unique libdirs.
8872 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8873 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8874 ;;
8875 *)
8876 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8877 ;;
8878 esac
8879 fi
8880 else
8881 eval flag=\"$hardcode_libdir_flag_spec\"
8882 func_append rpath " $flag"
8883 fi
8884 elif test -n "$runpath_var"; then
8885 case "$finalize_perm_rpath " in
8886 *" $libdir "*) ;;
8887 *) func_append finalize_perm_rpath " $libdir" ;;
8888 esac
8889 fi
8890 done
8891 # Substitute the hardcoded libdirs into the rpath.
8892 if test -n "$hardcode_libdir_separator" &&
8893 test -n "$hardcode_libdirs"; then
8894 libdir="$hardcode_libdirs"
8895 eval rpath=\" $hardcode_libdir_flag_spec\"
8896 fi
8897 finalize_rpath="$rpath"
8898
8899 if test -n "$libobjs" && test "$build_old_libs" = yes; then
8900 # Transform all the library objects into standard objects.
8901 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8902 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8903 fi
8904
8905 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
8906
8907 # template prelinking step
8908 if test -n "$prelink_cmds"; then
8909 func_execute_cmds "$prelink_cmds" 'exit $?'
8910 fi
8911
8912 wrappers_required=yes
8913 case $host in
8914 *cegcc* | *mingw32ce*)
8915 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8916 wrappers_required=no
8917 ;;
8918 *cygwin* | *mingw* )
8919 if test "$build_libtool_libs" != yes; then
8920 wrappers_required=no
8921 fi
8922 ;;
8923 *)
8924 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
8925 wrappers_required=no
8926 fi
8927 ;;
8928 esac
8929 if test "$wrappers_required" = no; then
8930 # Replace the output file specification.
8931 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
8932 link_command="$compile_command$compile_rpath"
8933
8934 # We have no uninstalled library dependencies, so finalize right now.
8935 exit_status=0
8936 func_show_eval "$link_command" 'exit_status=$?'
8937
8938 if test -n "$postlink_cmds"; then
8939 func_to_tool_file "$output"
8940 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8941 func_execute_cmds "$postlink_cmds" 'exit $?'
8942 fi
8943
8944 # Delete the generated files.
8945 if test -f "$output_objdir/${outputname}S.${objext}"; then
8946 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
8947 fi
8948
8949 exit $exit_status
8950 fi
8951
8952 if test -n "$compile_shlibpath$finalize_shlibpath"; then
8953 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
8954 fi
8955 if test -n "$finalize_shlibpath"; then
8956 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
8957 fi
8958
8959 compile_var=
8960 finalize_var=
8961 if test -n "$runpath_var"; then
8962 if test -n "$perm_rpath"; then
8963 # We should set the runpath_var.
8964 rpath=
8965 for dir in $perm_rpath; do
8966 func_append rpath "$dir:"
8967 done
8968 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
8969 fi
8970 if test -n "$finalize_perm_rpath"; then
8971 # We should set the runpath_var.
8972 rpath=
8973 for dir in $finalize_perm_rpath; do
8974 func_append rpath "$dir:"
8975 done
8976 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
8977 fi
8978 fi
8979
8980 if test "$no_install" = yes; then
8981 # We don't need to create a wrapper script.
8982 link_command="$compile_var$compile_command$compile_rpath"
8983 # Replace the output file specification.
8984 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
8985 # Delete the old output file.
8986 $opt_dry_run || $RM $output
8987 # Link the executable and exit
8988 func_show_eval "$link_command" 'exit $?'
8989
8990 if test -n "$postlink_cmds"; then
8991 func_to_tool_file "$output"
8992 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8993 func_execute_cmds "$postlink_cmds" 'exit $?'
8994 fi
8995
8996 exit $EXIT_SUCCESS
8997 fi
8998
8999 if test "$hardcode_action" = relink; then
9000 # Fast installation is not supported
9001 link_command="$compile_var$compile_command$compile_rpath"
9002 relink_command="$finalize_var$finalize_command$finalize_rpath"
9003
9004 func_warning "this platform does not like uninstalled shared libraries"
9005 func_warning "\`$output' will be relinked during installation"
9006 else
9007 if test "$fast_install" != no; then
9008 link_command="$finalize_var$compile_command$finalize_rpath"
9009 if test "$fast_install" = yes; then
9010 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
9011 else
9012 # fast_install is set to needless
9013 relink_command=
9014 fi
9015 else
9016 link_command="$compile_var$compile_command$compile_rpath"
9017 relink_command="$finalize_var$finalize_command$finalize_rpath"
9018 fi
9019 fi
9020
9021 # Replace the output file specification.
9022 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
9023
9024 # Delete the old output files.
9025 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
9026
9027 func_show_eval "$link_command" 'exit $?'
9028
9029 if test -n "$postlink_cmds"; then
9030 func_to_tool_file "$output_objdir/$outputname"
9031 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
9032 func_execute_cmds "$postlink_cmds" 'exit $?'
9033 fi
9034
9035 # Now create the wrapper script.
9036 func_verbose "creating $output"
9037
9038 # Quote the relink command for shipping.
9039 if test -n "$relink_command"; then
9040 # Preserve any variables that may affect compiler behavior
9041 for var in $variables_saved_for_relink; do
9042 if eval test -z \"\${$var+set}\"; then
9043 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
9044 elif eval var_value=\$$var; test -z "$var_value"; then
9045 relink_command="$var=; export $var; $relink_command"
9046 else
9047 func_quote_for_eval "$var_value"
9048 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
9049 fi
9050 done
9051 relink_command="(cd `pwd`; $relink_command)"
9052 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
9053 fi
9054
9055 # Only actually do things if not in dry run mode.
9056 $opt_dry_run || {
9057 # win32 will think the script is a binary if it has
9058 # a .exe suffix, so we strip it off here.
9059 case $output in
9060 *.exe) func_stripname '' '.exe' "$output"
9061 output=$func_stripname_result ;;
9062 esac
9063 # test for cygwin because mv fails w/o .exe extensions
9064 case $host in
9065 *cygwin*)
9066 exeext=.exe
9067 func_stripname '' '.exe' "$outputname"
9068 outputname=$func_stripname_result ;;
9069 *) exeext= ;;
9070 esac
9071 case $host in
9072 *cygwin* | *mingw* )
9073 func_dirname_and_basename "$output" "" "."
9074 output_name=$func_basename_result
9075 output_path=$func_dirname_result
9076 cwrappersource="$output_path/$objdir/lt-$output_name.c"
9077 cwrapper="$output_path/$output_name.exe"
9078 $RM $cwrappersource $cwrapper
9079 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
9080
9081 func_emit_cwrapperexe_src > $cwrappersource
9082
9083 # The wrapper executable is built using the $host compiler,
9084 # because it contains $host paths and files. If cross-
9085 # compiling, it, like the target executable, must be
9086 # executed on the $host or under an emulation environment.
9087 $opt_dry_run || {
9088 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
9089 $STRIP $cwrapper
9090 }
9091
9092 # Now, create the wrapper script for func_source use:
9093 func_ltwrapper_scriptname $cwrapper
9094 $RM $func_ltwrapper_scriptname_result
9095 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
9096 $opt_dry_run || {
9097 # note: this script will not be executed, so do not chmod.
9098 if test "x$build" = "x$host" ; then
9099 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
9100 else
9101 func_emit_wrapper no > $func_ltwrapper_scriptname_result
9102 fi
9103 }
9104 ;;
9105 * )
9106 $RM $output
9107 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
9108
9109 func_emit_wrapper no > $output
9110 chmod +x $output
9111 ;;
9112 esac
9113 }
9114 exit $EXIT_SUCCESS
9115 ;;
9116 esac
9117
9118 # See if we need to build an old-fashioned archive.
9119 for oldlib in $oldlibs; do
9120
9121 if test "$build_libtool_libs" = convenience; then
9122 oldobjs="$libobjs_save $symfileobj"
9123 addlibs="$convenience"
9124 build_libtool_libs=no
9125 else
9126 if test "$build_libtool_libs" = module; then
9127 oldobjs="$libobjs_save"
9128 build_libtool_libs=no
9129 else
9130 oldobjs="$old_deplibs $non_pic_objects"
9131 if test "$preload" = yes && test -f "$symfileobj"; then
9132 func_append oldobjs " $symfileobj"
9133 fi
9134 fi
9135 addlibs="$old_convenience"
9136 fi
9137
9138 if test -n "$addlibs"; then
9139 gentop="$output_objdir/${outputname}x"
9140 func_append generated " $gentop"
9141
9142 func_extract_archives $gentop $addlibs
9143 func_append oldobjs " $func_extract_archives_result"
9144 fi
9145
9146 # Do each command in the archive commands.
9147 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
9148 cmds=$old_archive_from_new_cmds
9149 else
9150
9151 # Add any objects from preloaded convenience libraries
9152 if test -n "$dlprefiles"; then
9153 gentop="$output_objdir/${outputname}x"
9154 func_append generated " $gentop"
9155
9156 func_extract_archives $gentop $dlprefiles
9157 func_append oldobjs " $func_extract_archives_result"
9158 fi
9159
9160 # POSIX demands no paths to be encoded in archives. We have
9161 # to avoid creating archives with duplicate basenames if we
9162 # might have to extract them afterwards, e.g., when creating a
9163 # static archive out of a convenience library, or when linking
9164 # the entirety of a libtool archive into another (currently
9165 # not supported by libtool).
9166 if (for obj in $oldobjs
9167 do
9168 func_basename "$obj"
9169 $ECHO "$func_basename_result"
9170 done | sort | sort -uc >/dev/null 2>&1); then
9171 :
9172 else
9173 echo "copying selected object files to avoid basename conflicts..."
9174 gentop="$output_objdir/${outputname}x"
9175 func_append generated " $gentop"
9176 func_mkdir_p "$gentop"
9177 save_oldobjs=$oldobjs
9178 oldobjs=
9179 counter=1
9180 for obj in $save_oldobjs
9181 do
9182 func_basename "$obj"
9183 objbase="$func_basename_result"
9184 case " $oldobjs " in
9185 " ") oldobjs=$obj ;;
9186 *[\ /]"$objbase "*)
9187 while :; do
9188 # Make sure we don't pick an alternate name that also
9189 # overlaps.
9190 newobj=lt$counter-$objbase
9191 func_arith $counter + 1
9192 counter=$func_arith_result
9193 case " $oldobjs " in
9194 *[\ /]"$newobj "*) ;;
9195 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
9196 esac
9197 done
9198 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
9199 func_append oldobjs " $gentop/$newobj"
9200 ;;
9201 *) func_append oldobjs " $obj" ;;
9202 esac
9203 done
9204 fi
9205 eval cmds=\"$old_archive_cmds\"
9206
9207 func_len " $cmds"
9208 len=$func_len_result
9209 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9210 cmds=$old_archive_cmds
9211 elif test -n "$archiver_list_spec"; then
9212 func_verbose "using command file archive linking..."
9213 for obj in $oldobjs
9214 do
9215 func_to_tool_file "$obj"
9216 $ECHO "$func_to_tool_file_result"
9217 done > $output_objdir/$libname.libcmd
9218 func_to_tool_file "$output_objdir/$libname.libcmd"
9219 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
9220 cmds=$old_archive_cmds
9221 else
9222 # the command line is too long to link in one step, link in parts
9223 func_verbose "using piecewise archive linking..."
9224 save_RANLIB=$RANLIB
9225 RANLIB=:
9226 objlist=
9227 concat_cmds=
9228 save_oldobjs=$oldobjs
9229 oldobjs=
9230 # Is there a better way of finding the last object in the list?
9231 for obj in $save_oldobjs
9232 do
9233 last_oldobj=$obj
9234 done
9235 eval test_cmds=\"$old_archive_cmds\"
9236 func_len " $test_cmds"
9237 len0=$func_len_result
9238 len=$len0
9239 for obj in $save_oldobjs
9240 do
9241 func_len " $obj"
9242 func_arith $len + $func_len_result
9243 len=$func_arith_result
9244 func_append objlist " $obj"
9245 if test "$len" -lt "$max_cmd_len"; then
9246 :
9247 else
9248 # the above command should be used before it gets too long
9249 oldobjs=$objlist
9250 if test "$obj" = "$last_oldobj" ; then
9251 RANLIB=$save_RANLIB
9252 fi
9253 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9254 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
9255 objlist=
9256 len=$len0
9257 fi
9258 done
9259 RANLIB=$save_RANLIB
9260 oldobjs=$objlist
9261 if test "X$oldobjs" = "X" ; then
9262 eval cmds=\"\$concat_cmds\"
9263 else
9264 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
9265 fi
9266 fi
9267 fi
9268 func_execute_cmds "$cmds" 'exit $?'
9269 done
9270
9271 test -n "$generated" && \
9272 func_show_eval "${RM}r$generated"
9273
9274 # Now create the libtool archive.
9275 case $output in
9276 *.la)
9277 old_library=
9278 test "$build_old_libs" = yes && old_library="$libname.$libext"
9279 func_verbose "creating $output"
9280
9281 # Preserve any variables that may affect compiler behavior
9282 for var in $variables_saved_for_relink; do
9283 if eval test -z \"\${$var+set}\"; then
9284 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
9285 elif eval var_value=\$$var; test -z "$var_value"; then
9286 relink_command="$var=; export $var; $relink_command"
9287 else
9288 func_quote_for_eval "$var_value"
9289 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
9290 fi
9291 done
9292 # Quote the link command for shipping.
9293 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
9294 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
9295 if test "$hardcode_automatic" = yes ; then
9296 relink_command=
9297 fi
9298
9299 # Only create the output if not a dry run.
9300 $opt_dry_run || {
9301 for installed in no yes; do
9302 if test "$installed" = yes; then
9303 if test -z "$install_libdir"; then
9304 break
9305 fi
9306 output="$output_objdir/$outputname"i
9307 # Replace all uninstalled libtool libraries with the installed ones
9308 newdependency_libs=
9309 for deplib in $dependency_libs; do
9310 case $deplib in
9311 *.la)
9312 func_basename "$deplib"
9313 name="$func_basename_result"
9314 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
9315 test -z "$libdir" && \
9316 func_fatal_error "\`$deplib' is not a valid libtool archive"
9317 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
9318 ;;
9319 -L*)
9320 func_stripname -L '' "$deplib"
9321 func_replace_sysroot "$func_stripname_result"
9322 func_append newdependency_libs " -L$func_replace_sysroot_result"
9323 ;;
9324 -R*)
9325 func_stripname -R '' "$deplib"
9326 func_replace_sysroot "$func_stripname_result"
9327 func_append newdependency_libs " -R$func_replace_sysroot_result"
9328 ;;
9329 *) func_append newdependency_libs " $deplib" ;;
9330 esac
9331 done
9332 dependency_libs="$newdependency_libs"
9333 newdlfiles=
9334
9335 for lib in $dlfiles; do
9336 case $lib in
9337 *.la)
9338 func_basename "$lib"
9339 name="$func_basename_result"
9340 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9341 test -z "$libdir" && \
9342 func_fatal_error "\`$lib' is not a valid libtool archive"
9343 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
9344 ;;
9345 *) func_append newdlfiles " $lib" ;;
9346 esac
9347 done
9348 dlfiles="$newdlfiles"
9349 newdlprefiles=
9350 for lib in $dlprefiles; do
9351 case $lib in
9352 *.la)
9353 # Only pass preopened files to the pseudo-archive (for
9354 # eventual linking with the app. that links it) if we
9355 # didn't already link the preopened objects directly into
9356 # the library:
9357 func_basename "$lib"
9358 name="$func_basename_result"
9359 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9360 test -z "$libdir" && \
9361 func_fatal_error "\`$lib' is not a valid libtool archive"
9362 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
9363 ;;
9364 esac
9365 done
9366 dlprefiles="$newdlprefiles"
9367 else
9368 newdlfiles=
9369 for lib in $dlfiles; do
9370 case $lib in
9371 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9372 *) abs=`pwd`"/$lib" ;;
9373 esac
9374 func_append newdlfiles " $abs"
9375 done
9376 dlfiles="$newdlfiles"
9377 newdlprefiles=
9378 for lib in $dlprefiles; do
9379 case $lib in
9380 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9381 *) abs=`pwd`"/$lib" ;;
9382 esac
9383 func_append newdlprefiles " $abs"
9384 done
9385 dlprefiles="$newdlprefiles"
9386 fi
9387 $RM $output
9388 # place dlname in correct position for cygwin
9389 # In fact, it would be nice if we could use this code for all target
9390 # systems that can't hard-code library paths into their executables
9391 # and that have no shared library path variable independent of PATH,
9392 # but it turns out we can't easily determine that from inspecting
9393 # libtool variables, so we have to hard-code the OSs to which it
9394 # applies here; at the moment, that means platforms that use the PE
9395 # object format with DLL files. See the long comment at the top of
9396 # tests/bindir.at for full details.
9397 tdlname=$dlname
9398 case $host,$output,$installed,$module,$dlname in
9399 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
9400 # If a -bindir argument was supplied, place the dll there.
9401 if test "x$bindir" != x ;
9402 then
9403 func_relative_path "$install_libdir" "$bindir"
9404 tdlname=$func_relative_path_result$dlname
9405 else
9406 # Otherwise fall back on heuristic.
9407 tdlname=../bin/$dlname
9408 fi
9409 ;;
9410 esac
9411 $ECHO > $output "\
9412 # $outputname - a libtool library file
9413 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
9414 #
9415 # Please DO NOT delete this file!
9416 # It is necessary for linking the library.
9417
9418 # The name that we can dlopen(3).
9419 dlname='$tdlname'
9420
9421 # Names of this library.
9422 library_names='$library_names'
9423
9424 # The name of the static archive.
9425 old_library='$old_library'
9426
9427 # Linker flags that can not go in dependency_libs.
9428 inherited_linker_flags='$new_inherited_linker_flags'
9429
9430 # Libraries that this one depends upon.
9431 dependency_libs='$dependency_libs'
9432
9433 # Names of additional weak libraries provided by this library
9434 weak_library_names='$weak_libs'
9435
9436 # Version information for $libname.
9437 current=$current
9438 age=$age
9439 revision=$revision
9440
9441 # Is this an already installed library?
9442 installed=$installed
9443
9444 # Should we warn about portability when linking against -modules?
9445 shouldnotlink=$module
9446
9447 # Files to dlopen/dlpreopen
9448 dlopen='$dlfiles'
9449 dlpreopen='$dlprefiles'
9450
9451 # Directory that this library needs to be installed in:
9452 libdir='$install_libdir'"
9453 if test "$installed" = no && test "$need_relink" = yes; then
9454 $ECHO >> $output "\
9455 relink_command=\"$relink_command\""
9456 fi
9457 done
9458 }
9459
9460 # Do a symbolic link so that the libtool archive can be found in
9461 # LD_LIBRARY_PATH before the program is installed.
9462 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
9463 ;;
9464 esac
9465 exit $EXIT_SUCCESS
9466 }
9467
9468 { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
9469 func_mode_link ${1+"$@"}
9470
9471
9472 # func_mode_uninstall arg...
9473 func_mode_uninstall ()
9474 {
9475 $opt_debug
9476 RM="$nonopt"
9477 files=
9478 rmforce=
9479 exit_status=0
9480
9481 # This variable tells wrapper scripts just to set variables rather
9482 # than running their programs.
9483 libtool_install_magic="$magic"
9484
9485 for arg
9486 do
9487 case $arg in
9488 -f) func_append RM " $arg"; rmforce=yes ;;
9489 -*) func_append RM " $arg" ;;
9490 *) func_append files " $arg" ;;
9491 esac
9492 done
9493
9494 test -z "$RM" && \
9495 func_fatal_help "you must specify an RM program"
9496
9497 rmdirs=
9498
9499 for file in $files; do
9500 func_dirname "$file" "" "."
9501 dir="$func_dirname_result"
9502 if test "X$dir" = X.; then
9503 odir="$objdir"
9504 else
9505 odir="$dir/$objdir"
9506 fi
9507 func_basename "$file"
9508 name="$func_basename_result"
9509 test "$opt_mode" = uninstall && odir="$dir"
9510
9511 # Remember odir for removal later, being careful to avoid duplicates
9512 if test "$opt_mode" = clean; then
9513 case " $rmdirs " in
9514 *" $odir "*) ;;
9515 *) func_append rmdirs " $odir" ;;
9516 esac
9517 fi
9518
9519 # Don't error if the file doesn't exist and rm -f was used.
9520 if { test -L "$file"; } >/dev/null 2>&1 ||
9521 { test -h "$file"; } >/dev/null 2>&1 ||
9522 test -f "$file"; then
9523 :
9524 elif test -d "$file"; then
9525 exit_status=1
9526 continue
9527 elif test "$rmforce" = yes; then
9528 continue
9529 fi
9530
9531 rmfiles="$file"
9532
9533 case $name in
9534 *.la)
9535 # Possibly a libtool archive, so verify it.
9536 if func_lalib_p "$file"; then
9537 func_source $dir/$name
9538
9539 # Delete the libtool libraries and symlinks.
9540 for n in $library_names; do
9541 func_append rmfiles " $odir/$n"
9542 done
9543 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
9544
9545 case "$opt_mode" in
9546 clean)
9547 case " $library_names " in
9548 *" $dlname "*) ;;
9549 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
9550 esac
9551 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
9552 ;;
9553 uninstall)
9554 if test -n "$library_names"; then
9555 # Do each command in the postuninstall commands.
9556 func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
9557 fi
9558
9559 if test -n "$old_library"; then
9560 # Do each command in the old_postuninstall commands.
9561 func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
9562 fi
9563 # FIXME: should reinstall the best remaining shared library.
9564 ;;
9565 esac
9566 fi
9567 ;;
9568
9569 *.lo)
9570 # Possibly a libtool object, so verify it.
9571 if func_lalib_p "$file"; then
9572
9573 # Read the .lo file
9574 func_source $dir/$name
9575
9576 # Add PIC object to the list of files to remove.
9577 if test -n "$pic_object" &&
9578 test "$pic_object" != none; then
9579 func_append rmfiles " $dir/$pic_object"
9580 fi
9581
9582 # Add non-PIC object to the list of files to remove.
9583 if test -n "$non_pic_object" &&
9584 test "$non_pic_object" != none; then
9585 func_append rmfiles " $dir/$non_pic_object"
9586 fi
9587 fi
9588 ;;
9589
9590 *)
9591 if test "$opt_mode" = clean ; then
9592 noexename=$name
9593 case $file in
9594 *.exe)
9595 func_stripname '' '.exe' "$file"
9596 file=$func_stripname_result
9597 func_stripname '' '.exe' "$name"
9598 noexename=$func_stripname_result
9599 # $file with .exe has already been added to rmfiles,
9600 # add $file without .exe
9601 func_append rmfiles " $file"
9602 ;;
9603 esac
9604 # Do a test to see if this is a libtool program.
9605 if func_ltwrapper_p "$file"; then
9606 if func_ltwrapper_executable_p "$file"; then
9607 func_ltwrapper_scriptname "$file"
9608 relink_command=
9609 func_source $func_ltwrapper_scriptname_result
9610 func_append rmfiles " $func_ltwrapper_scriptname_result"
9611 else
9612 relink_command=
9613 func_source $dir/$noexename
9614 fi
9615
9616 # note $name still contains .exe if it was in $file originally
9617 # as does the version of $file that was added into $rmfiles
9618 func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
9619 if test "$fast_install" = yes && test -n "$relink_command"; then
9620 func_append rmfiles " $odir/lt-$name"
9621 fi
9622 if test "X$noexename" != "X$name" ; then
9623 func_append rmfiles " $odir/lt-${noexename}.c"
9624 fi
9625 fi
9626 fi
9627 ;;
9628 esac
9629 func_show_eval "$RM $rmfiles" 'exit_status=1'
9630 done
9631
9632 # Try to remove the ${objdir}s in the directories where we deleted files
9633 for dir in $rmdirs; do
9634 if test -d "$dir"; then
9635 func_show_eval "rmdir $dir >/dev/null 2>&1"
9636 fi
9637 done
9638
9639 exit $exit_status
9640 }
9641
9642 { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
9643 func_mode_uninstall ${1+"$@"}
9644
9645 test -z "$opt_mode" && {
9646 help="$generic_help"
9647 func_fatal_help "you must specify a MODE"
9648 }
9649
9650 test -z "$exec_cmd" && \
9651 func_fatal_help "invalid operation mode \`$opt_mode'"
9652
9653 if test -n "$exec_cmd"; then
9654 eval exec "$exec_cmd"
9655 exit $EXIT_FAILURE
9656 fi
9657
9658 exit $exit_status
9659
9660
9661 # The TAGs below are defined such that we never get into a situation
9662 # in which we disable both kinds of libraries. Given conflicting
9663 # choices, we go for a static library, that is the most portable,
9664 # since we can't tell whether shared libraries were disabled because
9665 # the user asked for that or because the platform doesn't support
9666 # them. This is particularly important on AIX, because we don't
9667 # support having both static and shared libraries enabled at the same
9668 # time on that platform, so we default to a shared-only configuration.
9669 # If a disable-shared tag is given, we'll fallback to a static-only
9670 # configuration. But we'll never go from static-only to shared-only.
9671
9672 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
9673 build_libtool_libs=no
9674 build_old_libs=yes
9675 # ### END LIBTOOL TAG CONFIG: disable-shared
9676
9677 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
9678 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
9679 # ### END LIBTOOL TAG CONFIG: disable-static
9680
9681 # Local Variables:
9682 # mode:shell-script
9683 # sh-indentation:2
9684 # End:
9685 # vi:sw=2
9686
0 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2012-06-26.16; # UTC
4
5 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
6 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU 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, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 if test $# -eq 0; then
27 echo 1>&2 "Try '$0 --help' for more information"
28 exit 1
29 fi
30
31 case $1 in
32
33 --is-lightweight)
34 # Used by our autoconf macros to check whether the available missing
35 # script is modern enough.
36 exit 0
37 ;;
38
39 --run)
40 # Back-compat with the calling convention used by older automake.
41 shift
42 ;;
43
44 -h|--h|--he|--hel|--help)
45 echo "\
46 $0 [OPTION]... PROGRAM [ARGUMENT]...
47
48 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
49 to PROGRAM being missing or too old.
50
51 Options:
52 -h, --help display this help and exit
53 -v, --version output version information and exit
54
55 Supported PROGRAM values:
56 aclocal autoconf autoheader autom4te automake makeinfo
57 bison yacc flex lex help2man
58
59 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
60 'g' are ignored when checking the name.
61
62 Send bug reports to <bug-automake@gnu.org>."
63 exit $?
64 ;;
65
66 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
67 echo "missing $scriptversion (GNU Automake)"
68 exit $?
69 ;;
70
71 -*)
72 echo 1>&2 "$0: unknown '$1' option"
73 echo 1>&2 "Try '$0 --help' for more information"
74 exit 1
75 ;;
76
77 esac
78
79 # Run the given program, remember its exit status.
80 "$@"; st=$?
81
82 # If it succeeded, we are done.
83 test $st -eq 0 && exit 0
84
85 # Also exit now if we it failed (or wasn't found), and '--version' was
86 # passed; such an option is passed most likely to detect whether the
87 # program is present and works.
88 case $2 in --version|--help) exit $st;; esac
89
90 # Exit code 63 means version mismatch. This often happens when the user
91 # tries to use an ancient version of a tool on a file that requires a
92 # minimum version.
93 if test $st -eq 63; then
94 msg="probably too old"
95 elif test $st -eq 127; then
96 # Program was missing.
97 msg="missing on your system"
98 else
99 # Program was found and executed, but failed. Give up.
100 exit $st
101 fi
102
103 perl_URL=http://www.perl.org/
104 flex_URL=http://flex.sourceforge.net/
105 gnu_software_URL=http://www.gnu.org/software
106
107 program_details ()
108 {
109 case $1 in
110 aclocal|automake)
111 echo "The '$1' program is part of the GNU Automake package:"
112 echo "<$gnu_software_URL/automake>"
113 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
114 echo "<$gnu_software_URL/autoconf>"
115 echo "<$gnu_software_URL/m4/>"
116 echo "<$perl_URL>"
117 ;;
118 autoconf|autom4te|autoheader)
119 echo "The '$1' program is part of the GNU Autoconf package:"
120 echo "<$gnu_software_URL/autoconf/>"
121 echo "It also requires GNU m4 and Perl in order to run:"
122 echo "<$gnu_software_URL/m4/>"
123 echo "<$perl_URL>"
124 ;;
125 esac
126 }
127
128 give_advice ()
129 {
130 # Normalize program name to check for.
131 normalized_program=`echo "$1" | sed '
132 s/^gnu-//; t
133 s/^gnu//; t
134 s/^g//; t'`
135
136 printf '%s\n' "'$1' is $msg."
137
138 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
139 case $normalized_program in
140 autoconf*)
141 echo "You should only need it if you modified 'configure.ac',"
142 echo "or m4 files included by it."
143 program_details 'autoconf'
144 ;;
145 autoheader*)
146 echo "You should only need it if you modified 'acconfig.h' or"
147 echo "$configure_deps."
148 program_details 'autoheader'
149 ;;
150 automake*)
151 echo "You should only need it if you modified 'Makefile.am' or"
152 echo "$configure_deps."
153 program_details 'automake'
154 ;;
155 aclocal*)
156 echo "You should only need it if you modified 'acinclude.m4' or"
157 echo "$configure_deps."
158 program_details 'aclocal'
159 ;;
160 autom4te*)
161 echo "You might have modified some maintainer files that require"
162 echo "the 'automa4te' program to be rebuilt."
163 program_details 'autom4te'
164 ;;
165 bison*|yacc*)
166 echo "You should only need it if you modified a '.y' file."
167 echo "You may want to install the GNU Bison package:"
168 echo "<$gnu_software_URL/bison/>"
169 ;;
170 lex*|flex*)
171 echo "You should only need it if you modified a '.l' file."
172 echo "You may want to install the Fast Lexical Analyzer package:"
173 echo "<$flex_URL>"
174 ;;
175 help2man*)
176 echo "You should only need it if you modified a dependency" \
177 "of a man page."
178 echo "You may want to install the GNU Help2man package:"
179 echo "<$gnu_software_URL/help2man/>"
180 ;;
181 makeinfo*)
182 echo "You should only need it if you modified a '.texi' file, or"
183 echo "any other file indirectly affecting the aspect of the manual."
184 echo "You might want to install the Texinfo package:"
185 echo "<$gnu_software_URL/texinfo/>"
186 echo "The spurious makeinfo call might also be the consequence of"
187 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
188 echo "want to install GNU make:"
189 echo "<$gnu_software_URL/make/>"
190 ;;
191 *)
192 echo "You might have modified some files without having the proper"
193 echo "tools for further handling them. Check the 'README' file, it"
194 echo "often tells you about the needed prerequisites for installing"
195 echo "this package. You may also peek at any GNU archive site, in"
196 echo "case some other package contains this missing '$1' program."
197 ;;
198 esac
199 }
200
201 give_advice "$1" | sed -e '1s/^/WARNING: /' \
202 -e '2,$s/^/ /' >&2
203
204 # Propagate the correct exit status (expected to be 127 for a program
205 # not found, 63 for a program that failed due to version mismatch).
206 exit $st
207
208 # Local variables:
209 # eval: (add-hook 'write-file-hooks 'time-stamp)
210 # time-stamp-start: "scriptversion="
211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC"
213 # time-stamp-end: "; # UTC"
214 # End:
0 #! /bin/sh
1 # test-driver - basic testsuite driver script.
2
3 scriptversion=2012-06-27.10; # UTC
4
5 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
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 # This file is maintained in Automake, please report
26 # bugs to <bug-automake@gnu.org> or send patches to
27 # <automake-patches@gnu.org>.
28
29 # Make unconditional expansion of undefined variables an error. This
30 # helps a lot in preventing typo-related bugs.
31 set -u
32
33 usage_error ()
34 {
35 echo "$0: $*" >&2
36 print_usage >&2
37 exit 2
38 }
39
40 print_usage ()
41 {
42 cat <<END
43 Usage:
44 test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
45 [--expect-failure={yes|no}] [--color-tests={yes|no}]
46 [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
47 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
48 END
49 }
50
51 # TODO: better error handling in option parsing (in particular, ensure
52 # TODO: $log_file, $trs_file and $test_name are defined).
53 test_name= # Used for reporting.
54 log_file= # Where to save the output of the test script.
55 trs_file= # Where to save the metadata of the test run.
56 expect_failure=no
57 color_tests=no
58 enable_hard_errors=yes
59 while test $# -gt 0; do
60 case $1 in
61 --help) print_usage; exit $?;;
62 --version) echo "test-driver $scriptversion"; exit $?;;
63 --test-name) test_name=$2; shift;;
64 --log-file) log_file=$2; shift;;
65 --trs-file) trs_file=$2; shift;;
66 --color-tests) color_tests=$2; shift;;
67 --expect-failure) expect_failure=$2; shift;;
68 --enable-hard-errors) enable_hard_errors=$2; shift;;
69 --) shift; break;;
70 -*) usage_error "invalid option: '$1'";;
71 esac
72 shift
73 done
74
75 if test $color_tests = yes; then
76 # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
77 red='' # Red.
78 grn='' # Green.
79 lgn='' # Light green.
80 blu='' # Blue.
81 mgn='' # Magenta.
82 std='' # No color.
83 else
84 red= grn= lgn= blu= mgn= std=
85 fi
86
87 do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
88 trap "st=129; $do_exit" 1
89 trap "st=130; $do_exit" 2
90 trap "st=141; $do_exit" 13
91 trap "st=143; $do_exit" 15
92
93 # Test script is run here.
94 "$@" >$log_file 2>&1
95 estatus=$?
96 if test $enable_hard_errors = no && test $estatus -eq 99; then
97 estatus=1
98 fi
99
100 case $estatus:$expect_failure in
101 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
102 0:*) col=$grn res=PASS recheck=no gcopy=no;;
103 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
104 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
105 *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
106 *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
107 esac
108
109 # Report outcome to console.
110 echo "${col}${res}${std}: $test_name"
111
112 # Register the test result, and other relevant metadata.
113 echo ":test-result: $res" > $trs_file
114 echo ":global-test-result: $res" >> $trs_file
115 echo ":recheck: $recheck" >> $trs_file
116 echo ":copy-in-global-log: $gcopy" >> $trs_file
117
118 # Local Variables:
119 # mode: shell-script
120 # sh-indentation: 2
121 # eval: (add-hook 'write-file-hooks 'time-stamp)
122 # time-stamp-start: "scriptversion="
123 # time-stamp-format: "%:y-%02m-%02d.%02H"
124 # time-stamp-time-zone: "UTC"
125 # time-stamp-end: "; # UTC"
126 # End:
0 /* build-config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define if building universal (internal helper macro) */
3 #undef AC_APPLE_UNIVERSAL_BUILD
4
5 /* Define to 1 if you have the <arpa/inet.h> header file. */
6 #undef HAVE_ARPA_INET_H
7
8 /* Define to 1 if you have the <arpa/nameser.h> header file. */
9 #undef HAVE_ARPA_NAMESER_H
10
11 /* Define to 1 if you have the `basename' function. */
12 #undef HAVE_BASENAME
13
14 /* Define to 1 if you have the `bcopy' function. */
15 #undef HAVE_BCOPY
16
17 /* Define to 1 if you have the <bsd/string.h> header file. */
18 #undef HAVE_BSD_STRING_H
19
20 /* Define to 1 if you have the `bzero' function. */
21 #undef HAVE_BZERO
22
23 /* Define to 1 if you have the <ctype.h> header file. */
24 #undef HAVE_CTYPE_H
25
26 /* Define to 1 if you have the `cuserid' function. */
27 #undef HAVE_CUSERID
28
29 /* Define to 1 if you have the <dlfcn.h> header file. */
30 #undef HAVE_DLFCN_H
31
32 /* Define to 1 if you have the <errno.h> header file. */
33 #undef HAVE_ERRNO_H
34
35 /* Define to 1 if you have the <fcntl.h> header file. */
36 #undef HAVE_FCNTL_H
37
38 /* Define to 1 if you have the `getipnodebyname()' function. */
39 #undef HAVE_GETADDRINFO
40
41 /* Define to 1 if you have the `inet_ntoa' function. */
42 #undef HAVE_INET_NTOA
43
44 /* Define to 1 if you have the `inet_ntop()' function. */
45 #undef HAVE_INET_NTOP
46
47 /* Define to 1 if you have the `inet_pton()' function. */
48 #undef HAVE_INET_PTON
49
50 /* Define to 1 if you have the <inttypes.h> header file. */
51 #undef HAVE_INTTYPES_H
52
53 /* Define to 1 if you have the <iso/limits_iso.h> header file. */
54 #undef HAVE_ISO_LIMITS_ISO_H
55
56 /* Define to 1 if you have the `idn' library (-lidn). */
57 #undef HAVE_LIBIDN
58
59 /* Define to 1 if you have the `resolv' library (-lresolv). */
60 #undef HAVE_LIBRESOLV
61
62 /* Define to 1 if you have the `rt' library (-lrt). */
63 #undef HAVE_LIBRT
64
65 /* Define to 1 if you have the `socket' library (-lsocket). */
66 #undef HAVE_LIBSOCKET
67
68 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
69 to 0 otherwise. */
70 #undef HAVE_MALLOC
71
72 /* Define to 1 if you have the `memcpy' function. */
73 #undef HAVE_MEMCPY
74
75 /* Define to 1 if you have the <memory.h> header file. */
76 #undef HAVE_MEMORY_H
77
78 /* Define to 1 if you have the `memset' function. */
79 #undef HAVE_MEMSET
80
81 /* Define to 1 if you have the <netdb.h> header file. */
82 #undef HAVE_NETDB_H
83
84 /* Define to 1 if you have the <netinet/in.h> header file. */
85 #undef HAVE_NETINET_IN_H
86
87 /* Define to 1 if you have the <poll.h> header file. */
88 #undef HAVE_POLL_H
89
90 /* Define if you have POSIX threads libraries and header files. */
91 #undef HAVE_PTHREAD
92
93 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
94 and to 0 otherwise. */
95 #undef HAVE_REALLOC
96
97 /* Define to 1 if you have the <regex.h> header file. */
98 #undef HAVE_REGEX_H
99
100 /* Define to 1 if you have the <resolv.h> header file. */
101 #undef HAVE_RESOLV_H
102
103 /* Define to 1 if you have the `res_ninit()' function. */
104 #undef HAVE_RES_NINIT
105
106 /* Define to 1 if you have the <signal.h> header file. */
107 #undef HAVE_SIGNAL_H
108
109 /* Define if libmilter has smfi_insheader() */
110 #undef HAVE_SMFI_INSHEADER
111
112 /* Define if libmilter has smfi_opensocket() */
113 #undef HAVE_SMFI_OPENSOCKET
114
115 /* Define if libmilter has smfi_progress() */
116 #undef HAVE_SMFI_PROGRESS
117
118 /* Define if libmilter has smfi_setsymlist() */
119 #undef HAVE_SMFI_SETSYMLIST
120
121 /* Define if libmilter has smfi_version() */
122 #undef HAVE_SMFI_VERSION
123
124 /* Define to 1 if you have libspf2's `spf.h' */
125 #undef HAVE_SPF2_H
126
127 /* Define to 1 if you have the <stdint.h> header file. */
128 #undef HAVE_STDINT_H
129
130 /* Define to 1 if you have the <stdio.h> header file. */
131 #undef HAVE_STDIO_H
132
133 /* Define to 1 if you have the <stdlib.h> header file. */
134 #undef HAVE_STDLIB_H
135
136 /* Define to 1 if you have the `strcasecmp' function. */
137 #undef HAVE_STRCASECMP
138
139 /* Define to 1 if you have the `strchr' function. */
140 #undef HAVE_STRCHR
141
142 /* Define to 1 if you have the `strdup' function. */
143 #undef HAVE_STRDUP
144
145 /* Define to 1 if you have the `strerror' function. */
146 #undef HAVE_STRERROR
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 /* Define to 1 if you have the <strl.h> header file. */
161 #undef HAVE_STRL_H
162
163 /* Define to 1 if you have the `strncasecmp' function. */
164 #undef HAVE_STRNCASECMP
165
166 /* Define to 1 if you have the `strpbrk' function. */
167 #undef HAVE_STRPBRK
168
169 /* Define to 1 if you have the `strrchr' function. */
170 #undef HAVE_STRRCHR
171
172 /* Define to 1 if you have the <sysexits.h> header file. */
173 #undef HAVE_SYSEXITS_H
174
175 /* Define to 1 if you have the `syslog' function. */
176 #undef HAVE_SYSLOG
177
178 /* Define to 1 if you have the <syslog.h> header file. */
179 #undef HAVE_SYSLOG_H
180
181 /* Define to 1 if you have the <sys/ioctl.h> header file. */
182 #undef HAVE_SYS_IOCTL_H
183
184 /* Define to 1 if you have the <sys/param.h> header file. */
185 #undef HAVE_SYS_PARAM_H
186
187 /* Define to 1 if you have the <sys/socket.h> header file. */
188 #undef HAVE_SYS_SOCKET_H
189
190 /* Define to 1 if you have the <sys/stat.h> header file. */
191 #undef HAVE_SYS_STAT_H
192
193 /* Define to 1 if you have the <sys/types.h> header file. */
194 #undef HAVE_SYS_TYPES_H
195
196 /* Define to 1 if you have the <time.h> header file. */
197 #undef HAVE_TIME_H
198
199 /* Define to 1 if you have the <unistd.h> header file. */
200 #undef HAVE_UNISTD_H
201
202 /* Define to the sub-directory in which libtool stores uninstalled libraries.
203 */
204 #undef LT_OBJDIR
205
206 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
207 #undef NO_MINUS_C_MINUS_O
208
209 /* Name of package */
210 #undef PACKAGE
211
212 /* Define to the address where bug reports for this package should be sent. */
213 #undef PACKAGE_BUGREPORT
214
215 /* Define to the full name of this package. */
216 #undef PACKAGE_NAME
217
218 /* Define to the full name and version of this package. */
219 #undef PACKAGE_STRING
220
221 /* Define to the one symbol short name of this package. */
222 #undef PACKAGE_TARNAME
223
224 /* Define to the home page for this package. */
225 #undef PACKAGE_URL
226
227 /* Define to the version of this package. */
228 #undef PACKAGE_VERSION
229
230 /* Define to necessary symbol if this constant uses a non-standard name on
231 your system. */
232 #undef PTHREAD_CREATE_JOINABLE
233
234 /* The size of `char', as computed by sizeof. */
235 #undef SIZEOF_CHAR
236
237 /* The size of `int', as computed by sizeof. */
238 #undef SIZEOF_INT
239
240 /* The size of `long', as computed by sizeof. */
241 #undef SIZEOF_LONG
242
243 /* The size of `long long', as computed by sizeof. */
244 #undef SIZEOF_LONG_LONG
245
246 /* The size of `short', as computed by sizeof. */
247 #undef SIZEOF_SHORT
248
249 /* The size of `size_t', as computed by sizeof. */
250 #undef SIZEOF_SIZE_T
251
252 /* The size of `unsigned long long', as computed by sizeof. */
253 #undef SIZEOF_UNSIGNED_LONG_LONG
254
255 /* The size of `void *', as computed by sizeof. */
256 #undef SIZEOF_VOID_P
257
258 /* default SQL back-end */
259 #undef SQL_BACKEND
260
261 /* Define to 1 if you have the ANSI C header files. */
262 #undef STDC_HEADERS
263
264 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
265 #undef TIME_WITH_SYS_TIME
266
267 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
268 #undef TM_IN_SYS_TIME
269
270 /* Define to 1 if you need to include <bsd/string.h> to get the `strlcat()'
271 and `strlcpy()' functions. */
272 #undef USE_BSD_H
273
274 /* Define to 1 if you need to include <opendmarc_strl.h> to get the
275 `strlcat()' and `strlcpy()' functions. */
276 #undef USE_DMARCSTRL_H
277
278 /* Define to 1 if you need to include <strl.h> to get the `strlcat()' and
279 `strlcpy()' functions. */
280 #undef USE_STRL_H
281
282 /* Version number of package */
283 #undef VERSION
284
285 /* Define to 1 if you want SPF support. */
286 #undef WITH_SPF
287
288 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
289 significant byte first (like Motorola and SPARC, unlike Intel). */
290 #if defined AC_APPLE_UNIVERSAL_BUILD
291 # if defined __BIG_ENDIAN__
292 # define WORDS_BIGENDIAN 1
293 # endif
294 #else
295 # ifndef WORDS_BIGENDIAN
296 # undef WORDS_BIGENDIAN
297 # endif
298 #endif
299
300 /* Define to empty if `const' does not conform to ANSI C. */
301 #undef const
302
303 /* Define to rpl_malloc if the replacement function should be used. */
304 #undef malloc
305
306 /* Define to rpl_realloc if the replacement function should be used. */
307 #undef realloc
308
309 /* Define to `unsigned int' if <sys/types.h> does not define. */
310 #undef size_t
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for OpenDMARC 1.3.2.
3 #
4 # Report bugs to <bcx+libdmarc@bcx.com>.
5 #
6 #
7 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
8 #
9 #
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## -------------------- ##
13 ## M4sh Initialization. ##
14 ## -------------------- ##
15
16 # Be more Bourne compatible
17 DUALCASE=1; export DUALCASE # for MKS sh
18 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19 emulate sh
20 NULLCMD=:
21 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
24 setopt NO_GLOB_SUBST
25 else
26 case `(set -o) 2>/dev/null` in #(
27 *posix*) :
28 set -o posix ;; #(
29 *) :
30 ;;
31 esac
32 fi
33
34
35 as_nl='
36 '
37 export as_nl
38 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42 # Prefer a ksh shell builtin over an external printf program on Solaris,
43 # but without wasting forks for bash or zsh.
44 if test -z "$BASH_VERSION$ZSH_VERSION" \
45 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46 as_echo='print -r --'
47 as_echo_n='print -rn --'
48 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='printf %s\n'
50 as_echo_n='printf %s'
51 else
52 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54 as_echo_n='/usr/ucb/echo -n'
55 else
56 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 as_echo_n_body='eval
58 arg=$1;
59 case $arg in #(
60 *"$as_nl"*)
61 expr "X$arg" : "X\\(.*\\)$as_nl";
62 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63 esac;
64 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 '
66 export as_echo_n_body
67 as_echo_n='sh -c $as_echo_n_body as_echo'
68 fi
69 export as_echo_body
70 as_echo='sh -c $as_echo_body as_echo'
71 fi
72
73 # The user is always right.
74 if test "${PATH_SEPARATOR+set}" != set; then
75 PATH_SEPARATOR=:
76 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78 PATH_SEPARATOR=';'
79 }
80 fi
81
82
83 # IFS
84 # We need space, tab and new line, in precisely that order. Quoting is
85 # there to prevent editors from complaining about space-tab.
86 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
87 # splitting by setting IFS to empty value.)
88 IFS=" "" $as_nl"
89
90 # Find who we are. Look in the path if we contain no directory separator.
91 as_myself=
92 case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH
96 do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101 IFS=$as_save_IFS
102
103 ;;
104 esac
105 # We did not find ourselves, most probably we were run as `sh COMMAND'
106 # in which case we are not to be found in the path.
107 if test "x$as_myself" = x; then
108 as_myself=$0
109 fi
110 if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113 fi
114
115 # Unset variables that we do not need and which cause bugs (e.g. in
116 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117 # suppresses any "Segmentation fault" message there. '((' could
118 # trigger a bug in pdksh 5.2.14.
119 for as_var in BASH_ENV ENV MAIL MAILPATH
120 do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && 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 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136 # Use a proper internal environment variable to ensure we don't fall
137 # into an infinite loop, continuously re-executing ourselves.
138 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
139 _as_can_reexec=no; export _as_can_reexec;
140 # We cannot yet assume a decent shell, so we have to provide a
141 # neutralization value for shells without unset; and this also
142 # works around shells that cannot unset nonexistent variables.
143 # Preserve -v and -x to the replacement shell.
144 BASH_ENV=/dev/null
145 ENV=/dev/null
146 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
147 case $- in # ((((
148 *v*x* | *x*v* ) as_opts=-vx ;;
149 *v* ) as_opts=-v ;;
150 *x* ) as_opts=-x ;;
151 * ) as_opts= ;;
152 esac
153 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
154 # Admittedly, this is quite paranoid, since all the known shells bail
155 # out after a failed `exec'.
156 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
157 as_fn_exit 255
158 fi
159 # We don't want this to propagate to other subprocesses.
160 { _as_can_reexec=; unset _as_can_reexec;}
161 if test "x$CONFIG_SHELL" = x; then
162 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
163 emulate sh
164 NULLCMD=:
165 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
166 # is contrary to our usage. Disable this feature.
167 alias -g '\${1+\"\$@\"}'='\"\$@\"'
168 setopt NO_GLOB_SUBST
169 else
170 case \`(set -o) 2>/dev/null\` in #(
171 *posix*) :
172 set -o posix ;; #(
173 *) :
174 ;;
175 esac
176 fi
177 "
178 as_required="as_fn_return () { (exit \$1); }
179 as_fn_success () { as_fn_return 0; }
180 as_fn_failure () { as_fn_return 1; }
181 as_fn_ret_success () { return 0; }
182 as_fn_ret_failure () { return 1; }
183
184 exitcode=0
185 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
186 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
187 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
188 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
189 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190
191 else
192 exitcode=1; echo positional parameters were not saved.
193 fi
194 test x\$exitcode = x0 || exit 1
195 test -x / || exit 1"
196 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
197 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
198 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
199 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
200
201 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
202 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
203 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
204 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
205 PATH=/empty FPATH=/empty; export PATH FPATH
206 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
207 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
208 test \$(( 1 + 1 )) = 2 || exit 1"
209 if (eval "$as_required") 2>/dev/null; then :
210 as_have_required=yes
211 else
212 as_have_required=no
213 fi
214 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
215
216 else
217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
218 as_found=false
219 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
220 do
221 IFS=$as_save_IFS
222 test -z "$as_dir" && as_dir=.
223 as_found=:
224 case $as_dir in #(
225 /*)
226 for as_base in sh bash ksh sh5; do
227 # Try only shells that exist, to save several forks.
228 as_shell=$as_dir/$as_base
229 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
230 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
231 CONFIG_SHELL=$as_shell as_have_required=yes
232 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
233 break 2
234 fi
235 fi
236 done;;
237 esac
238 as_found=false
239 done
240 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
241 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
242 CONFIG_SHELL=$SHELL as_have_required=yes
243 fi; }
244 IFS=$as_save_IFS
245
246
247 if test "x$CONFIG_SHELL" != x; then :
248 export CONFIG_SHELL
249 # We cannot yet assume a decent shell, so we have to provide a
250 # neutralization value for shells without unset; and this also
251 # works around shells that cannot unset nonexistent variables.
252 # Preserve -v and -x to the replacement shell.
253 BASH_ENV=/dev/null
254 ENV=/dev/null
255 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
256 case $- in # ((((
257 *v*x* | *x*v* ) as_opts=-vx ;;
258 *v* ) as_opts=-v ;;
259 *x* ) as_opts=-x ;;
260 * ) as_opts= ;;
261 esac
262 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
263 # Admittedly, this is quite paranoid, since all the known shells bail
264 # out after a failed `exec'.
265 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
266 exit 255
267 fi
268
269 if test x$as_have_required = xno; then :
270 $as_echo "$0: This script requires a shell more modern than all"
271 $as_echo "$0: the shells that I found on your system."
272 if test x${ZSH_VERSION+set} = xset ; then
273 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
274 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
275 else
276 $as_echo "$0: Please tell bug-autoconf@gnu.org and
277 $0: bcx+libdmarc@bcx.com about your system, including any
278 $0: error possibly output before this message. Then install
279 $0: a modern shell, or manually run the script under such a
280 $0: shell if you do have one."
281 fi
282 exit 1
283 fi
284 fi
285 fi
286 SHELL=${CONFIG_SHELL-/bin/sh}
287 export SHELL
288 # Unset more variables known to interfere with behavior of common tools.
289 CLICOLOR_FORCE= GREP_OPTIONS=
290 unset CLICOLOR_FORCE GREP_OPTIONS
291
292 ## --------------------- ##
293 ## M4sh Shell Functions. ##
294 ## --------------------- ##
295 # as_fn_unset VAR
296 # ---------------
297 # Portably unset VAR.
298 as_fn_unset ()
299 {
300 { eval $1=; unset $1;}
301 }
302 as_unset=as_fn_unset
303
304 # as_fn_set_status STATUS
305 # -----------------------
306 # Set $? to STATUS, without forking.
307 as_fn_set_status ()
308 {
309 return $1
310 } # as_fn_set_status
311
312 # as_fn_exit STATUS
313 # -----------------
314 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
315 as_fn_exit ()
316 {
317 set +e
318 as_fn_set_status $1
319 exit $1
320 } # as_fn_exit
321
322 # as_fn_mkdir_p
323 # -------------
324 # Create "$as_dir" as a directory, including parents if necessary.
325 as_fn_mkdir_p ()
326 {
327
328 case $as_dir in #(
329 -*) as_dir=./$as_dir;;
330 esac
331 test -d "$as_dir" || eval $as_mkdir_p || {
332 as_dirs=
333 while :; do
334 case $as_dir in #(
335 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
336 *) as_qdir=$as_dir;;
337 esac
338 as_dirs="'$as_qdir' $as_dirs"
339 as_dir=`$as_dirname -- "$as_dir" ||
340 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341 X"$as_dir" : 'X\(//\)[^/]' \| \
342 X"$as_dir" : 'X\(//\)$' \| \
343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
344 $as_echo X"$as_dir" |
345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)[^/].*/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)$/{
354 s//\1/
355 q
356 }
357 /^X\(\/\).*/{
358 s//\1/
359 q
360 }
361 s/.*/./; q'`
362 test -d "$as_dir" && break
363 done
364 test -z "$as_dirs" || eval "mkdir $as_dirs"
365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
366
367
368 } # as_fn_mkdir_p
369
370 # as_fn_executable_p FILE
371 # -----------------------
372 # Test if FILE is an executable regular file.
373 as_fn_executable_p ()
374 {
375 test -f "$1" && test -x "$1"
376 } # as_fn_executable_p
377 # as_fn_append VAR VALUE
378 # ----------------------
379 # Append the text in VALUE to the end of the definition contained in VAR. Take
380 # advantage of any shell optimizations that allow amortized linear growth over
381 # repeated appends, instead of the typical quadratic growth present in naive
382 # implementations.
383 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
384 eval 'as_fn_append ()
385 {
386 eval $1+=\$2
387 }'
388 else
389 as_fn_append ()
390 {
391 eval $1=\$$1\$2
392 }
393 fi # as_fn_append
394
395 # as_fn_arith ARG...
396 # ------------------
397 # Perform arithmetic evaluation on the ARGs, and store the result in the
398 # global $as_val. Take advantage of shells that can avoid forks. The arguments
399 # must be portable across $(()) and expr.
400 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
401 eval 'as_fn_arith ()
402 {
403 as_val=$(( $* ))
404 }'
405 else
406 as_fn_arith ()
407 {
408 as_val=`expr "$@" || test $? -eq 1`
409 }
410 fi # as_fn_arith
411
412
413 # as_fn_error STATUS ERROR [LINENO LOG_FD]
414 # ----------------------------------------
415 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
416 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
417 # script with STATUS, using 1 if that was 0.
418 as_fn_error ()
419 {
420 as_status=$1; test $as_status -eq 0 && as_status=1
421 if test "$4"; then
422 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
423 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
424 fi
425 $as_echo "$as_me: error: $2" >&2
426 as_fn_exit $as_status
427 } # as_fn_error
428
429 if expr a : '\(a\)' >/dev/null 2>&1 &&
430 test "X`expr 00001 : '.*\(...\)'`" = X001; then
431 as_expr=expr
432 else
433 as_expr=false
434 fi
435
436 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
437 as_basename=basename
438 else
439 as_basename=false
440 fi
441
442 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
443 as_dirname=dirname
444 else
445 as_dirname=false
446 fi
447
448 as_me=`$as_basename -- "$0" ||
449 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
450 X"$0" : 'X\(//\)$' \| \
451 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
452 $as_echo X/"$0" |
453 sed '/^.*\/\([^/][^/]*\)\/*$/{
454 s//\1/
455 q
456 }
457 /^X\/\(\/\/\)$/{
458 s//\1/
459 q
460 }
461 /^X\/\(\/\).*/{
462 s//\1/
463 q
464 }
465 s/.*/./; q'`
466
467 # Avoid depending upon Character Ranges.
468 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
469 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
470 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
471 as_cr_digits='0123456789'
472 as_cr_alnum=$as_cr_Letters$as_cr_digits
473
474
475 as_lineno_1=$LINENO as_lineno_1a=$LINENO
476 as_lineno_2=$LINENO as_lineno_2a=$LINENO
477 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
478 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
479 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
480 sed -n '
481 p
482 /[$]LINENO/=
483 ' <$as_myself |
484 sed '
485 s/[$]LINENO.*/&-/
486 t lineno
487 b
488 :lineno
489 N
490 :loop
491 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
492 t loop
493 s/-\n.*//
494 ' >$as_me.lineno &&
495 chmod +x "$as_me.lineno" ||
496 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
497
498 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
499 # already done that, so ensure we don't try to do so again and fall
500 # in an infinite loop. This has already happened in practice.
501 _as_can_reexec=no; export _as_can_reexec
502 # Don't try to exec as it changes $[0], causing all sort of problems
503 # (the dirname of $[0] is not the place where we might find the
504 # original and so on. Autoconf is especially sensitive to this).
505 . "./$as_me.lineno"
506 # Exit status is that of the last command.
507 exit
508 }
509
510 ECHO_C= ECHO_N= ECHO_T=
511 case `echo -n x` in #(((((
512 -n*)
513 case `echo 'xy\c'` in
514 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
515 xy) ECHO_C='\c';;
516 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
517 ECHO_T=' ';;
518 esac;;
519 *)
520 ECHO_N='-n';;
521 esac
522
523 rm -f conf$$ conf$$.exe conf$$.file
524 if test -d conf$$.dir; then
525 rm -f conf$$.dir/conf$$.file
526 else
527 rm -f conf$$.dir
528 mkdir conf$$.dir 2>/dev/null
529 fi
530 if (echo >conf$$.file) 2>/dev/null; then
531 if ln -s conf$$.file conf$$ 2>/dev/null; then
532 as_ln_s='ln -s'
533 # ... but there are two gotchas:
534 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
535 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
536 # In both cases, we have to default to `cp -pR'.
537 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
538 as_ln_s='cp -pR'
539 elif ln conf$$.file conf$$ 2>/dev/null; then
540 as_ln_s=ln
541 else
542 as_ln_s='cp -pR'
543 fi
544 else
545 as_ln_s='cp -pR'
546 fi
547 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
548 rmdir conf$$.dir 2>/dev/null
549
550 if mkdir -p . 2>/dev/null; then
551 as_mkdir_p='mkdir -p "$as_dir"'
552 else
553 test -d ./-p && rmdir ./-p
554 as_mkdir_p=false
555 fi
556
557 as_test_x='test -x'
558 as_executable_p=as_fn_executable_p
559
560 # Sed expression to map a string onto a valid CPP name.
561 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
562
563 # Sed expression to map a string onto a valid variable name.
564 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
565
566 SHELL=${CONFIG_SHELL-/bin/sh}
567
568
569 test -n "$DJDIR" || exec 7<&0 </dev/null
570 exec 6>&1
571
572 # Name of the host.
573 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
574 # so uname gets run too.
575 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
576
577 #
578 # Initializations.
579 #
580 ac_default_prefix=/usr/local
581 ac_clean_files=
582 ac_config_libobj_dir=.
583 LIBOBJS=
584 cross_compiling=no
585 subdirs=
586 MFLAGS=
587 MAKEFLAGS=
588
589 # Identity of this package.
590 PACKAGE_NAME='OpenDMARC'
591 PACKAGE_TARNAME='opendmarc'
592 PACKAGE_VERSION='1.3.2'
593 PACKAGE_STRING='OpenDMARC 1.3.2'
594 PACKAGE_BUGREPORT='bcx+libdmarc@bcx.com'
595 PACKAGE_URL=''
596
597 ac_unique_file="."
598 # Factoring default headers for most tests.
599 ac_includes_default="\
600 #include <stdio.h>
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif
604 #ifdef HAVE_SYS_STAT_H
605 # include <sys/stat.h>
606 #endif
607 #ifdef STDC_HEADERS
608 # include <stdlib.h>
609 # include <stddef.h>
610 #else
611 # ifdef HAVE_STDLIB_H
612 # include <stdlib.h>
613 # endif
614 #endif
615 #ifdef HAVE_STRING_H
616 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617 # include <memory.h>
618 # endif
619 # include <string.h>
620 #endif
621 #ifdef HAVE_STRINGS_H
622 # include <strings.h>
623 #endif
624 #ifdef HAVE_INTTYPES_H
625 # include <inttypes.h>
626 #endif
627 #ifdef HAVE_STDINT_H
628 # include <stdint.h>
629 #endif
630 #ifdef HAVE_UNISTD_H
631 # include <unistd.h>
632 #endif"
633
634 ac_subst_vars='am__EXEEXT_FALSE
635 am__EXEEXT_TRUE
636 LTLIBOBJS
637 SYSCONFDIR
638 LIBMILTER_LIBS
639 LIBMILTER_LIBDIRS
640 LIBMILTER_INCDIRS
641 FILTER_TESTS_FALSE
642 FILTER_TESTS_TRUE
643 LIVE_TESTS_FALSE
644 LIVE_TESTS_TRUE
645 BUILD_FILTER_FALSE
646 BUILD_FILTER_TRUE
647 USE_SPF_FALSE
648 USE_SPF_TRUE
649 SQL_BACKEND
650 LIBRESOLV
651 ac_aux_dir
652 miltertest
653 LIBOBJS
654 PTHREAD_CFLAGS
655 PTHREAD_LIBS
656 PTHREAD_CC
657 ax_pthread_config
658 LIBDMARC_DIR
659 PKG_CONFIG_LIBDIR
660 PKG_CONFIG_PATH
661 PKG_CONFIG
662 CPP
663 OTOOL64
664 OTOOL
665 LIPO
666 NMEDIT
667 DSYMUTIL
668 MANIFEST_TOOL
669 RANLIB
670 ac_ct_AR
671 AR
672 DLLTOOL
673 OBJDUMP
674 LN_S
675 NM
676 ac_ct_DUMPBIN
677 DUMPBIN
678 LD
679 FGREP
680 EGREP
681 GREP
682 SED
683 host_os
684 host_vendor
685 host_cpu
686 host
687 build_os
688 build_vendor
689 build_cpu
690 build
691 LIBTOOL
692 am__fastdepCC_FALSE
693 am__fastdepCC_TRUE
694 CCDEPMODE
695 am__nodep
696 AMDEPBACKSLASH
697 AMDEP_FALSE
698 AMDEP_TRUE
699 am__quote
700 am__include
701 DEPDIR
702 OBJEXT
703 EXEEXT
704 ac_ct_CC
705 CPPFLAGS
706 LDFLAGS
707 CFLAGS
708 CC
709 LIBOPENDMARC_VERSION_INFO
710 HEX_VERSION
711 AM_BACKSLASH
712 AM_DEFAULT_VERBOSITY
713 AM_DEFAULT_V
714 AM_V
715 am__untar
716 am__tar
717 AMTAR
718 am__leading_dot
719 SET_MAKE
720 AWK
721 mkdir_p
722 MKDIR_P
723 INSTALL_STRIP_PROGRAM
724 STRIP
725 install_sh
726 MAKEINFO
727 AUTOHEADER
728 AUTOMAKE
729 AUTOCONF
730 ACLOCAL
731 VERSION
732 PACKAGE
733 CYGPATH_W
734 am__isrc
735 INSTALL_DATA
736 INSTALL_SCRIPT
737 INSTALL_PROGRAM
738 target_alias
739 host_alias
740 build_alias
741 LIBS
742 ECHO_T
743 ECHO_N
744 ECHO_C
745 DEFS
746 mandir
747 localedir
748 libdir
749 psdir
750 pdfdir
751 dvidir
752 htmldir
753 infodir
754 docdir
755 oldincludedir
756 includedir
757 localstatedir
758 sharedstatedir
759 sysconfdir
760 datadir
761 datarootdir
762 libexecdir
763 sbindir
764 bindir
765 program_transform_name
766 prefix
767 exec_prefix
768 PACKAGE_URL
769 PACKAGE_BUGREPORT
770 PACKAGE_STRING
771 PACKAGE_VERSION
772 PACKAGE_TARNAME
773 PACKAGE_NAME
774 PATH_SEPARATOR
775 SHELL'
776 ac_subst_files=''
777 ac_user_opts='
778 enable_option_checking
779 enable_silent_rules
780 enable_dependency_tracking
781 enable_shared
782 enable_static
783 with_pic
784 enable_fast_install
785 with_gnu_ld
786 with_sysroot
787 enable_libtool_lock
788 with_installdir
789 with_wall
790 with_sql_backend
791 with_spf
792 with_spf2_include
793 with_spf2_lib
794 enable_filter
795 enable_live_tests
796 enable_filter_tests
797 with_milter
798 '
799 ac_precious_vars='build_alias
800 host_alias
801 target_alias
802 CC
803 CFLAGS
804 LDFLAGS
805 LIBS
806 CPPFLAGS
807 CPP
808 PKG_CONFIG
809 PKG_CONFIG_PATH
810 PKG_CONFIG_LIBDIR'
811
812
813 # Initialize some variables set by options.
814 ac_init_help=
815 ac_init_version=false
816 ac_unrecognized_opts=
817 ac_unrecognized_sep=
818 # The variables have the same names as the options, with
819 # dashes changed to underlines.
820 cache_file=/dev/null
821 exec_prefix=NONE
822 no_create=
823 no_recursion=
824 prefix=NONE
825 program_prefix=NONE
826 program_suffix=NONE
827 program_transform_name=s,x,x,
828 silent=
829 site=
830 srcdir=
831 verbose=
832 x_includes=NONE
833 x_libraries=NONE
834
835 # Installation directory options.
836 # These are left unexpanded so users can "make install exec_prefix=/foo"
837 # and all the variables that are supposed to be based on exec_prefix
838 # by default will actually change.
839 # Use braces instead of parens because sh, perl, etc. also accept them.
840 # (The list follows the same order as the GNU Coding Standards.)
841 bindir='${exec_prefix}/bin'
842 sbindir='${exec_prefix}/sbin'
843 libexecdir='${exec_prefix}/libexec'
844 datarootdir='${prefix}/share'
845 datadir='${datarootdir}'
846 sysconfdir='${prefix}/etc'
847 sharedstatedir='${prefix}/com'
848 localstatedir='${prefix}/var'
849 includedir='${prefix}/include'
850 oldincludedir='/usr/include'
851 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
852 infodir='${datarootdir}/info'
853 htmldir='${docdir}'
854 dvidir='${docdir}'
855 pdfdir='${docdir}'
856 psdir='${docdir}'
857 libdir='${exec_prefix}/lib'
858 localedir='${datarootdir}/locale'
859 mandir='${datarootdir}/man'
860
861 ac_prev=
862 ac_dashdash=
863 for ac_option
864 do
865 # If the previous option needs an argument, assign it.
866 if test -n "$ac_prev"; then
867 eval $ac_prev=\$ac_option
868 ac_prev=
869 continue
870 fi
871
872 case $ac_option in
873 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
874 *=) ac_optarg= ;;
875 *) ac_optarg=yes ;;
876 esac
877
878 # Accept the important Cygnus configure options, so we can diagnose typos.
879
880 case $ac_dashdash$ac_option in
881 --)
882 ac_dashdash=yes ;;
883
884 -bindir | --bindir | --bindi | --bind | --bin | --bi)
885 ac_prev=bindir ;;
886 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
887 bindir=$ac_optarg ;;
888
889 -build | --build | --buil | --bui | --bu)
890 ac_prev=build_alias ;;
891 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
892 build_alias=$ac_optarg ;;
893
894 -cache-file | --cache-file | --cache-fil | --cache-fi \
895 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
896 ac_prev=cache_file ;;
897 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
898 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
899 cache_file=$ac_optarg ;;
900
901 --config-cache | -C)
902 cache_file=config.cache ;;
903
904 -datadir | --datadir | --datadi | --datad)
905 ac_prev=datadir ;;
906 -datadir=* | --datadir=* | --datadi=* | --datad=*)
907 datadir=$ac_optarg ;;
908
909 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
910 | --dataroo | --dataro | --datar)
911 ac_prev=datarootdir ;;
912 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
913 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
914 datarootdir=$ac_optarg ;;
915
916 -disable-* | --disable-*)
917 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
918 # Reject names that are not valid shell variable names.
919 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
920 as_fn_error $? "invalid feature name: $ac_useropt"
921 ac_useropt_orig=$ac_useropt
922 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
923 case $ac_user_opts in
924 *"
925 "enable_$ac_useropt"
926 "*) ;;
927 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
928 ac_unrecognized_sep=', ';;
929 esac
930 eval enable_$ac_useropt=no ;;
931
932 -docdir | --docdir | --docdi | --doc | --do)
933 ac_prev=docdir ;;
934 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
935 docdir=$ac_optarg ;;
936
937 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
938 ac_prev=dvidir ;;
939 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
940 dvidir=$ac_optarg ;;
941
942 -enable-* | --enable-*)
943 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
944 # Reject names that are not valid shell variable names.
945 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
946 as_fn_error $? "invalid feature name: $ac_useropt"
947 ac_useropt_orig=$ac_useropt
948 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
949 case $ac_user_opts in
950 *"
951 "enable_$ac_useropt"
952 "*) ;;
953 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
954 ac_unrecognized_sep=', ';;
955 esac
956 eval enable_$ac_useropt=\$ac_optarg ;;
957
958 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
959 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
960 | --exec | --exe | --ex)
961 ac_prev=exec_prefix ;;
962 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
963 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
964 | --exec=* | --exe=* | --ex=*)
965 exec_prefix=$ac_optarg ;;
966
967 -gas | --gas | --ga | --g)
968 # Obsolete; use --with-gas.
969 with_gas=yes ;;
970
971 -help | --help | --hel | --he | -h)
972 ac_init_help=long ;;
973 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
974 ac_init_help=recursive ;;
975 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
976 ac_init_help=short ;;
977
978 -host | --host | --hos | --ho)
979 ac_prev=host_alias ;;
980 -host=* | --host=* | --hos=* | --ho=*)
981 host_alias=$ac_optarg ;;
982
983 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
984 ac_prev=htmldir ;;
985 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
986 | --ht=*)
987 htmldir=$ac_optarg ;;
988
989 -includedir | --includedir | --includedi | --included | --include \
990 | --includ | --inclu | --incl | --inc)
991 ac_prev=includedir ;;
992 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
993 | --includ=* | --inclu=* | --incl=* | --inc=*)
994 includedir=$ac_optarg ;;
995
996 -infodir | --infodir | --infodi | --infod | --info | --inf)
997 ac_prev=infodir ;;
998 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
999 infodir=$ac_optarg ;;
1000
1001 -libdir | --libdir | --libdi | --libd)
1002 ac_prev=libdir ;;
1003 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1004 libdir=$ac_optarg ;;
1005
1006 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1007 | --libexe | --libex | --libe)
1008 ac_prev=libexecdir ;;
1009 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1010 | --libexe=* | --libex=* | --libe=*)
1011 libexecdir=$ac_optarg ;;
1012
1013 -localedir | --localedir | --localedi | --localed | --locale)
1014 ac_prev=localedir ;;
1015 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1016 localedir=$ac_optarg ;;
1017
1018 -localstatedir | --localstatedir | --localstatedi | --localstated \
1019 | --localstate | --localstat | --localsta | --localst | --locals)
1020 ac_prev=localstatedir ;;
1021 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1022 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1023 localstatedir=$ac_optarg ;;
1024
1025 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1026 ac_prev=mandir ;;
1027 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1028 mandir=$ac_optarg ;;
1029
1030 -nfp | --nfp | --nf)
1031 # Obsolete; use --without-fp.
1032 with_fp=no ;;
1033
1034 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1035 | --no-cr | --no-c | -n)
1036 no_create=yes ;;
1037
1038 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1039 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1040 no_recursion=yes ;;
1041
1042 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1043 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1044 | --oldin | --oldi | --old | --ol | --o)
1045 ac_prev=oldincludedir ;;
1046 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1047 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1048 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1049 oldincludedir=$ac_optarg ;;
1050
1051 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1052 ac_prev=prefix ;;
1053 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1054 prefix=$ac_optarg ;;
1055
1056 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1057 | --program-pre | --program-pr | --program-p)
1058 ac_prev=program_prefix ;;
1059 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1060 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1061 program_prefix=$ac_optarg ;;
1062
1063 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1064 | --program-suf | --program-su | --program-s)
1065 ac_prev=program_suffix ;;
1066 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1067 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1068 program_suffix=$ac_optarg ;;
1069
1070 -program-transform-name | --program-transform-name \
1071 | --program-transform-nam | --program-transform-na \
1072 | --program-transform-n | --program-transform- \
1073 | --program-transform | --program-transfor \
1074 | --program-transfo | --program-transf \
1075 | --program-trans | --program-tran \
1076 | --progr-tra | --program-tr | --program-t)
1077 ac_prev=program_transform_name ;;
1078 -program-transform-name=* | --program-transform-name=* \
1079 | --program-transform-nam=* | --program-transform-na=* \
1080 | --program-transform-n=* | --program-transform-=* \
1081 | --program-transform=* | --program-transfor=* \
1082 | --program-transfo=* | --program-transf=* \
1083 | --program-trans=* | --program-tran=* \
1084 | --progr-tra=* | --program-tr=* | --program-t=*)
1085 program_transform_name=$ac_optarg ;;
1086
1087 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1088 ac_prev=pdfdir ;;
1089 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1090 pdfdir=$ac_optarg ;;
1091
1092 -psdir | --psdir | --psdi | --psd | --ps)
1093 ac_prev=psdir ;;
1094 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1095 psdir=$ac_optarg ;;
1096
1097 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1098 | -silent | --silent | --silen | --sile | --sil)
1099 silent=yes ;;
1100
1101 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1102 ac_prev=sbindir ;;
1103 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1104 | --sbi=* | --sb=*)
1105 sbindir=$ac_optarg ;;
1106
1107 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1108 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1109 | --sharedst | --shareds | --shared | --share | --shar \
1110 | --sha | --sh)
1111 ac_prev=sharedstatedir ;;
1112 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1113 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1114 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1115 | --sha=* | --sh=*)
1116 sharedstatedir=$ac_optarg ;;
1117
1118 -site | --site | --sit)
1119 ac_prev=site ;;
1120 -site=* | --site=* | --sit=*)
1121 site=$ac_optarg ;;
1122
1123 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1124 ac_prev=srcdir ;;
1125 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1126 srcdir=$ac_optarg ;;
1127
1128 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1129 | --syscon | --sysco | --sysc | --sys | --sy)
1130 ac_prev=sysconfdir ;;
1131 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1132 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1133 sysconfdir=$ac_optarg ;;
1134
1135 -target | --target | --targe | --targ | --tar | --ta | --t)
1136 ac_prev=target_alias ;;
1137 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1138 target_alias=$ac_optarg ;;
1139
1140 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1141 verbose=yes ;;
1142
1143 -version | --version | --versio | --versi | --vers | -V)
1144 ac_init_version=: ;;
1145
1146 -with-* | --with-*)
1147 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1148 # Reject names that are not valid shell variable names.
1149 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1150 as_fn_error $? "invalid package name: $ac_useropt"
1151 ac_useropt_orig=$ac_useropt
1152 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1153 case $ac_user_opts in
1154 *"
1155 "with_$ac_useropt"
1156 "*) ;;
1157 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1158 ac_unrecognized_sep=', ';;
1159 esac
1160 eval with_$ac_useropt=\$ac_optarg ;;
1161
1162 -without-* | --without-*)
1163 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1164 # Reject names that are not valid shell variable names.
1165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1166 as_fn_error $? "invalid package name: $ac_useropt"
1167 ac_useropt_orig=$ac_useropt
1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169 case $ac_user_opts in
1170 *"
1171 "with_$ac_useropt"
1172 "*) ;;
1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1174 ac_unrecognized_sep=', ';;
1175 esac
1176 eval with_$ac_useropt=no ;;
1177
1178 --x)
1179 # Obsolete; use --with-x.
1180 with_x=yes ;;
1181
1182 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1183 | --x-incl | --x-inc | --x-in | --x-i)
1184 ac_prev=x_includes ;;
1185 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1186 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1187 x_includes=$ac_optarg ;;
1188
1189 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1190 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1191 ac_prev=x_libraries ;;
1192 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1193 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1194 x_libraries=$ac_optarg ;;
1195
1196 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1197 Try \`$0 --help' for more information"
1198 ;;
1199
1200 *=*)
1201 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1202 # Reject names that are not valid shell variable names.
1203 case $ac_envvar in #(
1204 '' | [0-9]* | *[!_$as_cr_alnum]* )
1205 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1206 esac
1207 eval $ac_envvar=\$ac_optarg
1208 export $ac_envvar ;;
1209
1210 *)
1211 # FIXME: should be removed in autoconf 3.0.
1212 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1213 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1214 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1215 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1216 ;;
1217
1218 esac
1219 done
1220
1221 if test -n "$ac_prev"; then
1222 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1223 as_fn_error $? "missing argument to $ac_option"
1224 fi
1225
1226 if test -n "$ac_unrecognized_opts"; then
1227 case $enable_option_checking in
1228 no) ;;
1229 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1230 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1231 esac
1232 fi
1233
1234 # Check all directory arguments for consistency.
1235 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1236 datadir sysconfdir sharedstatedir localstatedir includedir \
1237 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1238 libdir localedir mandir
1239 do
1240 eval ac_val=\$$ac_var
1241 # Remove trailing slashes.
1242 case $ac_val in
1243 */ )
1244 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1245 eval $ac_var=\$ac_val;;
1246 esac
1247 # Be sure to have absolute directory names.
1248 case $ac_val in
1249 [\\/$]* | ?:[\\/]* ) continue;;
1250 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1251 esac
1252 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1253 done
1254
1255 # There might be people who depend on the old broken behavior: `$host'
1256 # used to hold the argument of --host etc.
1257 # FIXME: To remove some day.
1258 build=$build_alias
1259 host=$host_alias
1260 target=$target_alias
1261
1262 # FIXME: To remove some day.
1263 if test "x$host_alias" != x; then
1264 if test "x$build_alias" = x; then
1265 cross_compiling=maybe
1266 elif test "x$build_alias" != "x$host_alias"; then
1267 cross_compiling=yes
1268 fi
1269 fi
1270
1271 ac_tool_prefix=
1272 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1273
1274 test "$silent" = yes && exec 6>/dev/null
1275
1276
1277 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1278 ac_ls_di=`ls -di .` &&
1279 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1280 as_fn_error $? "working directory cannot be determined"
1281 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1282 as_fn_error $? "pwd does not report name of working directory"
1283
1284
1285 # Find the source files, if location was not specified.
1286 if test -z "$srcdir"; then
1287 ac_srcdir_defaulted=yes
1288 # Try the directory containing this script, then the parent directory.
1289 ac_confdir=`$as_dirname -- "$as_myself" ||
1290 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1291 X"$as_myself" : 'X\(//\)[^/]' \| \
1292 X"$as_myself" : 'X\(//\)$' \| \
1293 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1294 $as_echo X"$as_myself" |
1295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)[^/].*/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\/\)$/{
1304 s//\1/
1305 q
1306 }
1307 /^X\(\/\).*/{
1308 s//\1/
1309 q
1310 }
1311 s/.*/./; q'`
1312 srcdir=$ac_confdir
1313 if test ! -r "$srcdir/$ac_unique_file"; then
1314 srcdir=..
1315 fi
1316 else
1317 ac_srcdir_defaulted=no
1318 fi
1319 if test ! -r "$srcdir/$ac_unique_file"; then
1320 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1321 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1322 fi
1323 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1324 ac_abs_confdir=`(
1325 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1326 pwd)`
1327 # When building in place, set srcdir=.
1328 if test "$ac_abs_confdir" = "$ac_pwd"; then
1329 srcdir=.
1330 fi
1331 # Remove unnecessary trailing slashes from srcdir.
1332 # Double slashes in file names in object file debugging info
1333 # mess up M-x gdb in Emacs.
1334 case $srcdir in
1335 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1336 esac
1337 for ac_var in $ac_precious_vars; do
1338 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1339 eval ac_env_${ac_var}_value=\$${ac_var}
1340 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1341 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1342 done
1343
1344 #
1345 # Report the --help message.
1346 #
1347 if test "$ac_init_help" = "long"; then
1348 # Omit some internal or obsolete options to make the list less imposing.
1349 # This message is too long to be a string in the A/UX 3.1 sh.
1350 cat <<_ACEOF
1351 \`configure' configures OpenDMARC 1.3.2 to adapt to many kinds of systems.
1352
1353 Usage: $0 [OPTION]... [VAR=VALUE]...
1354
1355 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1356 VAR=VALUE. See below for descriptions of some of the useful variables.
1357
1358 Defaults for the options are specified in brackets.
1359
1360 Configuration:
1361 -h, --help display this help and exit
1362 --help=short display options specific to this package
1363 --help=recursive display the short help of all the included packages
1364 -V, --version display version information and exit
1365 -q, --quiet, --silent do not print \`checking ...' messages
1366 --cache-file=FILE cache test results in FILE [disabled]
1367 -C, --config-cache alias for \`--cache-file=config.cache'
1368 -n, --no-create do not create output files
1369 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1370
1371 Installation directories:
1372 --prefix=PREFIX install architecture-independent files in PREFIX
1373 [$ac_default_prefix]
1374 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1375 [PREFIX]
1376
1377 By default, \`make install' will install all the files in
1378 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1379 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1380 for instance \`--prefix=\$HOME'.
1381
1382 For better control, use the options below.
1383
1384 Fine tuning of the installation directories:
1385 --bindir=DIR user executables [EPREFIX/bin]
1386 --sbindir=DIR system admin executables [EPREFIX/sbin]
1387 --libexecdir=DIR program executables [EPREFIX/libexec]
1388 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1389 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1390 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1391 --libdir=DIR object code libraries [EPREFIX/lib]
1392 --includedir=DIR C header files [PREFIX/include]
1393 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1394 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1395 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1396 --infodir=DIR info documentation [DATAROOTDIR/info]
1397 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1398 --mandir=DIR man documentation [DATAROOTDIR/man]
1399 --docdir=DIR documentation root [DATAROOTDIR/doc/opendmarc]
1400 --htmldir=DIR html documentation [DOCDIR]
1401 --dvidir=DIR dvi documentation [DOCDIR]
1402 --pdfdir=DIR pdf documentation [DOCDIR]
1403 --psdir=DIR ps documentation [DOCDIR]
1404 _ACEOF
1405
1406 cat <<\_ACEOF
1407
1408 Program names:
1409 --program-prefix=PREFIX prepend PREFIX to installed program names
1410 --program-suffix=SUFFIX append SUFFIX to installed program names
1411 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1412
1413 System types:
1414 --build=BUILD configure for building on BUILD [guessed]
1415 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1416 _ACEOF
1417 fi
1418
1419 if test -n "$ac_init_help"; then
1420 case $ac_init_help in
1421 short | recursive ) echo "Configuration of OpenDMARC 1.3.2:";;
1422 esac
1423 cat <<\_ACEOF
1424
1425 Optional Features:
1426 --disable-option-checking ignore unrecognized --enable/--with options
1427 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1428 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1429 --enable-silent-rules less verbose build output (undo: "make V=1")
1430 --disable-silent-rules verbose build output (undo: "make V=0")
1431 --enable-dependency-tracking
1432 do not reject slow dependency extractors
1433 --disable-dependency-tracking
1434 speeds up one-time build
1435 --enable-shared[=PKGS] build shared libraries [default=yes]
1436 --enable-static[=PKGS] build static libraries [default=yes]
1437 --enable-fast-install[=PKGS]
1438 optimize for fast installation [default=yes]
1439 --disable-libtool-lock avoid locking (might break parallel builds)
1440 --disable-filter do not compile the opendmarc filter
1441 --enable-live-tests enable live unit tests
1442 --enable-filter-tests enable Lua-based filter unit tests
1443
1444 Optional Packages:
1445 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1446 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1447 --with-pic try to use only PIC/non-PIC objects [default=use
1448 both]
1449 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1450 --with-sysroot=DIR Search for dependent libraries within DIR
1451 (or the compiler's sysroot if not specified).
1452 --with-installdir=/path (default =/usr/local)
1453 --with-wall (no default)
1454 --with-sql-backend selection of SQL backend in use
1455 --with-spf enable SPF checking
1456 --with-spf2-include path to libspf2 includes
1457 --with-spf2-lib path to libspf2 libraries
1458 --with-milter location of milter includes and library
1459
1460 Some influential environment variables:
1461 CC C compiler command
1462 CFLAGS C compiler flags
1463 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1464 nonstandard directory <lib dir>
1465 LIBS libraries to pass to the linker, e.g. -l<library>
1466 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1467 you have headers in a nonstandard directory <include dir>
1468 CPP C preprocessor
1469 PKG_CONFIG path to pkg-config utility
1470 PKG_CONFIG_PATH
1471 directories to add to pkg-config's search path
1472 PKG_CONFIG_LIBDIR
1473 path overriding pkg-config's built-in search path
1474
1475 Use these variables to override the choices made by `configure' or to help
1476 it to find libraries and programs with nonstandard names/locations.
1477
1478 Report bugs to <bcx+libdmarc@bcx.com>.
1479 _ACEOF
1480 ac_status=$?
1481 fi
1482
1483 if test "$ac_init_help" = "recursive"; then
1484 # If there are subdirs, report their specific --help.
1485 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1486 test -d "$ac_dir" ||
1487 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1488 continue
1489 ac_builddir=.
1490
1491 case "$ac_dir" in
1492 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1493 *)
1494 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1495 # A ".." for each directory in $ac_dir_suffix.
1496 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1497 case $ac_top_builddir_sub in
1498 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1499 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1500 esac ;;
1501 esac
1502 ac_abs_top_builddir=$ac_pwd
1503 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1504 # for backward compatibility:
1505 ac_top_builddir=$ac_top_build_prefix
1506
1507 case $srcdir in
1508 .) # We are building in place.
1509 ac_srcdir=.
1510 ac_top_srcdir=$ac_top_builddir_sub
1511 ac_abs_top_srcdir=$ac_pwd ;;
1512 [\\/]* | ?:[\\/]* ) # Absolute name.
1513 ac_srcdir=$srcdir$ac_dir_suffix;
1514 ac_top_srcdir=$srcdir
1515 ac_abs_top_srcdir=$srcdir ;;
1516 *) # Relative name.
1517 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1518 ac_top_srcdir=$ac_top_build_prefix$srcdir
1519 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1520 esac
1521 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1522
1523 cd "$ac_dir" || { ac_status=$?; continue; }
1524 # Check for guested configure.
1525 if test -f "$ac_srcdir/configure.gnu"; then
1526 echo &&
1527 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1528 elif test -f "$ac_srcdir/configure"; then
1529 echo &&
1530 $SHELL "$ac_srcdir/configure" --help=recursive
1531 else
1532 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1533 fi || ac_status=$?
1534 cd "$ac_pwd" || { ac_status=$?; break; }
1535 done
1536 fi
1537
1538 test -n "$ac_init_help" && exit $ac_status
1539 if $ac_init_version; then
1540 cat <<\_ACEOF
1541 OpenDMARC configure 1.3.2
1542 generated by GNU Autoconf 2.69
1543
1544 Copyright (C) 2012 Free Software Foundation, Inc.
1545 This configure script is free software; the Free Software Foundation
1546 gives unlimited permission to copy, distribute and modify it.
1547 _ACEOF
1548 exit
1549 fi
1550
1551 ## ------------------------ ##
1552 ## Autoconf initialization. ##
1553 ## ------------------------ ##
1554
1555 # ac_fn_c_try_compile LINENO
1556 # --------------------------
1557 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1558 ac_fn_c_try_compile ()
1559 {
1560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1561 rm -f conftest.$ac_objext
1562 if { { ac_try="$ac_compile"
1563 case "(($ac_try" in
1564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1565 *) ac_try_echo=$ac_try;;
1566 esac
1567 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1568 $as_echo "$ac_try_echo"; } >&5
1569 (eval "$ac_compile") 2>conftest.err
1570 ac_status=$?
1571 if test -s conftest.err; then
1572 grep -v '^ *+' conftest.err >conftest.er1
1573 cat conftest.er1 >&5
1574 mv -f conftest.er1 conftest.err
1575 fi
1576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1577 test $ac_status = 0; } && {
1578 test -z "$ac_c_werror_flag" ||
1579 test ! -s conftest.err
1580 } && test -s conftest.$ac_objext; then :
1581 ac_retval=0
1582 else
1583 $as_echo "$as_me: failed program was:" >&5
1584 sed 's/^/| /' conftest.$ac_ext >&5
1585
1586 ac_retval=1
1587 fi
1588 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1589 as_fn_set_status $ac_retval
1590
1591 } # ac_fn_c_try_compile
1592
1593 # ac_fn_c_try_link LINENO
1594 # -----------------------
1595 # Try to link conftest.$ac_ext, and return whether this succeeded.
1596 ac_fn_c_try_link ()
1597 {
1598 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1599 rm -f conftest.$ac_objext conftest$ac_exeext
1600 if { { ac_try="$ac_link"
1601 case "(($ac_try" in
1602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1603 *) ac_try_echo=$ac_try;;
1604 esac
1605 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1606 $as_echo "$ac_try_echo"; } >&5
1607 (eval "$ac_link") 2>conftest.err
1608 ac_status=$?
1609 if test -s conftest.err; then
1610 grep -v '^ *+' conftest.err >conftest.er1
1611 cat conftest.er1 >&5
1612 mv -f conftest.er1 conftest.err
1613 fi
1614 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1615 test $ac_status = 0; } && {
1616 test -z "$ac_c_werror_flag" ||
1617 test ! -s conftest.err
1618 } && test -s conftest$ac_exeext && {
1619 test "$cross_compiling" = yes ||
1620 test -x conftest$ac_exeext
1621 }; then :
1622 ac_retval=0
1623 else
1624 $as_echo "$as_me: failed program was:" >&5
1625 sed 's/^/| /' conftest.$ac_ext >&5
1626
1627 ac_retval=1
1628 fi
1629 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1630 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1631 # interfere with the next link command; also delete a directory that is
1632 # left behind by Apple's compiler. We do this before executing the actions.
1633 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1634 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1635 as_fn_set_status $ac_retval
1636
1637 } # ac_fn_c_try_link
1638
1639 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1640 # -------------------------------------------------------
1641 # Tests whether HEADER exists and can be compiled using the include files in
1642 # INCLUDES, setting the cache variable VAR accordingly.
1643 ac_fn_c_check_header_compile ()
1644 {
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1647 $as_echo_n "checking for $2... " >&6; }
1648 if eval \${$3+:} false; then :
1649 $as_echo_n "(cached) " >&6
1650 else
1651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1652 /* end confdefs.h. */
1653 $4
1654 #include <$2>
1655 _ACEOF
1656 if ac_fn_c_try_compile "$LINENO"; then :
1657 eval "$3=yes"
1658 else
1659 eval "$3=no"
1660 fi
1661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1662 fi
1663 eval ac_res=\$$3
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1665 $as_echo "$ac_res" >&6; }
1666 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1667
1668 } # ac_fn_c_check_header_compile
1669
1670 # ac_fn_c_try_cpp LINENO
1671 # ----------------------
1672 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1673 ac_fn_c_try_cpp ()
1674 {
1675 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1676 if { { ac_try="$ac_cpp conftest.$ac_ext"
1677 case "(($ac_try" in
1678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1679 *) ac_try_echo=$ac_try;;
1680 esac
1681 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1682 $as_echo "$ac_try_echo"; } >&5
1683 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1684 ac_status=$?
1685 if test -s conftest.err; then
1686 grep -v '^ *+' conftest.err >conftest.er1
1687 cat conftest.er1 >&5
1688 mv -f conftest.er1 conftest.err
1689 fi
1690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1691 test $ac_status = 0; } > conftest.i && {
1692 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1693 test ! -s conftest.err
1694 }; then :
1695 ac_retval=0
1696 else
1697 $as_echo "$as_me: failed program was:" >&5
1698 sed 's/^/| /' conftest.$ac_ext >&5
1699
1700 ac_retval=1
1701 fi
1702 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1703 as_fn_set_status $ac_retval
1704
1705 } # ac_fn_c_try_cpp
1706
1707 # ac_fn_c_try_run LINENO
1708 # ----------------------
1709 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1710 # that executables *can* be run.
1711 ac_fn_c_try_run ()
1712 {
1713 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 if { { ac_try="$ac_link"
1715 case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718 esac
1719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720 $as_echo "$ac_try_echo"; } >&5
1721 (eval "$ac_link") 2>&5
1722 ac_status=$?
1723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1724 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1725 { { case "(($ac_try" in
1726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1727 *) ac_try_echo=$ac_try;;
1728 esac
1729 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1730 $as_echo "$ac_try_echo"; } >&5
1731 (eval "$ac_try") 2>&5
1732 ac_status=$?
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; }; }; then :
1735 ac_retval=0
1736 else
1737 $as_echo "$as_me: program exited with status $ac_status" >&5
1738 $as_echo "$as_me: failed program was:" >&5
1739 sed 's/^/| /' conftest.$ac_ext >&5
1740
1741 ac_retval=$ac_status
1742 fi
1743 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1745 as_fn_set_status $ac_retval
1746
1747 } # ac_fn_c_try_run
1748
1749 # ac_fn_c_check_func LINENO FUNC VAR
1750 # ----------------------------------
1751 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1752 ac_fn_c_check_func ()
1753 {
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1756 $as_echo_n "checking for $2... " >&6; }
1757 if eval \${$3+:} false; then :
1758 $as_echo_n "(cached) " >&6
1759 else
1760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761 /* end confdefs.h. */
1762 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1763 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1764 #define $2 innocuous_$2
1765
1766 /* System header to define __stub macros and hopefully few prototypes,
1767 which can conflict with char $2 (); below.
1768 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1769 <limits.h> exists even on freestanding compilers. */
1770
1771 #ifdef __STDC__
1772 # include <limits.h>
1773 #else
1774 # include <assert.h>
1775 #endif
1776
1777 #undef $2
1778
1779 /* Override any GCC internal prototype to avoid an error.
1780 Use char because int might match the return type of a GCC
1781 builtin and then its argument prototype would still apply. */
1782 #ifdef __cplusplus
1783 extern "C"
1784 #endif
1785 char $2 ();
1786 /* The GNU C library defines this for functions which it implements
1787 to always fail with ENOSYS. Some functions are actually named
1788 something starting with __ and the normal name is an alias. */
1789 #if defined __stub_$2 || defined __stub___$2
1790 choke me
1791 #endif
1792
1793 int
1794 main ()
1795 {
1796 return $2 ();
1797 ;
1798 return 0;
1799 }
1800 _ACEOF
1801 if ac_fn_c_try_link "$LINENO"; then :
1802 eval "$3=yes"
1803 else
1804 eval "$3=no"
1805 fi
1806 rm -f core conftest.err conftest.$ac_objext \
1807 conftest$ac_exeext conftest.$ac_ext
1808 fi
1809 eval ac_res=\$$3
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1811 $as_echo "$ac_res" >&6; }
1812 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1813
1814 } # ac_fn_c_check_func
1815
1816 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1817 # -------------------------------------------------------
1818 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1819 # the include files in INCLUDES and setting the cache variable VAR
1820 # accordingly.
1821 ac_fn_c_check_header_mongrel ()
1822 {
1823 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1824 if eval \${$3+:} false; then :
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1826 $as_echo_n "checking for $2... " >&6; }
1827 if eval \${$3+:} false; then :
1828 $as_echo_n "(cached) " >&6
1829 fi
1830 eval ac_res=\$$3
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832 $as_echo "$ac_res" >&6; }
1833 else
1834 # Is the header compilable?
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1836 $as_echo_n "checking $2 usability... " >&6; }
1837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838 /* end confdefs.h. */
1839 $4
1840 #include <$2>
1841 _ACEOF
1842 if ac_fn_c_try_compile "$LINENO"; then :
1843 ac_header_compiler=yes
1844 else
1845 ac_header_compiler=no
1846 fi
1847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1849 $as_echo "$ac_header_compiler" >&6; }
1850
1851 # Is the header present?
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1853 $as_echo_n "checking $2 presence... " >&6; }
1854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1855 /* end confdefs.h. */
1856 #include <$2>
1857 _ACEOF
1858 if ac_fn_c_try_cpp "$LINENO"; then :
1859 ac_header_preproc=yes
1860 else
1861 ac_header_preproc=no
1862 fi
1863 rm -f conftest.err conftest.i conftest.$ac_ext
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1865 $as_echo "$ac_header_preproc" >&6; }
1866
1867 # So? What about this header?
1868 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1869 yes:no: )
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1871 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1873 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1874 ;;
1875 no:yes:* )
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1877 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1879 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1881 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1883 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1885 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1886 ( $as_echo "## ----------------------------------- ##
1887 ## Report this to bcx+libdmarc@bcx.com ##
1888 ## ----------------------------------- ##"
1889 ) | sed "s/^/$as_me: WARNING: /" >&2
1890 ;;
1891 esac
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893 $as_echo_n "checking for $2... " >&6; }
1894 if eval \${$3+:} false; then :
1895 $as_echo_n "(cached) " >&6
1896 else
1897 eval "$3=\$ac_header_compiler"
1898 fi
1899 eval ac_res=\$$3
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1901 $as_echo "$ac_res" >&6; }
1902 fi
1903 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1904
1905 } # ac_fn_c_check_header_mongrel
1906
1907 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1908 # -------------------------------------------
1909 # Tests whether TYPE exists after having included INCLUDES, setting cache
1910 # variable VAR accordingly.
1911 ac_fn_c_check_type ()
1912 {
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915 $as_echo_n "checking for $2... " >&6; }
1916 if eval \${$3+:} false; then :
1917 $as_echo_n "(cached) " >&6
1918 else
1919 eval "$3=no"
1920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1921 /* end confdefs.h. */
1922 $4
1923 int
1924 main ()
1925 {
1926 if (sizeof ($2))
1927 return 0;
1928 ;
1929 return 0;
1930 }
1931 _ACEOF
1932 if ac_fn_c_try_compile "$LINENO"; then :
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934 /* end confdefs.h. */
1935 $4
1936 int
1937 main ()
1938 {
1939 if (sizeof (($2)))
1940 return 0;
1941 ;
1942 return 0;
1943 }
1944 _ACEOF
1945 if ac_fn_c_try_compile "$LINENO"; then :
1946
1947 else
1948 eval "$3=yes"
1949 fi
1950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951 fi
1952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953 fi
1954 eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956 $as_echo "$ac_res" >&6; }
1957 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1958
1959 } # ac_fn_c_check_type
1960
1961 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1962 # --------------------------------------------
1963 # Tries to find the compile-time value of EXPR in a program that includes
1964 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1965 # computed
1966 ac_fn_c_compute_int ()
1967 {
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 if test "$cross_compiling" = yes; then
1970 # Depending upon the size, compute the lo and hi bounds.
1971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972 /* end confdefs.h. */
1973 $4
1974 int
1975 main ()
1976 {
1977 static int test_array [1 - 2 * !(($2) >= 0)];
1978 test_array [0] = 0;
1979 return test_array [0];
1980
1981 ;
1982 return 0;
1983 }
1984 _ACEOF
1985 if ac_fn_c_try_compile "$LINENO"; then :
1986 ac_lo=0 ac_mid=0
1987 while :; do
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 /* end confdefs.h. */
1990 $4
1991 int
1992 main ()
1993 {
1994 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1995 test_array [0] = 0;
1996 return test_array [0];
1997
1998 ;
1999 return 0;
2000 }
2001 _ACEOF
2002 if ac_fn_c_try_compile "$LINENO"; then :
2003 ac_hi=$ac_mid; break
2004 else
2005 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2006 if test $ac_lo -le $ac_mid; then
2007 ac_lo= ac_hi=
2008 break
2009 fi
2010 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2011 fi
2012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2013 done
2014 else
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016 /* end confdefs.h. */
2017 $4
2018 int
2019 main ()
2020 {
2021 static int test_array [1 - 2 * !(($2) < 0)];
2022 test_array [0] = 0;
2023 return test_array [0];
2024
2025 ;
2026 return 0;
2027 }
2028 _ACEOF
2029 if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=-1 ac_mid=-1
2031 while :; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033 /* end confdefs.h. */
2034 $4
2035 int
2036 main ()
2037 {
2038 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2039 test_array [0] = 0;
2040 return test_array [0];
2041
2042 ;
2043 return 0;
2044 }
2045 _ACEOF
2046 if ac_fn_c_try_compile "$LINENO"; then :
2047 ac_lo=$ac_mid; break
2048 else
2049 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2050 if test $ac_mid -le $ac_hi; then
2051 ac_lo= ac_hi=
2052 break
2053 fi
2054 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2055 fi
2056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2057 done
2058 else
2059 ac_lo= ac_hi=
2060 fi
2061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2062 fi
2063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2064 # Binary search between lo and hi bounds.
2065 while test "x$ac_lo" != "x$ac_hi"; do
2066 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068 /* end confdefs.h. */
2069 $4
2070 int
2071 main ()
2072 {
2073 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2074 test_array [0] = 0;
2075 return test_array [0];
2076
2077 ;
2078 return 0;
2079 }
2080 _ACEOF
2081 if ac_fn_c_try_compile "$LINENO"; then :
2082 ac_hi=$ac_mid
2083 else
2084 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2085 fi
2086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087 done
2088 case $ac_lo in #((
2089 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2090 '') ac_retval=1 ;;
2091 esac
2092 else
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094 /* end confdefs.h. */
2095 $4
2096 static long int longval () { return $2; }
2097 static unsigned long int ulongval () { return $2; }
2098 #include <stdio.h>
2099 #include <stdlib.h>
2100 int
2101 main ()
2102 {
2103
2104 FILE *f = fopen ("conftest.val", "w");
2105 if (! f)
2106 return 1;
2107 if (($2) < 0)
2108 {
2109 long int i = longval ();
2110 if (i != ($2))
2111 return 1;
2112 fprintf (f, "%ld", i);
2113 }
2114 else
2115 {
2116 unsigned long int i = ulongval ();
2117 if (i != ($2))
2118 return 1;
2119 fprintf (f, "%lu", i);
2120 }
2121 /* Do not output a trailing newline, as this causes \r\n confusion
2122 on some platforms. */
2123 return ferror (f) || fclose (f) != 0;
2124
2125 ;
2126 return 0;
2127 }
2128 _ACEOF
2129 if ac_fn_c_try_run "$LINENO"; then :
2130 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2131 else
2132 ac_retval=1
2133 fi
2134 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2135 conftest.$ac_objext conftest.beam conftest.$ac_ext
2136 rm -f conftest.val
2137
2138 fi
2139 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2140 as_fn_set_status $ac_retval
2141
2142 } # ac_fn_c_compute_int
2143 cat >config.log <<_ACEOF
2144 This file contains any messages produced by compilers while
2145 running configure, to aid debugging if configure makes a mistake.
2146
2147 It was created by OpenDMARC $as_me 1.3.2, which was
2148 generated by GNU Autoconf 2.69. Invocation command line was
2149
2150 $ $0 $@
2151
2152 _ACEOF
2153 exec 5>>config.log
2154 {
2155 cat <<_ASUNAME
2156 ## --------- ##
2157 ## Platform. ##
2158 ## --------- ##
2159
2160 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2161 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2162 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2163 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2164 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2165
2166 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2167 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2168
2169 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2170 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2171 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2172 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2173 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2174 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2175 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2176
2177 _ASUNAME
2178
2179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2180 for as_dir in $PATH
2181 do
2182 IFS=$as_save_IFS
2183 test -z "$as_dir" && as_dir=.
2184 $as_echo "PATH: $as_dir"
2185 done
2186 IFS=$as_save_IFS
2187
2188 } >&5
2189
2190 cat >&5 <<_ACEOF
2191
2192
2193 ## ----------- ##
2194 ## Core tests. ##
2195 ## ----------- ##
2196
2197 _ACEOF
2198
2199
2200 # Keep a trace of the command line.
2201 # Strip out --no-create and --no-recursion so they do not pile up.
2202 # Strip out --silent because we don't want to record it for future runs.
2203 # Also quote any args containing shell meta-characters.
2204 # Make two passes to allow for proper duplicate-argument suppression.
2205 ac_configure_args=
2206 ac_configure_args0=
2207 ac_configure_args1=
2208 ac_must_keep_next=false
2209 for ac_pass in 1 2
2210 do
2211 for ac_arg
2212 do
2213 case $ac_arg in
2214 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2215 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2216 | -silent | --silent | --silen | --sile | --sil)
2217 continue ;;
2218 *\'*)
2219 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2220 esac
2221 case $ac_pass in
2222 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2223 2)
2224 as_fn_append ac_configure_args1 " '$ac_arg'"
2225 if test $ac_must_keep_next = true; then
2226 ac_must_keep_next=false # Got value, back to normal.
2227 else
2228 case $ac_arg in
2229 *=* | --config-cache | -C | -disable-* | --disable-* \
2230 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2231 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2232 | -with-* | --with-* | -without-* | --without-* | --x)
2233 case "$ac_configure_args0 " in
2234 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2235 esac
2236 ;;
2237 -* ) ac_must_keep_next=true ;;
2238 esac
2239 fi
2240 as_fn_append ac_configure_args " '$ac_arg'"
2241 ;;
2242 esac
2243 done
2244 done
2245 { ac_configure_args0=; unset ac_configure_args0;}
2246 { ac_configure_args1=; unset ac_configure_args1;}
2247
2248 # When interrupted or exit'd, cleanup temporary files, and complete
2249 # config.log. We remove comments because anyway the quotes in there
2250 # would cause problems or look ugly.
2251 # WARNING: Use '\'' to represent an apostrophe within the trap.
2252 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2253 trap 'exit_status=$?
2254 # Save into config.log some information that might help in debugging.
2255 {
2256 echo
2257
2258 $as_echo "## ---------------- ##
2259 ## Cache variables. ##
2260 ## ---------------- ##"
2261 echo
2262 # The following way of writing the cache mishandles newlines in values,
2263 (
2264 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2265 eval ac_val=\$$ac_var
2266 case $ac_val in #(
2267 *${as_nl}*)
2268 case $ac_var in #(
2269 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2270 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2271 esac
2272 case $ac_var in #(
2273 _ | IFS | as_nl) ;; #(
2274 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2275 *) { eval $ac_var=; unset $ac_var;} ;;
2276 esac ;;
2277 esac
2278 done
2279 (set) 2>&1 |
2280 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2281 *${as_nl}ac_space=\ *)
2282 sed -n \
2283 "s/'\''/'\''\\\\'\'''\''/g;
2284 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2285 ;; #(
2286 *)
2287 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2288 ;;
2289 esac |
2290 sort
2291 )
2292 echo
2293
2294 $as_echo "## ----------------- ##
2295 ## Output variables. ##
2296 ## ----------------- ##"
2297 echo
2298 for ac_var in $ac_subst_vars
2299 do
2300 eval ac_val=\$$ac_var
2301 case $ac_val in
2302 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2303 esac
2304 $as_echo "$ac_var='\''$ac_val'\''"
2305 done | sort
2306 echo
2307
2308 if test -n "$ac_subst_files"; then
2309 $as_echo "## ------------------- ##
2310 ## File substitutions. ##
2311 ## ------------------- ##"
2312 echo
2313 for ac_var in $ac_subst_files
2314 do
2315 eval ac_val=\$$ac_var
2316 case $ac_val in
2317 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2318 esac
2319 $as_echo "$ac_var='\''$ac_val'\''"
2320 done | sort
2321 echo
2322 fi
2323
2324 if test -s confdefs.h; then
2325 $as_echo "## ----------- ##
2326 ## confdefs.h. ##
2327 ## ----------- ##"
2328 echo
2329 cat confdefs.h
2330 echo
2331 fi
2332 test "$ac_signal" != 0 &&
2333 $as_echo "$as_me: caught signal $ac_signal"
2334 $as_echo "$as_me: exit $exit_status"
2335 } >&5
2336 rm -f core *.core core.conftest.* &&
2337 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2338 exit $exit_status
2339 ' 0
2340 for ac_signal in 1 2 13 15; do
2341 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2342 done
2343 ac_signal=0
2344
2345 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2346 rm -f -r conftest* confdefs.h
2347
2348 $as_echo "/* confdefs.h */" > confdefs.h
2349
2350 # Predefined preprocessor variables.
2351
2352 cat >>confdefs.h <<_ACEOF
2353 #define PACKAGE_NAME "$PACKAGE_NAME"
2354 _ACEOF
2355
2356 cat >>confdefs.h <<_ACEOF
2357 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2358 _ACEOF
2359
2360 cat >>confdefs.h <<_ACEOF
2361 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2362 _ACEOF
2363
2364 cat >>confdefs.h <<_ACEOF
2365 #define PACKAGE_STRING "$PACKAGE_STRING"
2366 _ACEOF
2367
2368 cat >>confdefs.h <<_ACEOF
2369 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2370 _ACEOF
2371
2372 cat >>confdefs.h <<_ACEOF
2373 #define PACKAGE_URL "$PACKAGE_URL"
2374 _ACEOF
2375
2376
2377 # Let the site file select an alternate cache file if it wants to.
2378 # Prefer an explicitly selected file to automatically selected ones.
2379 ac_site_file1=NONE
2380 ac_site_file2=NONE
2381 if test -n "$CONFIG_SITE"; then
2382 # We do not want a PATH search for config.site.
2383 case $CONFIG_SITE in #((
2384 -*) ac_site_file1=./$CONFIG_SITE;;
2385 */*) ac_site_file1=$CONFIG_SITE;;
2386 *) ac_site_file1=./$CONFIG_SITE;;
2387 esac
2388 elif test "x$prefix" != xNONE; then
2389 ac_site_file1=$prefix/share/config.site
2390 ac_site_file2=$prefix/etc/config.site
2391 else
2392 ac_site_file1=$ac_default_prefix/share/config.site
2393 ac_site_file2=$ac_default_prefix/etc/config.site
2394 fi
2395 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2396 do
2397 test "x$ac_site_file" = xNONE && continue
2398 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2400 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2401 sed 's/^/| /' "$ac_site_file" >&5
2402 . "$ac_site_file" \
2403 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2404 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2405 as_fn_error $? "failed to load site script $ac_site_file
2406 See \`config.log' for more details" "$LINENO" 5; }
2407 fi
2408 done
2409
2410 if test -r "$cache_file"; then
2411 # Some versions of bash will fail to source /dev/null (special files
2412 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2413 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2414 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2415 $as_echo "$as_me: loading cache $cache_file" >&6;}
2416 case $cache_file in
2417 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2418 *) . "./$cache_file";;
2419 esac
2420 fi
2421 else
2422 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2423 $as_echo "$as_me: creating cache $cache_file" >&6;}
2424 >$cache_file
2425 fi
2426
2427 # Check that the precious variables saved in the cache have kept the same
2428 # value.
2429 ac_cache_corrupted=false
2430 for ac_var in $ac_precious_vars; do
2431 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2432 eval ac_new_set=\$ac_env_${ac_var}_set
2433 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2434 eval ac_new_val=\$ac_env_${ac_var}_value
2435 case $ac_old_set,$ac_new_set in
2436 set,)
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2438 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2439 ac_cache_corrupted=: ;;
2440 ,set)
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2442 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2443 ac_cache_corrupted=: ;;
2444 ,);;
2445 *)
2446 if test "x$ac_old_val" != "x$ac_new_val"; then
2447 # differences in whitespace do not lead to failure.
2448 ac_old_val_w=`echo x $ac_old_val`
2449 ac_new_val_w=`echo x $ac_new_val`
2450 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2452 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2453 ac_cache_corrupted=:
2454 else
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2456 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2457 eval $ac_var=\$ac_old_val
2458 fi
2459 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2460 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2462 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2463 fi;;
2464 esac
2465 # Pass precious variables to config.status.
2466 if test "$ac_new_set" = set; then
2467 case $ac_new_val in
2468 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2469 *) ac_arg=$ac_var=$ac_new_val ;;
2470 esac
2471 case " $ac_configure_args " in
2472 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2473 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2474 esac
2475 fi
2476 done
2477 if $ac_cache_corrupted; then
2478 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2479 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2480 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2481 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2482 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2483 fi
2484 ## -------------------- ##
2485 ## Main body of script. ##
2486 ## -------------------- ##
2487
2488 ac_ext=c
2489 ac_cpp='$CPP $CPPFLAGS'
2490 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2491 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2492 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2493
2494
2495 ac_aux_dir=
2496 for ac_dir in build-aux "$srcdir"/build-aux; do
2497 if test -f "$ac_dir/install-sh"; then
2498 ac_aux_dir=$ac_dir
2499 ac_install_sh="$ac_aux_dir/install-sh -c"
2500 break
2501 elif test -f "$ac_dir/install.sh"; then
2502 ac_aux_dir=$ac_dir
2503 ac_install_sh="$ac_aux_dir/install.sh -c"
2504 break
2505 elif test -f "$ac_dir/shtool"; then
2506 ac_aux_dir=$ac_dir
2507 ac_install_sh="$ac_aux_dir/shtool install -c"
2508 break
2509 fi
2510 done
2511 if test -z "$ac_aux_dir"; then
2512 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2513 fi
2514
2515 # These three variables are undocumented and unsupported,
2516 # and are intended to be withdrawn in a future Autoconf release.
2517 # They can cause serious problems if a builder's source tree is in a directory
2518 # whose full name contains unusual characters.
2519 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2520 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2521 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2522
2523
2524 am__api_version='1.13'
2525
2526 # Find a good install program. We prefer a C program (faster),
2527 # so one script is as good as another. But avoid the broken or
2528 # incompatible versions:
2529 # SysV /etc/install, /usr/sbin/install
2530 # SunOS /usr/etc/install
2531 # IRIX /sbin/install
2532 # AIX /bin/install
2533 # AmigaOS /C/install, which installs bootblocks on floppy discs
2534 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2535 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2536 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2537 # OS/2's system install, which has a completely different semantic
2538 # ./install, which can be erroneously created by make from ./install.sh.
2539 # Reject install programs that cannot install multiple files.
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2541 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2542 if test -z "$INSTALL"; then
2543 if ${ac_cv_path_install+:} false; then :
2544 $as_echo_n "(cached) " >&6
2545 else
2546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2547 for as_dir in $PATH
2548 do
2549 IFS=$as_save_IFS
2550 test -z "$as_dir" && as_dir=.
2551 # Account for people who put trailing slashes in PATH elements.
2552 case $as_dir/ in #((
2553 ./ | .// | /[cC]/* | \
2554 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2555 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2556 /usr/ucb/* ) ;;
2557 *)
2558 # OSF1 and SCO ODT 3.0 have their own names for install.
2559 # Don't use installbsd from OSF since it installs stuff as root
2560 # by default.
2561 for ac_prog in ginstall scoinst install; do
2562 for ac_exec_ext in '' $ac_executable_extensions; do
2563 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2564 if test $ac_prog = install &&
2565 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2566 # AIX install. It has an incompatible calling convention.
2567 :
2568 elif test $ac_prog = install &&
2569 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2570 # program-specific install script used by HP pwplus--don't use.
2571 :
2572 else
2573 rm -rf conftest.one conftest.two conftest.dir
2574 echo one > conftest.one
2575 echo two > conftest.two
2576 mkdir conftest.dir
2577 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2578 test -s conftest.one && test -s conftest.two &&
2579 test -s conftest.dir/conftest.one &&
2580 test -s conftest.dir/conftest.two
2581 then
2582 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2583 break 3
2584 fi
2585 fi
2586 fi
2587 done
2588 done
2589 ;;
2590 esac
2591
2592 done
2593 IFS=$as_save_IFS
2594
2595 rm -rf conftest.one conftest.two conftest.dir
2596
2597 fi
2598 if test "${ac_cv_path_install+set}" = set; then
2599 INSTALL=$ac_cv_path_install
2600 else
2601 # As a last resort, use the slow shell script. Don't cache a
2602 # value for INSTALL within a source directory, because that will
2603 # break other packages using the cache if that directory is
2604 # removed, or if the value is a relative name.
2605 INSTALL=$ac_install_sh
2606 fi
2607 fi
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2609 $as_echo "$INSTALL" >&6; }
2610
2611 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2612 # It thinks the first close brace ends the variable substitution.
2613 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2614
2615 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2616
2617 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2618
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2620 $as_echo_n "checking whether build environment is sane... " >&6; }
2621 # Reject unsafe characters in $srcdir or the absolute working directory
2622 # name. Accept space and tab only in the latter.
2623 am_lf='
2624 '
2625 case `pwd` in
2626 *[\\\"\#\$\&\'\`$am_lf]*)
2627 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2628 esac
2629 case $srcdir in
2630 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2631 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2632 esac
2633
2634 # Do 'set' in a subshell so we don't clobber the current shell's
2635 # arguments. Must try -L first in case configure is actually a
2636 # symlink; some systems play weird games with the mod time of symlinks
2637 # (eg FreeBSD returns the mod time of the symlink's containing
2638 # directory).
2639 if (
2640 am_has_slept=no
2641 for am_try in 1 2; do
2642 echo "timestamp, slept: $am_has_slept" > conftest.file
2643 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2644 if test "$*" = "X"; then
2645 # -L didn't work.
2646 set X `ls -t "$srcdir/configure" conftest.file`
2647 fi
2648 if test "$*" != "X $srcdir/configure conftest.file" \
2649 && test "$*" != "X conftest.file $srcdir/configure"; then
2650
2651 # If neither matched, then we have a broken ls. This can happen
2652 # if, for instance, CONFIG_SHELL is bash and it inherits a
2653 # broken ls alias from the environment. This has actually
2654 # happened. Such a system could not be considered "sane".
2655 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2656 alias in your environment" "$LINENO" 5
2657 fi
2658 if test "$2" = conftest.file || test $am_try -eq 2; then
2659 break
2660 fi
2661 # Just in case.
2662 sleep 1
2663 am_has_slept=yes
2664 done
2665 test "$2" = conftest.file
2666 )
2667 then
2668 # Ok.
2669 :
2670 else
2671 as_fn_error $? "newly created file is older than distributed files!
2672 Check your system clock" "$LINENO" 5
2673 fi
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2675 $as_echo "yes" >&6; }
2676 # If we didn't sleep, we still need to ensure time stamps of config.status and
2677 # generated files are strictly newer.
2678 am_sleep_pid=
2679 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2680 ( sleep 1 ) &
2681 am_sleep_pid=$!
2682 fi
2683
2684 rm -f conftest.file
2685
2686 test "$program_prefix" != NONE &&
2687 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2688 # Use a double $ so make ignores it.
2689 test "$program_suffix" != NONE &&
2690 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2691 # Double any \ or $.
2692 # By default was `s,x,x', remove it if useless.
2693 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2694 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2695
2696 # expand $ac_aux_dir to an absolute path
2697 am_aux_dir=`cd $ac_aux_dir && pwd`
2698
2699 if test x"${MISSING+set}" != xset; then
2700 case $am_aux_dir in
2701 *\ * | *\ *)
2702 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2703 *)
2704 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2705 esac
2706 fi
2707 # Use eval to expand $SHELL
2708 if eval "$MISSING --is-lightweight"; then
2709 am_missing_run="$MISSING "
2710 else
2711 am_missing_run=
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2713 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
2714 fi
2715
2716 if test x"${install_sh}" != xset; then
2717 case $am_aux_dir in
2718 *\ * | *\ *)
2719 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2720 *)
2721 install_sh="\${SHELL} $am_aux_dir/install-sh"
2722 esac
2723 fi
2724
2725 # Installed binaries are usually stripped using 'strip' when the user
2726 # run "make install-strip". However 'strip' might not be the right
2727 # tool to use in cross-compilation environments, therefore Automake
2728 # will honor the 'STRIP' environment variable to overrule this program.
2729 if test "$cross_compiling" != no; then
2730 if test -n "$ac_tool_prefix"; then
2731 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2732 set dummy ${ac_tool_prefix}strip; ac_word=$2
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2734 $as_echo_n "checking for $ac_word... " >&6; }
2735 if ${ac_cv_prog_STRIP+:} false; then :
2736 $as_echo_n "(cached) " >&6
2737 else
2738 if test -n "$STRIP"; then
2739 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2740 else
2741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2742 for as_dir in $PATH
2743 do
2744 IFS=$as_save_IFS
2745 test -z "$as_dir" && as_dir=.
2746 for ac_exec_ext in '' $ac_executable_extensions; do
2747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2748 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2750 break 2
2751 fi
2752 done
2753 done
2754 IFS=$as_save_IFS
2755
2756 fi
2757 fi
2758 STRIP=$ac_cv_prog_STRIP
2759 if test -n "$STRIP"; then
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2761 $as_echo "$STRIP" >&6; }
2762 else
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2764 $as_echo "no" >&6; }
2765 fi
2766
2767
2768 fi
2769 if test -z "$ac_cv_prog_STRIP"; then
2770 ac_ct_STRIP=$STRIP
2771 # Extract the first word of "strip", so it can be a program name with args.
2772 set dummy strip; ac_word=$2
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774 $as_echo_n "checking for $ac_word... " >&6; }
2775 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2776 $as_echo_n "(cached) " >&6
2777 else
2778 if test -n "$ac_ct_STRIP"; then
2779 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2780 else
2781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782 for as_dir in $PATH
2783 do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
2787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2788 ac_cv_prog_ac_ct_STRIP="strip"
2789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792 done
2793 done
2794 IFS=$as_save_IFS
2795
2796 fi
2797 fi
2798 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2799 if test -n "$ac_ct_STRIP"; then
2800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2801 $as_echo "$ac_ct_STRIP" >&6; }
2802 else
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2804 $as_echo "no" >&6; }
2805 fi
2806
2807 if test "x$ac_ct_STRIP" = x; then
2808 STRIP=":"
2809 else
2810 case $cross_compiling:$ac_tool_warned in
2811 yes:)
2812 { $as_echo "$as_me:${as_lineno-$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 STRIP=$ac_ct_STRIP
2817 fi
2818 else
2819 STRIP="$ac_cv_prog_STRIP"
2820 fi
2821
2822 fi
2823 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2824
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2826 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2827 if test -z "$MKDIR_P"; then
2828 if ${ac_cv_path_mkdir+:} false; then :
2829 $as_echo_n "(cached) " >&6
2830 else
2831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2832 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2833 do
2834 IFS=$as_save_IFS
2835 test -z "$as_dir" && as_dir=.
2836 for ac_prog in mkdir gmkdir; do
2837 for ac_exec_ext in '' $ac_executable_extensions; do
2838 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
2839 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2840 'mkdir (GNU coreutils) '* | \
2841 'mkdir (coreutils) '* | \
2842 'mkdir (fileutils) '4.1*)
2843 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2844 break 3;;
2845 esac
2846 done
2847 done
2848 done
2849 IFS=$as_save_IFS
2850
2851 fi
2852
2853 test -d ./--version && rmdir ./--version
2854 if test "${ac_cv_path_mkdir+set}" = set; then
2855 MKDIR_P="$ac_cv_path_mkdir -p"
2856 else
2857 # As a last resort, use the slow shell script. Don't cache a
2858 # value for MKDIR_P within a source directory, because that will
2859 # break other packages using the cache if that directory is
2860 # removed, or if the value is a relative name.
2861 MKDIR_P="$ac_install_sh -d"
2862 fi
2863 fi
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2865 $as_echo "$MKDIR_P" >&6; }
2866
2867 for ac_prog in gawk mawk nawk awk
2868 do
2869 # Extract the first word of "$ac_prog", so it can be a program name with args.
2870 set dummy $ac_prog; ac_word=$2
2871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2872 $as_echo_n "checking for $ac_word... " >&6; }
2873 if ${ac_cv_prog_AWK+:} false; then :
2874 $as_echo_n "(cached) " >&6
2875 else
2876 if test -n "$AWK"; then
2877 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2878 else
2879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2880 for as_dir in $PATH
2881 do
2882 IFS=$as_save_IFS
2883 test -z "$as_dir" && as_dir=.
2884 for ac_exec_ext in '' $ac_executable_extensions; do
2885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2886 ac_cv_prog_AWK="$ac_prog"
2887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2888 break 2
2889 fi
2890 done
2891 done
2892 IFS=$as_save_IFS
2893
2894 fi
2895 fi
2896 AWK=$ac_cv_prog_AWK
2897 if test -n "$AWK"; then
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2899 $as_echo "$AWK" >&6; }
2900 else
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2902 $as_echo "no" >&6; }
2903 fi
2904
2905
2906 test -n "$AWK" && break
2907 done
2908
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2910 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2911 set x ${MAKE-make}
2912 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2913 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2914 $as_echo_n "(cached) " >&6
2915 else
2916 cat >conftest.make <<\_ACEOF
2917 SHELL = /bin/sh
2918 all:
2919 @echo '@@@%%%=$(MAKE)=@@@%%%'
2920 _ACEOF
2921 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2922 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2923 *@@@%%%=?*=@@@%%%*)
2924 eval ac_cv_prog_make_${ac_make}_set=yes;;
2925 *)
2926 eval ac_cv_prog_make_${ac_make}_set=no;;
2927 esac
2928 rm -f conftest.make
2929 fi
2930 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2932 $as_echo "yes" >&6; }
2933 SET_MAKE=
2934 else
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2936 $as_echo "no" >&6; }
2937 SET_MAKE="MAKE=${MAKE-make}"
2938 fi
2939
2940 rm -rf .tst 2>/dev/null
2941 mkdir .tst 2>/dev/null
2942 if test -d .tst; then
2943 am__leading_dot=.
2944 else
2945 am__leading_dot=_
2946 fi
2947 rmdir .tst 2>/dev/null
2948
2949 # Check whether --enable-silent-rules was given.
2950 if test "${enable_silent_rules+set}" = set; then :
2951 enableval=$enable_silent_rules;
2952 fi
2953
2954 case $enable_silent_rules in # (((
2955 yes) AM_DEFAULT_VERBOSITY=0;;
2956 no) AM_DEFAULT_VERBOSITY=1;;
2957 *) AM_DEFAULT_VERBOSITY=1;;
2958 esac
2959 am_make=${MAKE-make}
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
2961 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
2962 if ${am_cv_make_support_nested_variables+:} false; then :
2963 $as_echo_n "(cached) " >&6
2964 else
2965 if $as_echo 'TRUE=$(BAR$(V))
2966 BAR0=false
2967 BAR1=true
2968 V=1
2969 am__doit:
2970 @$(TRUE)
2971 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
2972 am_cv_make_support_nested_variables=yes
2973 else
2974 am_cv_make_support_nested_variables=no
2975 fi
2976 fi
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
2978 $as_echo "$am_cv_make_support_nested_variables" >&6; }
2979 if test $am_cv_make_support_nested_variables = yes; then
2980 AM_V='$(V)'
2981 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2982 else
2983 AM_V=$AM_DEFAULT_VERBOSITY
2984 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2985 fi
2986 AM_BACKSLASH='\'
2987
2988 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2989 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2990 # is not polluted with repeated "-I."
2991 am__isrc=' -I$(srcdir)'
2992 # test to see if srcdir already configured
2993 if test -f $srcdir/config.status; then
2994 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2995 fi
2996 fi
2997
2998 # test whether we have cygpath
2999 if test -z "$CYGPATH_W"; then
3000 if (cygpath --version) >/dev/null 2>/dev/null; then
3001 CYGPATH_W='cygpath -w'
3002 else
3003 CYGPATH_W=echo
3004 fi
3005 fi
3006
3007
3008 # Define the identity of the package.
3009 PACKAGE='opendmarc'
3010 VERSION='1.3.2'
3011
3012
3013 cat >>confdefs.h <<_ACEOF
3014 #define PACKAGE "$PACKAGE"
3015 _ACEOF
3016
3017
3018 cat >>confdefs.h <<_ACEOF
3019 #define VERSION "$VERSION"
3020 _ACEOF
3021
3022 # Some tools Automake needs.
3023
3024 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3025
3026
3027 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3028
3029
3030 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3031
3032
3033 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3034
3035
3036 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3037
3038 # For better backward compatibility. To be removed once Automake 1.9.x
3039 # dies out for good. For more background, see:
3040 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3041 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3042 mkdir_p='$(MKDIR_P)'
3043
3044 # We need awk for the "check" target. The system "awk" is bad on
3045 # some platforms.
3046 # Always define AMTAR for backward compatibility. Yes, it's still used
3047 # in the wild :-( We should find a proper way to deprecate it ...
3048 AMTAR='$${TAR-tar}'
3049
3050
3051 # We'll loop over all known methods to create a tar archive until one works.
3052 _am_tools='gnutar pax cpio none'
3053
3054 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3055
3056
3057
3058
3059
3060
3061
3062 ac_config_headers="$ac_config_headers build-config.h"
3063
3064
3065
3066
3067 #
3068 # Hexadecimal version, for use in generating dmarc.h
3069 #
3070 HEX_VERSION=$(printf %08x $(( ((1 << 8 | 3) << 8 | 2) << 8 | 0 )))
3071
3072
3073 #
3074 # library version, passed to libtool
3075 #
3076 LIBOPENDMARC_VERSION_INFO=$(printf %d:%d:%d 2 2 0)
3077
3078
3079 #
3080 # Checks for programs
3081 #
3082 ac_ext=c
3083 ac_cpp='$CPP $CPPFLAGS'
3084 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3085 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3086 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3087 if test -n "$ac_tool_prefix"; then
3088 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3089 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3091 $as_echo_n "checking for $ac_word... " >&6; }
3092 if ${ac_cv_prog_CC+:} false; then :
3093 $as_echo_n "(cached) " >&6
3094 else
3095 if test -n "$CC"; then
3096 ac_cv_prog_CC="$CC" # Let the user override the test.
3097 else
3098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3099 for as_dir in $PATH
3100 do
3101 IFS=$as_save_IFS
3102 test -z "$as_dir" && as_dir=.
3103 for ac_exec_ext in '' $ac_executable_extensions; do
3104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3105 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3107 break 2
3108 fi
3109 done
3110 done
3111 IFS=$as_save_IFS
3112
3113 fi
3114 fi
3115 CC=$ac_cv_prog_CC
3116 if test -n "$CC"; then
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3118 $as_echo "$CC" >&6; }
3119 else
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3121 $as_echo "no" >&6; }
3122 fi
3123
3124
3125 fi
3126 if test -z "$ac_cv_prog_CC"; then
3127 ac_ct_CC=$CC
3128 # Extract the first word of "gcc", so it can be a program name with args.
3129 set dummy gcc; ac_word=$2
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3131 $as_echo_n "checking for $ac_word... " >&6; }
3132 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3133 $as_echo_n "(cached) " >&6
3134 else
3135 if test -n "$ac_ct_CC"; then
3136 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3137 else
3138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3139 for as_dir in $PATH
3140 do
3141 IFS=$as_save_IFS
3142 test -z "$as_dir" && as_dir=.
3143 for ac_exec_ext in '' $ac_executable_extensions; do
3144 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3145 ac_cv_prog_ac_ct_CC="gcc"
3146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3147 break 2
3148 fi
3149 done
3150 done
3151 IFS=$as_save_IFS
3152
3153 fi
3154 fi
3155 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3156 if test -n "$ac_ct_CC"; then
3157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3158 $as_echo "$ac_ct_CC" >&6; }
3159 else
3160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3161 $as_echo "no" >&6; }
3162 fi
3163
3164 if test "x$ac_ct_CC" = x; then
3165 CC=""
3166 else
3167 case $cross_compiling:$ac_tool_warned in
3168 yes:)
3169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3170 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3171 ac_tool_warned=yes ;;
3172 esac
3173 CC=$ac_ct_CC
3174 fi
3175 else
3176 CC="$ac_cv_prog_CC"
3177 fi
3178
3179 if test -z "$CC"; then
3180 if test -n "$ac_tool_prefix"; then
3181 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3182 set dummy ${ac_tool_prefix}cc; ac_word=$2
3183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3184 $as_echo_n "checking for $ac_word... " >&6; }
3185 if ${ac_cv_prog_CC+:} false; then :
3186 $as_echo_n "(cached) " >&6
3187 else
3188 if test -n "$CC"; then
3189 ac_cv_prog_CC="$CC" # Let the user override the test.
3190 else
3191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3192 for as_dir in $PATH
3193 do
3194 IFS=$as_save_IFS
3195 test -z "$as_dir" && as_dir=.
3196 for ac_exec_ext in '' $ac_executable_extensions; do
3197 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3198 ac_cv_prog_CC="${ac_tool_prefix}cc"
3199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3200 break 2
3201 fi
3202 done
3203 done
3204 IFS=$as_save_IFS
3205
3206 fi
3207 fi
3208 CC=$ac_cv_prog_CC
3209 if test -n "$CC"; then
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3211 $as_echo "$CC" >&6; }
3212 else
3213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3214 $as_echo "no" >&6; }
3215 fi
3216
3217
3218 fi
3219 fi
3220 if test -z "$CC"; then
3221 # Extract the first word of "cc", so it can be a program name with args.
3222 set dummy cc; ac_word=$2
3223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3224 $as_echo_n "checking for $ac_word... " >&6; }
3225 if ${ac_cv_prog_CC+:} false; then :
3226 $as_echo_n "(cached) " >&6
3227 else
3228 if test -n "$CC"; then
3229 ac_cv_prog_CC="$CC" # Let the user override the test.
3230 else
3231 ac_prog_rejected=no
3232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3233 for as_dir in $PATH
3234 do
3235 IFS=$as_save_IFS
3236 test -z "$as_dir" && as_dir=.
3237 for ac_exec_ext in '' $ac_executable_extensions; do
3238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3239 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3240 ac_prog_rejected=yes
3241 continue
3242 fi
3243 ac_cv_prog_CC="cc"
3244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3245 break 2
3246 fi
3247 done
3248 done
3249 IFS=$as_save_IFS
3250
3251 if test $ac_prog_rejected = yes; then
3252 # We found a bogon in the path, so make sure we never use it.
3253 set dummy $ac_cv_prog_CC
3254 shift
3255 if test $# != 0; then
3256 # We chose a different compiler from the bogus one.
3257 # However, it has the same basename, so the bogon will be chosen
3258 # first if we set CC to just the basename; use the full file name.
3259 shift
3260 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3261 fi
3262 fi
3263 fi
3264 fi
3265 CC=$ac_cv_prog_CC
3266 if test -n "$CC"; then
3267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3268 $as_echo "$CC" >&6; }
3269 else
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3271 $as_echo "no" >&6; }
3272 fi
3273
3274
3275 fi
3276 if test -z "$CC"; then
3277 if test -n "$ac_tool_prefix"; then
3278 for ac_prog in cl.exe
3279 do
3280 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3281 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3283 $as_echo_n "checking for $ac_word... " >&6; }
3284 if ${ac_cv_prog_CC+:} false; then :
3285 $as_echo_n "(cached) " >&6
3286 else
3287 if test -n "$CC"; then
3288 ac_cv_prog_CC="$CC" # Let the user override the test.
3289 else
3290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3291 for as_dir in $PATH
3292 do
3293 IFS=$as_save_IFS
3294 test -z "$as_dir" && as_dir=.
3295 for ac_exec_ext in '' $ac_executable_extensions; do
3296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3297 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3299 break 2
3300 fi
3301 done
3302 done
3303 IFS=$as_save_IFS
3304
3305 fi
3306 fi
3307 CC=$ac_cv_prog_CC
3308 if test -n "$CC"; then
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3310 $as_echo "$CC" >&6; }
3311 else
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3313 $as_echo "no" >&6; }
3314 fi
3315
3316
3317 test -n "$CC" && break
3318 done
3319 fi
3320 if test -z "$CC"; then
3321 ac_ct_CC=$CC
3322 for ac_prog in cl.exe
3323 do
3324 # Extract the first word of "$ac_prog", so it can be a program name with args.
3325 set dummy $ac_prog; ac_word=$2
3326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3327 $as_echo_n "checking for $ac_word... " >&6; }
3328 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3329 $as_echo_n "(cached) " >&6
3330 else
3331 if test -n "$ac_ct_CC"; then
3332 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3333 else
3334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3335 for as_dir in $PATH
3336 do
3337 IFS=$as_save_IFS
3338 test -z "$as_dir" && as_dir=.
3339 for ac_exec_ext in '' $ac_executable_extensions; do
3340 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3341 ac_cv_prog_ac_ct_CC="$ac_prog"
3342 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3343 break 2
3344 fi
3345 done
3346 done
3347 IFS=$as_save_IFS
3348
3349 fi
3350 fi
3351 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3352 if test -n "$ac_ct_CC"; then
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3354 $as_echo "$ac_ct_CC" >&6; }
3355 else
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3357 $as_echo "no" >&6; }
3358 fi
3359
3360
3361 test -n "$ac_ct_CC" && break
3362 done
3363
3364 if test "x$ac_ct_CC" = x; then
3365 CC=""
3366 else
3367 case $cross_compiling:$ac_tool_warned in
3368 yes:)
3369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3370 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3371 ac_tool_warned=yes ;;
3372 esac
3373 CC=$ac_ct_CC
3374 fi
3375 fi
3376
3377 fi
3378
3379
3380 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3381 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3382 as_fn_error $? "no acceptable C compiler found in \$PATH
3383 See \`config.log' for more details" "$LINENO" 5; }
3384
3385 # Provide some information about the compiler.
3386 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3387 set X $ac_compile
3388 ac_compiler=$2
3389 for ac_option in --version -v -V -qversion; do
3390 { { ac_try="$ac_compiler $ac_option >&5"
3391 case "(($ac_try" in
3392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3393 *) ac_try_echo=$ac_try;;
3394 esac
3395 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3396 $as_echo "$ac_try_echo"; } >&5
3397 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3398 ac_status=$?
3399 if test -s conftest.err; then
3400 sed '10a\
3401 ... rest of stderr output deleted ...
3402 10q' conftest.err >conftest.er1
3403 cat conftest.er1 >&5
3404 fi
3405 rm -f conftest.er1 conftest.err
3406 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3407 test $ac_status = 0; }
3408 done
3409
3410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3411 /* end confdefs.h. */
3412
3413 int
3414 main ()
3415 {
3416
3417 ;
3418 return 0;
3419 }
3420 _ACEOF
3421 ac_clean_files_save=$ac_clean_files
3422 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3423 # Try to create an executable without -o first, disregard a.out.
3424 # It will help us diagnose broken compilers, and finding out an intuition
3425 # of exeext.
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3427 $as_echo_n "checking whether the C compiler works... " >&6; }
3428 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3429
3430 # The possible output files:
3431 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3432
3433 ac_rmfiles=
3434 for ac_file in $ac_files
3435 do
3436 case $ac_file in
3437 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3438 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3439 esac
3440 done
3441 rm -f $ac_rmfiles
3442
3443 if { { ac_try="$ac_link_default"
3444 case "(($ac_try" in
3445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3446 *) ac_try_echo=$ac_try;;
3447 esac
3448 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3449 $as_echo "$ac_try_echo"; } >&5
3450 (eval "$ac_link_default") 2>&5
3451 ac_status=$?
3452 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3453 test $ac_status = 0; }; then :
3454 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3455 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3456 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3457 # so that the user can short-circuit this test for compilers unknown to
3458 # Autoconf.
3459 for ac_file in $ac_files ''
3460 do
3461 test -f "$ac_file" || continue
3462 case $ac_file in
3463 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3464 ;;
3465 [ab].out )
3466 # We found the default executable, but exeext='' is most
3467 # certainly right.
3468 break;;
3469 *.* )
3470 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3471 then :; else
3472 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3473 fi
3474 # We set ac_cv_exeext here because the later test for it is not
3475 # safe: cross compilers may not add the suffix if given an `-o'
3476 # argument, so we may need to know it at that point already.
3477 # Even if this section looks crufty: it has the advantage of
3478 # actually working.
3479 break;;
3480 * )
3481 break;;
3482 esac
3483 done
3484 test "$ac_cv_exeext" = no && ac_cv_exeext=
3485
3486 else
3487 ac_file=''
3488 fi
3489 if test -z "$ac_file"; then :
3490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3491 $as_echo "no" >&6; }
3492 $as_echo "$as_me: failed program was:" >&5
3493 sed 's/^/| /' conftest.$ac_ext >&5
3494
3495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3496 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3497 as_fn_error 77 "C compiler cannot create executables
3498 See \`config.log' for more details" "$LINENO" 5; }
3499 else
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3501 $as_echo "yes" >&6; }
3502 fi
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3504 $as_echo_n "checking for C compiler default output file name... " >&6; }
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3506 $as_echo "$ac_file" >&6; }
3507 ac_exeext=$ac_cv_exeext
3508
3509 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3510 ac_clean_files=$ac_clean_files_save
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3512 $as_echo_n "checking for suffix of executables... " >&6; }
3513 if { { ac_try="$ac_link"
3514 case "(($ac_try" in
3515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3516 *) ac_try_echo=$ac_try;;
3517 esac
3518 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3519 $as_echo "$ac_try_echo"; } >&5
3520 (eval "$ac_link") 2>&5
3521 ac_status=$?
3522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3523 test $ac_status = 0; }; then :
3524 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3525 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3526 # work properly (i.e., refer to `conftest.exe'), while it won't with
3527 # `rm'.
3528 for ac_file in conftest.exe conftest conftest.*; do
3529 test -f "$ac_file" || continue
3530 case $ac_file in
3531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3532 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3533 break;;
3534 * ) break;;
3535 esac
3536 done
3537 else
3538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3539 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3540 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3541 See \`config.log' for more details" "$LINENO" 5; }
3542 fi
3543 rm -f conftest conftest$ac_cv_exeext
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3545 $as_echo "$ac_cv_exeext" >&6; }
3546
3547 rm -f conftest.$ac_ext
3548 EXEEXT=$ac_cv_exeext
3549 ac_exeext=$EXEEXT
3550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3551 /* end confdefs.h. */
3552 #include <stdio.h>
3553 int
3554 main ()
3555 {
3556 FILE *f = fopen ("conftest.out", "w");
3557 return ferror (f) || fclose (f) != 0;
3558
3559 ;
3560 return 0;
3561 }
3562 _ACEOF
3563 ac_clean_files="$ac_clean_files conftest.out"
3564 # Check that the compiler produces executables we can run. If not, either
3565 # the compiler is broken, or we cross compile.
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3567 $as_echo_n "checking whether we are cross compiling... " >&6; }
3568 if test "$cross_compiling" != yes; then
3569 { { ac_try="$ac_link"
3570 case "(($ac_try" in
3571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3572 *) ac_try_echo=$ac_try;;
3573 esac
3574 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3575 $as_echo "$ac_try_echo"; } >&5
3576 (eval "$ac_link") 2>&5
3577 ac_status=$?
3578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3579 test $ac_status = 0; }
3580 if { ac_try='./conftest$ac_cv_exeext'
3581 { { case "(($ac_try" in
3582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3583 *) ac_try_echo=$ac_try;;
3584 esac
3585 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3586 $as_echo "$ac_try_echo"; } >&5
3587 (eval "$ac_try") 2>&5
3588 ac_status=$?
3589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3590 test $ac_status = 0; }; }; then
3591 cross_compiling=no
3592 else
3593 if test "$cross_compiling" = maybe; then
3594 cross_compiling=yes
3595 else
3596 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3597 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3598 as_fn_error $? "cannot run C compiled programs.
3599 If you meant to cross compile, use \`--host'.
3600 See \`config.log' for more details" "$LINENO" 5; }
3601 fi
3602 fi
3603 fi
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3605 $as_echo "$cross_compiling" >&6; }
3606
3607 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3608 ac_clean_files=$ac_clean_files_save
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3610 $as_echo_n "checking for suffix of object files... " >&6; }
3611 if ${ac_cv_objext+:} false; then :
3612 $as_echo_n "(cached) " >&6
3613 else
3614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3615 /* end confdefs.h. */
3616
3617 int
3618 main ()
3619 {
3620
3621 ;
3622 return 0;
3623 }
3624 _ACEOF
3625 rm -f conftest.o conftest.obj
3626 if { { ac_try="$ac_compile"
3627 case "(($ac_try" in
3628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3629 *) ac_try_echo=$ac_try;;
3630 esac
3631 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3632 $as_echo "$ac_try_echo"; } >&5
3633 (eval "$ac_compile") 2>&5
3634 ac_status=$?
3635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3636 test $ac_status = 0; }; then :
3637 for ac_file in conftest.o conftest.obj conftest.*; do
3638 test -f "$ac_file" || continue;
3639 case $ac_file in
3640 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3641 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3642 break;;
3643 esac
3644 done
3645 else
3646 $as_echo "$as_me: failed program was:" >&5
3647 sed 's/^/| /' conftest.$ac_ext >&5
3648
3649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3650 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3651 as_fn_error $? "cannot compute suffix of object files: cannot compile
3652 See \`config.log' for more details" "$LINENO" 5; }
3653 fi
3654 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3655 fi
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3657 $as_echo "$ac_cv_objext" >&6; }
3658 OBJEXT=$ac_cv_objext
3659 ac_objext=$OBJEXT
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3661 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3662 if ${ac_cv_c_compiler_gnu+:} false; then :
3663 $as_echo_n "(cached) " >&6
3664 else
3665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3666 /* end confdefs.h. */
3667
3668 int
3669 main ()
3670 {
3671 #ifndef __GNUC__
3672 choke me
3673 #endif
3674
3675 ;
3676 return 0;
3677 }
3678 _ACEOF
3679 if ac_fn_c_try_compile "$LINENO"; then :
3680 ac_compiler_gnu=yes
3681 else
3682 ac_compiler_gnu=no
3683 fi
3684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3685 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3686
3687 fi
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3689 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3690 if test $ac_compiler_gnu = yes; then
3691 GCC=yes
3692 else
3693 GCC=
3694 fi
3695 ac_test_CFLAGS=${CFLAGS+set}
3696 ac_save_CFLAGS=$CFLAGS
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3698 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3699 if ${ac_cv_prog_cc_g+:} false; then :
3700 $as_echo_n "(cached) " >&6
3701 else
3702 ac_save_c_werror_flag=$ac_c_werror_flag
3703 ac_c_werror_flag=yes
3704 ac_cv_prog_cc_g=no
3705 CFLAGS="-g"
3706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3707 /* end confdefs.h. */
3708
3709 int
3710 main ()
3711 {
3712
3713 ;
3714 return 0;
3715 }
3716 _ACEOF
3717 if ac_fn_c_try_compile "$LINENO"; then :
3718 ac_cv_prog_cc_g=yes
3719 else
3720 CFLAGS=""
3721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3722 /* end confdefs.h. */
3723
3724 int
3725 main ()
3726 {
3727
3728 ;
3729 return 0;
3730 }
3731 _ACEOF
3732 if ac_fn_c_try_compile "$LINENO"; then :
3733
3734 else
3735 ac_c_werror_flag=$ac_save_c_werror_flag
3736 CFLAGS="-g"
3737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3738 /* end confdefs.h. */
3739
3740 int
3741 main ()
3742 {
3743
3744 ;
3745 return 0;
3746 }
3747 _ACEOF
3748 if ac_fn_c_try_compile "$LINENO"; then :
3749 ac_cv_prog_cc_g=yes
3750 fi
3751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3752 fi
3753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3754 fi
3755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3756 ac_c_werror_flag=$ac_save_c_werror_flag
3757 fi
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3759 $as_echo "$ac_cv_prog_cc_g" >&6; }
3760 if test "$ac_test_CFLAGS" = set; then
3761 CFLAGS=$ac_save_CFLAGS
3762 elif test $ac_cv_prog_cc_g = yes; then
3763 if test "$GCC" = yes; then
3764 CFLAGS="-g -O2"
3765 else
3766 CFLAGS="-g"
3767 fi
3768 else
3769 if test "$GCC" = yes; then
3770 CFLAGS="-O2"
3771 else
3772 CFLAGS=
3773 fi
3774 fi
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3776 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3777 if ${ac_cv_prog_cc_c89+:} false; then :
3778 $as_echo_n "(cached) " >&6
3779 else
3780 ac_cv_prog_cc_c89=no
3781 ac_save_CC=$CC
3782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3783 /* end confdefs.h. */
3784 #include <stdarg.h>
3785 #include <stdio.h>
3786 struct stat;
3787 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3788 struct buf { int x; };
3789 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3790 static char *e (p, i)
3791 char **p;
3792 int i;
3793 {
3794 return p[i];
3795 }
3796 static char *f (char * (*g) (char **, int), char **p, ...)
3797 {
3798 char *s;
3799 va_list v;
3800 va_start (v,p);
3801 s = g (p, va_arg (v,int));
3802 va_end (v);
3803 return s;
3804 }
3805
3806 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3807 function prototypes and stuff, but not '\xHH' hex character constants.
3808 These don't provoke an error unfortunately, instead are silently treated
3809 as 'x'. The following induces an error, until -std is added to get
3810 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3811 array size at least. It's necessary to write '\x00'==0 to get something
3812 that's true only with -std. */
3813 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3814
3815 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3816 inside strings and character constants. */
3817 #define FOO(x) 'x'
3818 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3819
3820 int test (int i, double x);
3821 struct s1 {int (*f) (int a);};
3822 struct s2 {int (*f) (double a);};
3823 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3824 int argc;
3825 char **argv;
3826 int
3827 main ()
3828 {
3829 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3830 ;
3831 return 0;
3832 }
3833 _ACEOF
3834 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3835 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3836 do
3837 CC="$ac_save_CC $ac_arg"
3838 if ac_fn_c_try_compile "$LINENO"; then :
3839 ac_cv_prog_cc_c89=$ac_arg
3840 fi
3841 rm -f core conftest.err conftest.$ac_objext
3842 test "x$ac_cv_prog_cc_c89" != "xno" && break
3843 done
3844 rm -f conftest.$ac_ext
3845 CC=$ac_save_CC
3846
3847 fi
3848 # AC_CACHE_VAL
3849 case "x$ac_cv_prog_cc_c89" in
3850 x)
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3852 $as_echo "none needed" >&6; } ;;
3853 xno)
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3855 $as_echo "unsupported" >&6; } ;;
3856 *)
3857 CC="$CC $ac_cv_prog_cc_c89"
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3859 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3860 esac
3861 if test "x$ac_cv_prog_cc_c89" != xno; then :
3862
3863 fi
3864
3865 ac_ext=c
3866 ac_cpp='$CPP $CPPFLAGS'
3867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3870 DEPDIR="${am__leading_dot}deps"
3871
3872 ac_config_commands="$ac_config_commands depfiles"
3873
3874
3875 am_make=${MAKE-make}
3876 cat > confinc << 'END'
3877 am__doit:
3878 @echo this is the am__doit target
3879 .PHONY: am__doit
3880 END
3881 # If we don't find an include directive, just comment out the code.
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3883 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3884 am__include="#"
3885 am__quote=
3886 _am_result=none
3887 # First try GNU make style include.
3888 echo "include confinc" > confmf
3889 # Ignore all kinds of additional output from 'make'.
3890 case `$am_make -s -f confmf 2> /dev/null` in #(
3891 *the\ am__doit\ target*)
3892 am__include=include
3893 am__quote=
3894 _am_result=GNU
3895 ;;
3896 esac
3897 # Now try BSD make style include.
3898 if test "$am__include" = "#"; then
3899 echo '.include "confinc"' > confmf
3900 case `$am_make -s -f confmf 2> /dev/null` in #(
3901 *the\ am__doit\ target*)
3902 am__include=.include
3903 am__quote="\""
3904 _am_result=BSD
3905 ;;
3906 esac
3907 fi
3908
3909
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3911 $as_echo "$_am_result" >&6; }
3912 rm -f confinc confmf
3913
3914 # Check whether --enable-dependency-tracking was given.
3915 if test "${enable_dependency_tracking+set}" = set; then :
3916 enableval=$enable_dependency_tracking;
3917 fi
3918
3919 if test "x$enable_dependency_tracking" != xno; then
3920 am_depcomp="$ac_aux_dir/depcomp"
3921 AMDEPBACKSLASH='\'
3922 am__nodep='_no'
3923 fi
3924 if test "x$enable_dependency_tracking" != xno; then
3925 AMDEP_TRUE=
3926 AMDEP_FALSE='#'
3927 else
3928 AMDEP_TRUE='#'
3929 AMDEP_FALSE=
3930 fi
3931
3932
3933
3934 depcc="$CC" am_compiler_list=
3935
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
3937 $as_echo_n "checking dependency style of $depcc... " >&6; }
3938 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
3939 $as_echo_n "(cached) " >&6
3940 else
3941 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3942 # We make a subdir and do the tests there. Otherwise we can end up
3943 # making bogus files that we don't know about and never remove. For
3944 # instance it was reported that on HP-UX the gcc test will end up
3945 # making a dummy file named 'D' -- because '-MD' means "put the output
3946 # in D".
3947 rm -rf conftest.dir
3948 mkdir conftest.dir
3949 # Copy depcomp to subdir because otherwise we won't find it if we're
3950 # using a relative directory.
3951 cp "$am_depcomp" conftest.dir
3952 cd conftest.dir
3953 # We will build objects and dependencies in a subdirectory because
3954 # it helps to detect inapplicable dependency modes. For instance
3955 # both Tru64's cc and ICC support -MD to output dependencies as a
3956 # side effect of compilation, but ICC will put the dependencies in
3957 # the current directory while Tru64 will put them in the object
3958 # directory.
3959 mkdir sub
3960
3961 am_cv_CC_dependencies_compiler_type=none
3962 if test "$am_compiler_list" = ""; then
3963 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3964 fi
3965 am__universal=false
3966 case " $depcc " in #(
3967 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3968 esac
3969
3970 for depmode in $am_compiler_list; do
3971 # Setup a source with many dependencies, because some compilers
3972 # like to wrap large dependency lists on column 80 (with \), and
3973 # we should not choose a depcomp mode which is confused by this.
3974 #
3975 # We need to recreate these files for each test, as the compiler may
3976 # overwrite some of them when testing with obscure command lines.
3977 # This happens at least with the AIX C compiler.
3978 : > sub/conftest.c
3979 for i in 1 2 3 4 5 6; do
3980 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3981 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3982 # Solaris 10 /bin/sh.
3983 echo '/* dummy */' > sub/conftst$i.h
3984 done
3985 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3986
3987 # We check with '-c' and '-o' for the sake of the "dashmstdout"
3988 # mode. It turns out that the SunPro C++ compiler does not properly
3989 # handle '-M -o', and we need to detect this. Also, some Intel
3990 # versions had trouble with output in subdirs.
3991 am__obj=sub/conftest.${OBJEXT-o}
3992 am__minus_obj="-o $am__obj"
3993 case $depmode in
3994 gcc)
3995 # This depmode causes a compiler race in universal mode.
3996 test "$am__universal" = false || continue
3997 ;;
3998 nosideeffect)
3999 # After this tag, mechanisms are not by side-effect, so they'll
4000 # only be used when explicitly requested.
4001 if test "x$enable_dependency_tracking" = xyes; then
4002 continue
4003 else
4004 break
4005 fi
4006 ;;
4007 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4008 # This compiler won't grok '-c -o', but also, the minuso test has
4009 # not run yet. These depmodes are late enough in the game, and
4010 # so weak that their functioning should not be impacted.
4011 am__obj=conftest.${OBJEXT-o}
4012 am__minus_obj=
4013 ;;
4014 none) break ;;
4015 esac
4016 if depmode=$depmode \
4017 source=sub/conftest.c object=$am__obj \
4018 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4019 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4020 >/dev/null 2>conftest.err &&
4021 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4022 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4023 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4024 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4025 # icc doesn't choke on unknown options, it will just issue warnings
4026 # or remarks (even with -Werror). So we grep stderr for any message
4027 # that says an option was ignored or not supported.
4028 # When given -MP, icc 7.0 and 7.1 complain thusly:
4029 # icc: Command line warning: ignoring option '-M'; no argument required
4030 # The diagnosis changed in icc 8.0:
4031 # icc: Command line remark: option '-MP' not supported
4032 if (grep 'ignoring option' conftest.err ||
4033 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4034 am_cv_CC_dependencies_compiler_type=$depmode
4035 break
4036 fi
4037 fi
4038 done
4039
4040 cd ..
4041 rm -rf conftest.dir
4042 else
4043 am_cv_CC_dependencies_compiler_type=none
4044 fi
4045
4046 fi
4047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4048 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4049 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4050
4051 if
4052 test "x$enable_dependency_tracking" != xno \
4053 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4054 am__fastdepCC_TRUE=
4055 am__fastdepCC_FALSE='#'
4056 else
4057 am__fastdepCC_TRUE='#'
4058 am__fastdepCC_FALSE=
4059 fi
4060
4061
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4063 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4064 if ${ac_cv_prog_cc_c99+:} false; then :
4065 $as_echo_n "(cached) " >&6
4066 else
4067 ac_cv_prog_cc_c99=no
4068 ac_save_CC=$CC
4069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4070 /* end confdefs.h. */
4071 #include <stdarg.h>
4072 #include <stdbool.h>
4073 #include <stdlib.h>
4074 #include <wchar.h>
4075 #include <stdio.h>
4076
4077 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4078 #define debug(...) fprintf (stderr, __VA_ARGS__)
4079 #define showlist(...) puts (#__VA_ARGS__)
4080 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4081 static void
4082 test_varargs_macros (void)
4083 {
4084 int x = 1234;
4085 int y = 5678;
4086 debug ("Flag");
4087 debug ("X = %d\n", x);
4088 showlist (The first, second, and third items.);
4089 report (x>y, "x is %d but y is %d", x, y);
4090 }
4091
4092 // Check long long types.
4093 #define BIG64 18446744073709551615ull
4094 #define BIG32 4294967295ul
4095 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4096 #if !BIG_OK
4097 your preprocessor is broken;
4098 #endif
4099 #if BIG_OK
4100 #else
4101 your preprocessor is broken;
4102 #endif
4103 static long long int bignum = -9223372036854775807LL;
4104 static unsigned long long int ubignum = BIG64;
4105
4106 struct incomplete_array
4107 {
4108 int datasize;
4109 double data[];
4110 };
4111
4112 struct named_init {
4113 int number;
4114 const wchar_t *name;
4115 double average;
4116 };
4117
4118 typedef const char *ccp;
4119
4120 static inline int
4121 test_restrict (ccp restrict text)
4122 {
4123 // See if C++-style comments work.
4124 // Iterate through items via the restricted pointer.
4125 // Also check for declarations in for loops.
4126 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4127 continue;
4128 return 0;
4129 }
4130
4131 // Check varargs and va_copy.
4132 static void
4133 test_varargs (const char *format, ...)
4134 {
4135 va_list args;
4136 va_start (args, format);
4137 va_list args_copy;
4138 va_copy (args_copy, args);
4139
4140 const char *str;
4141 int number;
4142 float fnumber;
4143
4144 while (*format)
4145 {
4146 switch (*format++)
4147 {
4148 case 's': // string
4149 str = va_arg (args_copy, const char *);
4150 break;
4151 case 'd': // int
4152 number = va_arg (args_copy, int);
4153 break;
4154 case 'f': // float
4155 fnumber = va_arg (args_copy, double);
4156 break;
4157 default:
4158 break;
4159 }
4160 }
4161 va_end (args_copy);
4162 va_end (args);
4163 }
4164
4165 int
4166 main ()
4167 {
4168
4169 // Check bool.
4170 _Bool success = false;
4171
4172 // Check restrict.
4173 if (test_restrict ("String literal") == 0)
4174 success = true;
4175 char *restrict newvar = "Another string";
4176
4177 // Check varargs.
4178 test_varargs ("s, d' f .", "string", 65, 34.234);
4179 test_varargs_macros ();
4180
4181 // Check flexible array members.
4182 struct incomplete_array *ia =
4183 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4184 ia->datasize = 10;
4185 for (int i = 0; i < ia->datasize; ++i)
4186 ia->data[i] = i * 1.234;
4187
4188 // Check named initializers.
4189 struct named_init ni = {
4190 .number = 34,
4191 .name = L"Test wide string",
4192 .average = 543.34343,
4193 };
4194
4195 ni.number = 58;
4196
4197 int dynamic_array[ni.number];
4198 dynamic_array[ni.number - 1] = 543;
4199
4200 // work around unused variable warnings
4201 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4202 || dynamic_array[ni.number - 1] != 543);
4203
4204 ;
4205 return 0;
4206 }
4207 _ACEOF
4208 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4209 do
4210 CC="$ac_save_CC $ac_arg"
4211 if ac_fn_c_try_compile "$LINENO"; then :
4212 ac_cv_prog_cc_c99=$ac_arg
4213 fi
4214 rm -f core conftest.err conftest.$ac_objext
4215 test "x$ac_cv_prog_cc_c99" != "xno" && break
4216 done
4217 rm -f conftest.$ac_ext
4218 CC=$ac_save_CC
4219
4220 fi
4221 # AC_CACHE_VAL
4222 case "x$ac_cv_prog_cc_c99" in
4223 x)
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4225 $as_echo "none needed" >&6; } ;;
4226 xno)
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4228 $as_echo "unsupported" >&6; } ;;
4229 *)
4230 CC="$CC $ac_cv_prog_cc_c99"
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4232 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4233 esac
4234 if test "x$ac_cv_prog_cc_c99" != xno; then :
4235
4236 fi
4237
4238
4239 if test "x$CC" != xcc; then
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4241 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
4242 else
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4244 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4245 fi
4246 set dummy $CC; ac_cc=`$as_echo "$2" |
4247 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4248 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
4249 $as_echo_n "(cached) " >&6
4250 else
4251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4252 /* end confdefs.h. */
4253
4254 int
4255 main ()
4256 {
4257
4258 ;
4259 return 0;
4260 }
4261 _ACEOF
4262 # Make sure it works both with $CC and with simple cc.
4263 # We do the test twice because some compilers refuse to overwrite an
4264 # existing .o file with -o, though they will create one.
4265 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4266 rm -f conftest2.*
4267 if { { case "(($ac_try" in
4268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4269 *) ac_try_echo=$ac_try;;
4270 esac
4271 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4272 $as_echo "$ac_try_echo"; } >&5
4273 (eval "$ac_try") 2>&5
4274 ac_status=$?
4275 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4276 test $ac_status = 0; } &&
4277 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4279 *) ac_try_echo=$ac_try;;
4280 esac
4281 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4282 $as_echo "$ac_try_echo"; } >&5
4283 (eval "$ac_try") 2>&5
4284 ac_status=$?
4285 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4286 test $ac_status = 0; };
4287 then
4288 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
4289 if test "x$CC" != xcc; then
4290 # Test first that cc exists at all.
4291 if { ac_try='cc -c conftest.$ac_ext >&5'
4292 { { case "(($ac_try" in
4293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4294 *) ac_try_echo=$ac_try;;
4295 esac
4296 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4297 $as_echo "$ac_try_echo"; } >&5
4298 (eval "$ac_try") 2>&5
4299 ac_status=$?
4300 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4301 test $ac_status = 0; }; }; then
4302 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4303 rm -f conftest2.*
4304 if { { case "(($ac_try" in
4305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4306 *) ac_try_echo=$ac_try;;
4307 esac
4308 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4309 $as_echo "$ac_try_echo"; } >&5
4310 (eval "$ac_try") 2>&5
4311 ac_status=$?
4312 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4313 test $ac_status = 0; } &&
4314 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4316 *) ac_try_echo=$ac_try;;
4317 esac
4318 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4319 $as_echo "$ac_try_echo"; } >&5
4320 (eval "$ac_try") 2>&5
4321 ac_status=$?
4322 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4323 test $ac_status = 0; };
4324 then
4325 # cc works too.
4326 :
4327 else
4328 # cc exists but doesn't like -o.
4329 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4330 fi
4331 fi
4332 fi
4333 else
4334 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4335 fi
4336 rm -f core conftest*
4337
4338 fi
4339 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
4340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4341 $as_echo "yes" >&6; }
4342 else
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4344 $as_echo "no" >&6; }
4345
4346 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
4347
4348 fi
4349
4350 # FIXME: we rely on the cache variable name because
4351 # there is no other way.
4352 set dummy $CC
4353 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4354 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
4355 if test "$am_t" != yes; then
4356 # Losing compiler, so override with the script.
4357 # FIXME: It is wrong to rewrite CC.
4358 # But if we don't then we get into trouble of one sort or another.
4359 # A longer-term fix would be to have automake use am__CC in this case,
4360 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4361 CC="$am_aux_dir/compile $CC"
4362 fi
4363
4364
4365 case `pwd` in
4366 *\ * | *\ *)
4367 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
4368 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
4369 esac
4370
4371
4372
4373 macro_version='2.4'
4374 macro_revision='1.3293'
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388 ltmain="$ac_aux_dir/ltmain.sh"
4389
4390 # Make sure we can run config.sub.
4391 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4392 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4393
4394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4395 $as_echo_n "checking build system type... " >&6; }
4396 if ${ac_cv_build+:} false; then :
4397 $as_echo_n "(cached) " >&6
4398 else
4399 ac_build_alias=$build_alias
4400 test "x$ac_build_alias" = x &&
4401 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4402 test "x$ac_build_alias" = x &&
4403 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4404 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4405 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4406
4407 fi
4408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4409 $as_echo "$ac_cv_build" >&6; }
4410 case $ac_cv_build in
4411 *-*-*) ;;
4412 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4413 esac
4414 build=$ac_cv_build
4415 ac_save_IFS=$IFS; IFS='-'
4416 set x $ac_cv_build
4417 shift
4418 build_cpu=$1
4419 build_vendor=$2
4420 shift; shift
4421 # Remember, the first character of IFS is used to create $*,
4422 # except with old shells:
4423 build_os=$*
4424 IFS=$ac_save_IFS
4425 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4426
4427
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4429 $as_echo_n "checking host system type... " >&6; }
4430 if ${ac_cv_host+:} false; then :
4431 $as_echo_n "(cached) " >&6
4432 else
4433 if test "x$host_alias" = x; then
4434 ac_cv_host=$ac_cv_build
4435 else
4436 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4437 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4438 fi
4439
4440 fi
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4442 $as_echo "$ac_cv_host" >&6; }
4443 case $ac_cv_host in
4444 *-*-*) ;;
4445 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4446 esac
4447 host=$ac_cv_host
4448 ac_save_IFS=$IFS; IFS='-'
4449 set x $ac_cv_host
4450 shift
4451 host_cpu=$1
4452 host_vendor=$2
4453 shift; shift
4454 # Remember, the first character of IFS is used to create $*,
4455 # except with old shells:
4456 host_os=$*
4457 IFS=$ac_save_IFS
4458 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4459
4460
4461 # Backslashify metacharacters that are still active within
4462 # double-quoted strings.
4463 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
4464
4465 # Same as above, but do not quote variable references.
4466 double_quote_subst='s/\(["`\\]\)/\\\1/g'
4467
4468 # Sed substitution to delay expansion of an escaped shell variable in a
4469 # double_quote_subst'ed string.
4470 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4471
4472 # Sed substitution to delay expansion of an escaped single quote.
4473 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
4474
4475 # Sed substitution to avoid accidental globbing in evaled expressions
4476 no_glob_subst='s/\*/\\\*/g'
4477
4478 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4479 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4480 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4481
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
4483 $as_echo_n "checking how to print strings... " >&6; }
4484 # Test print first, because it will be a builtin if present.
4485 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4486 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
4487 ECHO='print -r --'
4488 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
4489 ECHO='printf %s\n'
4490 else
4491 # Use this function as a fallback that always works.
4492 func_fallback_echo ()
4493 {
4494 eval 'cat <<_LTECHO_EOF
4495 $1
4496 _LTECHO_EOF'
4497 }
4498 ECHO='func_fallback_echo'
4499 fi
4500
4501 # func_echo_all arg...
4502 # Invoke $ECHO with all args, space-separated.
4503 func_echo_all ()
4504 {
4505 $ECHO ""
4506 }
4507
4508 case "$ECHO" in
4509 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
4510 $as_echo "printf" >&6; } ;;
4511 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
4512 $as_echo "print -r" >&6; } ;;
4513 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
4514 $as_echo "cat" >&6; } ;;
4515 esac
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4531 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
4532 if ${ac_cv_path_SED+:} false; then :
4533 $as_echo_n "(cached) " >&6
4534 else
4535 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4536 for ac_i in 1 2 3 4 5 6 7; do
4537 ac_script="$ac_script$as_nl$ac_script"
4538 done
4539 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4540 { ac_script=; unset ac_script;}
4541 if test -z "$SED"; then
4542 ac_path_SED_found=false
4543 # Loop through the user's path and test for each of PROGNAME-LIST
4544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4545 for as_dir in $PATH
4546 do
4547 IFS=$as_save_IFS
4548 test -z "$as_dir" && as_dir=.
4549 for ac_prog in sed gsed; do
4550 for ac_exec_ext in '' $ac_executable_extensions; do
4551 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4552 as_fn_executable_p "$ac_path_SED" || continue
4553 # Check for GNU ac_path_SED and select it if it is found.
4554 # Check for GNU $ac_path_SED
4555 case `"$ac_path_SED" --version 2>&1` in
4556 *GNU*)
4557 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4558 *)
4559 ac_count=0
4560 $as_echo_n 0123456789 >"conftest.in"
4561 while :
4562 do
4563 cat "conftest.in" "conftest.in" >"conftest.tmp"
4564 mv "conftest.tmp" "conftest.in"
4565 cp "conftest.in" "conftest.nl"
4566 $as_echo '' >> "conftest.nl"
4567 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4568 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4569 as_fn_arith $ac_count + 1 && ac_count=$as_val
4570 if test $ac_count -gt ${ac_path_SED_max-0}; then
4571 # Best one so far, save it but keep looking for a better one
4572 ac_cv_path_SED="$ac_path_SED"
4573 ac_path_SED_max=$ac_count
4574 fi
4575 # 10*(2^10) chars as input seems more than enough
4576 test $ac_count -gt 10 && break
4577 done
4578 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4579 esac
4580
4581 $ac_path_SED_found && break 3
4582 done
4583 done
4584 done
4585 IFS=$as_save_IFS
4586 if test -z "$ac_cv_path_SED"; then
4587 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4588 fi
4589 else
4590 ac_cv_path_SED=$SED
4591 fi
4592
4593 fi
4594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4595 $as_echo "$ac_cv_path_SED" >&6; }
4596 SED="$ac_cv_path_SED"
4597 rm -f conftest.sed
4598
4599 test -z "$SED" && SED=sed
4600 Xsed="$SED -e 1s/^X//"
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4613 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4614 if ${ac_cv_path_GREP+:} false; then :
4615 $as_echo_n "(cached) " >&6
4616 else
4617 if test -z "$GREP"; then
4618 ac_path_GREP_found=false
4619 # Loop through the user's path and test for each of PROGNAME-LIST
4620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4621 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4622 do
4623 IFS=$as_save_IFS
4624 test -z "$as_dir" && as_dir=.
4625 for ac_prog in grep ggrep; do
4626 for ac_exec_ext in '' $ac_executable_extensions; do
4627 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4628 as_fn_executable_p "$ac_path_GREP" || continue
4629 # Check for GNU ac_path_GREP and select it if it is found.
4630 # Check for GNU $ac_path_GREP
4631 case `"$ac_path_GREP" --version 2>&1` in
4632 *GNU*)
4633 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4634 *)
4635 ac_count=0
4636 $as_echo_n 0123456789 >"conftest.in"
4637 while :
4638 do
4639 cat "conftest.in" "conftest.in" >"conftest.tmp"
4640 mv "conftest.tmp" "conftest.in"
4641 cp "conftest.in" "conftest.nl"
4642 $as_echo 'GREP' >> "conftest.nl"
4643 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4644 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4645 as_fn_arith $ac_count + 1 && ac_count=$as_val
4646 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4647 # Best one so far, save it but keep looking for a better one
4648 ac_cv_path_GREP="$ac_path_GREP"
4649 ac_path_GREP_max=$ac_count
4650 fi
4651 # 10*(2^10) chars as input seems more than enough
4652 test $ac_count -gt 10 && break
4653 done
4654 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4655 esac
4656
4657 $ac_path_GREP_found && break 3
4658 done
4659 done
4660 done
4661 IFS=$as_save_IFS
4662 if test -z "$ac_cv_path_GREP"; then
4663 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4664 fi
4665 else
4666 ac_cv_path_GREP=$GREP
4667 fi
4668
4669 fi
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4671 $as_echo "$ac_cv_path_GREP" >&6; }
4672 GREP="$ac_cv_path_GREP"
4673
4674
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4676 $as_echo_n "checking for egrep... " >&6; }
4677 if ${ac_cv_path_EGREP+:} false; then :
4678 $as_echo_n "(cached) " >&6
4679 else
4680 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4681 then ac_cv_path_EGREP="$GREP -E"
4682 else
4683 if test -z "$EGREP"; then
4684 ac_path_EGREP_found=false
4685 # Loop through the user's path and test for each of PROGNAME-LIST
4686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4687 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4688 do
4689 IFS=$as_save_IFS
4690 test -z "$as_dir" && as_dir=.
4691 for ac_prog in egrep; do
4692 for ac_exec_ext in '' $ac_executable_extensions; do
4693 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4694 as_fn_executable_p "$ac_path_EGREP" || continue
4695 # Check for GNU ac_path_EGREP and select it if it is found.
4696 # Check for GNU $ac_path_EGREP
4697 case `"$ac_path_EGREP" --version 2>&1` in
4698 *GNU*)
4699 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4700 *)
4701 ac_count=0
4702 $as_echo_n 0123456789 >"conftest.in"
4703 while :
4704 do
4705 cat "conftest.in" "conftest.in" >"conftest.tmp"
4706 mv "conftest.tmp" "conftest.in"
4707 cp "conftest.in" "conftest.nl"
4708 $as_echo 'EGREP' >> "conftest.nl"
4709 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4710 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4711 as_fn_arith $ac_count + 1 && ac_count=$as_val
4712 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4713 # Best one so far, save it but keep looking for a better one
4714 ac_cv_path_EGREP="$ac_path_EGREP"
4715 ac_path_EGREP_max=$ac_count
4716 fi
4717 # 10*(2^10) chars as input seems more than enough
4718 test $ac_count -gt 10 && break
4719 done
4720 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4721 esac
4722
4723 $ac_path_EGREP_found && break 3
4724 done
4725 done
4726 done
4727 IFS=$as_save_IFS
4728 if test -z "$ac_cv_path_EGREP"; then
4729 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4730 fi
4731 else
4732 ac_cv_path_EGREP=$EGREP
4733 fi
4734
4735 fi
4736 fi
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4738 $as_echo "$ac_cv_path_EGREP" >&6; }
4739 EGREP="$ac_cv_path_EGREP"
4740
4741
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4743 $as_echo_n "checking for fgrep... " >&6; }
4744 if ${ac_cv_path_FGREP+:} false; then :
4745 $as_echo_n "(cached) " >&6
4746 else
4747 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4748 then ac_cv_path_FGREP="$GREP -F"
4749 else
4750 if test -z "$FGREP"; then
4751 ac_path_FGREP_found=false
4752 # Loop through the user's path and test for each of PROGNAME-LIST
4753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4755 do
4756 IFS=$as_save_IFS
4757 test -z "$as_dir" && as_dir=.
4758 for ac_prog in fgrep; do
4759 for ac_exec_ext in '' $ac_executable_extensions; do
4760 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
4761 as_fn_executable_p "$ac_path_FGREP" || continue
4762 # Check for GNU ac_path_FGREP and select it if it is found.
4763 # Check for GNU $ac_path_FGREP
4764 case `"$ac_path_FGREP" --version 2>&1` in
4765 *GNU*)
4766 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4767 *)
4768 ac_count=0
4769 $as_echo_n 0123456789 >"conftest.in"
4770 while :
4771 do
4772 cat "conftest.in" "conftest.in" >"conftest.tmp"
4773 mv "conftest.tmp" "conftest.in"
4774 cp "conftest.in" "conftest.nl"
4775 $as_echo 'FGREP' >> "conftest.nl"
4776 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4777 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4778 as_fn_arith $ac_count + 1 && ac_count=$as_val
4779 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4780 # Best one so far, save it but keep looking for a better one
4781 ac_cv_path_FGREP="$ac_path_FGREP"
4782 ac_path_FGREP_max=$ac_count
4783 fi
4784 # 10*(2^10) chars as input seems more than enough
4785 test $ac_count -gt 10 && break
4786 done
4787 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4788 esac
4789
4790 $ac_path_FGREP_found && break 3
4791 done
4792 done
4793 done
4794 IFS=$as_save_IFS
4795 if test -z "$ac_cv_path_FGREP"; then
4796 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4797 fi
4798 else
4799 ac_cv_path_FGREP=$FGREP
4800 fi
4801
4802 fi
4803 fi
4804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4805 $as_echo "$ac_cv_path_FGREP" >&6; }
4806 FGREP="$ac_cv_path_FGREP"
4807
4808
4809 test -z "$GREP" && GREP=grep
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829 # Check whether --with-gnu-ld was given.
4830 if test "${with_gnu_ld+set}" = set; then :
4831 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
4832 else
4833 with_gnu_ld=no
4834 fi
4835
4836 ac_prog=ld
4837 if test "$GCC" = yes; then
4838 # Check if gcc -print-prog-name=ld gives a path.
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
4840 $as_echo_n "checking for ld used by $CC... " >&6; }
4841 case $host in
4842 *-*-mingw*)
4843 # gcc leaves a trailing carriage return which upsets mingw
4844 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4845 *)
4846 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4847 esac
4848 case $ac_prog in
4849 # Accept absolute paths.
4850 [\\/]* | ?:[\\/]*)
4851 re_direlt='/[^/][^/]*/\.\./'
4852 # Canonicalize the pathname of ld
4853 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4854 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4855 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4856 done
4857 test -z "$LD" && LD="$ac_prog"
4858 ;;
4859 "")
4860 # If it fails, then pretend we aren't using GCC.
4861 ac_prog=ld
4862 ;;
4863 *)
4864 # If it is relative, then search for the first ld in PATH.
4865 with_gnu_ld=unknown
4866 ;;
4867 esac
4868 elif test "$with_gnu_ld" = yes; then
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4870 $as_echo_n "checking for GNU ld... " >&6; }
4871 else
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
4873 $as_echo_n "checking for non-GNU ld... " >&6; }
4874 fi
4875 if ${lt_cv_path_LD+:} false; then :
4876 $as_echo_n "(cached) " >&6
4877 else
4878 if test -z "$LD"; then
4879 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4880 for ac_dir in $PATH; do
4881 IFS="$lt_save_ifs"
4882 test -z "$ac_dir" && ac_dir=.
4883 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4884 lt_cv_path_LD="$ac_dir/$ac_prog"
4885 # Check to see if the program is GNU ld. I'd rather use --version,
4886 # but apparently some variants of GNU ld only accept -v.
4887 # Break only if it was the GNU/non-GNU ld that we prefer.
4888 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4889 *GNU* | *'with BFD'*)
4890 test "$with_gnu_ld" != no && break
4891 ;;
4892 *)
4893 test "$with_gnu_ld" != yes && break
4894 ;;
4895 esac
4896 fi
4897 done
4898 IFS="$lt_save_ifs"
4899 else
4900 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4901 fi
4902 fi
4903
4904 LD="$lt_cv_path_LD"
4905 if test -n "$LD"; then
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
4907 $as_echo "$LD" >&6; }
4908 else
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910 $as_echo "no" >&6; }
4911 fi
4912 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
4914 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
4915 if ${lt_cv_prog_gnu_ld+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917 else
4918 # I'd rather use --version here, but apparently some GNU lds only accept -v.
4919 case `$LD -v 2>&1 </dev/null` in
4920 *GNU* | *'with BFD'*)
4921 lt_cv_prog_gnu_ld=yes
4922 ;;
4923 *)
4924 lt_cv_prog_gnu_ld=no
4925 ;;
4926 esac
4927 fi
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
4929 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
4930 with_gnu_ld=$lt_cv_prog_gnu_ld
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
4941 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
4942 if ${lt_cv_path_NM+:} false; then :
4943 $as_echo_n "(cached) " >&6
4944 else
4945 if test -n "$NM"; then
4946 # Let the user override the test.
4947 lt_cv_path_NM="$NM"
4948 else
4949 lt_nm_to_check="${ac_tool_prefix}nm"
4950 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4951 lt_nm_to_check="$lt_nm_to_check nm"
4952 fi
4953 for lt_tmp_nm in $lt_nm_to_check; do
4954 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4955 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4956 IFS="$lt_save_ifs"
4957 test -z "$ac_dir" && ac_dir=.
4958 tmp_nm="$ac_dir/$lt_tmp_nm"
4959 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4960 # Check to see if the nm accepts a BSD-compat flag.
4961 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4962 # nm: unknown option "B" ignored
4963 # Tru64's nm complains that /dev/null is an invalid object file
4964 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4965 */dev/null* | *'Invalid file or object type'*)
4966 lt_cv_path_NM="$tmp_nm -B"
4967 break
4968 ;;
4969 *)
4970 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4971 */dev/null*)
4972 lt_cv_path_NM="$tmp_nm -p"
4973 break
4974 ;;
4975 *)
4976 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4977 continue # so that we can try to find one that supports BSD flags
4978 ;;
4979 esac
4980 ;;
4981 esac
4982 fi
4983 done
4984 IFS="$lt_save_ifs"
4985 done
4986 : ${lt_cv_path_NM=no}
4987 fi
4988 fi
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
4990 $as_echo "$lt_cv_path_NM" >&6; }
4991 if test "$lt_cv_path_NM" != "no"; then
4992 NM="$lt_cv_path_NM"
4993 else
4994 # Didn't find any BSD compatible name lister, look for dumpbin.
4995 if test -n "$DUMPBIN"; then :
4996 # Let the user override the test.
4997 else
4998 if test -n "$ac_tool_prefix"; then
4999 for ac_prog in dumpbin "link -dump"
5000 do
5001 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5002 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004 $as_echo_n "checking for $ac_word... " >&6; }
5005 if ${ac_cv_prog_DUMPBIN+:} false; then :
5006 $as_echo_n "(cached) " >&6
5007 else
5008 if test -n "$DUMPBIN"; then
5009 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
5010 else
5011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012 for as_dir in $PATH
5013 do
5014 IFS=$as_save_IFS
5015 test -z "$as_dir" && as_dir=.
5016 for ac_exec_ext in '' $ac_executable_extensions; do
5017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5018 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020 break 2
5021 fi
5022 done
5023 done
5024 IFS=$as_save_IFS
5025
5026 fi
5027 fi
5028 DUMPBIN=$ac_cv_prog_DUMPBIN
5029 if test -n "$DUMPBIN"; then
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
5031 $as_echo "$DUMPBIN" >&6; }
5032 else
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5034 $as_echo "no" >&6; }
5035 fi
5036
5037
5038 test -n "$DUMPBIN" && break
5039 done
5040 fi
5041 if test -z "$DUMPBIN"; then
5042 ac_ct_DUMPBIN=$DUMPBIN
5043 for ac_prog in dumpbin "link -dump"
5044 do
5045 # Extract the first word of "$ac_prog", so it can be a program name with args.
5046 set dummy $ac_prog; ac_word=$2
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5048 $as_echo_n "checking for $ac_word... " >&6; }
5049 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
5050 $as_echo_n "(cached) " >&6
5051 else
5052 if test -n "$ac_ct_DUMPBIN"; then
5053 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
5054 else
5055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5056 for as_dir in $PATH
5057 do
5058 IFS=$as_save_IFS
5059 test -z "$as_dir" && as_dir=.
5060 for ac_exec_ext in '' $ac_executable_extensions; do
5061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5062 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5064 break 2
5065 fi
5066 done
5067 done
5068 IFS=$as_save_IFS
5069
5070 fi
5071 fi
5072 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
5073 if test -n "$ac_ct_DUMPBIN"; then
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
5075 $as_echo "$ac_ct_DUMPBIN" >&6; }
5076 else
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078 $as_echo "no" >&6; }
5079 fi
5080
5081
5082 test -n "$ac_ct_DUMPBIN" && break
5083 done
5084
5085 if test "x$ac_ct_DUMPBIN" = x; then
5086 DUMPBIN=":"
5087 else
5088 case $cross_compiling:$ac_tool_warned in
5089 yes:)
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5091 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5092 ac_tool_warned=yes ;;
5093 esac
5094 DUMPBIN=$ac_ct_DUMPBIN
5095 fi
5096 fi
5097
5098 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5099 *COFF*)
5100 DUMPBIN="$DUMPBIN -symbols"
5101 ;;
5102 *)
5103 DUMPBIN=:
5104 ;;
5105 esac
5106 fi
5107
5108 if test "$DUMPBIN" != ":"; then
5109 NM="$DUMPBIN"
5110 fi
5111 fi
5112 test -z "$NM" && NM=nm
5113
5114
5115
5116
5117
5118
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
5120 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
5121 if ${lt_cv_nm_interface+:} false; then :
5122 $as_echo_n "(cached) " >&6
5123 else
5124 lt_cv_nm_interface="BSD nm"
5125 echo "int some_variable = 0;" > conftest.$ac_ext
5126 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
5127 (eval "$ac_compile" 2>conftest.err)
5128 cat conftest.err >&5
5129 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5130 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5131 cat conftest.err >&5
5132 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
5133 cat conftest.out >&5
5134 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5135 lt_cv_nm_interface="MS dumpbin"
5136 fi
5137 rm -f conftest*
5138 fi
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
5140 $as_echo "$lt_cv_nm_interface" >&6; }
5141
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5143 $as_echo_n "checking whether ln -s works... " >&6; }
5144 LN_S=$as_ln_s
5145 if test "$LN_S" = "ln -s"; then
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5147 $as_echo "yes" >&6; }
5148 else
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5150 $as_echo "no, using $LN_S" >&6; }
5151 fi
5152
5153 # find the maximum length of command line arguments
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
5155 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
5156 if ${lt_cv_sys_max_cmd_len+:} false; then :
5157 $as_echo_n "(cached) " >&6
5158 else
5159 i=0
5160 teststring="ABCD"
5161
5162 case $build_os in
5163 msdosdjgpp*)
5164 # On DJGPP, this test can blow up pretty badly due to problems in libc
5165 # (any single argument exceeding 2000 bytes causes a buffer overrun
5166 # during glob expansion). Even if it were fixed, the result of this
5167 # check would be larger than it should be.
5168 lt_cv_sys_max_cmd_len=12288; # 12K is about right
5169 ;;
5170
5171 gnu*)
5172 # Under GNU Hurd, this test is not required because there is
5173 # no limit to the length of command line arguments.
5174 # Libtool will interpret -1 as no limit whatsoever
5175 lt_cv_sys_max_cmd_len=-1;
5176 ;;
5177
5178 cygwin* | mingw* | cegcc*)
5179 # On Win9x/ME, this test blows up -- it succeeds, but takes
5180 # about 5 minutes as the teststring grows exponentially.
5181 # Worse, since 9x/ME are not pre-emptively multitasking,
5182 # you end up with a "frozen" computer, even though with patience
5183 # the test eventually succeeds (with a max line length of 256k).
5184 # Instead, let's just punt: use the minimum linelength reported by
5185 # all of the supported platforms: 8192 (on NT/2K/XP).
5186 lt_cv_sys_max_cmd_len=8192;
5187 ;;
5188
5189 mint*)
5190 # On MiNT this can take a long time and run out of memory.
5191 lt_cv_sys_max_cmd_len=8192;
5192 ;;
5193
5194 amigaos*)
5195 # On AmigaOS with pdksh, this test takes hours, literally.
5196 # So we just punt and use a minimum line length of 8192.
5197 lt_cv_sys_max_cmd_len=8192;
5198 ;;
5199
5200 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
5201 # This has been around since 386BSD, at least. Likely further.
5202 if test -x /sbin/sysctl; then
5203 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5204 elif test -x /usr/sbin/sysctl; then
5205 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5206 else
5207 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
5208 fi
5209 # And add a safety zone
5210 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5211 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5212 ;;
5213
5214 interix*)
5215 # We know the value 262144 and hardcode it with a safety zone (like BSD)
5216 lt_cv_sys_max_cmd_len=196608
5217 ;;
5218
5219 osf*)
5220 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5221 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5222 # nice to cause kernel panics so lets avoid the loop below.
5223 # First set a reasonable default.
5224 lt_cv_sys_max_cmd_len=16384
5225 #
5226 if test -x /sbin/sysconfig; then
5227 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5228 *1*) lt_cv_sys_max_cmd_len=-1 ;;
5229 esac
5230 fi
5231 ;;
5232 sco3.2v5*)
5233 lt_cv_sys_max_cmd_len=102400
5234 ;;
5235 sysv5* | sco5v6* | sysv4.2uw2*)
5236 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5237 if test -n "$kargmax"; then
5238 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
5239 else
5240 lt_cv_sys_max_cmd_len=32768
5241 fi
5242 ;;
5243 *)
5244 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
5245 if test -n "$lt_cv_sys_max_cmd_len"; then
5246 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5247 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5248 else
5249 # Make teststring a little bigger before we do anything with it.
5250 # a 1K string should be a reasonable start.
5251 for i in 1 2 3 4 5 6 7 8 ; do
5252 teststring=$teststring$teststring
5253 done
5254 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5255 # If test is not a shell built-in, we'll probably end up computing a
5256 # maximum length that is only half of the actual maximum length, but
5257 # we can't tell.
5258 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
5259 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
5260 test $i != 17 # 1/2 MB should be enough
5261 do
5262 i=`expr $i + 1`
5263 teststring=$teststring$teststring
5264 done
5265 # Only check the string length outside the loop.
5266 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
5267 teststring=
5268 # Add a significant safety factor because C++ compilers can tack on
5269 # massive amounts of additional arguments before passing them to the
5270 # linker. It appears as though 1/2 is a usable value.
5271 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5272 fi
5273 ;;
5274 esac
5275
5276 fi
5277
5278 if test -n $lt_cv_sys_max_cmd_len ; then
5279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
5280 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
5281 else
5282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5283 $as_echo "none" >&6; }
5284 fi
5285 max_cmd_len=$lt_cv_sys_max_cmd_len
5286
5287
5288
5289
5290
5291
5292 : ${CP="cp -f"}
5293 : ${MV="mv -f"}
5294 : ${RM="rm -f"}
5295
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
5297 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
5298 # Try some XSI features
5299 xsi_shell=no
5300 ( _lt_dummy="a/b/c"
5301 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
5302 = c,a/b,b/c, \
5303 && eval 'test $(( 1 + 1 )) -eq 2 \
5304 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
5305 && xsi_shell=yes
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
5307 $as_echo "$xsi_shell" >&6; }
5308
5309
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
5311 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
5312 lt_shell_append=no
5313 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
5314 >/dev/null 2>&1 \
5315 && lt_shell_append=yes
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
5317 $as_echo "$lt_shell_append" >&6; }
5318
5319
5320 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
5321 lt_unset=unset
5322 else
5323 lt_unset=false
5324 fi
5325
5326
5327
5328
5329
5330 # test EBCDIC or ASCII
5331 case `echo X|tr X '\101'` in
5332 A) # ASCII based system
5333 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
5334 lt_SP2NL='tr \040 \012'
5335 lt_NL2SP='tr \015\012 \040\040'
5336 ;;
5337 *) # EBCDIC based system
5338 lt_SP2NL='tr \100 \n'
5339 lt_NL2SP='tr \r\n \100\100'
5340 ;;
5341 esac
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
5352 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
5353 if ${lt_cv_to_host_file_cmd+:} false; then :
5354 $as_echo_n "(cached) " >&6
5355 else
5356 case $host in
5357 *-*-mingw* )
5358 case $build in
5359 *-*-mingw* ) # actually msys
5360 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
5361 ;;
5362 *-*-cygwin* )
5363 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
5364 ;;
5365 * ) # otherwise, assume *nix
5366 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
5367 ;;
5368 esac
5369 ;;
5370 *-*-cygwin* )
5371 case $build in
5372 *-*-mingw* ) # actually msys
5373 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
5374 ;;
5375 *-*-cygwin* )
5376 lt_cv_to_host_file_cmd=func_convert_file_noop
5377 ;;
5378 * ) # otherwise, assume *nix
5379 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
5380 ;;
5381 esac
5382 ;;
5383 * ) # unhandled hosts (and "normal" native builds)
5384 lt_cv_to_host_file_cmd=func_convert_file_noop
5385 ;;
5386 esac
5387
5388 fi
5389
5390 to_host_file_cmd=$lt_cv_to_host_file_cmd
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
5392 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
5393
5394
5395
5396
5397
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
5399 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
5400 if ${lt_cv_to_tool_file_cmd+:} false; then :
5401 $as_echo_n "(cached) " >&6
5402 else
5403 #assume ordinary cross tools, or native build.
5404 lt_cv_to_tool_file_cmd=func_convert_file_noop
5405 case $host in
5406 *-*-mingw* )
5407 case $build in
5408 *-*-mingw* ) # actually msys
5409 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
5410 ;;
5411 esac
5412 ;;
5413 esac
5414
5415 fi
5416
5417 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
5419 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
5420
5421
5422
5423
5424
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
5426 $as_echo_n "checking for $LD option to reload object files... " >&6; }
5427 if ${lt_cv_ld_reload_flag+:} false; then :
5428 $as_echo_n "(cached) " >&6
5429 else
5430 lt_cv_ld_reload_flag='-r'
5431 fi
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
5433 $as_echo "$lt_cv_ld_reload_flag" >&6; }
5434 reload_flag=$lt_cv_ld_reload_flag
5435 case $reload_flag in
5436 "" | " "*) ;;
5437 *) reload_flag=" $reload_flag" ;;
5438 esac
5439 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5440 case $host_os in
5441 cygwin* | mingw* | pw32* | cegcc*)
5442 if test "$GCC" != yes; then
5443 reload_cmds=false
5444 fi
5445 ;;
5446 darwin*)
5447 if test "$GCC" = yes; then
5448 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5449 else
5450 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5451 fi
5452 ;;
5453 esac
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463 if test -n "$ac_tool_prefix"; then
5464 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
5465 set dummy ${ac_tool_prefix}objdump; ac_word=$2
5466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5467 $as_echo_n "checking for $ac_word... " >&6; }
5468 if ${ac_cv_prog_OBJDUMP+:} false; then :
5469 $as_echo_n "(cached) " >&6
5470 else
5471 if test -n "$OBJDUMP"; then
5472 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
5473 else
5474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475 for as_dir in $PATH
5476 do
5477 IFS=$as_save_IFS
5478 test -z "$as_dir" && as_dir=.
5479 for ac_exec_ext in '' $ac_executable_extensions; do
5480 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5481 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5482 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483 break 2
5484 fi
5485 done
5486 done
5487 IFS=$as_save_IFS
5488
5489 fi
5490 fi
5491 OBJDUMP=$ac_cv_prog_OBJDUMP
5492 if test -n "$OBJDUMP"; then
5493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
5494 $as_echo "$OBJDUMP" >&6; }
5495 else
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497 $as_echo "no" >&6; }
5498 fi
5499
5500
5501 fi
5502 if test -z "$ac_cv_prog_OBJDUMP"; then
5503 ac_ct_OBJDUMP=$OBJDUMP
5504 # Extract the first word of "objdump", so it can be a program name with args.
5505 set dummy objdump; ac_word=$2
5506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5507 $as_echo_n "checking for $ac_word... " >&6; }
5508 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
5509 $as_echo_n "(cached) " >&6
5510 else
5511 if test -n "$ac_ct_OBJDUMP"; then
5512 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
5513 else
5514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5515 for as_dir in $PATH
5516 do
5517 IFS=$as_save_IFS
5518 test -z "$as_dir" && as_dir=.
5519 for ac_exec_ext in '' $ac_executable_extensions; do
5520 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5521 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5523 break 2
5524 fi
5525 done
5526 done
5527 IFS=$as_save_IFS
5528
5529 fi
5530 fi
5531 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
5532 if test -n "$ac_ct_OBJDUMP"; then
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
5534 $as_echo "$ac_ct_OBJDUMP" >&6; }
5535 else
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537 $as_echo "no" >&6; }
5538 fi
5539
5540 if test "x$ac_ct_OBJDUMP" = x; then
5541 OBJDUMP="false"
5542 else
5543 case $cross_compiling:$ac_tool_warned in
5544 yes:)
5545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5546 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5547 ac_tool_warned=yes ;;
5548 esac
5549 OBJDUMP=$ac_ct_OBJDUMP
5550 fi
5551 else
5552 OBJDUMP="$ac_cv_prog_OBJDUMP"
5553 fi
5554
5555 test -z "$OBJDUMP" && OBJDUMP=objdump
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
5566 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
5567 if ${lt_cv_deplibs_check_method+:} false; then :
5568 $as_echo_n "(cached) " >&6
5569 else
5570 lt_cv_file_magic_cmd='$MAGIC_CMD'
5571 lt_cv_file_magic_test_file=
5572 lt_cv_deplibs_check_method='unknown'
5573 # Need to set the preceding variable on all platforms that support
5574 # interlibrary dependencies.
5575 # 'none' -- dependencies not supported.
5576 # `unknown' -- same as none, but documents that we really don't know.
5577 # 'pass_all' -- all dependencies passed with no checks.
5578 # 'test_compile' -- check by making test program.
5579 # 'file_magic [[regex]]' -- check by looking for files in library path
5580 # which responds to the $file_magic_cmd with a given extended regex.
5581 # If you have `file' or equivalent on your system and you're not sure
5582 # whether `pass_all' will *always* work, you probably want this one.
5583
5584 case $host_os in
5585 aix[4-9]*)
5586 lt_cv_deplibs_check_method=pass_all
5587 ;;
5588
5589 beos*)
5590 lt_cv_deplibs_check_method=pass_all
5591 ;;
5592
5593 bsdi[45]*)
5594 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5595 lt_cv_file_magic_cmd='/usr/bin/file -L'
5596 lt_cv_file_magic_test_file=/shlib/libc.so
5597 ;;
5598
5599 cygwin*)
5600 # func_win32_libid is a shell function defined in ltmain.sh
5601 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5602 lt_cv_file_magic_cmd='func_win32_libid'
5603 ;;
5604
5605 mingw* | pw32*)
5606 # Base MSYS/MinGW do not provide the 'file' command needed by
5607 # func_win32_libid shell function, so use a weaker test based on 'objdump',
5608 # unless we find 'file', for example because we are cross-compiling.
5609 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5610 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5611 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5612 lt_cv_file_magic_cmd='func_win32_libid'
5613 else
5614 # Keep this pattern in sync with the one in func_win32_libid.
5615 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5616 lt_cv_file_magic_cmd='$OBJDUMP -f'
5617 fi
5618 ;;
5619
5620 cegcc*)
5621 # use the weaker test based on 'objdump'. See mingw*.
5622 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5623 lt_cv_file_magic_cmd='$OBJDUMP -f'
5624 ;;
5625
5626 darwin* | rhapsody*)
5627 lt_cv_deplibs_check_method=pass_all
5628 ;;
5629
5630 freebsd* | dragonfly*)
5631 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5632 case $host_cpu in
5633 i*86 )
5634 # Not sure whether the presence of OpenBSD here was a mistake.
5635 # Let's accept both of them until this is cleared up.
5636 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5637 lt_cv_file_magic_cmd=/usr/bin/file
5638 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5639 ;;
5640 esac
5641 else
5642 lt_cv_deplibs_check_method=pass_all
5643 fi
5644 ;;
5645
5646 gnu*)
5647 lt_cv_deplibs_check_method=pass_all
5648 ;;
5649
5650 haiku*)
5651 lt_cv_deplibs_check_method=pass_all
5652 ;;
5653
5654 hpux10.20* | hpux11*)
5655 lt_cv_file_magic_cmd=/usr/bin/file
5656 case $host_cpu in
5657 ia64*)
5658 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5659 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5660 ;;
5661 hppa*64*)
5662 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
5663 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5664 ;;
5665 *)
5666 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
5667 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5668 ;;
5669 esac
5670 ;;
5671
5672 interix[3-9]*)
5673 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5674 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
5675 ;;
5676
5677 irix5* | irix6* | nonstopux*)
5678 case $LD in
5679 *-32|*"-32 ") libmagic=32-bit;;
5680 *-n32|*"-n32 ") libmagic=N32;;
5681 *-64|*"-64 ") libmagic=64-bit;;
5682 *) libmagic=never-match;;
5683 esac
5684 lt_cv_deplibs_check_method=pass_all
5685 ;;
5686
5687 # This must be Linux ELF.
5688 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5689 lt_cv_deplibs_check_method=pass_all
5690 ;;
5691
5692 netbsd*)
5693 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5694 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5695 else
5696 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5697 fi
5698 ;;
5699
5700 newos6*)
5701 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5702 lt_cv_file_magic_cmd=/usr/bin/file
5703 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5704 ;;
5705
5706 *nto* | *qnx*)
5707 lt_cv_deplibs_check_method=pass_all
5708 ;;
5709
5710 openbsd*)
5711 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5712 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5713 else
5714 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5715 fi
5716 ;;
5717
5718 osf3* | osf4* | osf5*)
5719 lt_cv_deplibs_check_method=pass_all
5720 ;;
5721
5722 rdos*)
5723 lt_cv_deplibs_check_method=pass_all
5724 ;;
5725
5726 solaris*)
5727 lt_cv_deplibs_check_method=pass_all
5728 ;;
5729
5730 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5731 lt_cv_deplibs_check_method=pass_all
5732 ;;
5733
5734 sysv4 | sysv4.3*)
5735 case $host_vendor in
5736 motorola)
5737 lt_cv_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]'
5738 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5739 ;;
5740 ncr)
5741 lt_cv_deplibs_check_method=pass_all
5742 ;;
5743 sequent)
5744 lt_cv_file_magic_cmd='/bin/file'
5745 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5746 ;;
5747 sni)
5748 lt_cv_file_magic_cmd='/bin/file'
5749 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5750 lt_cv_file_magic_test_file=/lib/libc.so
5751 ;;
5752 siemens)
5753 lt_cv_deplibs_check_method=pass_all
5754 ;;
5755 pc)
5756 lt_cv_deplibs_check_method=pass_all
5757 ;;
5758 esac
5759 ;;
5760
5761 tpf*)
5762 lt_cv_deplibs_check_method=pass_all
5763 ;;
5764 esac
5765
5766 fi
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
5768 $as_echo "$lt_cv_deplibs_check_method" >&6; }
5769
5770 file_magic_glob=
5771 want_nocaseglob=no
5772 if test "$build" = "$host"; then
5773 case $host_os in
5774 mingw* | pw32*)
5775 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5776 want_nocaseglob=yes
5777 else
5778 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
5779 fi
5780 ;;
5781 esac
5782 fi
5783
5784 file_magic_cmd=$lt_cv_file_magic_cmd
5785 deplibs_check_method=$lt_cv_deplibs_check_method
5786 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809 if test -n "$ac_tool_prefix"; then
5810 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5811 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5813 $as_echo_n "checking for $ac_word... " >&6; }
5814 if ${ac_cv_prog_DLLTOOL+:} false; then :
5815 $as_echo_n "(cached) " >&6
5816 else
5817 if test -n "$DLLTOOL"; then
5818 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5819 else
5820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5821 for as_dir in $PATH
5822 do
5823 IFS=$as_save_IFS
5824 test -z "$as_dir" && as_dir=.
5825 for ac_exec_ext in '' $ac_executable_extensions; do
5826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5827 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5829 break 2
5830 fi
5831 done
5832 done
5833 IFS=$as_save_IFS
5834
5835 fi
5836 fi
5837 DLLTOOL=$ac_cv_prog_DLLTOOL
5838 if test -n "$DLLTOOL"; then
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5840 $as_echo "$DLLTOOL" >&6; }
5841 else
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5843 $as_echo "no" >&6; }
5844 fi
5845
5846
5847 fi
5848 if test -z "$ac_cv_prog_DLLTOOL"; then
5849 ac_ct_DLLTOOL=$DLLTOOL
5850 # Extract the first word of "dlltool", so it can be a program name with args.
5851 set dummy dlltool; ac_word=$2
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5853 $as_echo_n "checking for $ac_word... " >&6; }
5854 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
5855 $as_echo_n "(cached) " >&6
5856 else
5857 if test -n "$ac_ct_DLLTOOL"; then
5858 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5859 else
5860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861 for as_dir in $PATH
5862 do
5863 IFS=$as_save_IFS
5864 test -z "$as_dir" && as_dir=.
5865 for ac_exec_ext in '' $ac_executable_extensions; do
5866 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869 break 2
5870 fi
5871 done
5872 done
5873 IFS=$as_save_IFS
5874
5875 fi
5876 fi
5877 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5878 if test -n "$ac_ct_DLLTOOL"; then
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5880 $as_echo "$ac_ct_DLLTOOL" >&6; }
5881 else
5882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5883 $as_echo "no" >&6; }
5884 fi
5885
5886 if test "x$ac_ct_DLLTOOL" = x; then
5887 DLLTOOL="false"
5888 else
5889 case $cross_compiling:$ac_tool_warned in
5890 yes:)
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5892 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5893 ac_tool_warned=yes ;;
5894 esac
5895 DLLTOOL=$ac_ct_DLLTOOL
5896 fi
5897 else
5898 DLLTOOL="$ac_cv_prog_DLLTOOL"
5899 fi
5900
5901 test -z "$DLLTOOL" && DLLTOOL=dlltool
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
5913 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
5914 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
5915 $as_echo_n "(cached) " >&6
5916 else
5917 lt_cv_sharedlib_from_linklib_cmd='unknown'
5918
5919 case $host_os in
5920 cygwin* | mingw* | pw32* | cegcc*)
5921 # two different shell functions defined in ltmain.sh
5922 # decide which to use based on capabilities of $DLLTOOL
5923 case `$DLLTOOL --help 2>&1` in
5924 *--identify-strict*)
5925 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5926 ;;
5927 *)
5928 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5929 ;;
5930 esac
5931 ;;
5932 *)
5933 # fallback: assume linklib IS sharedlib
5934 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
5935 ;;
5936 esac
5937
5938 fi
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
5940 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
5941 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5942 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5943
5944
5945
5946
5947
5948
5949
5950
5951 if test -n "$ac_tool_prefix"; then
5952 for ac_prog in ar
5953 do
5954 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5955 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5957 $as_echo_n "checking for $ac_word... " >&6; }
5958 if ${ac_cv_prog_AR+:} false; then :
5959 $as_echo_n "(cached) " >&6
5960 else
5961 if test -n "$AR"; then
5962 ac_cv_prog_AR="$AR" # Let the user override the test.
5963 else
5964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5965 for as_dir in $PATH
5966 do
5967 IFS=$as_save_IFS
5968 test -z "$as_dir" && as_dir=.
5969 for ac_exec_ext in '' $ac_executable_extensions; do
5970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5971 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
5972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5973 break 2
5974 fi
5975 done
5976 done
5977 IFS=$as_save_IFS
5978
5979 fi
5980 fi
5981 AR=$ac_cv_prog_AR
5982 if test -n "$AR"; then
5983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5984 $as_echo "$AR" >&6; }
5985 else
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5987 $as_echo "no" >&6; }
5988 fi
5989
5990
5991 test -n "$AR" && break
5992 done
5993 fi
5994 if test -z "$AR"; then
5995 ac_ct_AR=$AR
5996 for ac_prog in ar
5997 do
5998 # Extract the first word of "$ac_prog", so it can be a program name with args.
5999 set dummy $ac_prog; ac_word=$2
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6001 $as_echo_n "checking for $ac_word... " >&6; }
6002 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6003 $as_echo_n "(cached) " >&6
6004 else
6005 if test -n "$ac_ct_AR"; then
6006 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6007 else
6008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6009 for as_dir in $PATH
6010 do
6011 IFS=$as_save_IFS
6012 test -z "$as_dir" && as_dir=.
6013 for ac_exec_ext in '' $ac_executable_extensions; do
6014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6015 ac_cv_prog_ac_ct_AR="$ac_prog"
6016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6017 break 2
6018 fi
6019 done
6020 done
6021 IFS=$as_save_IFS
6022
6023 fi
6024 fi
6025 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6026 if test -n "$ac_ct_AR"; then
6027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6028 $as_echo "$ac_ct_AR" >&6; }
6029 else
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6031 $as_echo "no" >&6; }
6032 fi
6033
6034
6035 test -n "$ac_ct_AR" && break
6036 done
6037
6038 if test "x$ac_ct_AR" = x; then
6039 AR="false"
6040 else
6041 case $cross_compiling:$ac_tool_warned in
6042 yes:)
6043 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6044 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6045 ac_tool_warned=yes ;;
6046 esac
6047 AR=$ac_ct_AR
6048 fi
6049 fi
6050
6051 : ${AR=ar}
6052 : ${AR_FLAGS=cru}
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
6065 $as_echo_n "checking for archiver @FILE support... " >&6; }
6066 if ${lt_cv_ar_at_file+:} false; then :
6067 $as_echo_n "(cached) " >&6
6068 else
6069 lt_cv_ar_at_file=no
6070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6071 /* end confdefs.h. */
6072
6073 int
6074 main ()
6075 {
6076
6077 ;
6078 return 0;
6079 }
6080 _ACEOF
6081 if ac_fn_c_try_compile "$LINENO"; then :
6082 echo conftest.$ac_objext > conftest.lst
6083 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
6084 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6085 (eval $lt_ar_try) 2>&5
6086 ac_status=$?
6087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6088 test $ac_status = 0; }
6089 if test "$ac_status" -eq 0; then
6090 # Ensure the archiver fails upon bogus file names.
6091 rm -f conftest.$ac_objext libconftest.a
6092 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6093 (eval $lt_ar_try) 2>&5
6094 ac_status=$?
6095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6096 test $ac_status = 0; }
6097 if test "$ac_status" -ne 0; then
6098 lt_cv_ar_at_file=@
6099 fi
6100 fi
6101 rm -f conftest.* libconftest.a
6102
6103 fi
6104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6105
6106 fi
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
6108 $as_echo "$lt_cv_ar_at_file" >&6; }
6109
6110 if test "x$lt_cv_ar_at_file" = xno; then
6111 archiver_list_spec=
6112 else
6113 archiver_list_spec=$lt_cv_ar_at_file
6114 fi
6115
6116
6117
6118
6119
6120
6121
6122 if test -n "$ac_tool_prefix"; then
6123 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6124 set dummy ${ac_tool_prefix}strip; ac_word=$2
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126 $as_echo_n "checking for $ac_word... " >&6; }
6127 if ${ac_cv_prog_STRIP+:} false; then :
6128 $as_echo_n "(cached) " >&6
6129 else
6130 if test -n "$STRIP"; then
6131 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6132 else
6133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134 for as_dir in $PATH
6135 do
6136 IFS=$as_save_IFS
6137 test -z "$as_dir" && as_dir=.
6138 for ac_exec_ext in '' $ac_executable_extensions; do
6139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6140 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142 break 2
6143 fi
6144 done
6145 done
6146 IFS=$as_save_IFS
6147
6148 fi
6149 fi
6150 STRIP=$ac_cv_prog_STRIP
6151 if test -n "$STRIP"; then
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6153 $as_echo "$STRIP" >&6; }
6154 else
6155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6156 $as_echo "no" >&6; }
6157 fi
6158
6159
6160 fi
6161 if test -z "$ac_cv_prog_STRIP"; then
6162 ac_ct_STRIP=$STRIP
6163 # Extract the first word of "strip", so it can be a program name with args.
6164 set dummy strip; ac_word=$2
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166 $as_echo_n "checking for $ac_word... " >&6; }
6167 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6168 $as_echo_n "(cached) " >&6
6169 else
6170 if test -n "$ac_ct_STRIP"; then
6171 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6172 else
6173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174 for as_dir in $PATH
6175 do
6176 IFS=$as_save_IFS
6177 test -z "$as_dir" && as_dir=.
6178 for ac_exec_ext in '' $ac_executable_extensions; do
6179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6180 ac_cv_prog_ac_ct_STRIP="strip"
6181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6182 break 2
6183 fi
6184 done
6185 done
6186 IFS=$as_save_IFS
6187
6188 fi
6189 fi
6190 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6191 if test -n "$ac_ct_STRIP"; then
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6193 $as_echo "$ac_ct_STRIP" >&6; }
6194 else
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196 $as_echo "no" >&6; }
6197 fi
6198
6199 if test "x$ac_ct_STRIP" = x; then
6200 STRIP=":"
6201 else
6202 case $cross_compiling:$ac_tool_warned in
6203 yes:)
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6205 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6206 ac_tool_warned=yes ;;
6207 esac
6208 STRIP=$ac_ct_STRIP
6209 fi
6210 else
6211 STRIP="$ac_cv_prog_STRIP"
6212 fi
6213
6214 test -z "$STRIP" && STRIP=:
6215
6216
6217
6218
6219
6220
6221 if test -n "$ac_tool_prefix"; then
6222 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6223 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225 $as_echo_n "checking for $ac_word... " >&6; }
6226 if ${ac_cv_prog_RANLIB+:} false; then :
6227 $as_echo_n "(cached) " >&6
6228 else
6229 if test -n "$RANLIB"; then
6230 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6231 else
6232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6233 for as_dir in $PATH
6234 do
6235 IFS=$as_save_IFS
6236 test -z "$as_dir" && as_dir=.
6237 for ac_exec_ext in '' $ac_executable_extensions; do
6238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6239 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6241 break 2
6242 fi
6243 done
6244 done
6245 IFS=$as_save_IFS
6246
6247 fi
6248 fi
6249 RANLIB=$ac_cv_prog_RANLIB
6250 if test -n "$RANLIB"; then
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6252 $as_echo "$RANLIB" >&6; }
6253 else
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255 $as_echo "no" >&6; }
6256 fi
6257
6258
6259 fi
6260 if test -z "$ac_cv_prog_RANLIB"; then
6261 ac_ct_RANLIB=$RANLIB
6262 # Extract the first word of "ranlib", so it can be a program name with args.
6263 set dummy ranlib; ac_word=$2
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6265 $as_echo_n "checking for $ac_word... " >&6; }
6266 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6267 $as_echo_n "(cached) " >&6
6268 else
6269 if test -n "$ac_ct_RANLIB"; then
6270 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6271 else
6272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273 for as_dir in $PATH
6274 do
6275 IFS=$as_save_IFS
6276 test -z "$as_dir" && as_dir=.
6277 for ac_exec_ext in '' $ac_executable_extensions; do
6278 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6279 ac_cv_prog_ac_ct_RANLIB="ranlib"
6280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6281 break 2
6282 fi
6283 done
6284 done
6285 IFS=$as_save_IFS
6286
6287 fi
6288 fi
6289 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6290 if test -n "$ac_ct_RANLIB"; then
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6292 $as_echo "$ac_ct_RANLIB" >&6; }
6293 else
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6295 $as_echo "no" >&6; }
6296 fi
6297
6298 if test "x$ac_ct_RANLIB" = x; then
6299 RANLIB=":"
6300 else
6301 case $cross_compiling:$ac_tool_warned in
6302 yes:)
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6304 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6305 ac_tool_warned=yes ;;
6306 esac
6307 RANLIB=$ac_ct_RANLIB
6308 fi
6309 else
6310 RANLIB="$ac_cv_prog_RANLIB"
6311 fi
6312
6313 test -z "$RANLIB" && RANLIB=:
6314
6315
6316
6317
6318
6319
6320 # Determine commands to create old-style static archives.
6321 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
6322 old_postinstall_cmds='chmod 644 $oldlib'
6323 old_postuninstall_cmds=
6324
6325 if test -n "$RANLIB"; then
6326 case $host_os in
6327 openbsd*)
6328 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6329 ;;
6330 *)
6331 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6332 ;;
6333 esac
6334 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6335 fi
6336
6337 case $host_os in
6338 darwin*)
6339 lock_old_archive_extraction=yes ;;
6340 *)
6341 lock_old_archive_extraction=no ;;
6342 esac
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382 # If no C compiler was specified, use CC.
6383 LTCC=${LTCC-"$CC"}
6384
6385 # If no C compiler flags were specified, use CFLAGS.
6386 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
6387
6388 # Allow CC to be a program name with arguments.
6389 compiler=$CC
6390
6391
6392 # Check for command to grab the raw symbol name followed by C symbol from nm.
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
6394 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
6395 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
6396 $as_echo_n "(cached) " >&6
6397 else
6398
6399 # These are sane defaults that work on at least a few old systems.
6400 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
6401
6402 # Character class describing NM global symbol codes.
6403 symcode='[BCDEGRST]'
6404
6405 # Regexp to match symbols that can be accessed directly from C.
6406 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6407
6408 # Define system-specific variables.
6409 case $host_os in
6410 aix*)
6411 symcode='[BCDT]'
6412 ;;
6413 cygwin* | mingw* | pw32* | cegcc*)
6414 symcode='[ABCDGISTW]'
6415 ;;
6416 hpux*)
6417 if test "$host_cpu" = ia64; then
6418 symcode='[ABCDEGRST]'
6419 fi
6420 ;;
6421 irix* | nonstopux*)
6422 symcode='[BCDEGRST]'
6423 ;;
6424 osf*)
6425 symcode='[BCDEGQRST]'
6426 ;;
6427 solaris*)
6428 symcode='[BDRT]'
6429 ;;
6430 sco3.2v5*)
6431 symcode='[DT]'
6432 ;;
6433 sysv4.2uw2*)
6434 symcode='[DT]'
6435 ;;
6436 sysv5* | sco5v6* | unixware* | OpenUNIX*)
6437 symcode='[ABDT]'
6438 ;;
6439 sysv4)
6440 symcode='[DFNSTU]'
6441 ;;
6442 esac
6443
6444 # If we're using GNU nm, then use its standard symbol codes.
6445 case `$NM -V 2>&1` in
6446 *GNU* | *'with BFD'*)
6447 symcode='[ABCDGIRSTW]' ;;
6448 esac
6449
6450 # Transform an extracted symbol line into a proper C declaration.
6451 # Some systems (esp. on ia64) link data and code symbols differently,
6452 # so use this general approach.
6453 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6454
6455 # Transform an extracted symbol line into symbol name and symbol address
6456 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
6457 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
6458
6459 # Handle CRLF in mingw tool chain
6460 opt_cr=
6461 case $build_os in
6462 mingw*)
6463 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6464 ;;
6465 esac
6466
6467 # Try without a prefix underscore, then with it.
6468 for ac_symprfx in "" "_"; do
6469
6470 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6471 symxfrm="\\1 $ac_symprfx\\2 \\2"
6472
6473 # Write the raw and C identifiers.
6474 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6475 # Fake it for dumpbin and say T for any non-static function
6476 # and D for any global variable.
6477 # Also find C++ and __fastcall symbols from MSVC++,
6478 # which start with @ or ?.
6479 lt_cv_sys_global_symbol_pipe="$AWK '"\
6480 " {last_section=section; section=\$ 3};"\
6481 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
6482 " \$ 0!~/External *\|/{next};"\
6483 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
6484 " {if(hide[section]) next};"\
6485 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
6486 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
6487 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
6488 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
6489 " ' prfx=^$ac_symprfx"
6490 else
6491 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6492 fi
6493 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
6494
6495 # Check to see that the pipe works correctly.
6496 pipe_works=no
6497
6498 rm -f conftest*
6499 cat > conftest.$ac_ext <<_LT_EOF
6500 #ifdef __cplusplus
6501 extern "C" {
6502 #endif
6503 char nm_test_var;
6504 void nm_test_func(void);
6505 void nm_test_func(void){}
6506 #ifdef __cplusplus
6507 }
6508 #endif
6509 int main(){nm_test_var='a';nm_test_func();return(0);}
6510 _LT_EOF
6511
6512 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6513 (eval $ac_compile) 2>&5
6514 ac_status=$?
6515 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6516 test $ac_status = 0; }; then
6517 # Now try to grab the symbols.
6518 nlist=conftest.nm
6519 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
6520 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
6521 ac_status=$?
6522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6523 test $ac_status = 0; } && test -s "$nlist"; then
6524 # Try sorting and uniquifying the output.
6525 if sort "$nlist" | uniq > "$nlist"T; then
6526 mv -f "$nlist"T "$nlist"
6527 else
6528 rm -f "$nlist"T
6529 fi
6530
6531 # Make sure that we snagged all the symbols we need.
6532 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
6533 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
6534 cat <<_LT_EOF > conftest.$ac_ext
6535 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
6536 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
6537 /* DATA imports from DLLs on WIN32 con't be const, because runtime
6538 relocations are performed -- see ld's documentation on pseudo-relocs. */
6539 # define LT_DLSYM_CONST
6540 #elif defined(__osf__)
6541 /* This system does not cope well with relocations in const data. */
6542 # define LT_DLSYM_CONST
6543 #else
6544 # define LT_DLSYM_CONST const
6545 #endif
6546
6547 #ifdef __cplusplus
6548 extern "C" {
6549 #endif
6550
6551 _LT_EOF
6552 # Now generate the symbol file.
6553 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
6554
6555 cat <<_LT_EOF >> conftest.$ac_ext
6556
6557 /* The mapping between symbol names and symbols. */
6558 LT_DLSYM_CONST struct {
6559 const char *name;
6560 void *address;
6561 }
6562 lt__PROGRAM__LTX_preloaded_symbols[] =
6563 {
6564 { "@PROGRAM@", (void *) 0 },
6565 _LT_EOF
6566 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
6567 cat <<\_LT_EOF >> conftest.$ac_ext
6568 {0, (void *) 0}
6569 };
6570
6571 /* This works around a problem in FreeBSD linker */
6572 #ifdef FREEBSD_WORKAROUND
6573 static const void *lt_preloaded_setup() {
6574 return lt__PROGRAM__LTX_preloaded_symbols;
6575 }
6576 #endif
6577
6578 #ifdef __cplusplus
6579 }
6580 #endif
6581 _LT_EOF
6582 # Now try linking the two files.
6583 mv conftest.$ac_objext conftstm.$ac_objext
6584 lt_globsym_save_LIBS=$LIBS
6585 lt_globsym_save_CFLAGS=$CFLAGS
6586 LIBS="conftstm.$ac_objext"
6587 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6588 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
6589 (eval $ac_link) 2>&5
6590 ac_status=$?
6591 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6592 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
6593 pipe_works=yes
6594 fi
6595 LIBS=$lt_globsym_save_LIBS
6596 CFLAGS=$lt_globsym_save_CFLAGS
6597 else
6598 echo "cannot find nm_test_func in $nlist" >&5
6599 fi
6600 else
6601 echo "cannot find nm_test_var in $nlist" >&5
6602 fi
6603 else
6604 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6605 fi
6606 else
6607 echo "$progname: failed program was:" >&5
6608 cat conftest.$ac_ext >&5
6609 fi
6610 rm -rf conftest* conftst*
6611
6612 # Do not use the global_symbol_pipe unless it works.
6613 if test "$pipe_works" = yes; then
6614 break
6615 else
6616 lt_cv_sys_global_symbol_pipe=
6617 fi
6618 done
6619
6620 fi
6621
6622 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6623 lt_cv_sys_global_symbol_to_cdecl=
6624 fi
6625 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6627 $as_echo "failed" >&6; }
6628 else
6629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
6630 $as_echo "ok" >&6; }
6631 fi
6632
6633 # Response file support.
6634 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6635 nm_file_list_spec='@'
6636 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
6637 nm_file_list_spec='@'
6638 fi
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
6667 $as_echo_n "checking for sysroot... " >&6; }
6668
6669 # Check whether --with-sysroot was given.
6670 if test "${with_sysroot+set}" = set; then :
6671 withval=$with_sysroot;
6672 else
6673 with_sysroot=no
6674 fi
6675
6676
6677 lt_sysroot=
6678 case ${with_sysroot} in #(
6679 yes)
6680 if test "$GCC" = yes; then
6681 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
6682 fi
6683 ;; #(
6684 /*)
6685 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
6686 ;; #(
6687 no|'')
6688 ;; #(
6689 *)
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
6691 $as_echo "${with_sysroot}" >&6; }
6692 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
6693 ;;
6694 esac
6695
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
6697 $as_echo "${lt_sysroot:-no}" >&6; }
6698
6699
6700
6701
6702
6703 # Check whether --enable-libtool-lock was given.
6704 if test "${enable_libtool_lock+set}" = set; then :
6705 enableval=$enable_libtool_lock;
6706 fi
6707
6708 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6709
6710 # Some flags need to be propagated to the compiler or linker for good
6711 # libtool support.
6712 case $host in
6713 ia64-*-hpux*)
6714 # Find out which ABI we are using.
6715 echo 'int i;' > conftest.$ac_ext
6716 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6717 (eval $ac_compile) 2>&5
6718 ac_status=$?
6719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6720 test $ac_status = 0; }; then
6721 case `/usr/bin/file conftest.$ac_objext` in
6722 *ELF-32*)
6723 HPUX_IA64_MODE="32"
6724 ;;
6725 *ELF-64*)
6726 HPUX_IA64_MODE="64"
6727 ;;
6728 esac
6729 fi
6730 rm -rf conftest*
6731 ;;
6732 *-*-irix6*)
6733 # Find out which ABI we are using.
6734 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
6735 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6736 (eval $ac_compile) 2>&5
6737 ac_status=$?
6738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6739 test $ac_status = 0; }; then
6740 if test "$lt_cv_prog_gnu_ld" = yes; then
6741 case `/usr/bin/file conftest.$ac_objext` in
6742 *32-bit*)
6743 LD="${LD-ld} -melf32bsmip"
6744 ;;
6745 *N32*)
6746 LD="${LD-ld} -melf32bmipn32"
6747 ;;
6748 *64-bit*)
6749 LD="${LD-ld} -melf64bmip"
6750 ;;
6751 esac
6752 else
6753 case `/usr/bin/file conftest.$ac_objext` in
6754 *32-bit*)
6755 LD="${LD-ld} -32"
6756 ;;
6757 *N32*)
6758 LD="${LD-ld} -n32"
6759 ;;
6760 *64-bit*)
6761 LD="${LD-ld} -64"
6762 ;;
6763 esac
6764 fi
6765 fi
6766 rm -rf conftest*
6767 ;;
6768
6769 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
6770 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
6771 # Find out which ABI we are using.
6772 echo 'int i;' > conftest.$ac_ext
6773 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6774 (eval $ac_compile) 2>&5
6775 ac_status=$?
6776 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6777 test $ac_status = 0; }; then
6778 case `/usr/bin/file conftest.o` in
6779 *32-bit*)
6780 case $host in
6781 x86_64-*kfreebsd*-gnu)
6782 LD="${LD-ld} -m elf_i386_fbsd"
6783 ;;
6784 x86_64-*linux*)
6785 LD="${LD-ld} -m elf_i386"
6786 ;;
6787 ppc64-*linux*|powerpc64-*linux*)
6788 LD="${LD-ld} -m elf32ppclinux"
6789 ;;
6790 s390x-*linux*)
6791 LD="${LD-ld} -m elf_s390"
6792 ;;
6793 sparc64-*linux*)
6794 LD="${LD-ld} -m elf32_sparc"
6795 ;;
6796 esac
6797 ;;
6798 *64-bit*)
6799 case $host in
6800 x86_64-*kfreebsd*-gnu)
6801 LD="${LD-ld} -m elf_x86_64_fbsd"
6802 ;;
6803 x86_64-*linux*)
6804 LD="${LD-ld} -m elf_x86_64"
6805 ;;
6806 ppc*-*linux*|powerpc*-*linux*)
6807 LD="${LD-ld} -m elf64ppc"
6808 ;;
6809 s390*-*linux*|s390*-*tpf*)
6810 LD="${LD-ld} -m elf64_s390"
6811 ;;
6812 sparc*-*linux*)
6813 LD="${LD-ld} -m elf64_sparc"
6814 ;;
6815 esac
6816 ;;
6817 esac
6818 fi
6819 rm -rf conftest*
6820 ;;
6821
6822 *-*-sco3.2v5*)
6823 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6824 SAVE_CFLAGS="$CFLAGS"
6825 CFLAGS="$CFLAGS -belf"
6826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
6827 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
6828 if ${lt_cv_cc_needs_belf+:} false; then :
6829 $as_echo_n "(cached) " >&6
6830 else
6831 ac_ext=c
6832 ac_cpp='$CPP $CPPFLAGS'
6833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6836
6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838 /* end confdefs.h. */
6839
6840 int
6841 main ()
6842 {
6843
6844 ;
6845 return 0;
6846 }
6847 _ACEOF
6848 if ac_fn_c_try_link "$LINENO"; then :
6849 lt_cv_cc_needs_belf=yes
6850 else
6851 lt_cv_cc_needs_belf=no
6852 fi
6853 rm -f core conftest.err conftest.$ac_objext \
6854 conftest$ac_exeext conftest.$ac_ext
6855 ac_ext=c
6856 ac_cpp='$CPP $CPPFLAGS'
6857 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6858 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6859 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6860
6861 fi
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
6863 $as_echo "$lt_cv_cc_needs_belf" >&6; }
6864 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6865 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6866 CFLAGS="$SAVE_CFLAGS"
6867 fi
6868 ;;
6869 sparc*-*solaris*)
6870 # Find out which ABI we are using.
6871 echo 'int i;' > conftest.$ac_ext
6872 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6873 (eval $ac_compile) 2>&5
6874 ac_status=$?
6875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6876 test $ac_status = 0; }; then
6877 case `/usr/bin/file conftest.o` in
6878 *64-bit*)
6879 case $lt_cv_prog_gnu_ld in
6880 yes*) LD="${LD-ld} -m elf64_sparc" ;;
6881 *)
6882 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
6883 LD="${LD-ld} -64"
6884 fi
6885 ;;
6886 esac
6887 ;;
6888 esac
6889 fi
6890 rm -rf conftest*
6891 ;;
6892 esac
6893
6894 need_locks="$enable_libtool_lock"
6895
6896 if test -n "$ac_tool_prefix"; then
6897 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
6898 set dummy ${ac_tool_prefix}mt; ac_word=$2
6899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6900 $as_echo_n "checking for $ac_word... " >&6; }
6901 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
6902 $as_echo_n "(cached) " >&6
6903 else
6904 if test -n "$MANIFEST_TOOL"; then
6905 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
6906 else
6907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6908 for as_dir in $PATH
6909 do
6910 IFS=$as_save_IFS
6911 test -z "$as_dir" && as_dir=.
6912 for ac_exec_ext in '' $ac_executable_extensions; do
6913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6914 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
6915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6916 break 2
6917 fi
6918 done
6919 done
6920 IFS=$as_save_IFS
6921
6922 fi
6923 fi
6924 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
6925 if test -n "$MANIFEST_TOOL"; then
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
6927 $as_echo "$MANIFEST_TOOL" >&6; }
6928 else
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6930 $as_echo "no" >&6; }
6931 fi
6932
6933
6934 fi
6935 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
6936 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
6937 # Extract the first word of "mt", so it can be a program name with args.
6938 set dummy mt; ac_word=$2
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6940 $as_echo_n "checking for $ac_word... " >&6; }
6941 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
6942 $as_echo_n "(cached) " >&6
6943 else
6944 if test -n "$ac_ct_MANIFEST_TOOL"; then
6945 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
6946 else
6947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6948 for as_dir in $PATH
6949 do
6950 IFS=$as_save_IFS
6951 test -z "$as_dir" && as_dir=.
6952 for ac_exec_ext in '' $ac_executable_extensions; do
6953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6954 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
6955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6956 break 2
6957 fi
6958 done
6959 done
6960 IFS=$as_save_IFS
6961
6962 fi
6963 fi
6964 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
6965 if test -n "$ac_ct_MANIFEST_TOOL"; then
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
6967 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
6968 else
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6970 $as_echo "no" >&6; }
6971 fi
6972
6973 if test "x$ac_ct_MANIFEST_TOOL" = x; then
6974 MANIFEST_TOOL=":"
6975 else
6976 case $cross_compiling:$ac_tool_warned in
6977 yes:)
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6979 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6980 ac_tool_warned=yes ;;
6981 esac
6982 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
6983 fi
6984 else
6985 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
6986 fi
6987
6988 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
6989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
6990 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
6991 if ${lt_cv_path_mainfest_tool+:} false; then :
6992 $as_echo_n "(cached) " >&6
6993 else
6994 lt_cv_path_mainfest_tool=no
6995 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
6996 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
6997 cat conftest.err >&5
6998 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
6999 lt_cv_path_mainfest_tool=yes
7000 fi
7001 rm -f conftest*
7002 fi
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
7004 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
7005 if test "x$lt_cv_path_mainfest_tool" != xyes; then
7006 MANIFEST_TOOL=:
7007 fi
7008
7009
7010
7011
7012
7013
7014 case $host_os in
7015 rhapsody* | darwin*)
7016 if test -n "$ac_tool_prefix"; then
7017 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
7018 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7020 $as_echo_n "checking for $ac_word... " >&6; }
7021 if ${ac_cv_prog_DSYMUTIL+:} false; then :
7022 $as_echo_n "(cached) " >&6
7023 else
7024 if test -n "$DSYMUTIL"; then
7025 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
7026 else
7027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028 for as_dir in $PATH
7029 do
7030 IFS=$as_save_IFS
7031 test -z "$as_dir" && as_dir=.
7032 for ac_exec_ext in '' $ac_executable_extensions; do
7033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
7035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036 break 2
7037 fi
7038 done
7039 done
7040 IFS=$as_save_IFS
7041
7042 fi
7043 fi
7044 DSYMUTIL=$ac_cv_prog_DSYMUTIL
7045 if test -n "$DSYMUTIL"; then
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
7047 $as_echo "$DSYMUTIL" >&6; }
7048 else
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7050 $as_echo "no" >&6; }
7051 fi
7052
7053
7054 fi
7055 if test -z "$ac_cv_prog_DSYMUTIL"; then
7056 ac_ct_DSYMUTIL=$DSYMUTIL
7057 # Extract the first word of "dsymutil", so it can be a program name with args.
7058 set dummy dsymutil; ac_word=$2
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7060 $as_echo_n "checking for $ac_word... " >&6; }
7061 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
7062 $as_echo_n "(cached) " >&6
7063 else
7064 if test -n "$ac_ct_DSYMUTIL"; then
7065 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
7066 else
7067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7068 for as_dir in $PATH
7069 do
7070 IFS=$as_save_IFS
7071 test -z "$as_dir" && as_dir=.
7072 for ac_exec_ext in '' $ac_executable_extensions; do
7073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7074 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
7075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7076 break 2
7077 fi
7078 done
7079 done
7080 IFS=$as_save_IFS
7081
7082 fi
7083 fi
7084 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
7085 if test -n "$ac_ct_DSYMUTIL"; then
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
7087 $as_echo "$ac_ct_DSYMUTIL" >&6; }
7088 else
7089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7090 $as_echo "no" >&6; }
7091 fi
7092
7093 if test "x$ac_ct_DSYMUTIL" = x; then
7094 DSYMUTIL=":"
7095 else
7096 case $cross_compiling:$ac_tool_warned in
7097 yes:)
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7099 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7100 ac_tool_warned=yes ;;
7101 esac
7102 DSYMUTIL=$ac_ct_DSYMUTIL
7103 fi
7104 else
7105 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
7106 fi
7107
7108 if test -n "$ac_tool_prefix"; then
7109 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
7110 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
7111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7112 $as_echo_n "checking for $ac_word... " >&6; }
7113 if ${ac_cv_prog_NMEDIT+:} false; then :
7114 $as_echo_n "(cached) " >&6
7115 else
7116 if test -n "$NMEDIT"; then
7117 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
7118 else
7119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120 for as_dir in $PATH
7121 do
7122 IFS=$as_save_IFS
7123 test -z "$as_dir" && as_dir=.
7124 for ac_exec_ext in '' $ac_executable_extensions; do
7125 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7126 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
7127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7128 break 2
7129 fi
7130 done
7131 done
7132 IFS=$as_save_IFS
7133
7134 fi
7135 fi
7136 NMEDIT=$ac_cv_prog_NMEDIT
7137 if test -n "$NMEDIT"; then
7138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
7139 $as_echo "$NMEDIT" >&6; }
7140 else
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7142 $as_echo "no" >&6; }
7143 fi
7144
7145
7146 fi
7147 if test -z "$ac_cv_prog_NMEDIT"; then
7148 ac_ct_NMEDIT=$NMEDIT
7149 # Extract the first word of "nmedit", so it can be a program name with args.
7150 set dummy nmedit; ac_word=$2
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7152 $as_echo_n "checking for $ac_word... " >&6; }
7153 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155 else
7156 if test -n "$ac_ct_NMEDIT"; then
7157 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
7158 else
7159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7160 for as_dir in $PATH
7161 do
7162 IFS=$as_save_IFS
7163 test -z "$as_dir" && as_dir=.
7164 for ac_exec_ext in '' $ac_executable_extensions; do
7165 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7166 ac_cv_prog_ac_ct_NMEDIT="nmedit"
7167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7168 break 2
7169 fi
7170 done
7171 done
7172 IFS=$as_save_IFS
7173
7174 fi
7175 fi
7176 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
7177 if test -n "$ac_ct_NMEDIT"; then
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
7179 $as_echo "$ac_ct_NMEDIT" >&6; }
7180 else
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7182 $as_echo "no" >&6; }
7183 fi
7184
7185 if test "x$ac_ct_NMEDIT" = x; then
7186 NMEDIT=":"
7187 else
7188 case $cross_compiling:$ac_tool_warned in
7189 yes:)
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7191 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7192 ac_tool_warned=yes ;;
7193 esac
7194 NMEDIT=$ac_ct_NMEDIT
7195 fi
7196 else
7197 NMEDIT="$ac_cv_prog_NMEDIT"
7198 fi
7199
7200 if test -n "$ac_tool_prefix"; then
7201 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
7202 set dummy ${ac_tool_prefix}lipo; ac_word=$2
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7204 $as_echo_n "checking for $ac_word... " >&6; }
7205 if ${ac_cv_prog_LIPO+:} false; then :
7206 $as_echo_n "(cached) " >&6
7207 else
7208 if test -n "$LIPO"; then
7209 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
7210 else
7211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212 for as_dir in $PATH
7213 do
7214 IFS=$as_save_IFS
7215 test -z "$as_dir" && as_dir=.
7216 for ac_exec_ext in '' $ac_executable_extensions; do
7217 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
7219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220 break 2
7221 fi
7222 done
7223 done
7224 IFS=$as_save_IFS
7225
7226 fi
7227 fi
7228 LIPO=$ac_cv_prog_LIPO
7229 if test -n "$LIPO"; then
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
7231 $as_echo "$LIPO" >&6; }
7232 else
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7234 $as_echo "no" >&6; }
7235 fi
7236
7237
7238 fi
7239 if test -z "$ac_cv_prog_LIPO"; then
7240 ac_ct_LIPO=$LIPO
7241 # Extract the first word of "lipo", so it can be a program name with args.
7242 set dummy lipo; ac_word=$2
7243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7244 $as_echo_n "checking for $ac_word... " >&6; }
7245 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
7246 $as_echo_n "(cached) " >&6
7247 else
7248 if test -n "$ac_ct_LIPO"; then
7249 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
7250 else
7251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7252 for as_dir in $PATH
7253 do
7254 IFS=$as_save_IFS
7255 test -z "$as_dir" && as_dir=.
7256 for ac_exec_ext in '' $ac_executable_extensions; do
7257 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7258 ac_cv_prog_ac_ct_LIPO="lipo"
7259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7260 break 2
7261 fi
7262 done
7263 done
7264 IFS=$as_save_IFS
7265
7266 fi
7267 fi
7268 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
7269 if test -n "$ac_ct_LIPO"; then
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
7271 $as_echo "$ac_ct_LIPO" >&6; }
7272 else
7273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7274 $as_echo "no" >&6; }
7275 fi
7276
7277 if test "x$ac_ct_LIPO" = x; then
7278 LIPO=":"
7279 else
7280 case $cross_compiling:$ac_tool_warned in
7281 yes:)
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7283 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7284 ac_tool_warned=yes ;;
7285 esac
7286 LIPO=$ac_ct_LIPO
7287 fi
7288 else
7289 LIPO="$ac_cv_prog_LIPO"
7290 fi
7291
7292 if test -n "$ac_tool_prefix"; then
7293 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
7294 set dummy ${ac_tool_prefix}otool; ac_word=$2
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296 $as_echo_n "checking for $ac_word... " >&6; }
7297 if ${ac_cv_prog_OTOOL+:} false; then :
7298 $as_echo_n "(cached) " >&6
7299 else
7300 if test -n "$OTOOL"; then
7301 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
7302 else
7303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304 for as_dir in $PATH
7305 do
7306 IFS=$as_save_IFS
7307 test -z "$as_dir" && as_dir=.
7308 for ac_exec_ext in '' $ac_executable_extensions; do
7309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7310 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
7311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7312 break 2
7313 fi
7314 done
7315 done
7316 IFS=$as_save_IFS
7317
7318 fi
7319 fi
7320 OTOOL=$ac_cv_prog_OTOOL
7321 if test -n "$OTOOL"; then
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
7323 $as_echo "$OTOOL" >&6; }
7324 else
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7326 $as_echo "no" >&6; }
7327 fi
7328
7329
7330 fi
7331 if test -z "$ac_cv_prog_OTOOL"; then
7332 ac_ct_OTOOL=$OTOOL
7333 # Extract the first word of "otool", so it can be a program name with args.
7334 set dummy otool; ac_word=$2
7335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7336 $as_echo_n "checking for $ac_word... " >&6; }
7337 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
7338 $as_echo_n "(cached) " >&6
7339 else
7340 if test -n "$ac_ct_OTOOL"; then
7341 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
7342 else
7343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344 for as_dir in $PATH
7345 do
7346 IFS=$as_save_IFS
7347 test -z "$as_dir" && as_dir=.
7348 for ac_exec_ext in '' $ac_executable_extensions; do
7349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7350 ac_cv_prog_ac_ct_OTOOL="otool"
7351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7352 break 2
7353 fi
7354 done
7355 done
7356 IFS=$as_save_IFS
7357
7358 fi
7359 fi
7360 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
7361 if test -n "$ac_ct_OTOOL"; then
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
7363 $as_echo "$ac_ct_OTOOL" >&6; }
7364 else
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366 $as_echo "no" >&6; }
7367 fi
7368
7369 if test "x$ac_ct_OTOOL" = x; then
7370 OTOOL=":"
7371 else
7372 case $cross_compiling:$ac_tool_warned in
7373 yes:)
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7375 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7376 ac_tool_warned=yes ;;
7377 esac
7378 OTOOL=$ac_ct_OTOOL
7379 fi
7380 else
7381 OTOOL="$ac_cv_prog_OTOOL"
7382 fi
7383
7384 if test -n "$ac_tool_prefix"; then
7385 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
7386 set dummy ${ac_tool_prefix}otool64; ac_word=$2
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7388 $as_echo_n "checking for $ac_word... " >&6; }
7389 if ${ac_cv_prog_OTOOL64+:} false; then :
7390 $as_echo_n "(cached) " >&6
7391 else
7392 if test -n "$OTOOL64"; then
7393 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
7394 else
7395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7396 for as_dir in $PATH
7397 do
7398 IFS=$as_save_IFS
7399 test -z "$as_dir" && as_dir=.
7400 for ac_exec_ext in '' $ac_executable_extensions; do
7401 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7402 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
7403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7404 break 2
7405 fi
7406 done
7407 done
7408 IFS=$as_save_IFS
7409
7410 fi
7411 fi
7412 OTOOL64=$ac_cv_prog_OTOOL64
7413 if test -n "$OTOOL64"; then
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
7415 $as_echo "$OTOOL64" >&6; }
7416 else
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7418 $as_echo "no" >&6; }
7419 fi
7420
7421
7422 fi
7423 if test -z "$ac_cv_prog_OTOOL64"; then
7424 ac_ct_OTOOL64=$OTOOL64
7425 # Extract the first word of "otool64", so it can be a program name with args.
7426 set dummy otool64; ac_word=$2
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7428 $as_echo_n "checking for $ac_word... " >&6; }
7429 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
7430 $as_echo_n "(cached) " >&6
7431 else
7432 if test -n "$ac_ct_OTOOL64"; then
7433 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
7434 else
7435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7436 for as_dir in $PATH
7437 do
7438 IFS=$as_save_IFS
7439 test -z "$as_dir" && as_dir=.
7440 for ac_exec_ext in '' $ac_executable_extensions; do
7441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7442 ac_cv_prog_ac_ct_OTOOL64="otool64"
7443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7444 break 2
7445 fi
7446 done
7447 done
7448 IFS=$as_save_IFS
7449
7450 fi
7451 fi
7452 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
7453 if test -n "$ac_ct_OTOOL64"; then
7454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
7455 $as_echo "$ac_ct_OTOOL64" >&6; }
7456 else
7457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7458 $as_echo "no" >&6; }
7459 fi
7460
7461 if test "x$ac_ct_OTOOL64" = x; then
7462 OTOOL64=":"
7463 else
7464 case $cross_compiling:$ac_tool_warned in
7465 yes:)
7466 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7467 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7468 ac_tool_warned=yes ;;
7469 esac
7470 OTOOL64=$ac_ct_OTOOL64
7471 fi
7472 else
7473 OTOOL64="$ac_cv_prog_OTOOL64"
7474 fi
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
7503 $as_echo_n "checking for -single_module linker flag... " >&6; }
7504 if ${lt_cv_apple_cc_single_mod+:} false; then :
7505 $as_echo_n "(cached) " >&6
7506 else
7507 lt_cv_apple_cc_single_mod=no
7508 if test -z "${LT_MULTI_MODULE}"; then
7509 # By default we will add the -single_module flag. You can override
7510 # by either setting the environment variable LT_MULTI_MODULE
7511 # non-empty at configure time, or by adding -multi_module to the
7512 # link flags.
7513 rm -rf libconftest.dylib*
7514 echo "int foo(void){return 1;}" > conftest.c
7515 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
7516 -dynamiclib -Wl,-single_module conftest.c" >&5
7517 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
7518 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
7519 _lt_result=$?
7520 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
7521 lt_cv_apple_cc_single_mod=yes
7522 else
7523 cat conftest.err >&5
7524 fi
7525 rm -rf libconftest.dylib*
7526 rm -f conftest.*
7527 fi
7528 fi
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
7530 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
7531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
7532 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
7533 if ${lt_cv_ld_exported_symbols_list+:} false; then :
7534 $as_echo_n "(cached) " >&6
7535 else
7536 lt_cv_ld_exported_symbols_list=no
7537 save_LDFLAGS=$LDFLAGS
7538 echo "_main" > conftest.sym
7539 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
7540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7541 /* end confdefs.h. */
7542
7543 int
7544 main ()
7545 {
7546
7547 ;
7548 return 0;
7549 }
7550 _ACEOF
7551 if ac_fn_c_try_link "$LINENO"; then :
7552 lt_cv_ld_exported_symbols_list=yes
7553 else
7554 lt_cv_ld_exported_symbols_list=no
7555 fi
7556 rm -f core conftest.err conftest.$ac_objext \
7557 conftest$ac_exeext conftest.$ac_ext
7558 LDFLAGS="$save_LDFLAGS"
7559
7560 fi
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
7562 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
7564 $as_echo_n "checking for -force_load linker flag... " >&6; }
7565 if ${lt_cv_ld_force_load+:} false; then :
7566 $as_echo_n "(cached) " >&6
7567 else
7568 lt_cv_ld_force_load=no
7569 cat > conftest.c << _LT_EOF
7570 int forced_loaded() { return 2;}
7571 _LT_EOF
7572 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
7573 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
7574 echo "$AR cru libconftest.a conftest.o" >&5
7575 $AR cru libconftest.a conftest.o 2>&5
7576 echo "$RANLIB libconftest.a" >&5
7577 $RANLIB libconftest.a 2>&5
7578 cat > conftest.c << _LT_EOF
7579 int main() { return 0;}
7580 _LT_EOF
7581 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
7582 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
7583 _lt_result=$?
7584 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
7585 lt_cv_ld_force_load=yes
7586 else
7587 cat conftest.err >&5
7588 fi
7589 rm -f conftest.err libconftest.a conftest conftest.c
7590 rm -rf conftest.dSYM
7591
7592 fi
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
7594 $as_echo "$lt_cv_ld_force_load" >&6; }
7595 case $host_os in
7596 rhapsody* | darwin1.[012])
7597 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
7598 darwin1.*)
7599 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
7600 darwin*) # darwin 5.x on
7601 # if running on 10.5 or later, the deployment target defaults
7602 # to the OS version, if on x86, and 10.4, the deployment
7603 # target defaults to 10.4. Don't you love it?
7604 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
7605 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
7606 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
7607 10.[012]*)
7608 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
7609 10.*)
7610 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
7611 esac
7612 ;;
7613 esac
7614 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
7615 _lt_dar_single_mod='$single_module'
7616 fi
7617 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
7618 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
7619 else
7620 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
7621 fi
7622 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
7623 _lt_dsymutil='~$DSYMUTIL $lib || :'
7624 else
7625 _lt_dsymutil=
7626 fi
7627 ;;
7628 esac
7629
7630 ac_ext=c
7631 ac_cpp='$CPP $CPPFLAGS'
7632 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7633 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7634 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7636 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7637 # On Suns, sometimes $CPP names a directory.
7638 if test -n "$CPP" && test -d "$CPP"; then
7639 CPP=
7640 fi
7641 if test -z "$CPP"; then
7642 if ${ac_cv_prog_CPP+:} false; then :
7643 $as_echo_n "(cached) " >&6
7644 else
7645 # Double quotes because CPP needs to be expanded
7646 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7647 do
7648 ac_preproc_ok=false
7649 for ac_c_preproc_warn_flag in '' yes
7650 do
7651 # Use a header file that comes with gcc, so configuring glibc
7652 # with a fresh cross-compiler works.
7653 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7654 # <limits.h> exists even on freestanding compilers.
7655 # On the NeXT, cc -E runs the code through the compiler's parser,
7656 # not just through cpp. "Syntax error" is here to catch this case.
7657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7658 /* end confdefs.h. */
7659 #ifdef __STDC__
7660 # include <limits.h>
7661 #else
7662 # include <assert.h>
7663 #endif
7664 Syntax error
7665 _ACEOF
7666 if ac_fn_c_try_cpp "$LINENO"; then :
7667
7668 else
7669 # Broken: fails on valid input.
7670 continue
7671 fi
7672 rm -f conftest.err conftest.i conftest.$ac_ext
7673
7674 # OK, works on sane cases. Now check whether nonexistent headers
7675 # can be detected and how.
7676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7677 /* end confdefs.h. */
7678 #include <ac_nonexistent.h>
7679 _ACEOF
7680 if ac_fn_c_try_cpp "$LINENO"; then :
7681 # Broken: success on invalid input.
7682 continue
7683 else
7684 # Passes both tests.
7685 ac_preproc_ok=:
7686 break
7687 fi
7688 rm -f conftest.err conftest.i conftest.$ac_ext
7689
7690 done
7691 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7692 rm -f conftest.i conftest.err conftest.$ac_ext
7693 if $ac_preproc_ok; then :
7694 break
7695 fi
7696
7697 done
7698 ac_cv_prog_CPP=$CPP
7699
7700 fi
7701 CPP=$ac_cv_prog_CPP
7702 else
7703 ac_cv_prog_CPP=$CPP
7704 fi
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7706 $as_echo "$CPP" >&6; }
7707 ac_preproc_ok=false
7708 for ac_c_preproc_warn_flag in '' yes
7709 do
7710 # Use a header file that comes with gcc, so configuring glibc
7711 # with a fresh cross-compiler works.
7712 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7713 # <limits.h> exists even on freestanding compilers.
7714 # On the NeXT, cc -E runs the code through the compiler's parser,
7715 # not just through cpp. "Syntax error" is here to catch this case.
7716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7717 /* end confdefs.h. */
7718 #ifdef __STDC__
7719 # include <limits.h>
7720 #else
7721 # include <assert.h>
7722 #endif
7723 Syntax error
7724 _ACEOF
7725 if ac_fn_c_try_cpp "$LINENO"; then :
7726
7727 else
7728 # Broken: fails on valid input.
7729 continue
7730 fi
7731 rm -f conftest.err conftest.i conftest.$ac_ext
7732
7733 # OK, works on sane cases. Now check whether nonexistent headers
7734 # can be detected and how.
7735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7736 /* end confdefs.h. */
7737 #include <ac_nonexistent.h>
7738 _ACEOF
7739 if ac_fn_c_try_cpp "$LINENO"; then :
7740 # Broken: success on invalid input.
7741 continue
7742 else
7743 # Passes both tests.
7744 ac_preproc_ok=:
7745 break
7746 fi
7747 rm -f conftest.err conftest.i conftest.$ac_ext
7748
7749 done
7750 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7751 rm -f conftest.i conftest.err conftest.$ac_ext
7752 if $ac_preproc_ok; then :
7753
7754 else
7755 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7756 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7757 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7758 See \`config.log' for more details" "$LINENO" 5; }
7759 fi
7760
7761 ac_ext=c
7762 ac_cpp='$CPP $CPPFLAGS'
7763 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7764 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7765 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7766
7767
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7769 $as_echo_n "checking for ANSI C header files... " >&6; }
7770 if ${ac_cv_header_stdc+:} false; then :
7771 $as_echo_n "(cached) " >&6
7772 else
7773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7774 /* end confdefs.h. */
7775 #include <stdlib.h>
7776 #include <stdarg.h>
7777 #include <string.h>
7778 #include <float.h>
7779
7780 int
7781 main ()
7782 {
7783
7784 ;
7785 return 0;
7786 }
7787 _ACEOF
7788 if ac_fn_c_try_compile "$LINENO"; then :
7789 ac_cv_header_stdc=yes
7790 else
7791 ac_cv_header_stdc=no
7792 fi
7793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7794
7795 if test $ac_cv_header_stdc = yes; then
7796 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7798 /* end confdefs.h. */
7799 #include <string.h>
7800
7801 _ACEOF
7802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7803 $EGREP "memchr" >/dev/null 2>&1; then :
7804
7805 else
7806 ac_cv_header_stdc=no
7807 fi
7808 rm -f conftest*
7809
7810 fi
7811
7812 if test $ac_cv_header_stdc = yes; then
7813 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7815 /* end confdefs.h. */
7816 #include <stdlib.h>
7817
7818 _ACEOF
7819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7820 $EGREP "free" >/dev/null 2>&1; then :
7821
7822 else
7823 ac_cv_header_stdc=no
7824 fi
7825 rm -f conftest*
7826
7827 fi
7828
7829 if test $ac_cv_header_stdc = yes; then
7830 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7831 if test "$cross_compiling" = yes; then :
7832 :
7833 else
7834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7835 /* end confdefs.h. */
7836 #include <ctype.h>
7837 #include <stdlib.h>
7838 #if ((' ' & 0x0FF) == 0x020)
7839 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7840 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7841 #else
7842 # define ISLOWER(c) \
7843 (('a' <= (c) && (c) <= 'i') \
7844 || ('j' <= (c) && (c) <= 'r') \
7845 || ('s' <= (c) && (c) <= 'z'))
7846 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7847 #endif
7848
7849 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7850 int
7851 main ()
7852 {
7853 int i;
7854 for (i = 0; i < 256; i++)
7855 if (XOR (islower (i), ISLOWER (i))
7856 || toupper (i) != TOUPPER (i))
7857 return 2;
7858 return 0;
7859 }
7860 _ACEOF
7861 if ac_fn_c_try_run "$LINENO"; then :
7862
7863 else
7864 ac_cv_header_stdc=no
7865 fi
7866 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7867 conftest.$ac_objext conftest.beam conftest.$ac_ext
7868 fi
7869
7870 fi
7871 fi
7872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7873 $as_echo "$ac_cv_header_stdc" >&6; }
7874 if test $ac_cv_header_stdc = yes; then
7875
7876 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7877
7878 fi
7879
7880 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7881 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7882 inttypes.h stdint.h unistd.h
7883 do :
7884 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7885 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7886 "
7887 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7888 cat >>confdefs.h <<_ACEOF
7889 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7890 _ACEOF
7891
7892 fi
7893
7894 done
7895
7896
7897 for ac_header in dlfcn.h
7898 do :
7899 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
7900 "
7901 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
7902 cat >>confdefs.h <<_ACEOF
7903 #define HAVE_DLFCN_H 1
7904 _ACEOF
7905
7906 fi
7907
7908 done
7909
7910
7911
7912
7913
7914 # Set options
7915
7916
7917
7918 enable_dlopen=no
7919
7920
7921 enable_win32_dll=no
7922
7923
7924 # Check whether --enable-shared was given.
7925 if test "${enable_shared+set}" = set; then :
7926 enableval=$enable_shared; p=${PACKAGE-default}
7927 case $enableval in
7928 yes) enable_shared=yes ;;
7929 no) enable_shared=no ;;
7930 *)
7931 enable_shared=no
7932 # Look at the argument we got. We use all the common list separators.
7933 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7934 for pkg in $enableval; do
7935 IFS="$lt_save_ifs"
7936 if test "X$pkg" = "X$p"; then
7937 enable_shared=yes
7938 fi
7939 done
7940 IFS="$lt_save_ifs"
7941 ;;
7942 esac
7943 else
7944 enable_shared=yes
7945 fi
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955 # Check whether --enable-static was given.
7956 if test "${enable_static+set}" = set; then :
7957 enableval=$enable_static; p=${PACKAGE-default}
7958 case $enableval in
7959 yes) enable_static=yes ;;
7960 no) enable_static=no ;;
7961 *)
7962 enable_static=no
7963 # Look at the argument we got. We use all the common list separators.
7964 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7965 for pkg in $enableval; do
7966 IFS="$lt_save_ifs"
7967 if test "X$pkg" = "X$p"; then
7968 enable_static=yes
7969 fi
7970 done
7971 IFS="$lt_save_ifs"
7972 ;;
7973 esac
7974 else
7975 enable_static=yes
7976 fi
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987 # Check whether --with-pic was given.
7988 if test "${with_pic+set}" = set; then :
7989 withval=$with_pic; pic_mode="$withval"
7990 else
7991 pic_mode=default
7992 fi
7993
7994
7995 test -z "$pic_mode" && pic_mode=default
7996
7997
7998
7999
8000
8001
8002
8003 # Check whether --enable-fast-install was given.
8004 if test "${enable_fast_install+set}" = set; then :
8005 enableval=$enable_fast_install; p=${PACKAGE-default}
8006 case $enableval in
8007 yes) enable_fast_install=yes ;;
8008 no) enable_fast_install=no ;;
8009 *)
8010 enable_fast_install=no
8011 # Look at the argument we got. We use all the common list separators.
8012 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8013 for pkg in $enableval; do
8014 IFS="$lt_save_ifs"
8015 if test "X$pkg" = "X$p"; then
8016 enable_fast_install=yes
8017 fi
8018 done
8019 IFS="$lt_save_ifs"
8020 ;;
8021 esac
8022 else
8023 enable_fast_install=yes
8024 fi
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036 # This can be used to rebuild libtool when needed
8037 LIBTOOL_DEPS="$ltmain"
8038
8039 # Always use our own libtool.
8040 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067 test -z "$LN_S" && LN_S="ln -s"
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082 if test -n "${ZSH_VERSION+set}" ; then
8083 setopt NO_GLOB_SUBST
8084 fi
8085
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
8087 $as_echo_n "checking for objdir... " >&6; }
8088 if ${lt_cv_objdir+:} false; then :
8089 $as_echo_n "(cached) " >&6
8090 else
8091 rm -f .libs 2>/dev/null
8092 mkdir .libs 2>/dev/null
8093 if test -d .libs; then
8094 lt_cv_objdir=.libs
8095 else
8096 # MS-DOS does not allow filenames that begin with a dot.
8097 lt_cv_objdir=_libs
8098 fi
8099 rmdir .libs 2>/dev/null
8100 fi
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
8102 $as_echo "$lt_cv_objdir" >&6; }
8103 objdir=$lt_cv_objdir
8104
8105
8106
8107
8108
8109 cat >>confdefs.h <<_ACEOF
8110 #define LT_OBJDIR "$lt_cv_objdir/"
8111 _ACEOF
8112
8113
8114
8115
8116 case $host_os in
8117 aix3*)
8118 # AIX sometimes has problems with the GCC collect2 program. For some
8119 # reason, if we set the COLLECT_NAMES environment variable, the problems
8120 # vanish in a puff of smoke.
8121 if test "X${COLLECT_NAMES+set}" != Xset; then
8122 COLLECT_NAMES=
8123 export COLLECT_NAMES
8124 fi
8125 ;;
8126 esac
8127
8128 # Global variables:
8129 ofile=libtool
8130 can_build_shared=yes
8131
8132 # All known linkers require a `.a' archive for static linking (except MSVC,
8133 # which needs '.lib').
8134 libext=a
8135
8136 with_gnu_ld="$lt_cv_prog_gnu_ld"
8137
8138 old_CC="$CC"
8139 old_CFLAGS="$CFLAGS"
8140
8141 # Set sane defaults for various variables
8142 test -z "$CC" && CC=cc
8143 test -z "$LTCC" && LTCC=$CC
8144 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
8145 test -z "$LD" && LD=ld
8146 test -z "$ac_objext" && ac_objext=o
8147
8148 for cc_temp in $compiler""; do
8149 case $cc_temp in
8150 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8151 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8152 \-*) ;;
8153 *) break;;
8154 esac
8155 done
8156 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
8157
8158
8159 # Only perform the check for file, if the check method requires it
8160 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8161 case $deplibs_check_method in
8162 file_magic*)
8163 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8165 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8166 if ${lt_cv_path_MAGIC_CMD+:} false; then :
8167 $as_echo_n "(cached) " >&6
8168 else
8169 case $MAGIC_CMD in
8170 [\\/*] | ?:[\\/]*)
8171 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8172 ;;
8173 *)
8174 lt_save_MAGIC_CMD="$MAGIC_CMD"
8175 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8176 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8177 for ac_dir in $ac_dummy; do
8178 IFS="$lt_save_ifs"
8179 test -z "$ac_dir" && ac_dir=.
8180 if test -f $ac_dir/${ac_tool_prefix}file; then
8181 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8182 if test -n "$file_magic_test_file"; then
8183 case $deplibs_check_method in
8184 "file_magic "*)
8185 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8186 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8187 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8188 $EGREP "$file_magic_regex" > /dev/null; then
8189 :
8190 else
8191 cat <<_LT_EOF 1>&2
8192
8193 *** Warning: the command libtool uses to detect shared libraries,
8194 *** $file_magic_cmd, produces output that libtool cannot recognize.
8195 *** The result is that libtool may fail to recognize shared libraries
8196 *** as such. This will affect the creation of libtool libraries that
8197 *** depend on shared libraries, but programs linked with such libtool
8198 *** libraries will work regardless of this problem. Nevertheless, you
8199 *** may want to report the problem to your system manager and/or to
8200 *** bug-libtool@gnu.org
8201
8202 _LT_EOF
8203 fi ;;
8204 esac
8205 fi
8206 break
8207 fi
8208 done
8209 IFS="$lt_save_ifs"
8210 MAGIC_CMD="$lt_save_MAGIC_CMD"
8211 ;;
8212 esac
8213 fi
8214
8215 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8216 if test -n "$MAGIC_CMD"; then
8217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8218 $as_echo "$MAGIC_CMD" >&6; }
8219 else
8220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8221 $as_echo "no" >&6; }
8222 fi
8223
8224
8225
8226
8227
8228 if test -z "$lt_cv_path_MAGIC_CMD"; then
8229 if test -n "$ac_tool_prefix"; then
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8231 $as_echo_n "checking for file... " >&6; }
8232 if ${lt_cv_path_MAGIC_CMD+:} false; then :
8233 $as_echo_n "(cached) " >&6
8234 else
8235 case $MAGIC_CMD in
8236 [\\/*] | ?:[\\/]*)
8237 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8238 ;;
8239 *)
8240 lt_save_MAGIC_CMD="$MAGIC_CMD"
8241 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8242 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8243 for ac_dir in $ac_dummy; do
8244 IFS="$lt_save_ifs"
8245 test -z "$ac_dir" && ac_dir=.
8246 if test -f $ac_dir/file; then
8247 lt_cv_path_MAGIC_CMD="$ac_dir/file"
8248 if test -n "$file_magic_test_file"; then
8249 case $deplibs_check_method in
8250 "file_magic "*)
8251 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8252 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8253 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8254 $EGREP "$file_magic_regex" > /dev/null; then
8255 :
8256 else
8257 cat <<_LT_EOF 1>&2
8258
8259 *** Warning: the command libtool uses to detect shared libraries,
8260 *** $file_magic_cmd, produces output that libtool cannot recognize.
8261 *** The result is that libtool may fail to recognize shared libraries
8262 *** as such. This will affect the creation of libtool libraries that
8263 *** depend on shared libraries, but programs linked with such libtool
8264 *** libraries will work regardless of this problem. Nevertheless, you
8265 *** may want to report the problem to your system manager and/or to
8266 *** bug-libtool@gnu.org
8267
8268 _LT_EOF
8269 fi ;;
8270 esac
8271 fi
8272 break
8273 fi
8274 done
8275 IFS="$lt_save_ifs"
8276 MAGIC_CMD="$lt_save_MAGIC_CMD"
8277 ;;
8278 esac
8279 fi
8280
8281 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8282 if test -n "$MAGIC_CMD"; then
8283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8284 $as_echo "$MAGIC_CMD" >&6; }
8285 else
8286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8287 $as_echo "no" >&6; }
8288 fi
8289
8290
8291 else
8292 MAGIC_CMD=:
8293 fi
8294 fi
8295
8296 fi
8297 ;;
8298 esac
8299
8300 # Use C for the default configuration in the libtool script
8301
8302 lt_save_CC="$CC"
8303 ac_ext=c
8304 ac_cpp='$CPP $CPPFLAGS'
8305 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8306 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8307 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8308
8309
8310 # Source file extension for C test sources.
8311 ac_ext=c
8312
8313 # Object file extension for compiled C test sources.
8314 objext=o
8315 objext=$objext
8316
8317 # Code to be used in simple compile tests
8318 lt_simple_compile_test_code="int some_variable = 0;"
8319
8320 # Code to be used in simple link tests
8321 lt_simple_link_test_code='int main(){return(0);}'
8322
8323
8324
8325
8326
8327
8328
8329 # If no C compiler was specified, use CC.
8330 LTCC=${LTCC-"$CC"}
8331
8332 # If no C compiler flags were specified, use CFLAGS.
8333 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8334
8335 # Allow CC to be a program name with arguments.
8336 compiler=$CC
8337
8338 # Save the default compiler, since it gets overwritten when the other
8339 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8340 compiler_DEFAULT=$CC
8341
8342 # save warnings/boilerplate of simple test code
8343 ac_outfile=conftest.$ac_objext
8344 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
8345 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8346 _lt_compiler_boilerplate=`cat conftest.err`
8347 $RM conftest*
8348
8349 ac_outfile=conftest.$ac_objext
8350 echo "$lt_simple_link_test_code" >conftest.$ac_ext
8351 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8352 _lt_linker_boilerplate=`cat conftest.err`
8353 $RM -r conftest*
8354
8355
8356 ## CAVEAT EMPTOR:
8357 ## There is no encapsulation within the following macros, do not change
8358 ## the running order or otherwise move them around unless you know exactly
8359 ## what you are doing...
8360 if test -n "$compiler"; then
8361
8362 lt_prog_compiler_no_builtin_flag=
8363
8364 if test "$GCC" = yes; then
8365 case $cc_basename in
8366 nvcc*)
8367 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
8368 *)
8369 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
8370 esac
8371
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8373 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8374 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
8375 $as_echo_n "(cached) " >&6
8376 else
8377 lt_cv_prog_compiler_rtti_exceptions=no
8378 ac_outfile=conftest.$ac_objext
8379 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8380 lt_compiler_flag="-fno-rtti -fno-exceptions"
8381 # Insert the option either (1) after the last *FLAGS variable, or
8382 # (2) before a word containing "conftest.", or (3) at the end.
8383 # Note that $ac_compile itself does not contain backslashes and begins
8384 # with a dollar sign (not a hyphen), so the echo should work correctly.
8385 # The option is referenced via a variable to avoid confusing sed.
8386 lt_compile=`echo "$ac_compile" | $SED \
8387 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8388 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8389 -e 's:$: $lt_compiler_flag:'`
8390 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8391 (eval "$lt_compile" 2>conftest.err)
8392 ac_status=$?
8393 cat conftest.err >&5
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 if (exit $ac_status) && test -s "$ac_outfile"; then
8396 # The compiler can only warn and ignore the option if not recognized
8397 # So say no if there are warnings other than the usual output.
8398 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
8399 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8400 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8401 lt_cv_prog_compiler_rtti_exceptions=yes
8402 fi
8403 fi
8404 $RM conftest*
8405
8406 fi
8407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8408 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8409
8410 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8411 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8412 else
8413 :
8414 fi
8415
8416 fi
8417
8418
8419
8420
8421
8422
8423 lt_prog_compiler_wl=
8424 lt_prog_compiler_pic=
8425 lt_prog_compiler_static=
8426
8427
8428 if test "$GCC" = yes; then
8429 lt_prog_compiler_wl='-Wl,'
8430 lt_prog_compiler_static='-static'
8431
8432 case $host_os in
8433 aix*)
8434 # All AIX code is PIC.
8435 if test "$host_cpu" = ia64; then
8436 # AIX 5 now supports IA64 processor
8437 lt_prog_compiler_static='-Bstatic'
8438 fi
8439 ;;
8440
8441 amigaos*)
8442 case $host_cpu in
8443 powerpc)
8444 # see comment about AmigaOS4 .so support
8445 lt_prog_compiler_pic='-fPIC'
8446 ;;
8447 m68k)
8448 # FIXME: we need at least 68020 code to build shared libraries, but
8449 # adding the `-m68020' flag to GCC prevents building anything better,
8450 # like `-m68040'.
8451 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8452 ;;
8453 esac
8454 ;;
8455
8456 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8457 # PIC is the default for these OSes.
8458 ;;
8459
8460 mingw* | cygwin* | pw32* | os2* | cegcc*)
8461 # This hack is so that the source file can tell whether it is being
8462 # built for inclusion in a dll (and should export symbols for example).
8463 # Although the cygwin gcc ignores -fPIC, still need this for old-style
8464 # (--disable-auto-import) libraries
8465 lt_prog_compiler_pic='-DDLL_EXPORT'
8466 ;;
8467
8468 darwin* | rhapsody*)
8469 # PIC is the default on this platform
8470 # Common symbols not allowed in MH_DYLIB files
8471 lt_prog_compiler_pic='-fno-common'
8472 ;;
8473
8474 haiku*)
8475 # PIC is the default for Haiku.
8476 # The "-static" flag exists, but is broken.
8477 lt_prog_compiler_static=
8478 ;;
8479
8480 hpux*)
8481 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8482 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
8483 # sets the default TLS model and affects inlining.
8484 case $host_cpu in
8485 hppa*64*)
8486 # +Z the default
8487 ;;
8488 *)
8489 lt_prog_compiler_pic='-fPIC'
8490 ;;
8491 esac
8492 ;;
8493
8494 interix[3-9]*)
8495 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8496 # Instead, we relocate shared libraries at runtime.
8497 ;;
8498
8499 msdosdjgpp*)
8500 # Just because we use GCC doesn't mean we suddenly get shared libraries
8501 # on systems that don't support them.
8502 lt_prog_compiler_can_build_shared=no
8503 enable_shared=no
8504 ;;
8505
8506 *nto* | *qnx*)
8507 # QNX uses GNU C++, but need to define -shared option too, otherwise
8508 # it will coredump.
8509 lt_prog_compiler_pic='-fPIC -shared'
8510 ;;
8511
8512 sysv4*MP*)
8513 if test -d /usr/nec; then
8514 lt_prog_compiler_pic=-Kconform_pic
8515 fi
8516 ;;
8517
8518 *)
8519 lt_prog_compiler_pic='-fPIC'
8520 ;;
8521 esac
8522
8523 case $cc_basename in
8524 nvcc*) # Cuda Compiler Driver 2.2
8525 lt_prog_compiler_wl='-Xlinker '
8526 lt_prog_compiler_pic='-Xcompiler -fPIC'
8527 ;;
8528 esac
8529 else
8530 # PORTME Check for flag to pass linker flags through the system compiler.
8531 case $host_os in
8532 aix*)
8533 lt_prog_compiler_wl='-Wl,'
8534 if test "$host_cpu" = ia64; then
8535 # AIX 5 now supports IA64 processor
8536 lt_prog_compiler_static='-Bstatic'
8537 else
8538 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8539 fi
8540 ;;
8541
8542 mingw* | cygwin* | pw32* | os2* | cegcc*)
8543 # This hack is so that the source file can tell whether it is being
8544 # built for inclusion in a dll (and should export symbols for example).
8545 lt_prog_compiler_pic='-DDLL_EXPORT'
8546 ;;
8547
8548 hpux9* | hpux10* | hpux11*)
8549 lt_prog_compiler_wl='-Wl,'
8550 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8551 # not for PA HP-UX.
8552 case $host_cpu in
8553 hppa*64*|ia64*)
8554 # +Z the default
8555 ;;
8556 *)
8557 lt_prog_compiler_pic='+Z'
8558 ;;
8559 esac
8560 # Is there a better lt_prog_compiler_static that works with the bundled CC?
8561 lt_prog_compiler_static='${wl}-a ${wl}archive'
8562 ;;
8563
8564 irix5* | irix6* | nonstopux*)
8565 lt_prog_compiler_wl='-Wl,'
8566 # PIC (with -KPIC) is the default.
8567 lt_prog_compiler_static='-non_shared'
8568 ;;
8569
8570 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8571 case $cc_basename in
8572 # old Intel for x86_64 which still supported -KPIC.
8573 ecc*)
8574 lt_prog_compiler_wl='-Wl,'
8575 lt_prog_compiler_pic='-KPIC'
8576 lt_prog_compiler_static='-static'
8577 ;;
8578 # icc used to be incompatible with GCC.
8579 # ICC 10 doesn't accept -KPIC any more.
8580 icc* | ifort*)
8581 lt_prog_compiler_wl='-Wl,'
8582 lt_prog_compiler_pic='-fPIC'
8583 lt_prog_compiler_static='-static'
8584 ;;
8585 # Lahey Fortran 8.1.
8586 lf95*)
8587 lt_prog_compiler_wl='-Wl,'
8588 lt_prog_compiler_pic='--shared'
8589 lt_prog_compiler_static='--static'
8590 ;;
8591 nagfor*)
8592 # NAG Fortran compiler
8593 lt_prog_compiler_wl='-Wl,-Wl,,'
8594 lt_prog_compiler_pic='-PIC'
8595 lt_prog_compiler_static='-Bstatic'
8596 ;;
8597 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
8598 # Portland Group compilers (*not* the Pentium gcc compiler,
8599 # which looks to be a dead project)
8600 lt_prog_compiler_wl='-Wl,'
8601 lt_prog_compiler_pic='-fpic'
8602 lt_prog_compiler_static='-Bstatic'
8603 ;;
8604 ccc*)
8605 lt_prog_compiler_wl='-Wl,'
8606 # All Alpha code is PIC.
8607 lt_prog_compiler_static='-non_shared'
8608 ;;
8609 xl* | bgxl* | bgf* | mpixl*)
8610 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
8611 lt_prog_compiler_wl='-Wl,'
8612 lt_prog_compiler_pic='-qpic'
8613 lt_prog_compiler_static='-qstaticlink'
8614 ;;
8615 *)
8616 case `$CC -V 2>&1 | sed 5q` in
8617 *Sun\ F* | *Sun*Fortran*)
8618 # Sun Fortran 8.3 passes all unrecognized flags to the linker
8619 lt_prog_compiler_pic='-KPIC'
8620 lt_prog_compiler_static='-Bstatic'
8621 lt_prog_compiler_wl=''
8622 ;;
8623 *Sun\ C*)
8624 # Sun C 5.9
8625 lt_prog_compiler_pic='-KPIC'
8626 lt_prog_compiler_static='-Bstatic'
8627 lt_prog_compiler_wl='-Wl,'
8628 ;;
8629 esac
8630 ;;
8631 esac
8632 ;;
8633
8634 newsos6)
8635 lt_prog_compiler_pic='-KPIC'
8636 lt_prog_compiler_static='-Bstatic'
8637 ;;
8638
8639 *nto* | *qnx*)
8640 # QNX uses GNU C++, but need to define -shared option too, otherwise
8641 # it will coredump.
8642 lt_prog_compiler_pic='-fPIC -shared'
8643 ;;
8644
8645 osf3* | osf4* | osf5*)
8646 lt_prog_compiler_wl='-Wl,'
8647 # All OSF/1 code is PIC.
8648 lt_prog_compiler_static='-non_shared'
8649 ;;
8650
8651 rdos*)
8652 lt_prog_compiler_static='-non_shared'
8653 ;;
8654
8655 solaris*)
8656 lt_prog_compiler_pic='-KPIC'
8657 lt_prog_compiler_static='-Bstatic'
8658 case $cc_basename in
8659 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
8660 lt_prog_compiler_wl='-Qoption ld ';;
8661 *)
8662 lt_prog_compiler_wl='-Wl,';;
8663 esac
8664 ;;
8665
8666 sunos4*)
8667 lt_prog_compiler_wl='-Qoption ld '
8668 lt_prog_compiler_pic='-PIC'
8669 lt_prog_compiler_static='-Bstatic'
8670 ;;
8671
8672 sysv4 | sysv4.2uw2* | sysv4.3*)
8673 lt_prog_compiler_wl='-Wl,'
8674 lt_prog_compiler_pic='-KPIC'
8675 lt_prog_compiler_static='-Bstatic'
8676 ;;
8677
8678 sysv4*MP*)
8679 if test -d /usr/nec ;then
8680 lt_prog_compiler_pic='-Kconform_pic'
8681 lt_prog_compiler_static='-Bstatic'
8682 fi
8683 ;;
8684
8685 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8686 lt_prog_compiler_wl='-Wl,'
8687 lt_prog_compiler_pic='-KPIC'
8688 lt_prog_compiler_static='-Bstatic'
8689 ;;
8690
8691 unicos*)
8692 lt_prog_compiler_wl='-Wl,'
8693 lt_prog_compiler_can_build_shared=no
8694 ;;
8695
8696 uts4*)
8697 lt_prog_compiler_pic='-pic'
8698 lt_prog_compiler_static='-Bstatic'
8699 ;;
8700
8701 *)
8702 lt_prog_compiler_can_build_shared=no
8703 ;;
8704 esac
8705 fi
8706
8707 case $host_os in
8708 # For platforms which do not support PIC, -DPIC is meaningless:
8709 *djgpp*)
8710 lt_prog_compiler_pic=
8711 ;;
8712 *)
8713 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8714 ;;
8715 esac
8716
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8718 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8719 if ${lt_cv_prog_compiler_pic+:} false; then :
8720 $as_echo_n "(cached) " >&6
8721 else
8722 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
8723 fi
8724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
8725 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
8726 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
8727
8728 #
8729 # Check to make sure the PIC flag actually works.
8730 #
8731 if test -n "$lt_prog_compiler_pic"; then
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8733 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8734 if ${lt_cv_prog_compiler_pic_works+:} false; then :
8735 $as_echo_n "(cached) " >&6
8736 else
8737 lt_cv_prog_compiler_pic_works=no
8738 ac_outfile=conftest.$ac_objext
8739 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8740 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8741 # Insert the option either (1) after the last *FLAGS variable, or
8742 # (2) before a word containing "conftest.", or (3) at the end.
8743 # Note that $ac_compile itself does not contain backslashes and begins
8744 # with a dollar sign (not a hyphen), so the echo should work correctly.
8745 # The option is referenced via a variable to avoid confusing sed.
8746 lt_compile=`echo "$ac_compile" | $SED \
8747 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8748 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8749 -e 's:$: $lt_compiler_flag:'`
8750 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8751 (eval "$lt_compile" 2>conftest.err)
8752 ac_status=$?
8753 cat conftest.err >&5
8754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8755 if (exit $ac_status) && test -s "$ac_outfile"; then
8756 # The compiler can only warn and ignore the option if not recognized
8757 # So say no if there are warnings other than the usual output.
8758 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
8759 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8760 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8761 lt_cv_prog_compiler_pic_works=yes
8762 fi
8763 fi
8764 $RM conftest*
8765
8766 fi
8767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
8768 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
8769
8770 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
8771 case $lt_prog_compiler_pic in
8772 "" | " "*) ;;
8773 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8774 esac
8775 else
8776 lt_prog_compiler_pic=
8777 lt_prog_compiler_can_build_shared=no
8778 fi
8779
8780 fi
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792 #
8793 # Check to make sure the static flag actually works.
8794 #
8795 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
8797 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
8798 if ${lt_cv_prog_compiler_static_works+:} false; then :
8799 $as_echo_n "(cached) " >&6
8800 else
8801 lt_cv_prog_compiler_static_works=no
8802 save_LDFLAGS="$LDFLAGS"
8803 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
8804 echo "$lt_simple_link_test_code" > conftest.$ac_ext
8805 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8806 # The linker can only warn and ignore the option if not recognized
8807 # So say no if there are warnings
8808 if test -s conftest.err; then
8809 # Append any errors to the config.log.
8810 cat conftest.err 1>&5
8811 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
8812 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8813 if diff conftest.exp conftest.er2 >/dev/null; then
8814 lt_cv_prog_compiler_static_works=yes
8815 fi
8816 else
8817 lt_cv_prog_compiler_static_works=yes
8818 fi
8819 fi
8820 $RM -r conftest*
8821 LDFLAGS="$save_LDFLAGS"
8822
8823 fi
8824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
8825 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
8826
8827 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
8828 :
8829 else
8830 lt_prog_compiler_static=
8831 fi
8832
8833
8834
8835
8836
8837
8838
8839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8840 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8841 if ${lt_cv_prog_compiler_c_o+:} false; then :
8842 $as_echo_n "(cached) " >&6
8843 else
8844 lt_cv_prog_compiler_c_o=no
8845 $RM -r conftest 2>/dev/null
8846 mkdir conftest
8847 cd conftest
8848 mkdir out
8849 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8850
8851 lt_compiler_flag="-o out/conftest2.$ac_objext"
8852 # Insert the option either (1) after the last *FLAGS variable, or
8853 # (2) before a word containing "conftest.", or (3) at the end.
8854 # Note that $ac_compile itself does not contain backslashes and begins
8855 # with a dollar sign (not a hyphen), so the echo should work correctly.
8856 lt_compile=`echo "$ac_compile" | $SED \
8857 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8858 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8859 -e 's:$: $lt_compiler_flag:'`
8860 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8861 (eval "$lt_compile" 2>out/conftest.err)
8862 ac_status=$?
8863 cat out/conftest.err >&5
8864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8865 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8866 then
8867 # The compiler can only warn and ignore the option if not recognized
8868 # So say no if there are warnings
8869 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8870 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8871 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8872 lt_cv_prog_compiler_c_o=yes
8873 fi
8874 fi
8875 chmod u+w . 2>&5
8876 $RM conftest*
8877 # SGI C++ compiler will create directory out/ii_files/ for
8878 # template instantiation
8879 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8880 $RM out/* && rmdir out
8881 cd ..
8882 $RM -r conftest
8883 $RM conftest*
8884
8885 fi
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8887 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8888
8889
8890
8891
8892
8893
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8895 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8896 if ${lt_cv_prog_compiler_c_o+:} false; then :
8897 $as_echo_n "(cached) " >&6
8898 else
8899 lt_cv_prog_compiler_c_o=no
8900 $RM -r conftest 2>/dev/null
8901 mkdir conftest
8902 cd conftest
8903 mkdir out
8904 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8905
8906 lt_compiler_flag="-o out/conftest2.$ac_objext"
8907 # Insert the option either (1) after the last *FLAGS variable, or
8908 # (2) before a word containing "conftest.", or (3) at the end.
8909 # Note that $ac_compile itself does not contain backslashes and begins
8910 # with a dollar sign (not a hyphen), so the echo should work correctly.
8911 lt_compile=`echo "$ac_compile" | $SED \
8912 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8913 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8914 -e 's:$: $lt_compiler_flag:'`
8915 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8916 (eval "$lt_compile" 2>out/conftest.err)
8917 ac_status=$?
8918 cat out/conftest.err >&5
8919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8921 then
8922 # The compiler can only warn and ignore the option if not recognized
8923 # So say no if there are warnings
8924 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8925 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8926 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8927 lt_cv_prog_compiler_c_o=yes
8928 fi
8929 fi
8930 chmod u+w . 2>&5
8931 $RM conftest*
8932 # SGI C++ compiler will create directory out/ii_files/ for
8933 # template instantiation
8934 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8935 $RM out/* && rmdir out
8936 cd ..
8937 $RM -r conftest
8938 $RM conftest*
8939
8940 fi
8941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8942 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8943
8944
8945
8946
8947 hard_links="nottested"
8948 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8949 # do not overwrite the value of need_locks provided by the user
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8951 $as_echo_n "checking if we can lock with hard links... " >&6; }
8952 hard_links=yes
8953 $RM conftest*
8954 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8955 touch conftest.a
8956 ln conftest.a conftest.b 2>&5 || hard_links=no
8957 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8959 $as_echo "$hard_links" >&6; }
8960 if test "$hard_links" = no; then
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8962 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8963 need_locks=warn
8964 fi
8965 else
8966 need_locks=no
8967 fi
8968
8969
8970
8971
8972
8973
8974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8975 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8976
8977 runpath_var=
8978 allow_undefined_flag=
8979 always_export_symbols=no
8980 archive_cmds=
8981 archive_expsym_cmds=
8982 compiler_needs_object=no
8983 enable_shared_with_static_runtimes=no
8984 export_dynamic_flag_spec=
8985 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8986 hardcode_automatic=no
8987 hardcode_direct=no
8988 hardcode_direct_absolute=no
8989 hardcode_libdir_flag_spec=
8990 hardcode_libdir_flag_spec_ld=
8991 hardcode_libdir_separator=
8992 hardcode_minus_L=no
8993 hardcode_shlibpath_var=unsupported
8994 inherit_rpath=no
8995 link_all_deplibs=unknown
8996 module_cmds=
8997 module_expsym_cmds=
8998 old_archive_from_new_cmds=
8999 old_archive_from_expsyms_cmds=
9000 thread_safe_flag_spec=
9001 whole_archive_flag_spec=
9002 # include_expsyms should be a list of space-separated symbols to be *always*
9003 # included in the symbol list
9004 include_expsyms=
9005 # exclude_expsyms can be an extended regexp of symbols to exclude
9006 # it will be wrapped by ` (' and `)$', so one must not match beginning or
9007 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9008 # as well as any symbol that contains `d'.
9009 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
9010 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9011 # platforms (ab)use it in PIC code, but their linkers get confused if
9012 # the symbol is explicitly referenced. Since portable code cannot
9013 # rely on this symbol name, it's probably fine to never include it in
9014 # preloaded symbol tables.
9015 # Exclude shared library initialization/finalization symbols.
9016 extract_expsyms_cmds=
9017
9018 case $host_os in
9019 cygwin* | mingw* | pw32* | cegcc*)
9020 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9021 # When not using gcc, we currently assume that we are using
9022 # Microsoft Visual C++.
9023 if test "$GCC" != yes; then
9024 with_gnu_ld=no
9025 fi
9026 ;;
9027 interix*)
9028 # we just hope/assume this is gcc and not c89 (= MSVC++)
9029 with_gnu_ld=yes
9030 ;;
9031 openbsd*)
9032 with_gnu_ld=no
9033 ;;
9034 esac
9035
9036 ld_shlibs=yes
9037
9038 # On some targets, GNU ld is compatible enough with the native linker
9039 # that we're better off using the native interface for both.
9040 lt_use_gnu_ld_interface=no
9041 if test "$with_gnu_ld" = yes; then
9042 case $host_os in
9043 aix*)
9044 # The AIX port of GNU ld has always aspired to compatibility
9045 # with the native linker. However, as the warning in the GNU ld
9046 # block says, versions before 2.19.5* couldn't really create working
9047 # shared libraries, regardless of the interface used.
9048 case `$LD -v 2>&1` in
9049 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
9050 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
9051 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
9052 *)
9053 lt_use_gnu_ld_interface=yes
9054 ;;
9055 esac
9056 ;;
9057 *)
9058 lt_use_gnu_ld_interface=yes
9059 ;;
9060 esac
9061 fi
9062
9063 if test "$lt_use_gnu_ld_interface" = yes; then
9064 # If archive_cmds runs LD, not CC, wlarc should be empty
9065 wlarc='${wl}'
9066
9067 # Set some defaults for GNU ld with shared library support. These
9068 # are reset later if shared libraries are not supported. Putting them
9069 # here allows them to be overridden if necessary.
9070 runpath_var=LD_RUN_PATH
9071 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9072 export_dynamic_flag_spec='${wl}--export-dynamic'
9073 # ancient GNU ld didn't support --whole-archive et. al.
9074 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
9075 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9076 else
9077 whole_archive_flag_spec=
9078 fi
9079 supports_anon_versioning=no
9080 case `$LD -v 2>&1` in
9081 *GNU\ gold*) supports_anon_versioning=yes ;;
9082 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9083 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9084 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9085 *\ 2.11.*) ;; # other 2.11 versions
9086 *) supports_anon_versioning=yes ;;
9087 esac
9088
9089 # See if GNU ld supports shared libraries.
9090 case $host_os in
9091 aix[3-9]*)
9092 # On AIX/PPC, the GNU linker is very broken
9093 if test "$host_cpu" != ia64; then
9094 ld_shlibs=no
9095 cat <<_LT_EOF 1>&2
9096
9097 *** Warning: the GNU linker, at least up to release 2.19, is reported
9098 *** to be unable to reliably create shared libraries on AIX.
9099 *** Therefore, libtool is disabling shared libraries support. If you
9100 *** really care for shared libraries, you may want to install binutils
9101 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
9102 *** You will then need to restart the configuration process.
9103
9104 _LT_EOF
9105 fi
9106 ;;
9107
9108 amigaos*)
9109 case $host_cpu in
9110 powerpc)
9111 # see comment about AmigaOS4 .so support
9112 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9113 archive_expsym_cmds=''
9114 ;;
9115 m68k)
9116 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
9117 hardcode_libdir_flag_spec='-L$libdir'
9118 hardcode_minus_L=yes
9119 ;;
9120 esac
9121 ;;
9122
9123 beos*)
9124 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9125 allow_undefined_flag=unsupported
9126 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9127 # support --undefined. This deserves some investigation. FIXME
9128 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9129 else
9130 ld_shlibs=no
9131 fi
9132 ;;
9133
9134 cygwin* | mingw* | pw32* | cegcc*)
9135 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9136 # as there is no search path for DLLs.
9137 hardcode_libdir_flag_spec='-L$libdir'
9138 export_dynamic_flag_spec='${wl}--export-all-symbols'
9139 allow_undefined_flag=unsupported
9140 always_export_symbols=no
9141 enable_shared_with_static_runtimes=yes
9142 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
9143 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
9144
9145 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9146 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9147 # If the export-symbols file already is a .def file (1st line
9148 # is EXPORTS), use it as is; otherwise, prepend...
9149 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9150 cp $export_symbols $output_objdir/$soname.def;
9151 else
9152 echo EXPORTS > $output_objdir/$soname.def;
9153 cat $export_symbols >> $output_objdir/$soname.def;
9154 fi~
9155 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9156 else
9157 ld_shlibs=no
9158 fi
9159 ;;
9160
9161 haiku*)
9162 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9163 link_all_deplibs=yes
9164 ;;
9165
9166 interix[3-9]*)
9167 hardcode_direct=no
9168 hardcode_shlibpath_var=no
9169 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9170 export_dynamic_flag_spec='${wl}-E'
9171 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9172 # Instead, shared libraries are loaded at an image base (0x10000000 by
9173 # default) and relocated if they conflict, which is a slow very memory
9174 # consuming and fragmenting process. To avoid this, we pick a random,
9175 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9176 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
9177 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9178 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9179 ;;
9180
9181 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
9182 tmp_diet=no
9183 if test "$host_os" = linux-dietlibc; then
9184 case $cc_basename in
9185 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
9186 esac
9187 fi
9188 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
9189 && test "$tmp_diet" = no
9190 then
9191 tmp_addflag=' $pic_flag'
9192 tmp_sharedflag='-shared'
9193 case $cc_basename,$host_cpu in
9194 pgcc*) # Portland Group C compiler
9195 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9196 tmp_addflag=' $pic_flag'
9197 ;;
9198 pgf77* | pgf90* | pgf95* | pgfortran*)
9199 # Portland Group f77 and f90 compilers
9200 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9201 tmp_addflag=' $pic_flag -Mnomain' ;;
9202 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
9203 tmp_addflag=' -i_dynamic' ;;
9204 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
9205 tmp_addflag=' -i_dynamic -nofor_main' ;;
9206 ifc* | ifort*) # Intel Fortran compiler
9207 tmp_addflag=' -nofor_main' ;;
9208 lf95*) # Lahey Fortran 8.1
9209 whole_archive_flag_spec=
9210 tmp_sharedflag='--shared' ;;
9211 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
9212 tmp_sharedflag='-qmkshrobj'
9213 tmp_addflag= ;;
9214 nvcc*) # Cuda Compiler Driver 2.2
9215 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9216 compiler_needs_object=yes
9217 ;;
9218 esac
9219 case `$CC -V 2>&1 | sed 5q` in
9220 *Sun\ C*) # Sun C 5.9
9221 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9222 compiler_needs_object=yes
9223 tmp_sharedflag='-G' ;;
9224 *Sun\ F*) # Sun Fortran 8.3
9225 tmp_sharedflag='-G' ;;
9226 esac
9227 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9228
9229 if test "x$supports_anon_versioning" = xyes; then
9230 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9231 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9232 echo "local: *; };" >> $output_objdir/$libname.ver~
9233 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9234 fi
9235
9236 case $cc_basename in
9237 xlf* | bgf* | bgxlf* | mpixlf*)
9238 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
9239 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
9240 hardcode_libdir_flag_spec=
9241 hardcode_libdir_flag_spec_ld='-rpath $libdir'
9242 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
9243 if test "x$supports_anon_versioning" = xyes; then
9244 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9245 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9246 echo "local: *; };" >> $output_objdir/$libname.ver~
9247 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9248 fi
9249 ;;
9250 esac
9251 else
9252 ld_shlibs=no
9253 fi
9254 ;;
9255
9256 netbsd*)
9257 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9258 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9259 wlarc=
9260 else
9261 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9262 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9263 fi
9264 ;;
9265
9266 solaris*)
9267 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
9268 ld_shlibs=no
9269 cat <<_LT_EOF 1>&2
9270
9271 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9272 *** create shared libraries on Solaris systems. Therefore, libtool
9273 *** is disabling shared libraries support. We urge you to upgrade GNU
9274 *** binutils to release 2.9.1 or newer. Another option is to modify
9275 *** your PATH or compiler configuration so that the native linker is
9276 *** used, and then restart.
9277
9278 _LT_EOF
9279 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9280 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9281 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9282 else
9283 ld_shlibs=no
9284 fi
9285 ;;
9286
9287 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
9288 case `$LD -v 2>&1` in
9289 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
9290 ld_shlibs=no
9291 cat <<_LT_EOF 1>&2
9292
9293 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
9294 *** reliably create shared libraries on SCO systems. Therefore, libtool
9295 *** is disabling shared libraries support. We urge you to upgrade GNU
9296 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
9297 *** your PATH or compiler configuration so that the native linker is
9298 *** used, and then restart.
9299
9300 _LT_EOF
9301 ;;
9302 *)
9303 # For security reasons, it is highly recommended that you always
9304 # use absolute paths for naming shared libraries, and exclude the
9305 # DT_RUNPATH tag from executables and libraries. But doing so
9306 # requires that you compile everything twice, which is a pain.
9307 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9308 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9309 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9310 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9311 else
9312 ld_shlibs=no
9313 fi
9314 ;;
9315 esac
9316 ;;
9317
9318 sunos4*)
9319 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9320 wlarc=
9321 hardcode_direct=yes
9322 hardcode_shlibpath_var=no
9323 ;;
9324
9325 *)
9326 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9327 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9328 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9329 else
9330 ld_shlibs=no
9331 fi
9332 ;;
9333 esac
9334
9335 if test "$ld_shlibs" = no; then
9336 runpath_var=
9337 hardcode_libdir_flag_spec=
9338 export_dynamic_flag_spec=
9339 whole_archive_flag_spec=
9340 fi
9341 else
9342 # PORTME fill in a description of your system's linker (not GNU ld)
9343 case $host_os in
9344 aix3*)
9345 allow_undefined_flag=unsupported
9346 always_export_symbols=yes
9347 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
9348 # Note: this linker hardcodes the directories in LIBPATH if there
9349 # are no directories specified by -L.
9350 hardcode_minus_L=yes
9351 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
9352 # Neither direct hardcoding nor static linking is supported with a
9353 # broken collect2.
9354 hardcode_direct=unsupported
9355 fi
9356 ;;
9357
9358 aix[4-9]*)
9359 if test "$host_cpu" = ia64; then
9360 # On IA64, the linker does run time linking by default, so we don't
9361 # have to do anything special.
9362 aix_use_runtimelinking=no
9363 exp_sym_flag='-Bexport'
9364 no_entry_flag=""
9365 else
9366 # If we're using GNU nm, then we don't want the "-C" option.
9367 # -C means demangle to AIX nm, but means don't demangle with GNU nm
9368 # Also, AIX nm treats weak defined symbols like other global
9369 # defined symbols, whereas GNU nm marks them as "W".
9370 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
9371 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
9372 else
9373 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
9374 fi
9375 aix_use_runtimelinking=no
9376
9377 # Test if we are trying to use run time linking or normal
9378 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9379 # need to do runtime linking.
9380 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
9381 for ld_flag in $LDFLAGS; do
9382 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9383 aix_use_runtimelinking=yes
9384 break
9385 fi
9386 done
9387 ;;
9388 esac
9389
9390 exp_sym_flag='-bexport'
9391 no_entry_flag='-bnoentry'
9392 fi
9393
9394 # When large executables or shared objects are built, AIX ld can
9395 # have problems creating the table of contents. If linking a library
9396 # or program results in "error TOC overflow" add -mminimal-toc to
9397 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
9398 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9399
9400 archive_cmds=''
9401 hardcode_direct=yes
9402 hardcode_direct_absolute=yes
9403 hardcode_libdir_separator=':'
9404 link_all_deplibs=yes
9405 file_list_spec='${wl}-f,'
9406
9407 if test "$GCC" = yes; then
9408 case $host_os in aix4.[012]|aix4.[012].*)
9409 # We only want to do this on AIX 4.2 and lower, the check
9410 # below for broken collect2 doesn't work under 4.3+
9411 collect2name=`${CC} -print-prog-name=collect2`
9412 if test -f "$collect2name" &&
9413 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9414 then
9415 # We have reworked collect2
9416 :
9417 else
9418 # We have old collect2
9419 hardcode_direct=unsupported
9420 # It fails to find uninstalled libraries when the uninstalled
9421 # path is not listed in the libpath. Setting hardcode_minus_L
9422 # to unsupported forces relinking
9423 hardcode_minus_L=yes
9424 hardcode_libdir_flag_spec='-L$libdir'
9425 hardcode_libdir_separator=
9426 fi
9427 ;;
9428 esac
9429 shared_flag='-shared'
9430 if test "$aix_use_runtimelinking" = yes; then
9431 shared_flag="$shared_flag "'${wl}-G'
9432 fi
9433 else
9434 # not using gcc
9435 if test "$host_cpu" = ia64; then
9436 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9437 # chokes on -Wl,-G. The following line is correct:
9438 shared_flag='-G'
9439 else
9440 if test "$aix_use_runtimelinking" = yes; then
9441 shared_flag='${wl}-G'
9442 else
9443 shared_flag='${wl}-bM:SRE'
9444 fi
9445 fi
9446 fi
9447
9448 export_dynamic_flag_spec='${wl}-bexpall'
9449 # It seems that -bexpall does not export symbols beginning with
9450 # underscore (_), so it is better to generate a list of symbols to export.
9451 always_export_symbols=yes
9452 if test "$aix_use_runtimelinking" = yes; then
9453 # Warning - without using the other runtime loading flags (-brtl),
9454 # -berok will link without error, but may produce a broken library.
9455 allow_undefined_flag='-berok'
9456 # Determine the default libpath from the value encoded in an
9457 # empty executable.
9458 if test "${lt_cv_aix_libpath+set}" = set; then
9459 aix_libpath=$lt_cv_aix_libpath
9460 else
9461 if ${lt_cv_aix_libpath_+:} false; then :
9462 $as_echo_n "(cached) " >&6
9463 else
9464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9465 /* end confdefs.h. */
9466
9467 int
9468 main ()
9469 {
9470
9471 ;
9472 return 0;
9473 }
9474 _ACEOF
9475 if ac_fn_c_try_link "$LINENO"; then :
9476
9477 lt_aix_libpath_sed='
9478 /Import File Strings/,/^$/ {
9479 /^0/ {
9480 s/^0 *\([^ ]*\) *$/\1/
9481 p
9482 }
9483 }'
9484 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9485 # Check for a 64-bit object if we didn't find anything.
9486 if test -z "$lt_cv_aix_libpath_"; then
9487 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9488 fi
9489 fi
9490 rm -f core conftest.err conftest.$ac_objext \
9491 conftest$ac_exeext conftest.$ac_ext
9492 if test -z "$lt_cv_aix_libpath_"; then
9493 lt_cv_aix_libpath_="/usr/lib:/lib"
9494 fi
9495
9496 fi
9497
9498 aix_libpath=$lt_cv_aix_libpath_
9499 fi
9500
9501 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9502 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
9503 else
9504 if test "$host_cpu" = ia64; then
9505 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9506 allow_undefined_flag="-z nodefs"
9507 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
9508 else
9509 # Determine the default libpath from the value encoded in an
9510 # empty executable.
9511 if test "${lt_cv_aix_libpath+set}" = set; then
9512 aix_libpath=$lt_cv_aix_libpath
9513 else
9514 if ${lt_cv_aix_libpath_+:} false; then :
9515 $as_echo_n "(cached) " >&6
9516 else
9517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9518 /* end confdefs.h. */
9519
9520 int
9521 main ()
9522 {
9523
9524 ;
9525 return 0;
9526 }
9527 _ACEOF
9528 if ac_fn_c_try_link "$LINENO"; then :
9529
9530 lt_aix_libpath_sed='
9531 /Import File Strings/,/^$/ {
9532 /^0/ {
9533 s/^0 *\([^ ]*\) *$/\1/
9534 p
9535 }
9536 }'
9537 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9538 # Check for a 64-bit object if we didn't find anything.
9539 if test -z "$lt_cv_aix_libpath_"; then
9540 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9541 fi
9542 fi
9543 rm -f core conftest.err conftest.$ac_objext \
9544 conftest$ac_exeext conftest.$ac_ext
9545 if test -z "$lt_cv_aix_libpath_"; then
9546 lt_cv_aix_libpath_="/usr/lib:/lib"
9547 fi
9548
9549 fi
9550
9551 aix_libpath=$lt_cv_aix_libpath_
9552 fi
9553
9554 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9555 # Warning - without using the other run time loading flags,
9556 # -berok will link without error, but may produce a broken library.
9557 no_undefined_flag=' ${wl}-bernotok'
9558 allow_undefined_flag=' ${wl}-berok'
9559 if test "$with_gnu_ld" = yes; then
9560 # We only use this code for GNU lds that support --whole-archive.
9561 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9562 else
9563 # Exported symbols can be pulled into shared objects from archives
9564 whole_archive_flag_spec='$convenience'
9565 fi
9566 archive_cmds_need_lc=yes
9567 # This is similar to how AIX traditionally builds its shared libraries.
9568 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
9569 fi
9570 fi
9571 ;;
9572
9573 amigaos*)
9574 case $host_cpu in
9575 powerpc)
9576 # see comment about AmigaOS4 .so support
9577 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9578 archive_expsym_cmds=''
9579 ;;
9580 m68k)
9581 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
9582 hardcode_libdir_flag_spec='-L$libdir'
9583 hardcode_minus_L=yes
9584 ;;
9585 esac
9586 ;;
9587
9588 bsdi[45]*)
9589 export_dynamic_flag_spec=-rdynamic
9590 ;;
9591
9592 cygwin* | mingw* | pw32* | cegcc*)
9593 # When not using gcc, we currently assume that we are using
9594 # Microsoft Visual C++.
9595 # hardcode_libdir_flag_spec is actually meaningless, as there is
9596 # no search path for DLLs.
9597 case $cc_basename in
9598 cl*)
9599 # Native MSVC
9600 hardcode_libdir_flag_spec=' '
9601 allow_undefined_flag=unsupported
9602 always_export_symbols=yes
9603 file_list_spec='@'
9604 # Tell ltmain to make .lib files, not .a files.
9605 libext=lib
9606 # Tell ltmain to make .dll files, not .so files.
9607 shrext_cmds=".dll"
9608 # FIXME: Setting linknames here is a bad hack.
9609 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
9610 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9611 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
9612 else
9613 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
9614 fi~
9615 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
9616 linknames='
9617 # The linker will not automatically build a static lib if we build a DLL.
9618 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
9619 enable_shared_with_static_runtimes=yes
9620 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
9621 # Don't use ranlib
9622 old_postinstall_cmds='chmod 644 $oldlib'
9623 postlink_cmds='lt_outputfile="@OUTPUT@"~
9624 lt_tool_outputfile="@TOOL_OUTPUT@"~
9625 case $lt_outputfile in
9626 *.exe|*.EXE) ;;
9627 *)
9628 lt_outputfile="$lt_outputfile.exe"
9629 lt_tool_outputfile="$lt_tool_outputfile.exe"
9630 ;;
9631 esac~
9632 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
9633 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
9634 $RM "$lt_outputfile.manifest";
9635 fi'
9636 ;;
9637 *)
9638 # Assume MSVC wrapper
9639 hardcode_libdir_flag_spec=' '
9640 allow_undefined_flag=unsupported
9641 # Tell ltmain to make .lib files, not .a files.
9642 libext=lib
9643 # Tell ltmain to make .dll files, not .so files.
9644 shrext_cmds=".dll"
9645 # FIXME: Setting linknames here is a bad hack.
9646 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
9647 # The linker will automatically build a .lib file if we build a DLL.
9648 old_archive_from_new_cmds='true'
9649 # FIXME: Should let the user specify the lib program.
9650 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
9651 enable_shared_with_static_runtimes=yes
9652 ;;
9653 esac
9654 ;;
9655
9656 darwin* | rhapsody*)
9657
9658
9659 archive_cmds_need_lc=no
9660 hardcode_direct=no
9661 hardcode_automatic=yes
9662 hardcode_shlibpath_var=unsupported
9663 if test "$lt_cv_ld_force_load" = "yes"; then
9664 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
9665 else
9666 whole_archive_flag_spec=''
9667 fi
9668 link_all_deplibs=yes
9669 allow_undefined_flag="$_lt_dar_allow_undefined"
9670 case $cc_basename in
9671 ifort*) _lt_dar_can_shared=yes ;;
9672 *) _lt_dar_can_shared=$GCC ;;
9673 esac
9674 if test "$_lt_dar_can_shared" = "yes"; then
9675 output_verbose_link_cmd=func_echo_all
9676 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
9677 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
9678 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
9679 module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
9680
9681 else
9682 ld_shlibs=no
9683 fi
9684
9685 ;;
9686
9687 dgux*)
9688 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9689 hardcode_libdir_flag_spec='-L$libdir'
9690 hardcode_shlibpath_var=no
9691 ;;
9692
9693 freebsd1*)
9694 ld_shlibs=no
9695 ;;
9696
9697 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9698 # support. Future versions do this automatically, but an explicit c++rt0.o
9699 # does not break anything, and helps significantly (at the cost of a little
9700 # extra space).
9701 freebsd2.2*)
9702 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9703 hardcode_libdir_flag_spec='-R$libdir'
9704 hardcode_direct=yes
9705 hardcode_shlibpath_var=no
9706 ;;
9707
9708 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9709 freebsd2*)
9710 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9711 hardcode_direct=yes
9712 hardcode_minus_L=yes
9713 hardcode_shlibpath_var=no
9714 ;;
9715
9716 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9717 freebsd* | dragonfly*)
9718 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9719 hardcode_libdir_flag_spec='-R$libdir'
9720 hardcode_direct=yes
9721 hardcode_shlibpath_var=no
9722 ;;
9723
9724 hpux9*)
9725 if test "$GCC" = yes; then
9726 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9727 else
9728 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9729 fi
9730 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9731 hardcode_libdir_separator=:
9732 hardcode_direct=yes
9733
9734 # hardcode_minus_L: Not really in the search PATH,
9735 # but as the default location of the library.
9736 hardcode_minus_L=yes
9737 export_dynamic_flag_spec='${wl}-E'
9738 ;;
9739
9740 hpux10*)
9741 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9742 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9743 else
9744 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9745 fi
9746 if test "$with_gnu_ld" = no; then
9747 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9748 hardcode_libdir_flag_spec_ld='+b $libdir'
9749 hardcode_libdir_separator=:
9750 hardcode_direct=yes
9751 hardcode_direct_absolute=yes
9752 export_dynamic_flag_spec='${wl}-E'
9753 # hardcode_minus_L: Not really in the search PATH,
9754 # but as the default location of the library.
9755 hardcode_minus_L=yes
9756 fi
9757 ;;
9758
9759 hpux11*)
9760 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9761 case $host_cpu in
9762 hppa*64*)
9763 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9764 ;;
9765 ia64*)
9766 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9767 ;;
9768 *)
9769 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9770 ;;
9771 esac
9772 else
9773 case $host_cpu in
9774 hppa*64*)
9775 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9776 ;;
9777 ia64*)
9778 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9779 ;;
9780 *)
9781
9782 # Older versions of the 11.00 compiler do not understand -b yet
9783 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
9785 $as_echo_n "checking if $CC understands -b... " >&6; }
9786 if ${lt_cv_prog_compiler__b+:} false; then :
9787 $as_echo_n "(cached) " >&6
9788 else
9789 lt_cv_prog_compiler__b=no
9790 save_LDFLAGS="$LDFLAGS"
9791 LDFLAGS="$LDFLAGS -b"
9792 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9793 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9794 # The linker can only warn and ignore the option if not recognized
9795 # So say no if there are warnings
9796 if test -s conftest.err; then
9797 # Append any errors to the config.log.
9798 cat conftest.err 1>&5
9799 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9800 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9801 if diff conftest.exp conftest.er2 >/dev/null; then
9802 lt_cv_prog_compiler__b=yes
9803 fi
9804 else
9805 lt_cv_prog_compiler__b=yes
9806 fi
9807 fi
9808 $RM -r conftest*
9809 LDFLAGS="$save_LDFLAGS"
9810
9811 fi
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
9813 $as_echo "$lt_cv_prog_compiler__b" >&6; }
9814
9815 if test x"$lt_cv_prog_compiler__b" = xyes; then
9816 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9817 else
9818 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9819 fi
9820
9821 ;;
9822 esac
9823 fi
9824 if test "$with_gnu_ld" = no; then
9825 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9826 hardcode_libdir_separator=:
9827
9828 case $host_cpu in
9829 hppa*64*|ia64*)
9830 hardcode_direct=no
9831 hardcode_shlibpath_var=no
9832 ;;
9833 *)
9834 hardcode_direct=yes
9835 hardcode_direct_absolute=yes
9836 export_dynamic_flag_spec='${wl}-E'
9837
9838 # hardcode_minus_L: Not really in the search PATH,
9839 # but as the default location of the library.
9840 hardcode_minus_L=yes
9841 ;;
9842 esac
9843 fi
9844 ;;
9845
9846 irix5* | irix6* | nonstopux*)
9847 if test "$GCC" = yes; then
9848 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9849 # Try to use the -exported_symbol ld option, if it does not
9850 # work, assume that -exports_file does not work either and
9851 # implicitly export all symbols.
9852 # This should be the same for all languages, so no per-tag cache variable.
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
9854 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
9855 if ${lt_cv_irix_exported_symbol+:} false; then :
9856 $as_echo_n "(cached) " >&6
9857 else
9858 save_LDFLAGS="$LDFLAGS"
9859 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
9860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9861 /* end confdefs.h. */
9862 int foo (void) { return 0; }
9863 _ACEOF
9864 if ac_fn_c_try_link "$LINENO"; then :
9865 lt_cv_irix_exported_symbol=yes
9866 else
9867 lt_cv_irix_exported_symbol=no
9868 fi
9869 rm -f core conftest.err conftest.$ac_objext \
9870 conftest$ac_exeext conftest.$ac_ext
9871 LDFLAGS="$save_LDFLAGS"
9872 fi
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
9874 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
9875 if test "$lt_cv_irix_exported_symbol" = yes; then
9876 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
9877 fi
9878 else
9879 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9880 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
9881 fi
9882 archive_cmds_need_lc='no'
9883 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9884 hardcode_libdir_separator=:
9885 inherit_rpath=yes
9886 link_all_deplibs=yes
9887 ;;
9888
9889 netbsd*)
9890 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9891 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
9892 else
9893 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
9894 fi
9895 hardcode_libdir_flag_spec='-R$libdir'
9896 hardcode_direct=yes
9897 hardcode_shlibpath_var=no
9898 ;;
9899
9900 newsos6)
9901 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9902 hardcode_direct=yes
9903 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9904 hardcode_libdir_separator=:
9905 hardcode_shlibpath_var=no
9906 ;;
9907
9908 *nto* | *qnx*)
9909 ;;
9910
9911 openbsd*)
9912 if test -f /usr/libexec/ld.so; then
9913 hardcode_direct=yes
9914 hardcode_shlibpath_var=no
9915 hardcode_direct_absolute=yes
9916 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9917 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9918 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9919 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9920 export_dynamic_flag_spec='${wl}-E'
9921 else
9922 case $host_os in
9923 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9924 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9925 hardcode_libdir_flag_spec='-R$libdir'
9926 ;;
9927 *)
9928 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9929 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9930 ;;
9931 esac
9932 fi
9933 else
9934 ld_shlibs=no
9935 fi
9936 ;;
9937
9938 os2*)
9939 hardcode_libdir_flag_spec='-L$libdir'
9940 hardcode_minus_L=yes
9941 allow_undefined_flag=unsupported
9942 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
9943 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9944 ;;
9945
9946 osf3*)
9947 if test "$GCC" = yes; then
9948 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9949 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9950 else
9951 allow_undefined_flag=' -expect_unresolved \*'
9952 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9953 fi
9954 archive_cmds_need_lc='no'
9955 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9956 hardcode_libdir_separator=:
9957 ;;
9958
9959 osf4* | osf5*) # as osf3* with the addition of -msym flag
9960 if test "$GCC" = yes; then
9961 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9962 archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9963 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9964 else
9965 allow_undefined_flag=' -expect_unresolved \*'
9966 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9967 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
9968 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
9969
9970 # Both c and cxx compiler support -rpath directly
9971 hardcode_libdir_flag_spec='-rpath $libdir'
9972 fi
9973 archive_cmds_need_lc='no'
9974 hardcode_libdir_separator=:
9975 ;;
9976
9977 solaris*)
9978 no_undefined_flag=' -z defs'
9979 if test "$GCC" = yes; then
9980 wlarc='${wl}'
9981 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9982 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9983 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9984 else
9985 case `$CC -V 2>&1` in
9986 *"Compilers 5.0"*)
9987 wlarc=''
9988 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9989 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9990 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9991 ;;
9992 *)
9993 wlarc='${wl}'
9994 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9995 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9996 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9997 ;;
9998 esac
9999 fi
10000 hardcode_libdir_flag_spec='-R$libdir'
10001 hardcode_shlibpath_var=no
10002 case $host_os in
10003 solaris2.[0-5] | solaris2.[0-5].*) ;;
10004 *)
10005 # The compiler driver will combine and reorder linker options,
10006 # but understands `-z linker_flag'. GCC discards it without `$wl',
10007 # but is careful enough not to reorder.
10008 # Supported since Solaris 2.6 (maybe 2.5.1?)
10009 if test "$GCC" = yes; then
10010 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
10011 else
10012 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
10013 fi
10014 ;;
10015 esac
10016 link_all_deplibs=yes
10017 ;;
10018
10019 sunos4*)
10020 if test "x$host_vendor" = xsequent; then
10021 # Use $CC to link under sequent, because it throws in some extra .o
10022 # files that make .init and .fini sections work.
10023 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10024 else
10025 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10026 fi
10027 hardcode_libdir_flag_spec='-L$libdir'
10028 hardcode_direct=yes
10029 hardcode_minus_L=yes
10030 hardcode_shlibpath_var=no
10031 ;;
10032
10033 sysv4)
10034 case $host_vendor in
10035 sni)
10036 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10037 hardcode_direct=yes # is this really true???
10038 ;;
10039 siemens)
10040 ## LD is ld it makes a PLAMLIB
10041 ## CC just makes a GrossModule.
10042 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10043 reload_cmds='$CC -r -o $output$reload_objs'
10044 hardcode_direct=no
10045 ;;
10046 motorola)
10047 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10048 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
10049 ;;
10050 esac
10051 runpath_var='LD_RUN_PATH'
10052 hardcode_shlibpath_var=no
10053 ;;
10054
10055 sysv4.3*)
10056 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10057 hardcode_shlibpath_var=no
10058 export_dynamic_flag_spec='-Bexport'
10059 ;;
10060
10061 sysv4*MP*)
10062 if test -d /usr/nec; then
10063 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10064 hardcode_shlibpath_var=no
10065 runpath_var=LD_RUN_PATH
10066 hardcode_runpath_var=yes
10067 ld_shlibs=yes
10068 fi
10069 ;;
10070
10071 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
10072 no_undefined_flag='${wl}-z,text'
10073 archive_cmds_need_lc=no
10074 hardcode_shlibpath_var=no
10075 runpath_var='LD_RUN_PATH'
10076
10077 if test "$GCC" = yes; then
10078 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10079 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10080 else
10081 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10082 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10083 fi
10084 ;;
10085
10086 sysv5* | sco3.2v5* | sco5v6*)
10087 # Note: We can NOT use -z defs as we might desire, because we do not
10088 # link with -lc, and that would cause any symbols used from libc to
10089 # always be unresolved, which means just about no library would
10090 # ever link correctly. If we're not using GNU ld we use -z text
10091 # though, which does catch some bad symbols but isn't as heavy-handed
10092 # as -z defs.
10093 no_undefined_flag='${wl}-z,text'
10094 allow_undefined_flag='${wl}-z,nodefs'
10095 archive_cmds_need_lc=no
10096 hardcode_shlibpath_var=no
10097 hardcode_libdir_flag_spec='${wl}-R,$libdir'
10098 hardcode_libdir_separator=':'
10099 link_all_deplibs=yes
10100 export_dynamic_flag_spec='${wl}-Bexport'
10101 runpath_var='LD_RUN_PATH'
10102
10103 if test "$GCC" = yes; then
10104 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10105 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10106 else
10107 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10108 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10109 fi
10110 ;;
10111
10112 uts4*)
10113 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10114 hardcode_libdir_flag_spec='-L$libdir'
10115 hardcode_shlibpath_var=no
10116 ;;
10117
10118 *)
10119 ld_shlibs=no
10120 ;;
10121 esac
10122
10123 if test x$host_vendor = xsni; then
10124 case $host in
10125 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10126 export_dynamic_flag_spec='${wl}-Blargedynsym'
10127 ;;
10128 esac
10129 fi
10130 fi
10131
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
10133 $as_echo "$ld_shlibs" >&6; }
10134 test "$ld_shlibs" = no && can_build_shared=no
10135
10136 with_gnu_ld=$with_gnu_ld
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152 #
10153 # Do we need to explicitly link libc?
10154 #
10155 case "x$archive_cmds_need_lc" in
10156 x|xyes)
10157 # Assume -lc should be added
10158 archive_cmds_need_lc=yes
10159
10160 if test "$enable_shared" = yes && test "$GCC" = yes; then
10161 case $archive_cmds in
10162 *'~'*)
10163 # FIXME: we may have to deal with multi-command sequences.
10164 ;;
10165 '$CC '*)
10166 # Test whether the compiler implicitly links with -lc since on some
10167 # systems, -lgcc has to come before -lc. If gcc already passes -lc
10168 # to ld, don't add -lc before -lgcc.
10169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
10170 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
10171 if ${lt_cv_archive_cmds_need_lc+:} false; then :
10172 $as_echo_n "(cached) " >&6
10173 else
10174 $RM conftest*
10175 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10176
10177 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10178 (eval $ac_compile) 2>&5
10179 ac_status=$?
10180 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10181 test $ac_status = 0; } 2>conftest.err; then
10182 soname=conftest
10183 lib=conftest
10184 libobjs=conftest.$ac_objext
10185 deplibs=
10186 wl=$lt_prog_compiler_wl
10187 pic_flag=$lt_prog_compiler_pic
10188 compiler_flags=-v
10189 linker_flags=-v
10190 verstring=
10191 output_objdir=.
10192 libname=conftest
10193 lt_save_allow_undefined_flag=$allow_undefined_flag
10194 allow_undefined_flag=
10195 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
10196 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
10197 ac_status=$?
10198 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10199 test $ac_status = 0; }
10200 then
10201 lt_cv_archive_cmds_need_lc=no
10202 else
10203 lt_cv_archive_cmds_need_lc=yes
10204 fi
10205 allow_undefined_flag=$lt_save_allow_undefined_flag
10206 else
10207 cat conftest.err 1>&5
10208 fi
10209 $RM conftest*
10210
10211 fi
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
10213 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
10214 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
10215 ;;
10216 esac
10217 fi
10218 ;;
10219 esac
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
10378 $as_echo_n "checking dynamic linker characteristics... " >&6; }
10379
10380 if test "$GCC" = yes; then
10381 case $host_os in
10382 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
10383 *) lt_awk_arg="/^libraries:/" ;;
10384 esac
10385 case $host_os in
10386 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
10387 *) lt_sed_strip_eq="s,=/,/,g" ;;
10388 esac
10389 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
10390 case $lt_search_path_spec in
10391 *\;*)
10392 # if the path contains ";" then we assume it to be the separator
10393 # otherwise default to the standard path separator (i.e. ":") - it is
10394 # assumed that no part of a normal pathname contains ";" but that should
10395 # okay in the real world where ";" in dirpaths is itself problematic.
10396 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
10397 ;;
10398 *)
10399 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
10400 ;;
10401 esac
10402 # Ok, now we have the path, separated by spaces, we can step through it
10403 # and add multilib dir if necessary.
10404 lt_tmp_lt_search_path_spec=
10405 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
10406 for lt_sys_path in $lt_search_path_spec; do
10407 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
10408 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
10409 else
10410 test -d "$lt_sys_path" && \
10411 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
10412 fi
10413 done
10414 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
10415 BEGIN {RS=" "; FS="/|\n";} {
10416 lt_foo="";
10417 lt_count=0;
10418 for (lt_i = NF; lt_i > 0; lt_i--) {
10419 if ($lt_i != "" && $lt_i != ".") {
10420 if ($lt_i == "..") {
10421 lt_count++;
10422 } else {
10423 if (lt_count == 0) {
10424 lt_foo="/" $lt_i lt_foo;
10425 } else {
10426 lt_count--;
10427 }
10428 }
10429 }
10430 }
10431 if (lt_foo != "") { lt_freq[lt_foo]++; }
10432 if (lt_freq[lt_foo] == 1) { print lt_foo; }
10433 }'`
10434 # AWK program above erroneously prepends '/' to C:/dos/paths
10435 # for these hosts.
10436 case $host_os in
10437 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
10438 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
10439 esac
10440 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
10441 else
10442 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
10443 fi
10444 library_names_spec=
10445 libname_spec='lib$name'
10446 soname_spec=
10447 shrext_cmds=".so"
10448 postinstall_cmds=
10449 postuninstall_cmds=
10450 finish_cmds=
10451 finish_eval=
10452 shlibpath_var=
10453 shlibpath_overrides_runpath=unknown
10454 version_type=none
10455 dynamic_linker="$host_os ld.so"
10456 sys_lib_dlsearch_path_spec="/lib /usr/lib"
10457 need_lib_prefix=unknown
10458 hardcode_into_libs=no
10459
10460 # when you set need_version to no, make sure it does not cause -set_version
10461 # flags to be left without arguments
10462 need_version=unknown
10463
10464 case $host_os in
10465 aix3*)
10466 version_type=linux
10467 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
10468 shlibpath_var=LIBPATH
10469
10470 # AIX 3 has no versioning support, so we append a major version to the name.
10471 soname_spec='${libname}${release}${shared_ext}$major'
10472 ;;
10473
10474 aix[4-9]*)
10475 version_type=linux
10476 need_lib_prefix=no
10477 need_version=no
10478 hardcode_into_libs=yes
10479 if test "$host_cpu" = ia64; then
10480 # AIX 5 supports IA64
10481 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
10482 shlibpath_var=LD_LIBRARY_PATH
10483 else
10484 # With GCC up to 2.95.x, collect2 would create an import file
10485 # for dependence libraries. The import file would start with
10486 # the line `#! .'. This would cause the generated library to
10487 # depend on `.', always an invalid library. This was fixed in
10488 # development snapshots of GCC prior to 3.0.
10489 case $host_os in
10490 aix4 | aix4.[01] | aix4.[01].*)
10491 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
10492 echo ' yes '
10493 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
10494 :
10495 else
10496 can_build_shared=no
10497 fi
10498 ;;
10499 esac
10500 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
10501 # soname into executable. Probably we can add versioning support to
10502 # collect2, so additional links can be useful in future.
10503 if test "$aix_use_runtimelinking" = yes; then
10504 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
10505 # instead of lib<name>.a to let people know that these are not
10506 # typical AIX shared libraries.
10507 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10508 else
10509 # We preserve .a as extension for shared libraries through AIX4.2
10510 # and later when we are not doing run time linking.
10511 library_names_spec='${libname}${release}.a $libname.a'
10512 soname_spec='${libname}${release}${shared_ext}$major'
10513 fi
10514 shlibpath_var=LIBPATH
10515 fi
10516 ;;
10517
10518 amigaos*)
10519 case $host_cpu in
10520 powerpc)
10521 # Since July 2007 AmigaOS4 officially supports .so libraries.
10522 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
10523 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10524 ;;
10525 m68k)
10526 library_names_spec='$libname.ixlibrary $libname.a'
10527 # Create ${libname}_ixlibrary.a entries in /sys/libs.
10528 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
10529 ;;
10530 esac
10531 ;;
10532
10533 beos*)
10534 library_names_spec='${libname}${shared_ext}'
10535 dynamic_linker="$host_os ld.so"
10536 shlibpath_var=LIBRARY_PATH
10537 ;;
10538
10539 bsdi[45]*)
10540 version_type=linux
10541 need_version=no
10542 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10543 soname_spec='${libname}${release}${shared_ext}$major'
10544 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
10545 shlibpath_var=LD_LIBRARY_PATH
10546 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
10547 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
10548 # the default ld.so.conf also contains /usr/contrib/lib and
10549 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
10550 # libtool to hard-code these into programs
10551 ;;
10552
10553 cygwin* | mingw* | pw32* | cegcc*)
10554 version_type=windows
10555 shrext_cmds=".dll"
10556 need_version=no
10557 need_lib_prefix=no
10558
10559 case $GCC,$cc_basename in
10560 yes,*)
10561 # gcc
10562 library_names_spec='$libname.dll.a'
10563 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10564 postinstall_cmds='base_file=`basename \${file}`~
10565 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
10566 dldir=$destdir/`dirname \$dlpath`~
10567 test -d \$dldir || mkdir -p \$dldir~
10568 $install_prog $dir/$dlname \$dldir/$dlname~
10569 chmod a+x \$dldir/$dlname~
10570 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
10571 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
10572 fi'
10573 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10574 dlpath=$dir/\$dldll~
10575 $RM \$dlpath'
10576 shlibpath_overrides_runpath=yes
10577
10578 case $host_os in
10579 cygwin*)
10580 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10581 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10582
10583 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
10584 ;;
10585 mingw* | cegcc*)
10586 # MinGW DLLs use traditional 'lib' prefix
10587 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10588 ;;
10589 pw32*)
10590 # pw32 DLLs use 'pw' prefix rather than 'lib'
10591 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10592 ;;
10593 esac
10594 dynamic_linker='Win32 ld.exe'
10595 ;;
10596
10597 *,cl*)
10598 # Native MSVC
10599 libname_spec='$name'
10600 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10601 library_names_spec='${libname}.dll.lib'
10602
10603 case $build_os in
10604 mingw*)
10605 sys_lib_search_path_spec=
10606 lt_save_ifs=$IFS
10607 IFS=';'
10608 for lt_path in $LIB
10609 do
10610 IFS=$lt_save_ifs
10611 # Let DOS variable expansion print the short 8.3 style file name.
10612 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
10613 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
10614 done
10615 IFS=$lt_save_ifs
10616 # Convert to MSYS style.
10617 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
10618 ;;
10619 cygwin*)
10620 # Convert to unix form, then to dos form, then back to unix form
10621 # but this time dos style (no spaces!) so that the unix form looks
10622 # like /cygdrive/c/PROGRA~1:/cygdr...
10623 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
10624 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
10625 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10626 ;;
10627 *)
10628 sys_lib_search_path_spec="$LIB"
10629 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
10630 # It is most probably a Windows format PATH.
10631 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10632 else
10633 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10634 fi
10635 # FIXME: find the short name or the path components, as spaces are
10636 # common. (e.g. "Program Files" -> "PROGRA~1")
10637 ;;
10638 esac
10639
10640 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10641 postinstall_cmds='base_file=`basename \${file}`~
10642 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
10643 dldir=$destdir/`dirname \$dlpath`~
10644 test -d \$dldir || mkdir -p \$dldir~
10645 $install_prog $dir/$dlname \$dldir/$dlname'
10646 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10647 dlpath=$dir/\$dldll~
10648 $RM \$dlpath'
10649 shlibpath_overrides_runpath=yes
10650 dynamic_linker='Win32 link.exe'
10651 ;;
10652
10653 *)
10654 # Assume MSVC wrapper
10655 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10656 dynamic_linker='Win32 ld.exe'
10657 ;;
10658 esac
10659 # FIXME: first we should search . and the directory the executable is in
10660 shlibpath_var=PATH
10661 ;;
10662
10663 darwin* | rhapsody*)
10664 dynamic_linker="$host_os dyld"
10665 version_type=darwin
10666 need_lib_prefix=no
10667 need_version=no
10668 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10669 soname_spec='${libname}${release}${major}$shared_ext'
10670 shlibpath_overrides_runpath=yes
10671 shlibpath_var=DYLD_LIBRARY_PATH
10672 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10673
10674 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
10675 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10676 ;;
10677
10678 dgux*)
10679 version_type=linux
10680 need_lib_prefix=no
10681 need_version=no
10682 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10683 soname_spec='${libname}${release}${shared_ext}$major'
10684 shlibpath_var=LD_LIBRARY_PATH
10685 ;;
10686
10687 freebsd1*)
10688 dynamic_linker=no
10689 ;;
10690
10691 freebsd* | dragonfly*)
10692 # DragonFly does not have aout. When/if they implement a new
10693 # versioning mechanism, adjust this.
10694 if test -x /usr/bin/objformat; then
10695 objformat=`/usr/bin/objformat`
10696 else
10697 case $host_os in
10698 freebsd[123]*) objformat=aout ;;
10699 *) objformat=elf ;;
10700 esac
10701 fi
10702 version_type=freebsd-$objformat
10703 case $version_type in
10704 freebsd-elf*)
10705 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10706 need_version=no
10707 need_lib_prefix=no
10708 ;;
10709 freebsd-*)
10710 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10711 need_version=yes
10712 ;;
10713 esac
10714 shlibpath_var=LD_LIBRARY_PATH
10715 case $host_os in
10716 freebsd2*)
10717 shlibpath_overrides_runpath=yes
10718 ;;
10719 freebsd3.[01]* | freebsdelf3.[01]*)
10720 shlibpath_overrides_runpath=yes
10721 hardcode_into_libs=yes
10722 ;;
10723 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
10724 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
10725 shlibpath_overrides_runpath=no
10726 hardcode_into_libs=yes
10727 ;;
10728 *) # from 4.6 on, and DragonFly
10729 shlibpath_overrides_runpath=yes
10730 hardcode_into_libs=yes
10731 ;;
10732 esac
10733 ;;
10734
10735 gnu*)
10736 version_type=linux
10737 need_lib_prefix=no
10738 need_version=no
10739 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10740 soname_spec='${libname}${release}${shared_ext}$major'
10741 shlibpath_var=LD_LIBRARY_PATH
10742 hardcode_into_libs=yes
10743 ;;
10744
10745 haiku*)
10746 version_type=linux
10747 need_lib_prefix=no
10748 need_version=no
10749 dynamic_linker="$host_os runtime_loader"
10750 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10751 soname_spec='${libname}${release}${shared_ext}$major'
10752 shlibpath_var=LIBRARY_PATH
10753 shlibpath_overrides_runpath=yes
10754 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
10755 hardcode_into_libs=yes
10756 ;;
10757
10758 hpux9* | hpux10* | hpux11*)
10759 # Give a soname corresponding to the major version so that dld.sl refuses to
10760 # link against other versions.
10761 version_type=sunos
10762 need_lib_prefix=no
10763 need_version=no
10764 case $host_cpu in
10765 ia64*)
10766 shrext_cmds='.so'
10767 hardcode_into_libs=yes
10768 dynamic_linker="$host_os dld.so"
10769 shlibpath_var=LD_LIBRARY_PATH
10770 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10771 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10772 soname_spec='${libname}${release}${shared_ext}$major'
10773 if test "X$HPUX_IA64_MODE" = X32; then
10774 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10775 else
10776 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10777 fi
10778 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10779 ;;
10780 hppa*64*)
10781 shrext_cmds='.sl'
10782 hardcode_into_libs=yes
10783 dynamic_linker="$host_os dld.sl"
10784 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10785 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10786 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10787 soname_spec='${libname}${release}${shared_ext}$major'
10788 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10789 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10790 ;;
10791 *)
10792 shrext_cmds='.sl'
10793 dynamic_linker="$host_os dld.sl"
10794 shlibpath_var=SHLIB_PATH
10795 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10796 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10797 soname_spec='${libname}${release}${shared_ext}$major'
10798 ;;
10799 esac
10800 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
10801 postinstall_cmds='chmod 555 $lib'
10802 # or fails outright, so override atomically:
10803 install_override_mode=555
10804 ;;
10805
10806 interix[3-9]*)
10807 version_type=linux
10808 need_lib_prefix=no
10809 need_version=no
10810 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10811 soname_spec='${libname}${release}${shared_ext}$major'
10812 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
10813 shlibpath_var=LD_LIBRARY_PATH
10814 shlibpath_overrides_runpath=no
10815 hardcode_into_libs=yes
10816 ;;
10817
10818 irix5* | irix6* | nonstopux*)
10819 case $host_os in
10820 nonstopux*) version_type=nonstopux ;;
10821 *)
10822 if test "$lt_cv_prog_gnu_ld" = yes; then
10823 version_type=linux
10824 else
10825 version_type=irix
10826 fi ;;
10827 esac
10828 need_lib_prefix=no
10829 need_version=no
10830 soname_spec='${libname}${release}${shared_ext}$major'
10831 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10832 case $host_os in
10833 irix5* | nonstopux*)
10834 libsuff= shlibsuff=
10835 ;;
10836 *)
10837 case $LD in # libtool.m4 will add one of these switches to LD
10838 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10839 libsuff= shlibsuff= libmagic=32-bit;;
10840 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10841 libsuff=32 shlibsuff=N32 libmagic=N32;;
10842 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10843 libsuff=64 shlibsuff=64 libmagic=64-bit;;
10844 *) libsuff= shlibsuff= libmagic=never-match;;
10845 esac
10846 ;;
10847 esac
10848 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10849 shlibpath_overrides_runpath=no
10850 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10851 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10852 hardcode_into_libs=yes
10853 ;;
10854
10855 # No shared lib support for Linux oldld, aout, or coff.
10856 linux*oldld* | linux*aout* | linux*coff*)
10857 dynamic_linker=no
10858 ;;
10859
10860 # This must be Linux ELF.
10861 linux* | k*bsd*-gnu | kopensolaris*-gnu)
10862 version_type=linux
10863 need_lib_prefix=no
10864 need_version=no
10865 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10866 soname_spec='${libname}${release}${shared_ext}$major'
10867 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10868 shlibpath_var=LD_LIBRARY_PATH
10869 shlibpath_overrides_runpath=no
10870
10871 # Some binutils ld are patched to set DT_RUNPATH
10872 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
10873 $as_echo_n "(cached) " >&6
10874 else
10875 lt_cv_shlibpath_overrides_runpath=no
10876 save_LDFLAGS=$LDFLAGS
10877 save_libdir=$libdir
10878 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10879 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10881 /* end confdefs.h. */
10882
10883 int
10884 main ()
10885 {
10886
10887 ;
10888 return 0;
10889 }
10890 _ACEOF
10891 if ac_fn_c_try_link "$LINENO"; then :
10892 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
10893 lt_cv_shlibpath_overrides_runpath=yes
10894 fi
10895 fi
10896 rm -f core conftest.err conftest.$ac_objext \
10897 conftest$ac_exeext conftest.$ac_ext
10898 LDFLAGS=$save_LDFLAGS
10899 libdir=$save_libdir
10900
10901 fi
10902
10903 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
10904
10905 # This implies no fast_install, which is unacceptable.
10906 # Some rework will be needed to allow for fast_install
10907 # before this can be enabled.
10908 hardcode_into_libs=yes
10909
10910 # Append ld.so.conf contents to the search path
10911 if test -f /etc/ld.so.conf; then
10912 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
10913 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10914 fi
10915
10916 # We used to test for /lib/ld.so.1 and disable shared libraries on
10917 # powerpc, because MkLinux only supported shared libraries with the
10918 # GNU dynamic linker. Since this was broken with cross compilers,
10919 # most powerpc-linux boxes support dynamic linking these days and
10920 # people can always --disable-shared, the test was removed, and we
10921 # assume the GNU/Linux dynamic linker is in use.
10922 dynamic_linker='GNU/Linux ld.so'
10923 ;;
10924
10925 netbsd*)
10926 version_type=sunos
10927 need_lib_prefix=no
10928 need_version=no
10929 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10930 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10931 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10932 dynamic_linker='NetBSD (a.out) ld.so'
10933 else
10934 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10935 soname_spec='${libname}${release}${shared_ext}$major'
10936 dynamic_linker='NetBSD ld.elf_so'
10937 fi
10938 shlibpath_var=LD_LIBRARY_PATH
10939 shlibpath_overrides_runpath=yes
10940 hardcode_into_libs=yes
10941 ;;
10942
10943 newsos6)
10944 version_type=linux
10945 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10946 shlibpath_var=LD_LIBRARY_PATH
10947 shlibpath_overrides_runpath=yes
10948 ;;
10949
10950 *nto* | *qnx*)
10951 version_type=qnx
10952 need_lib_prefix=no
10953 need_version=no
10954 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10955 soname_spec='${libname}${release}${shared_ext}$major'
10956 shlibpath_var=LD_LIBRARY_PATH
10957 shlibpath_overrides_runpath=no
10958 hardcode_into_libs=yes
10959 dynamic_linker='ldqnx.so'
10960 ;;
10961
10962 openbsd*)
10963 version_type=sunos
10964 sys_lib_dlsearch_path_spec="/usr/lib"
10965 need_lib_prefix=no
10966 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10967 case $host_os in
10968 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10969 *) need_version=no ;;
10970 esac
10971 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10972 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10973 shlibpath_var=LD_LIBRARY_PATH
10974 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10975 case $host_os in
10976 openbsd2.[89] | openbsd2.[89].*)
10977 shlibpath_overrides_runpath=no
10978 ;;
10979 *)
10980 shlibpath_overrides_runpath=yes
10981 ;;
10982 esac
10983 else
10984 shlibpath_overrides_runpath=yes
10985 fi
10986 ;;
10987
10988 os2*)
10989 libname_spec='$name'
10990 shrext_cmds=".dll"
10991 need_lib_prefix=no
10992 library_names_spec='$libname${shared_ext} $libname.a'
10993 dynamic_linker='OS/2 ld.exe'
10994 shlibpath_var=LIBPATH
10995 ;;
10996
10997 osf3* | osf4* | osf5*)
10998 version_type=osf
10999 need_lib_prefix=no
11000 need_version=no
11001 soname_spec='${libname}${release}${shared_ext}$major'
11002 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11003 shlibpath_var=LD_LIBRARY_PATH
11004 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
11005 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
11006 ;;
11007
11008 rdos*)
11009 dynamic_linker=no
11010 ;;
11011
11012 solaris*)
11013 version_type=linux
11014 need_lib_prefix=no
11015 need_version=no
11016 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11017 soname_spec='${libname}${release}${shared_ext}$major'
11018 shlibpath_var=LD_LIBRARY_PATH
11019 shlibpath_overrides_runpath=yes
11020 hardcode_into_libs=yes
11021 # ldd complains unless libraries are executable
11022 postinstall_cmds='chmod +x $lib'
11023 ;;
11024
11025 sunos4*)
11026 version_type=sunos
11027 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11028 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
11029 shlibpath_var=LD_LIBRARY_PATH
11030 shlibpath_overrides_runpath=yes
11031 if test "$with_gnu_ld" = yes; then
11032 need_lib_prefix=no
11033 fi
11034 need_version=yes
11035 ;;
11036
11037 sysv4 | sysv4.3*)
11038 version_type=linux
11039 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11040 soname_spec='${libname}${release}${shared_ext}$major'
11041 shlibpath_var=LD_LIBRARY_PATH
11042 case $host_vendor in
11043 sni)
11044 shlibpath_overrides_runpath=no
11045 need_lib_prefix=no
11046 runpath_var=LD_RUN_PATH
11047 ;;
11048 siemens)
11049 need_lib_prefix=no
11050 ;;
11051 motorola)
11052 need_lib_prefix=no
11053 need_version=no
11054 shlibpath_overrides_runpath=no
11055 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
11056 ;;
11057 esac
11058 ;;
11059
11060 sysv4*MP*)
11061 if test -d /usr/nec ;then
11062 version_type=linux
11063 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
11064 soname_spec='$libname${shared_ext}.$major'
11065 shlibpath_var=LD_LIBRARY_PATH
11066 fi
11067 ;;
11068
11069 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
11070 version_type=freebsd-elf
11071 need_lib_prefix=no
11072 need_version=no
11073 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11074 soname_spec='${libname}${release}${shared_ext}$major'
11075 shlibpath_var=LD_LIBRARY_PATH
11076 shlibpath_overrides_runpath=yes
11077 hardcode_into_libs=yes
11078 if test "$with_gnu_ld" = yes; then
11079 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
11080 else
11081 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
11082 case $host_os in
11083 sco3.2v5*)
11084 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
11085 ;;
11086 esac
11087 fi
11088 sys_lib_dlsearch_path_spec='/usr/lib'
11089 ;;
11090
11091 tpf*)
11092 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
11093 version_type=linux
11094 need_lib_prefix=no
11095 need_version=no
11096 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11097 shlibpath_var=LD_LIBRARY_PATH
11098 shlibpath_overrides_runpath=no
11099 hardcode_into_libs=yes
11100 ;;
11101
11102 uts4*)
11103 version_type=linux
11104 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11105 soname_spec='${libname}${release}${shared_ext}$major'
11106 shlibpath_var=LD_LIBRARY_PATH
11107 ;;
11108
11109 *)
11110 dynamic_linker=no
11111 ;;
11112 esac
11113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
11114 $as_echo "$dynamic_linker" >&6; }
11115 test "$dynamic_linker" = no && can_build_shared=no
11116
11117 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11118 if test "$GCC" = yes; then
11119 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11120 fi
11121
11122 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
11123 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
11124 fi
11125 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
11126 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
11127 fi
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
11221 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
11222 hardcode_action=
11223 if test -n "$hardcode_libdir_flag_spec" ||
11224 test -n "$runpath_var" ||
11225 test "X$hardcode_automatic" = "Xyes" ; then
11226
11227 # We can hardcode non-existent directories.
11228 if test "$hardcode_direct" != no &&
11229 # If the only mechanism to avoid hardcoding is shlibpath_var, we
11230 # have to relink, otherwise we might link with an installed library
11231 # when we should be linking with a yet-to-be-installed one
11232 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
11233 test "$hardcode_minus_L" != no; then
11234 # Linking always hardcodes the temporary library directory.
11235 hardcode_action=relink
11236 else
11237 # We can link without hardcoding, and we can hardcode nonexisting dirs.
11238 hardcode_action=immediate
11239 fi
11240 else
11241 # We cannot hardcode anything, or else we can only hardcode existing
11242 # directories.
11243 hardcode_action=unsupported
11244 fi
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
11246 $as_echo "$hardcode_action" >&6; }
11247
11248 if test "$hardcode_action" = relink ||
11249 test "$inherit_rpath" = yes; then
11250 # Fast installation is not supported
11251 enable_fast_install=no
11252 elif test "$shlibpath_overrides_runpath" = yes ||
11253 test "$enable_shared" = no; then
11254 # Fast installation is not necessary
11255 enable_fast_install=needless
11256 fi
11257
11258
11259
11260
11261
11262
11263 if test "x$enable_dlopen" != xyes; then
11264 enable_dlopen=unknown
11265 enable_dlopen_self=unknown
11266 enable_dlopen_self_static=unknown
11267 else
11268 lt_cv_dlopen=no
11269 lt_cv_dlopen_libs=
11270
11271 case $host_os in
11272 beos*)
11273 lt_cv_dlopen="load_add_on"
11274 lt_cv_dlopen_libs=
11275 lt_cv_dlopen_self=yes
11276 ;;
11277
11278 mingw* | pw32* | cegcc*)
11279 lt_cv_dlopen="LoadLibrary"
11280 lt_cv_dlopen_libs=
11281 ;;
11282
11283 cygwin*)
11284 lt_cv_dlopen="dlopen"
11285 lt_cv_dlopen_libs=
11286 ;;
11287
11288 darwin*)
11289 # if libdl is installed we need to link against it
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11291 $as_echo_n "checking for dlopen in -ldl... " >&6; }
11292 if ${ac_cv_lib_dl_dlopen+:} false; then :
11293 $as_echo_n "(cached) " >&6
11294 else
11295 ac_check_lib_save_LIBS=$LIBS
11296 LIBS="-ldl $LIBS"
11297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11298 /* end confdefs.h. */
11299
11300 /* Override any GCC internal prototype to avoid an error.
11301 Use char because int might match the return type of a GCC
11302 builtin and then its argument prototype would still apply. */
11303 #ifdef __cplusplus
11304 extern "C"
11305 #endif
11306 char dlopen ();
11307 int
11308 main ()
11309 {
11310 return dlopen ();
11311 ;
11312 return 0;
11313 }
11314 _ACEOF
11315 if ac_fn_c_try_link "$LINENO"; then :
11316 ac_cv_lib_dl_dlopen=yes
11317 else
11318 ac_cv_lib_dl_dlopen=no
11319 fi
11320 rm -f core conftest.err conftest.$ac_objext \
11321 conftest$ac_exeext conftest.$ac_ext
11322 LIBS=$ac_check_lib_save_LIBS
11323 fi
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11325 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11326 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11327 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11328 else
11329
11330 lt_cv_dlopen="dyld"
11331 lt_cv_dlopen_libs=
11332 lt_cv_dlopen_self=yes
11333
11334 fi
11335
11336 ;;
11337
11338 *)
11339 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
11340 if test "x$ac_cv_func_shl_load" = xyes; then :
11341 lt_cv_dlopen="shl_load"
11342 else
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
11344 $as_echo_n "checking for shl_load in -ldld... " >&6; }
11345 if ${ac_cv_lib_dld_shl_load+:} false; then :
11346 $as_echo_n "(cached) " >&6
11347 else
11348 ac_check_lib_save_LIBS=$LIBS
11349 LIBS="-ldld $LIBS"
11350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11351 /* end confdefs.h. */
11352
11353 /* Override any GCC internal prototype to avoid an error.
11354 Use char because int might match the return type of a GCC
11355 builtin and then its argument prototype would still apply. */
11356 #ifdef __cplusplus
11357 extern "C"
11358 #endif
11359 char shl_load ();
11360 int
11361 main ()
11362 {
11363 return shl_load ();
11364 ;
11365 return 0;
11366 }
11367 _ACEOF
11368 if ac_fn_c_try_link "$LINENO"; then :
11369 ac_cv_lib_dld_shl_load=yes
11370 else
11371 ac_cv_lib_dld_shl_load=no
11372 fi
11373 rm -f core conftest.err conftest.$ac_objext \
11374 conftest$ac_exeext conftest.$ac_ext
11375 LIBS=$ac_check_lib_save_LIBS
11376 fi
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
11378 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
11379 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
11380 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
11381 else
11382 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11383 if test "x$ac_cv_func_dlopen" = xyes; then :
11384 lt_cv_dlopen="dlopen"
11385 else
11386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11387 $as_echo_n "checking for dlopen in -ldl... " >&6; }
11388 if ${ac_cv_lib_dl_dlopen+:} false; then :
11389 $as_echo_n "(cached) " >&6
11390 else
11391 ac_check_lib_save_LIBS=$LIBS
11392 LIBS="-ldl $LIBS"
11393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11394 /* end confdefs.h. */
11395
11396 /* Override any GCC internal prototype to avoid an error.
11397 Use char because int might match the return type of a GCC
11398 builtin and then its argument prototype would still apply. */
11399 #ifdef __cplusplus
11400 extern "C"
11401 #endif
11402 char dlopen ();
11403 int
11404 main ()
11405 {
11406 return dlopen ();
11407 ;
11408 return 0;
11409 }
11410 _ACEOF
11411 if ac_fn_c_try_link "$LINENO"; then :
11412 ac_cv_lib_dl_dlopen=yes
11413 else
11414 ac_cv_lib_dl_dlopen=no
11415 fi
11416 rm -f core conftest.err conftest.$ac_objext \
11417 conftest$ac_exeext conftest.$ac_ext
11418 LIBS=$ac_check_lib_save_LIBS
11419 fi
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11421 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11422 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11423 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11424 else
11425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
11426 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
11427 if ${ac_cv_lib_svld_dlopen+:} false; then :
11428 $as_echo_n "(cached) " >&6
11429 else
11430 ac_check_lib_save_LIBS=$LIBS
11431 LIBS="-lsvld $LIBS"
11432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11433 /* end confdefs.h. */
11434
11435 /* Override any GCC internal prototype to avoid an error.
11436 Use char because int might match the return type of a GCC
11437 builtin and then its argument prototype would still apply. */
11438 #ifdef __cplusplus
11439 extern "C"
11440 #endif
11441 char dlopen ();
11442 int
11443 main ()
11444 {
11445 return dlopen ();
11446 ;
11447 return 0;
11448 }
11449 _ACEOF
11450 if ac_fn_c_try_link "$LINENO"; then :
11451 ac_cv_lib_svld_dlopen=yes
11452 else
11453 ac_cv_lib_svld_dlopen=no
11454 fi
11455 rm -f core conftest.err conftest.$ac_objext \
11456 conftest$ac_exeext conftest.$ac_ext
11457 LIBS=$ac_check_lib_save_LIBS
11458 fi
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
11460 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
11461 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
11462 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
11463 else
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
11465 $as_echo_n "checking for dld_link in -ldld... " >&6; }
11466 if ${ac_cv_lib_dld_dld_link+:} false; then :
11467 $as_echo_n "(cached) " >&6
11468 else
11469 ac_check_lib_save_LIBS=$LIBS
11470 LIBS="-ldld $LIBS"
11471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11472 /* end confdefs.h. */
11473
11474 /* Override any GCC internal prototype to avoid an error.
11475 Use char because int might match the return type of a GCC
11476 builtin and then its argument prototype would still apply. */
11477 #ifdef __cplusplus
11478 extern "C"
11479 #endif
11480 char dld_link ();
11481 int
11482 main ()
11483 {
11484 return dld_link ();
11485 ;
11486 return 0;
11487 }
11488 _ACEOF
11489 if ac_fn_c_try_link "$LINENO"; then :
11490 ac_cv_lib_dld_dld_link=yes
11491 else
11492 ac_cv_lib_dld_dld_link=no
11493 fi
11494 rm -f core conftest.err conftest.$ac_objext \
11495 conftest$ac_exeext conftest.$ac_ext
11496 LIBS=$ac_check_lib_save_LIBS
11497 fi
11498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
11499 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
11500 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
11501 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
11502 fi
11503
11504
11505 fi
11506
11507
11508 fi
11509
11510
11511 fi
11512
11513
11514 fi
11515
11516
11517 fi
11518
11519 ;;
11520 esac
11521
11522 if test "x$lt_cv_dlopen" != xno; then
11523 enable_dlopen=yes
11524 else
11525 enable_dlopen=no
11526 fi
11527
11528 case $lt_cv_dlopen in
11529 dlopen)
11530 save_CPPFLAGS="$CPPFLAGS"
11531 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
11532
11533 save_LDFLAGS="$LDFLAGS"
11534 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
11535
11536 save_LIBS="$LIBS"
11537 LIBS="$lt_cv_dlopen_libs $LIBS"
11538
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
11540 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
11541 if ${lt_cv_dlopen_self+:} false; then :
11542 $as_echo_n "(cached) " >&6
11543 else
11544 if test "$cross_compiling" = yes; then :
11545 lt_cv_dlopen_self=cross
11546 else
11547 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11548 lt_status=$lt_dlunknown
11549 cat > conftest.$ac_ext <<_LT_EOF
11550 #line $LINENO "configure"
11551 #include "confdefs.h"
11552
11553 #if HAVE_DLFCN_H
11554 #include <dlfcn.h>
11555 #endif
11556
11557 #include <stdio.h>
11558
11559 #ifdef RTLD_GLOBAL
11560 # define LT_DLGLOBAL RTLD_GLOBAL
11561 #else
11562 # ifdef DL_GLOBAL
11563 # define LT_DLGLOBAL DL_GLOBAL
11564 # else
11565 # define LT_DLGLOBAL 0
11566 # endif
11567 #endif
11568
11569 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11570 find out it does not work in some platform. */
11571 #ifndef LT_DLLAZY_OR_NOW
11572 # ifdef RTLD_LAZY
11573 # define LT_DLLAZY_OR_NOW RTLD_LAZY
11574 # else
11575 # ifdef DL_LAZY
11576 # define LT_DLLAZY_OR_NOW DL_LAZY
11577 # else
11578 # ifdef RTLD_NOW
11579 # define LT_DLLAZY_OR_NOW RTLD_NOW
11580 # else
11581 # ifdef DL_NOW
11582 # define LT_DLLAZY_OR_NOW DL_NOW
11583 # else
11584 # define LT_DLLAZY_OR_NOW 0
11585 # endif
11586 # endif
11587 # endif
11588 # endif
11589 #endif
11590
11591 /* When -fvisbility=hidden is used, assume the code has been annotated
11592 correspondingly for the symbols needed. */
11593 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11594 int fnord () __attribute__((visibility("default")));
11595 #endif
11596
11597 int fnord () { return 42; }
11598 int main ()
11599 {
11600 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11601 int status = $lt_dlunknown;
11602
11603 if (self)
11604 {
11605 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11606 else
11607 {
11608 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11609 else puts (dlerror ());
11610 }
11611 /* dlclose (self); */
11612 }
11613 else
11614 puts (dlerror ());
11615
11616 return status;
11617 }
11618 _LT_EOF
11619 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11620 (eval $ac_link) 2>&5
11621 ac_status=$?
11622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11623 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11624 (./conftest; exit; ) >&5 2>/dev/null
11625 lt_status=$?
11626 case x$lt_status in
11627 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
11628 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
11629 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
11630 esac
11631 else :
11632 # compilation failed
11633 lt_cv_dlopen_self=no
11634 fi
11635 fi
11636 rm -fr conftest*
11637
11638
11639 fi
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
11641 $as_echo "$lt_cv_dlopen_self" >&6; }
11642
11643 if test "x$lt_cv_dlopen_self" = xyes; then
11644 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
11645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
11646 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
11647 if ${lt_cv_dlopen_self_static+:} false; then :
11648 $as_echo_n "(cached) " >&6
11649 else
11650 if test "$cross_compiling" = yes; then :
11651 lt_cv_dlopen_self_static=cross
11652 else
11653 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11654 lt_status=$lt_dlunknown
11655 cat > conftest.$ac_ext <<_LT_EOF
11656 #line $LINENO "configure"
11657 #include "confdefs.h"
11658
11659 #if HAVE_DLFCN_H
11660 #include <dlfcn.h>
11661 #endif
11662
11663 #include <stdio.h>
11664
11665 #ifdef RTLD_GLOBAL
11666 # define LT_DLGLOBAL RTLD_GLOBAL
11667 #else
11668 # ifdef DL_GLOBAL
11669 # define LT_DLGLOBAL DL_GLOBAL
11670 # else
11671 # define LT_DLGLOBAL 0
11672 # endif
11673 #endif
11674
11675 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11676 find out it does not work in some platform. */
11677 #ifndef LT_DLLAZY_OR_NOW
11678 # ifdef RTLD_LAZY
11679 # define LT_DLLAZY_OR_NOW RTLD_LAZY
11680 # else
11681 # ifdef DL_LAZY
11682 # define LT_DLLAZY_OR_NOW DL_LAZY
11683 # else
11684 # ifdef RTLD_NOW
11685 # define LT_DLLAZY_OR_NOW RTLD_NOW
11686 # else
11687 # ifdef DL_NOW
11688 # define LT_DLLAZY_OR_NOW DL_NOW
11689 # else
11690 # define LT_DLLAZY_OR_NOW 0
11691 # endif
11692 # endif
11693 # endif
11694 # endif
11695 #endif
11696
11697 /* When -fvisbility=hidden is used, assume the code has been annotated
11698 correspondingly for the symbols needed. */
11699 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11700 int fnord () __attribute__((visibility("default")));
11701 #endif
11702
11703 int fnord () { return 42; }
11704 int main ()
11705 {
11706 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11707 int status = $lt_dlunknown;
11708
11709 if (self)
11710 {
11711 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11712 else
11713 {
11714 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11715 else puts (dlerror ());
11716 }
11717 /* dlclose (self); */
11718 }
11719 else
11720 puts (dlerror ());
11721
11722 return status;
11723 }
11724 _LT_EOF
11725 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11726 (eval $ac_link) 2>&5
11727 ac_status=$?
11728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11729 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11730 (./conftest; exit; ) >&5 2>/dev/null
11731 lt_status=$?
11732 case x$lt_status in
11733 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11734 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11735 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
11736 esac
11737 else :
11738 # compilation failed
11739 lt_cv_dlopen_self_static=no
11740 fi
11741 fi
11742 rm -fr conftest*
11743
11744
11745 fi
11746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11747 $as_echo "$lt_cv_dlopen_self_static" >&6; }
11748 fi
11749
11750 CPPFLAGS="$save_CPPFLAGS"
11751 LDFLAGS="$save_LDFLAGS"
11752 LIBS="$save_LIBS"
11753 ;;
11754 esac
11755
11756 case $lt_cv_dlopen_self in
11757 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11758 *) enable_dlopen_self=unknown ;;
11759 esac
11760
11761 case $lt_cv_dlopen_self_static in
11762 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11763 *) enable_dlopen_self_static=unknown ;;
11764 esac
11765 fi
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783 striplib=
11784 old_striplib=
11785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
11786 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
11787 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
11788 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
11789 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11791 $as_echo "yes" >&6; }
11792 else
11793 # FIXME - insert some real tests, host_os isn't really good enough
11794 case $host_os in
11795 darwin*)
11796 if test -n "$STRIP" ; then
11797 striplib="$STRIP -x"
11798 old_striplib="$STRIP -S"
11799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11800 $as_echo "yes" >&6; }
11801 else
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11803 $as_echo "no" >&6; }
11804 fi
11805 ;;
11806 *)
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11808 $as_echo "no" >&6; }
11809 ;;
11810 esac
11811 fi
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824 # Report which library types will actually be built
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11826 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11828 $as_echo "$can_build_shared" >&6; }
11829
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11831 $as_echo_n "checking whether to build shared libraries... " >&6; }
11832 test "$can_build_shared" = "no" && enable_shared=no
11833
11834 # On AIX, shared libraries and static libraries use the same namespace, and
11835 # are all built from PIC.
11836 case $host_os in
11837 aix3*)
11838 test "$enable_shared" = yes && enable_static=no
11839 if test -n "$RANLIB"; then
11840 archive_cmds="$archive_cmds~\$RANLIB \$lib"
11841 postinstall_cmds='$RANLIB $lib'
11842 fi
11843 ;;
11844
11845 aix[4-9]*)
11846 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11847 test "$enable_shared" = yes && enable_static=no
11848 fi
11849 ;;
11850 esac
11851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11852 $as_echo "$enable_shared" >&6; }
11853
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11855 $as_echo_n "checking whether to build static libraries... " >&6; }
11856 # Make sure either enable_shared or enable_static is yes.
11857 test "$enable_shared" = yes || enable_static=yes
11858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11859 $as_echo "$enable_static" >&6; }
11860
11861
11862
11863
11864 fi
11865 ac_ext=c
11866 ac_cpp='$CPP $CPPFLAGS'
11867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11870
11871 CC="$lt_save_CC"
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885 ac_config_commands="$ac_config_commands libtool"
11886
11887
11888
11889
11890 # Only expand once:
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11901 if test -n "$ac_tool_prefix"; then
11902 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11903 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11905 $as_echo_n "checking for $ac_word... " >&6; }
11906 if ${ac_cv_path_PKG_CONFIG+:} false; then :
11907 $as_echo_n "(cached) " >&6
11908 else
11909 case $PKG_CONFIG in
11910 [\\/]* | ?:[\\/]*)
11911 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11912 ;;
11913 *)
11914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11915 for as_dir in $PATH
11916 do
11917 IFS=$as_save_IFS
11918 test -z "$as_dir" && as_dir=.
11919 for ac_exec_ext in '' $ac_executable_extensions; do
11920 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11921 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11923 break 2
11924 fi
11925 done
11926 done
11927 IFS=$as_save_IFS
11928
11929 ;;
11930 esac
11931 fi
11932 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11933 if test -n "$PKG_CONFIG"; then
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11935 $as_echo "$PKG_CONFIG" >&6; }
11936 else
11937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11938 $as_echo "no" >&6; }
11939 fi
11940
11941
11942 fi
11943 if test -z "$ac_cv_path_PKG_CONFIG"; then
11944 ac_pt_PKG_CONFIG=$PKG_CONFIG
11945 # Extract the first word of "pkg-config", so it can be a program name with args.
11946 set dummy pkg-config; ac_word=$2
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11948 $as_echo_n "checking for $ac_word... " >&6; }
11949 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
11950 $as_echo_n "(cached) " >&6
11951 else
11952 case $ac_pt_PKG_CONFIG in
11953 [\\/]* | ?:[\\/]*)
11954 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11955 ;;
11956 *)
11957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11958 for as_dir in $PATH
11959 do
11960 IFS=$as_save_IFS
11961 test -z "$as_dir" && as_dir=.
11962 for ac_exec_ext in '' $ac_executable_extensions; do
11963 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11964 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11965 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11966 break 2
11967 fi
11968 done
11969 done
11970 IFS=$as_save_IFS
11971
11972 ;;
11973 esac
11974 fi
11975 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11976 if test -n "$ac_pt_PKG_CONFIG"; then
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11978 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
11979 else
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11981 $as_echo "no" >&6; }
11982 fi
11983
11984 if test "x$ac_pt_PKG_CONFIG" = x; then
11985 PKG_CONFIG=""
11986 else
11987 case $cross_compiling:$ac_tool_warned in
11988 yes:)
11989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11990 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11991 ac_tool_warned=yes ;;
11992 esac
11993 PKG_CONFIG=$ac_pt_PKG_CONFIG
11994 fi
11995 else
11996 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11997 fi
11998
11999 fi
12000 if test -n "$PKG_CONFIG"; then
12001 _pkg_min_version=0.9.0
12002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
12003 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
12004 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12006 $as_echo "yes" >&6; }
12007 else
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009 $as_echo "no" >&6; }
12010 PKG_CONFIG=""
12011 fi
12012 fi
12013
12014
12015 # Check whether --with-installdir was given.
12016 if test "${with_installdir+set}" = set; then :
12017 withval=$with_installdir; LIBDMARC_BASE=$withval
12018 else
12019 LIBDMARC_BASE=/usr/local/
12020 fi
12021
12022 LIBDMARC_DIR=$LIBDMARC_BASE
12023
12024
12025 #
12026 # Check for how to compile threaded stuff
12027 #
12028
12029
12030
12031 ac_ext=c
12032 ac_cpp='$CPP $CPPFLAGS'
12033 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12034 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12035 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12036
12037 ax_pthread_ok=no
12038
12039 # We used to check for pthread.h first, but this fails if pthread.h
12040 # requires special compiler flags (e.g. on True64 or Sequent).
12041 # It gets checked for in the link test anyway.
12042
12043 # First of all, check if the user has set any of the PTHREAD_LIBS,
12044 # etcetera environment variables, and if threads linking works using
12045 # them:
12046 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12047 save_CFLAGS="$CFLAGS"
12048 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12049 save_LIBS="$LIBS"
12050 LIBS="$PTHREAD_LIBS $LIBS"
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12052 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12054 /* end confdefs.h. */
12055
12056 /* Override any GCC internal prototype to avoid an error.
12057 Use char because int might match the return type of a GCC
12058 builtin and then its argument prototype would still apply. */
12059 #ifdef __cplusplus
12060 extern "C"
12061 #endif
12062 char pthread_join ();
12063 int
12064 main ()
12065 {
12066 return pthread_join ();
12067 ;
12068 return 0;
12069 }
12070 _ACEOF
12071 if ac_fn_c_try_link "$LINENO"; then :
12072 ax_pthread_ok=yes
12073 fi
12074 rm -f core conftest.err conftest.$ac_objext \
12075 conftest$ac_exeext conftest.$ac_ext
12076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
12077 $as_echo "$ax_pthread_ok" >&6; }
12078 if test x"$ax_pthread_ok" = xno; then
12079 PTHREAD_LIBS=""
12080 PTHREAD_CFLAGS=""
12081 fi
12082 LIBS="$save_LIBS"
12083 CFLAGS="$save_CFLAGS"
12084 fi
12085
12086 # We must check for the threads library under a number of different
12087 # names; the ordering is very important because some systems
12088 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12089 # libraries is broken (non-POSIX).
12090
12091 # Create a list of thread flags to try. Items starting with a "-" are
12092 # C compiler flags, and other items are library names, except for "none"
12093 # which indicates that we try without any flags at all, and "pthread-config"
12094 # which is a program returning the flags for the Pth emulation library.
12095
12096 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
12097
12098 # The ordering *is* (sometimes) important. Some notes on the
12099 # individual items follow:
12100
12101 # pthreads: AIX (must check this before -lpthread)
12102 # none: in case threads are in libc; should be tried before -Kthread and
12103 # other compiler flags to prevent continual compiler warnings
12104 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12105 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12106 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12107 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12108 # -pthreads: Solaris/gcc
12109 # -mthreads: Mingw32/gcc, Lynx/gcc
12110 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12111 # doesn't hurt to check since this sometimes defines pthreads too;
12112 # also defines -D_REENTRANT)
12113 # ... -mt is also the pthreads flag for HP/aCC
12114 # pthread: Linux, etcetera
12115 # --thread-safe: KAI C++
12116 # pthread-config: use pthread-config program (for GNU Pth library)
12117
12118 case "${host_cpu}-${host_os}" in
12119 *solaris*)
12120
12121 # On Solaris (at least, for some versions), libc contains stubbed
12122 # (non-functional) versions of the pthreads routines, so link-based
12123 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
12124 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
12125 # a function called by this macro, so we could check for that, but
12126 # who knows whether they'll stub that too in a future libc.) So,
12127 # we'll just look for -pthreads and -lpthread first:
12128
12129 ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
12130 ;;
12131
12132 *-darwin*)
12133 ax_pthread_flags="-pthread $ax_pthread_flags"
12134 ;;
12135 esac
12136
12137 if test x"$ax_pthread_ok" = xno; then
12138 for flag in $ax_pthread_flags; do
12139
12140 case $flag in
12141 none)
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12143 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12144 ;;
12145
12146 -*)
12147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12148 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12149 PTHREAD_CFLAGS="$flag"
12150 ;;
12151
12152 pthread-config)
12153 # Extract the first word of "pthread-config", so it can be a program name with args.
12154 set dummy pthread-config; ac_word=$2
12155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12156 $as_echo_n "checking for $ac_word... " >&6; }
12157 if ${ac_cv_prog_ax_pthread_config+:} false; then :
12158 $as_echo_n "(cached) " >&6
12159 else
12160 if test -n "$ax_pthread_config"; then
12161 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
12162 else
12163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12164 for as_dir in $PATH
12165 do
12166 IFS=$as_save_IFS
12167 test -z "$as_dir" && as_dir=.
12168 for ac_exec_ext in '' $ac_executable_extensions; do
12169 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12170 ac_cv_prog_ax_pthread_config="yes"
12171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12172 break 2
12173 fi
12174 done
12175 done
12176 IFS=$as_save_IFS
12177
12178 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
12179 fi
12180 fi
12181 ax_pthread_config=$ac_cv_prog_ax_pthread_config
12182 if test -n "$ax_pthread_config"; then
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
12184 $as_echo "$ax_pthread_config" >&6; }
12185 else
12186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12187 $as_echo "no" >&6; }
12188 fi
12189
12190
12191 if test x"$ax_pthread_config" = xno; then continue; fi
12192 PTHREAD_CFLAGS="`pthread-config --cflags`"
12193 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12194 ;;
12195
12196 *)
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12198 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12199 PTHREAD_LIBS="-l$flag"
12200 ;;
12201 esac
12202
12203 save_LIBS="$LIBS"
12204 save_CFLAGS="$CFLAGS"
12205 LIBS="$PTHREAD_LIBS $LIBS"
12206 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12207
12208 # Check for various functions. We must include pthread.h,
12209 # since some functions may be macros. (On the Sequent, we
12210 # need a special flag -Kthread to make this header compile.)
12211 # We check for pthread_join because it is in -lpthread on IRIX
12212 # while pthread_create is in libc. We check for pthread_attr_init
12213 # due to DEC craziness with -lpthreads. We check for
12214 # pthread_cleanup_push because it is one of the few pthread
12215 # functions on Solaris that doesn't have a non-functional libc stub.
12216 # We try pthread_create on general principles.
12217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12218 /* end confdefs.h. */
12219 #include <pthread.h>
12220 static void routine(void* a) {a=0;}
12221 static void* start_routine(void* a) {return a;}
12222 int
12223 main ()
12224 {
12225 pthread_t th; pthread_attr_t attr;
12226 pthread_create(&th,0,start_routine,0);
12227 pthread_join(th, 0);
12228 pthread_attr_init(&attr);
12229 pthread_cleanup_push(routine, 0);
12230 pthread_cleanup_pop(0);
12231 ;
12232 return 0;
12233 }
12234 _ACEOF
12235 if ac_fn_c_try_link "$LINENO"; then :
12236 ax_pthread_ok=yes
12237 fi
12238 rm -f core conftest.err conftest.$ac_objext \
12239 conftest$ac_exeext conftest.$ac_ext
12240
12241 LIBS="$save_LIBS"
12242 CFLAGS="$save_CFLAGS"
12243
12244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
12245 $as_echo "$ax_pthread_ok" >&6; }
12246 if test "x$ax_pthread_ok" = xyes; then
12247 break;
12248 fi
12249
12250 PTHREAD_LIBS=""
12251 PTHREAD_CFLAGS=""
12252 done
12253 fi
12254
12255 # Various other checks:
12256 if test "x$ax_pthread_ok" = xyes; then
12257 save_LIBS="$LIBS"
12258 LIBS="$PTHREAD_LIBS $LIBS"
12259 save_CFLAGS="$CFLAGS"
12260 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12261
12262 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
12263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
12264 $as_echo_n "checking for joinable pthread attribute... " >&6; }
12265 attr_name=unknown
12266 for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
12267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12268 /* end confdefs.h. */
12269 #include <pthread.h>
12270 int
12271 main ()
12272 {
12273 int attr=$attr; return attr;
12274 ;
12275 return 0;
12276 }
12277 _ACEOF
12278 if ac_fn_c_try_link "$LINENO"; then :
12279 attr_name=$attr; break
12280 fi
12281 rm -f core conftest.err conftest.$ac_objext \
12282 conftest$ac_exeext conftest.$ac_ext
12283 done
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
12285 $as_echo "$attr_name" >&6; }
12286 if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
12287
12288 cat >>confdefs.h <<_ACEOF
12289 #define PTHREAD_CREATE_JOINABLE $attr_name
12290 _ACEOF
12291
12292 fi
12293
12294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
12295 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
12296 flag=no
12297 case "${host_cpu}-${host_os}" in
12298 *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
12299 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
12300 esac
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
12302 $as_echo "${flag}" >&6; }
12303 if test "x$flag" != xno; then
12304 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
12305 fi
12306
12307 LIBS="$save_LIBS"
12308 CFLAGS="$save_CFLAGS"
12309
12310 # More AIX lossage: must compile with xlc_r or cc_r
12311 if test x"$GCC" != xyes; then
12312 for ac_prog in xlc_r cc_r
12313 do
12314 # Extract the first word of "$ac_prog", so it can be a program name with args.
12315 set dummy $ac_prog; ac_word=$2
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12317 $as_echo_n "checking for $ac_word... " >&6; }
12318 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
12319 $as_echo_n "(cached) " >&6
12320 else
12321 if test -n "$PTHREAD_CC"; then
12322 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
12323 else
12324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12325 for as_dir in $PATH
12326 do
12327 IFS=$as_save_IFS
12328 test -z "$as_dir" && as_dir=.
12329 for ac_exec_ext in '' $ac_executable_extensions; do
12330 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12331 ac_cv_prog_PTHREAD_CC="$ac_prog"
12332 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12333 break 2
12334 fi
12335 done
12336 done
12337 IFS=$as_save_IFS
12338
12339 fi
12340 fi
12341 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
12342 if test -n "$PTHREAD_CC"; then
12343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
12344 $as_echo "$PTHREAD_CC" >&6; }
12345 else
12346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347 $as_echo "no" >&6; }
12348 fi
12349
12350
12351 test -n "$PTHREAD_CC" && break
12352 done
12353 test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
12354
12355 else
12356 PTHREAD_CC=$CC
12357 fi
12358 else
12359 PTHREAD_CC="$CC"
12360 fi
12361
12362
12363
12364
12365
12366 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
12367 if test x"$ax_pthread_ok" = xyes; then
12368
12369 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
12370
12371 :
12372 else
12373 ax_pthread_ok=no
12374
12375 fi
12376 ac_ext=c
12377 ac_cpp='$CPP $CPPFLAGS'
12378 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12379 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12380 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12381
12382
12383
12384
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12386 $as_echo_n "checking for ANSI C header files... " >&6; }
12387 if ${ac_cv_header_stdc+:} false; then :
12388 $as_echo_n "(cached) " >&6
12389 else
12390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12391 /* end confdefs.h. */
12392 #include <stdlib.h>
12393 #include <stdarg.h>
12394 #include <string.h>
12395 #include <float.h>
12396
12397 int
12398 main ()
12399 {
12400
12401 ;
12402 return 0;
12403 }
12404 _ACEOF
12405 if ac_fn_c_try_compile "$LINENO"; then :
12406 ac_cv_header_stdc=yes
12407 else
12408 ac_cv_header_stdc=no
12409 fi
12410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12411
12412 if test $ac_cv_header_stdc = yes; then
12413 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12415 /* end confdefs.h. */
12416 #include <string.h>
12417
12418 _ACEOF
12419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12420 $EGREP "memchr" >/dev/null 2>&1; then :
12421
12422 else
12423 ac_cv_header_stdc=no
12424 fi
12425 rm -f conftest*
12426
12427 fi
12428
12429 if test $ac_cv_header_stdc = yes; then
12430 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12432 /* end confdefs.h. */
12433 #include <stdlib.h>
12434
12435 _ACEOF
12436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12437 $EGREP "free" >/dev/null 2>&1; then :
12438
12439 else
12440 ac_cv_header_stdc=no
12441 fi
12442 rm -f conftest*
12443
12444 fi
12445
12446 if test $ac_cv_header_stdc = yes; then
12447 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12448 if test "$cross_compiling" = yes; then :
12449 :
12450 else
12451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12452 /* end confdefs.h. */
12453 #include <ctype.h>
12454 #include <stdlib.h>
12455 #if ((' ' & 0x0FF) == 0x020)
12456 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12457 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12458 #else
12459 # define ISLOWER(c) \
12460 (('a' <= (c) && (c) <= 'i') \
12461 || ('j' <= (c) && (c) <= 'r') \
12462 || ('s' <= (c) && (c) <= 'z'))
12463 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12464 #endif
12465
12466 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12467 int
12468 main ()
12469 {
12470 int i;
12471 for (i = 0; i < 256; i++)
12472 if (XOR (islower (i), ISLOWER (i))
12473 || toupper (i) != TOUPPER (i))
12474 return 2;
12475 return 0;
12476 }
12477 _ACEOF
12478 if ac_fn_c_try_run "$LINENO"; then :
12479
12480 else
12481 ac_cv_header_stdc=no
12482 fi
12483 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12484 conftest.$ac_objext conftest.beam conftest.$ac_ext
12485 fi
12486
12487 fi
12488 fi
12489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12490 $as_echo "$ac_cv_header_stdc" >&6; }
12491 if test $ac_cv_header_stdc = yes; then
12492
12493 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12494
12495 fi
12496
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12498 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
12499 if ${ac_cv_header_time+:} false; then :
12500 $as_echo_n "(cached) " >&6
12501 else
12502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12503 /* end confdefs.h. */
12504 #include <sys/types.h>
12505 #include <sys/time.h>
12506 #include <time.h>
12507
12508 int
12509 main ()
12510 {
12511 if ((struct tm *) 0)
12512 return 0;
12513 ;
12514 return 0;
12515 }
12516 _ACEOF
12517 if ac_fn_c_try_compile "$LINENO"; then :
12518 ac_cv_header_time=yes
12519 else
12520 ac_cv_header_time=no
12521 fi
12522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12523 fi
12524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12525 $as_echo "$ac_cv_header_time" >&6; }
12526 if test $ac_cv_header_time = yes; then
12527
12528 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
12529
12530 fi
12531
12532 for ac_header in stdio.h
12533 do :
12534 ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
12535 if test "x$ac_cv_header_stdio_h" = xyes; then :
12536 cat >>confdefs.h <<_ACEOF
12537 #define HAVE_STDIO_H 1
12538 _ACEOF
12539
12540 fi
12541
12542 done
12543
12544 for ac_header in syslog.h
12545 do :
12546 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
12547 if test "x$ac_cv_header_syslog_h" = xyes; then :
12548 cat >>confdefs.h <<_ACEOF
12549 #define HAVE_SYSLOG_H 1
12550 _ACEOF
12551
12552 fi
12553
12554 done
12555
12556 for ac_header in sysexits.h
12557 do :
12558 ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
12559 if test "x$ac_cv_header_sysexits_h" = xyes; then :
12560 cat >>confdefs.h <<_ACEOF
12561 #define HAVE_SYSEXITS_H 1
12562 _ACEOF
12563
12564 fi
12565
12566 done
12567
12568 for ac_header in poll.h
12569 do :
12570 ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
12571 if test "x$ac_cv_header_poll_h" = xyes; then :
12572 cat >>confdefs.h <<_ACEOF
12573 #define HAVE_POLL_H 1
12574 _ACEOF
12575
12576 fi
12577
12578 done
12579
12580 for ac_header in time.h
12581 do :
12582 ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
12583 if test "x$ac_cv_header_time_h" = xyes; then :
12584 cat >>confdefs.h <<_ACEOF
12585 #define HAVE_TIME_H 1
12586 _ACEOF
12587
12588 fi
12589
12590 done
12591
12592 for ac_header in netdb.h
12593 do :
12594 ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
12595 if test "x$ac_cv_header_netdb_h" = xyes; then :
12596 cat >>confdefs.h <<_ACEOF
12597 #define HAVE_NETDB_H 1
12598 _ACEOF
12599
12600 fi
12601
12602 done
12603
12604 for ac_header in errno.h
12605 do :
12606 ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
12607 if test "x$ac_cv_header_errno_h" = xyes; then :
12608 cat >>confdefs.h <<_ACEOF
12609 #define HAVE_ERRNO_H 1
12610 _ACEOF
12611
12612 fi
12613
12614 done
12615
12616 for ac_header in ctype.h
12617 do :
12618 ac_fn_c_check_header_mongrel "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default"
12619 if test "x$ac_cv_header_ctype_h" = xyes; then :
12620 cat >>confdefs.h <<_ACEOF
12621 #define HAVE_CTYPE_H 1
12622 _ACEOF
12623
12624 fi
12625
12626 done
12627
12628 for ac_header in fcntl.h
12629 do :
12630 ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
12631 if test "x$ac_cv_header_fcntl_h" = xyes; then :
12632 cat >>confdefs.h <<_ACEOF
12633 #define HAVE_FCNTL_H 1
12634 _ACEOF
12635
12636 fi
12637
12638 done
12639
12640 for ac_header in string.h
12641 do :
12642 ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
12643 if test "x$ac_cv_header_string_h" = xyes; then :
12644 cat >>confdefs.h <<_ACEOF
12645 #define HAVE_STRING_H 1
12646 _ACEOF
12647
12648 fi
12649
12650 done
12651
12652 for ac_header in sys/param.h
12653 do :
12654 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
12655 if test "x$ac_cv_header_sys_param_h" = xyes; then :
12656 cat >>confdefs.h <<_ACEOF
12657 #define HAVE_SYS_PARAM_H 1
12658 _ACEOF
12659
12660 fi
12661
12662 done
12663
12664 for ac_header in sys/socket.h
12665 do :
12666 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12667 if test "x$ac_cv_header_sys_socket_h" = xyes; then :
12668 cat >>confdefs.h <<_ACEOF
12669 #define HAVE_SYS_SOCKET_H 1
12670 _ACEOF
12671
12672 fi
12673
12674 done
12675
12676 for ac_header in sys/types.h
12677 do :
12678 ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
12679 if test "x$ac_cv_header_sys_types_h" = xyes; then :
12680 cat >>confdefs.h <<_ACEOF
12681 #define HAVE_SYS_TYPES_H 1
12682 _ACEOF
12683
12684 fi
12685
12686 done
12687
12688 for ac_header in sys/types.h
12689 do :
12690 ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
12691 if test "x$ac_cv_header_sys_types_h" = xyes; then :
12692 cat >>confdefs.h <<_ACEOF
12693 #define HAVE_SYS_TYPES_H 1
12694 _ACEOF
12695
12696 fi
12697
12698 done
12699
12700 for ac_header in arpa/inet.h sys/socket.h netdb.h sys/ioctl.h
12701 do :
12702 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12703 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12704 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12705 cat >>confdefs.h <<_ACEOF
12706 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12707 _ACEOF
12708
12709 fi
12710
12711 done
12712
12713 for ac_header in iso/limits_iso.h
12714 do :
12715 ac_fn_c_check_header_mongrel "$LINENO" "iso/limits_iso.h" "ac_cv_header_iso_limits_iso_h" "$ac_includes_default"
12716 if test "x$ac_cv_header_iso_limits_iso_h" = xyes; then :
12717 cat >>confdefs.h <<_ACEOF
12718 #define HAVE_ISO_LIMITS_ISO_H 1
12719 _ACEOF
12720
12721 fi
12722
12723 done
12724
12725
12726 for ac_header in netinet/in.h
12727 do :
12728 ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#if HAVE_SYS_TYPES_H
12729 # include <sys/types.h>
12730 #endif
12731
12732 "
12733 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
12734 cat >>confdefs.h <<_ACEOF
12735 #define HAVE_NETINET_IN_H 1
12736 _ACEOF
12737
12738 fi
12739
12740 done
12741
12742 for ac_header in arpa/nameser.h
12743 do :
12744 ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#if HAVE_SYS_TYPES_H
12745 # include <sys/types.h>
12746 #endif
12747
12748 "
12749 if test "x$ac_cv_header_arpa_nameser_h" = xyes; then :
12750 cat >>confdefs.h <<_ACEOF
12751 #define HAVE_ARPA_NAMESER_H 1
12752 _ACEOF
12753
12754 fi
12755
12756 done
12757
12758 for ac_header in resolv.h
12759 do :
12760 ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#if HAVE_SYS_TYPES_H
12761 # include <sys/types.h>
12762 #endif
12763 #if HAVE_NETINET_IN_H
12764 # include <netinet/in.h>
12765 #endif
12766 #if HAVE_ARPA_NAMESER_H
12767 # include <arpa/nameser.h>
12768 #endif
12769
12770 "
12771 if test "x$ac_cv_header_resolv_h" = xyes; then :
12772 cat >>confdefs.h <<_ACEOF
12773 #define HAVE_RESOLV_H 1
12774 _ACEOF
12775
12776 fi
12777
12778 done
12779
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
12781 $as_echo_n "checking for connect in -lsocket... " >&6; }
12782 if ${ac_cv_lib_socket_connect+:} false; then :
12783 $as_echo_n "(cached) " >&6
12784 else
12785 ac_check_lib_save_LIBS=$LIBS
12786 LIBS="-lsocket $LIBS"
12787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12788 /* end confdefs.h. */
12789
12790 /* Override any GCC internal prototype to avoid an error.
12791 Use char because int might match the return type of a GCC
12792 builtin and then its argument prototype would still apply. */
12793 #ifdef __cplusplus
12794 extern "C"
12795 #endif
12796 char connect ();
12797 int
12798 main ()
12799 {
12800 return connect ();
12801 ;
12802 return 0;
12803 }
12804 _ACEOF
12805 if ac_fn_c_try_link "$LINENO"; then :
12806 ac_cv_lib_socket_connect=yes
12807 else
12808 ac_cv_lib_socket_connect=no
12809 fi
12810 rm -f core conftest.err conftest.$ac_objext \
12811 conftest$ac_exeext conftest.$ac_ext
12812 LIBS=$ac_check_lib_save_LIBS
12813 fi
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
12815 $as_echo "$ac_cv_lib_socket_connect" >&6; }
12816 if test "x$ac_cv_lib_socket_connect" = xyes; then :
12817 cat >>confdefs.h <<_ACEOF
12818 #define HAVE_LIBSOCKET 1
12819 _ACEOF
12820
12821 LIBS="-lsocket $LIBS"
12822
12823 fi
12824
12825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror in -lresolv" >&5
12826 $as_echo_n "checking for hstrerror in -lresolv... " >&6; }
12827 if ${ac_cv_lib_resolv_hstrerror+:} false; then :
12828 $as_echo_n "(cached) " >&6
12829 else
12830 ac_check_lib_save_LIBS=$LIBS
12831 LIBS="-lresolv -lnsl -lsocket $LIBS"
12832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12833 /* end confdefs.h. */
12834
12835 /* Override any GCC internal prototype to avoid an error.
12836 Use char because int might match the return type of a GCC
12837 builtin and then its argument prototype would still apply. */
12838 #ifdef __cplusplus
12839 extern "C"
12840 #endif
12841 char hstrerror ();
12842 int
12843 main ()
12844 {
12845 return hstrerror ();
12846 ;
12847 return 0;
12848 }
12849 _ACEOF
12850 if ac_fn_c_try_link "$LINENO"; then :
12851 ac_cv_lib_resolv_hstrerror=yes
12852 else
12853 ac_cv_lib_resolv_hstrerror=no
12854 fi
12855 rm -f core conftest.err conftest.$ac_objext \
12856 conftest$ac_exeext conftest.$ac_ext
12857 LIBS=$ac_check_lib_save_LIBS
12858 fi
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_hstrerror" >&5
12860 $as_echo "$ac_cv_lib_resolv_hstrerror" >&6; }
12861 if test "x$ac_cv_lib_resolv_hstrerror" = xyes; then :
12862 cat >>confdefs.h <<_ACEOF
12863 #define HAVE_LIBRESOLV 1
12864 _ACEOF
12865
12866 LIBS="-lresolv $LIBS"
12867
12868 fi
12869
12870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12871 $as_echo_n "checking for inet_aton in -lresolv... " >&6; }
12872 if ${ac_cv_lib_resolv_inet_aton+:} false; then :
12873 $as_echo_n "(cached) " >&6
12874 else
12875 ac_check_lib_save_LIBS=$LIBS
12876 LIBS="-lresolv -lnsl -lsocket $LIBS"
12877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12878 /* end confdefs.h. */
12879
12880 /* Override any GCC internal prototype to avoid an error.
12881 Use char because int might match the return type of a GCC
12882 builtin and then its argument prototype would still apply. */
12883 #ifdef __cplusplus
12884 extern "C"
12885 #endif
12886 char inet_aton ();
12887 int
12888 main ()
12889 {
12890 return inet_aton ();
12891 ;
12892 return 0;
12893 }
12894 _ACEOF
12895 if ac_fn_c_try_link "$LINENO"; then :
12896 ac_cv_lib_resolv_inet_aton=yes
12897 else
12898 ac_cv_lib_resolv_inet_aton=no
12899 fi
12900 rm -f core conftest.err conftest.$ac_objext \
12901 conftest$ac_exeext conftest.$ac_ext
12902 LIBS=$ac_check_lib_save_LIBS
12903 fi
12904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12905 $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
12906 if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
12907 cat >>confdefs.h <<_ACEOF
12908 #define HAVE_LIBRESOLV 1
12909 _ACEOF
12910
12911 LIBS="-lresolv $LIBS"
12912
12913 fi
12914
12915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_ninit" >&5
12916 $as_echo_n "checking for library containing res_ninit... " >&6; }
12917 if ${ac_cv_search_res_ninit+:} false; then :
12918 $as_echo_n "(cached) " >&6
12919 else
12920 ac_func_search_save_LIBS=$LIBS
12921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12922 /* end confdefs.h. */
12923
12924 /* Override any GCC internal prototype to avoid an error.
12925 Use char because int might match the return type of a GCC
12926 builtin and then its argument prototype would still apply. */
12927 #ifdef __cplusplus
12928 extern "C"
12929 #endif
12930 char res_ninit ();
12931 int
12932 main ()
12933 {
12934 return res_ninit ();
12935 ;
12936 return 0;
12937 }
12938 _ACEOF
12939 for ac_lib in '' resolv; do
12940 if test -z "$ac_lib"; then
12941 ac_res="none required"
12942 else
12943 ac_res=-l$ac_lib
12944 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12945 fi
12946 if ac_fn_c_try_link "$LINENO"; then :
12947 ac_cv_search_res_ninit=$ac_res
12948 fi
12949 rm -f core conftest.err conftest.$ac_objext \
12950 conftest$ac_exeext
12951 if ${ac_cv_search_res_ninit+:} false; then :
12952 break
12953 fi
12954 done
12955 if ${ac_cv_search_res_ninit+:} false; then :
12956
12957 else
12958 ac_cv_search_res_ninit=no
12959 fi
12960 rm conftest.$ac_ext
12961 LIBS=$ac_func_search_save_LIBS
12962 fi
12963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_ninit" >&5
12964 $as_echo "$ac_cv_search_res_ninit" >&6; }
12965 ac_res=$ac_cv_search_res_ninit
12966 if test "$ac_res" != no; then :
12967 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12968
12969 $as_echo "#define HAVE_RES_NINIT 1" >>confdefs.h
12970
12971 fi
12972
12973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for idn_free in -lidn" >&5
12974 $as_echo_n "checking for idn_free in -lidn... " >&6; }
12975 if ${ac_cv_lib_idn_idn_free+:} false; then :
12976 $as_echo_n "(cached) " >&6
12977 else
12978 ac_check_lib_save_LIBS=$LIBS
12979 LIBS="-lidn $LIBS"
12980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12981 /* end confdefs.h. */
12982
12983 /* Override any GCC internal prototype to avoid an error.
12984 Use char because int might match the return type of a GCC
12985 builtin and then its argument prototype would still apply. */
12986 #ifdef __cplusplus
12987 extern "C"
12988 #endif
12989 char idn_free ();
12990 int
12991 main ()
12992 {
12993 return idn_free ();
12994 ;
12995 return 0;
12996 }
12997 _ACEOF
12998 if ac_fn_c_try_link "$LINENO"; then :
12999 ac_cv_lib_idn_idn_free=yes
13000 else
13001 ac_cv_lib_idn_idn_free=no
13002 fi
13003 rm -f core conftest.err conftest.$ac_objext \
13004 conftest$ac_exeext conftest.$ac_ext
13005 LIBS=$ac_check_lib_save_LIBS
13006 fi
13007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_idn_free" >&5
13008 $as_echo "$ac_cv_lib_idn_idn_free" >&6; }
13009 if test "x$ac_cv_lib_idn_idn_free" = xyes; then :
13010 cat >>confdefs.h <<_ACEOF
13011 #define HAVE_LIBIDN 1
13012 _ACEOF
13013
13014 LIBS="-lidn $LIBS"
13015
13016 fi
13017
13018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
13019 $as_echo_n "checking for nanosleep in -lrt... " >&6; }
13020 if ${ac_cv_lib_rt_nanosleep+:} false; then :
13021 $as_echo_n "(cached) " >&6
13022 else
13023 ac_check_lib_save_LIBS=$LIBS
13024 LIBS="-lrt $LIBS"
13025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13026 /* end confdefs.h. */
13027
13028 /* Override any GCC internal prototype to avoid an error.
13029 Use char because int might match the return type of a GCC
13030 builtin and then its argument prototype would still apply. */
13031 #ifdef __cplusplus
13032 extern "C"
13033 #endif
13034 char nanosleep ();
13035 int
13036 main ()
13037 {
13038 return nanosleep ();
13039 ;
13040 return 0;
13041 }
13042 _ACEOF
13043 if ac_fn_c_try_link "$LINENO"; then :
13044 ac_cv_lib_rt_nanosleep=yes
13045 else
13046 ac_cv_lib_rt_nanosleep=no
13047 fi
13048 rm -f core conftest.err conftest.$ac_objext \
13049 conftest$ac_exeext conftest.$ac_ext
13050 LIBS=$ac_check_lib_save_LIBS
13051 fi
13052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
13053 $as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
13054 if test "x$ac_cv_lib_rt_nanosleep" = xyes; then :
13055 cat >>confdefs.h <<_ACEOF
13056 #define HAVE_LIBRT 1
13057 _ACEOF
13058
13059 LIBS="-lrt $LIBS"
13060
13061 fi
13062
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_addr" >&5
13064 $as_echo_n "checking for library containing inet_addr... " >&6; }
13065 if ${ac_cv_search_inet_addr+:} false; then :
13066 $as_echo_n "(cached) " >&6
13067 else
13068 ac_func_search_save_LIBS=$LIBS
13069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13070 /* end confdefs.h. */
13071
13072 /* Override any GCC internal prototype to avoid an error.
13073 Use char because int might match the return type of a GCC
13074 builtin and then its argument prototype would still apply. */
13075 #ifdef __cplusplus
13076 extern "C"
13077 #endif
13078 char inet_addr ();
13079 int
13080 main ()
13081 {
13082 return inet_addr ();
13083 ;
13084 return 0;
13085 }
13086 _ACEOF
13087 for ac_lib in '' nsl; do
13088 if test -z "$ac_lib"; then
13089 ac_res="none required"
13090 else
13091 ac_res=-l$ac_lib
13092 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13093 fi
13094 if ac_fn_c_try_link "$LINENO"; then :
13095 ac_cv_search_inet_addr=$ac_res
13096 fi
13097 rm -f core conftest.err conftest.$ac_objext \
13098 conftest$ac_exeext
13099 if ${ac_cv_search_inet_addr+:} false; then :
13100 break
13101 fi
13102 done
13103 if ${ac_cv_search_inet_addr+:} false; then :
13104
13105 else
13106 ac_cv_search_inet_addr=no
13107 fi
13108 rm conftest.$ac_ext
13109 LIBS=$ac_func_search_save_LIBS
13110 fi
13111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_addr" >&5
13112 $as_echo "$ac_cv_search_inet_addr" >&6; }
13113 ac_res=$ac_cv_search_inet_addr
13114 if test "$ac_res" != no; then :
13115 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13116
13117 fi
13118
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing freehostent" >&5
13120 $as_echo_n "checking for library containing freehostent... " >&6; }
13121 if ${ac_cv_search_freehostent+:} false; then :
13122 $as_echo_n "(cached) " >&6
13123 else
13124 ac_func_search_save_LIBS=$LIBS
13125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13126 /* end confdefs.h. */
13127
13128 /* Override any GCC internal prototype to avoid an error.
13129 Use char because int might match the return type of a GCC
13130 builtin and then its argument prototype would still apply. */
13131 #ifdef __cplusplus
13132 extern "C"
13133 #endif
13134 char freehostent ();
13135 int
13136 main ()
13137 {
13138 return freehostent ();
13139 ;
13140 return 0;
13141 }
13142 _ACEOF
13143 for ac_lib in '' resolv; do
13144 if test -z "$ac_lib"; then
13145 ac_res="none required"
13146 else
13147 ac_res=-l$ac_lib
13148 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13149 fi
13150 if ac_fn_c_try_link "$LINENO"; then :
13151 ac_cv_search_freehostent=$ac_res
13152 fi
13153 rm -f core conftest.err conftest.$ac_objext \
13154 conftest$ac_exeext
13155 if ${ac_cv_search_freehostent+:} false; then :
13156 break
13157 fi
13158 done
13159 if ${ac_cv_search_freehostent+:} false; then :
13160
13161 else
13162 ac_cv_search_freehostent=no
13163 fi
13164 rm conftest.$ac_ext
13165 LIBS=$ac_func_search_save_LIBS
13166 fi
13167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_freehostent" >&5
13168 $as_echo "$ac_cv_search_freehostent" >&6; }
13169 ac_res=$ac_cv_search_freehostent
13170 if test "$ac_res" != no; then :
13171 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13172
13173 fi
13174
13175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
13176 $as_echo_n "checking for library containing inet_pton... " >&6; }
13177 if ${ac_cv_search_inet_pton+:} false; then :
13178 $as_echo_n "(cached) " >&6
13179 else
13180 ac_func_search_save_LIBS=$LIBS
13181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13182 /* end confdefs.h. */
13183
13184 /* Override any GCC internal prototype to avoid an error.
13185 Use char because int might match the return type of a GCC
13186 builtin and then its argument prototype would still apply. */
13187 #ifdef __cplusplus
13188 extern "C"
13189 #endif
13190 char inet_pton ();
13191 int
13192 main ()
13193 {
13194 return inet_pton ();
13195 ;
13196 return 0;
13197 }
13198 _ACEOF
13199 for ac_lib in '' resolv; do
13200 if test -z "$ac_lib"; then
13201 ac_res="none required"
13202 else
13203 ac_res=-l$ac_lib
13204 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13205 fi
13206 if ac_fn_c_try_link "$LINENO"; then :
13207 ac_cv_search_inet_pton=$ac_res
13208 fi
13209 rm -f core conftest.err conftest.$ac_objext \
13210 conftest$ac_exeext
13211 if ${ac_cv_search_inet_pton+:} false; then :
13212 break
13213 fi
13214 done
13215 if ${ac_cv_search_inet_pton+:} false; then :
13216
13217 else
13218 ac_cv_search_inet_pton=no
13219 fi
13220 rm conftest.$ac_ext
13221 LIBS=$ac_func_search_save_LIBS
13222 fi
13223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
13224 $as_echo "$ac_cv_search_inet_pton" >&6; }
13225 ac_res=$ac_cv_search_inet_pton
13226 if test "$ac_res" != no; then :
13227 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13228
13229 $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
13230
13231 fi
13232
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
13234 $as_echo_n "checking for library containing inet_ntop... " >&6; }
13235 if ${ac_cv_search_inet_ntop+:} false; then :
13236 $as_echo_n "(cached) " >&6
13237 else
13238 ac_func_search_save_LIBS=$LIBS
13239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13240 /* end confdefs.h. */
13241
13242 /* Override any GCC internal prototype to avoid an error.
13243 Use char because int might match the return type of a GCC
13244 builtin and then its argument prototype would still apply. */
13245 #ifdef __cplusplus
13246 extern "C"
13247 #endif
13248 char inet_ntop ();
13249 int
13250 main ()
13251 {
13252 return inet_ntop ();
13253 ;
13254 return 0;
13255 }
13256 _ACEOF
13257 for ac_lib in '' resolv; do
13258 if test -z "$ac_lib"; then
13259 ac_res="none required"
13260 else
13261 ac_res=-l$ac_lib
13262 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13263 fi
13264 if ac_fn_c_try_link "$LINENO"; then :
13265 ac_cv_search_inet_ntop=$ac_res
13266 fi
13267 rm -f core conftest.err conftest.$ac_objext \
13268 conftest$ac_exeext
13269 if ${ac_cv_search_inet_ntop+:} false; then :
13270 break
13271 fi
13272 done
13273 if ${ac_cv_search_inet_ntop+:} false; then :
13274
13275 else
13276 ac_cv_search_inet_ntop=no
13277 fi
13278 rm conftest.$ac_ext
13279 LIBS=$ac_func_search_save_LIBS
13280 fi
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
13282 $as_echo "$ac_cv_search_inet_ntop" >&6; }
13283 ac_res=$ac_cv_search_inet_ntop
13284 if test "$ac_res" != no; then :
13285 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13286
13287 $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
13288
13289 fi
13290
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getipnodebyname" >&5
13292 $as_echo_n "checking for library containing getipnodebyname... " >&6; }
13293 if ${ac_cv_search_getipnodebyname+:} false; then :
13294 $as_echo_n "(cached) " >&6
13295 else
13296 ac_func_search_save_LIBS=$LIBS
13297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13298 /* end confdefs.h. */
13299
13300 /* Override any GCC internal prototype to avoid an error.
13301 Use char because int might match the return type of a GCC
13302 builtin and then its argument prototype would still apply. */
13303 #ifdef __cplusplus
13304 extern "C"
13305 #endif
13306 char getipnodebyname ();
13307 int
13308 main ()
13309 {
13310 return getipnodebyname ();
13311 ;
13312 return 0;
13313 }
13314 _ACEOF
13315 for ac_lib in '' resolv; do
13316 if test -z "$ac_lib"; then
13317 ac_res="none required"
13318 else
13319 ac_res=-l$ac_lib
13320 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13321 fi
13322 if ac_fn_c_try_link "$LINENO"; then :
13323 ac_cv_search_getipnodebyname=$ac_res
13324 fi
13325 rm -f core conftest.err conftest.$ac_objext \
13326 conftest$ac_exeext
13327 if ${ac_cv_search_getipnodebyname+:} false; then :
13328 break
13329 fi
13330 done
13331 if ${ac_cv_search_getipnodebyname+:} false; then :
13332
13333 else
13334 ac_cv_search_getipnodebyname=no
13335 fi
13336 rm conftest.$ac_ext
13337 LIBS=$ac_func_search_save_LIBS
13338 fi
13339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getipnodebyname" >&5
13340 $as_echo "$ac_cv_search_getipnodebyname" >&6; }
13341 ac_res=$ac_cv_search_getipnodebyname
13342 if test "$ac_res" != no; then :
13343 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13344
13345 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13346
13347 fi
13348
13349
13350 for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
13351 do :
13352 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13353 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
13354 # include <sys/types.h>
13355 #endif
13356 #ifdef HAVE_NETINET_IN_H
13357 # include <netinet/in.h> /* inet_ functions / structs */
13358 #endif
13359 #ifdef HAVE_ARPA_NAMESER_H
13360 # include <arpa/nameser.h> /* DNS HEADER struct */
13361 #endif
13362 #ifdef HAVE_NETDB_H
13363 # include <netdb.h>
13364 #endif
13365 "
13366 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13367 cat >>confdefs.h <<_ACEOF
13368 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13369 _ACEOF
13370
13371 fi
13372
13373 done
13374
13375
13376
13377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13378 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13379 if ${ac_cv_c_bigendian+:} false; then :
13380 $as_echo_n "(cached) " >&6
13381 else
13382 ac_cv_c_bigendian=unknown
13383 # See if we're dealing with a universal compiler.
13384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13385 /* end confdefs.h. */
13386 #ifndef __APPLE_CC__
13387 not a universal capable compiler
13388 #endif
13389 typedef int dummy;
13390
13391 _ACEOF
13392 if ac_fn_c_try_compile "$LINENO"; then :
13393
13394 # Check for potential -arch flags. It is not universal unless
13395 # there are at least two -arch flags with different values.
13396 ac_arch=
13397 ac_prev=
13398 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13399 if test -n "$ac_prev"; then
13400 case $ac_word in
13401 i?86 | x86_64 | ppc | ppc64)
13402 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13403 ac_arch=$ac_word
13404 else
13405 ac_cv_c_bigendian=universal
13406 break
13407 fi
13408 ;;
13409 esac
13410 ac_prev=
13411 elif test "x$ac_word" = "x-arch"; then
13412 ac_prev=arch
13413 fi
13414 done
13415 fi
13416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13417 if test $ac_cv_c_bigendian = unknown; then
13418 # See if sys/param.h defines the BYTE_ORDER macro.
13419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13420 /* end confdefs.h. */
13421 #include <sys/types.h>
13422 #include <sys/param.h>
13423
13424 int
13425 main ()
13426 {
13427 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13428 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13429 && LITTLE_ENDIAN)
13430 bogus endian macros
13431 #endif
13432
13433 ;
13434 return 0;
13435 }
13436 _ACEOF
13437 if ac_fn_c_try_compile "$LINENO"; then :
13438 # It does; now see whether it defined to BIG_ENDIAN or not.
13439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13440 /* end confdefs.h. */
13441 #include <sys/types.h>
13442 #include <sys/param.h>
13443
13444 int
13445 main ()
13446 {
13447 #if BYTE_ORDER != BIG_ENDIAN
13448 not big endian
13449 #endif
13450
13451 ;
13452 return 0;
13453 }
13454 _ACEOF
13455 if ac_fn_c_try_compile "$LINENO"; then :
13456 ac_cv_c_bigendian=yes
13457 else
13458 ac_cv_c_bigendian=no
13459 fi
13460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13461 fi
13462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13463 fi
13464 if test $ac_cv_c_bigendian = unknown; then
13465 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13467 /* end confdefs.h. */
13468 #include <limits.h>
13469
13470 int
13471 main ()
13472 {
13473 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13474 bogus endian macros
13475 #endif
13476
13477 ;
13478 return 0;
13479 }
13480 _ACEOF
13481 if ac_fn_c_try_compile "$LINENO"; then :
13482 # It does; now see whether it defined to _BIG_ENDIAN or not.
13483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13484 /* end confdefs.h. */
13485 #include <limits.h>
13486
13487 int
13488 main ()
13489 {
13490 #ifndef _BIG_ENDIAN
13491 not big endian
13492 #endif
13493
13494 ;
13495 return 0;
13496 }
13497 _ACEOF
13498 if ac_fn_c_try_compile "$LINENO"; then :
13499 ac_cv_c_bigendian=yes
13500 else
13501 ac_cv_c_bigendian=no
13502 fi
13503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13504 fi
13505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13506 fi
13507 if test $ac_cv_c_bigendian = unknown; then
13508 # Compile a test program.
13509 if test "$cross_compiling" = yes; then :
13510 # Try to guess by grepping values from an object file.
13511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13512 /* end confdefs.h. */
13513 short int ascii_mm[] =
13514 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13515 short int ascii_ii[] =
13516 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13517 int use_ascii (int i) {
13518 return ascii_mm[i] + ascii_ii[i];
13519 }
13520 short int ebcdic_ii[] =
13521 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13522 short int ebcdic_mm[] =
13523 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13524 int use_ebcdic (int i) {
13525 return ebcdic_mm[i] + ebcdic_ii[i];
13526 }
13527 extern int foo;
13528
13529 int
13530 main ()
13531 {
13532 return use_ascii (foo) == use_ebcdic (foo);
13533 ;
13534 return 0;
13535 }
13536 _ACEOF
13537 if ac_fn_c_try_compile "$LINENO"; then :
13538 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13539 ac_cv_c_bigendian=yes
13540 fi
13541 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13542 if test "$ac_cv_c_bigendian" = unknown; then
13543 ac_cv_c_bigendian=no
13544 else
13545 # finding both strings is unlikely to happen, but who knows?
13546 ac_cv_c_bigendian=unknown
13547 fi
13548 fi
13549 fi
13550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13551 else
13552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13553 /* end confdefs.h. */
13554 $ac_includes_default
13555 int
13556 main ()
13557 {
13558
13559 /* Are we little or big endian? From Harbison&Steele. */
13560 union
13561 {
13562 long int l;
13563 char c[sizeof (long int)];
13564 } u;
13565 u.l = 1;
13566 return u.c[sizeof (long int) - 1] == 1;
13567
13568 ;
13569 return 0;
13570 }
13571 _ACEOF
13572 if ac_fn_c_try_run "$LINENO"; then :
13573 ac_cv_c_bigendian=no
13574 else
13575 ac_cv_c_bigendian=yes
13576 fi
13577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13578 conftest.$ac_objext conftest.beam conftest.$ac_ext
13579 fi
13580
13581 fi
13582 fi
13583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13584 $as_echo "$ac_cv_c_bigendian" >&6; }
13585 case $ac_cv_c_bigendian in #(
13586 yes)
13587 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13588 ;; #(
13589 no)
13590 ;; #(
13591 universal)
13592
13593 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13594
13595 ;; #(
13596 *)
13597 as_fn_error $? "unknown endianness
13598 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13599 esac
13600
13601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13602 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13603 if ${ac_cv_struct_tm+:} false; then :
13604 $as_echo_n "(cached) " >&6
13605 else
13606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13607 /* end confdefs.h. */
13608 #include <sys/types.h>
13609 #include <time.h>
13610
13611 int
13612 main ()
13613 {
13614 struct tm tm;
13615 int *p = &tm.tm_sec;
13616 return !p;
13617 ;
13618 return 0;
13619 }
13620 _ACEOF
13621 if ac_fn_c_try_compile "$LINENO"; then :
13622 ac_cv_struct_tm=time.h
13623 else
13624 ac_cv_struct_tm=sys/time.h
13625 fi
13626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13627 fi
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13629 $as_echo "$ac_cv_struct_tm" >&6; }
13630 if test $ac_cv_struct_tm = sys/time.h; then
13631
13632 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
13633
13634 fi
13635
13636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13637 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
13638 if ${ac_cv_c_const+:} false; then :
13639 $as_echo_n "(cached) " >&6
13640 else
13641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642 /* end confdefs.h. */
13643
13644 int
13645 main ()
13646 {
13647
13648 #ifndef __cplusplus
13649 /* Ultrix mips cc rejects this sort of thing. */
13650 typedef int charset[2];
13651 const charset cs = { 0, 0 };
13652 /* SunOS 4.1.1 cc rejects this. */
13653 char const *const *pcpcc;
13654 char **ppc;
13655 /* NEC SVR4.0.2 mips cc rejects this. */
13656 struct point {int x, y;};
13657 static struct point const zero = {0,0};
13658 /* AIX XL C 1.02.0.0 rejects this.
13659 It does not let you subtract one const X* pointer from another in
13660 an arm of an if-expression whose if-part is not a constant
13661 expression */
13662 const char *g = "string";
13663 pcpcc = &g + (g ? g-g : 0);
13664 /* HPUX 7.0 cc rejects these. */
13665 ++pcpcc;
13666 ppc = (char**) pcpcc;
13667 pcpcc = (char const *const *) ppc;
13668 { /* SCO 3.2v4 cc rejects this sort of thing. */
13669 char tx;
13670 char *t = &tx;
13671 char const *s = 0 ? (char *) 0 : (char const *) 0;
13672
13673 *t++ = 0;
13674 if (s) return 0;
13675 }
13676 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13677 int x[] = {25, 17};
13678 const int *foo = &x[0];
13679 ++foo;
13680 }
13681 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13682 typedef const int *iptr;
13683 iptr p = 0;
13684 ++p;
13685 }
13686 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
13687 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13688 struct s { int j; const int *ap[3]; } bx;
13689 struct s *b = &bx; b->j = 5;
13690 }
13691 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13692 const int foo = 10;
13693 if (!foo) return 0;
13694 }
13695 return !cs[0] && !zero.x;
13696 #endif
13697
13698 ;
13699 return 0;
13700 }
13701 _ACEOF
13702 if ac_fn_c_try_compile "$LINENO"; then :
13703 ac_cv_c_const=yes
13704 else
13705 ac_cv_c_const=no
13706 fi
13707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13708 fi
13709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13710 $as_echo "$ac_cv_c_const" >&6; }
13711 if test $ac_cv_c_const = no; then
13712
13713 $as_echo "#define const /**/" >>confdefs.h
13714
13715 fi
13716
13717 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13718 if test "x$ac_cv_type_size_t" = xyes; then :
13719
13720 else
13721
13722 cat >>confdefs.h <<_ACEOF
13723 #define size_t unsigned int
13724 _ACEOF
13725
13726 fi
13727
13728 # The cast to long int works around a bug in the HP C Compiler
13729 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13730 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13731 # This bug is HP SR number 8606223364.
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13733 $as_echo_n "checking size of long... " >&6; }
13734 if ${ac_cv_sizeof_long+:} false; then :
13735 $as_echo_n "(cached) " >&6
13736 else
13737 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
13738
13739 else
13740 if test "$ac_cv_type_long" = yes; then
13741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13742 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13743 as_fn_error 77 "cannot compute sizeof (long)
13744 See \`config.log' for more details" "$LINENO" 5; }
13745 else
13746 ac_cv_sizeof_long=0
13747 fi
13748 fi
13749
13750 fi
13751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13752 $as_echo "$ac_cv_sizeof_long" >&6; }
13753
13754
13755
13756 cat >>confdefs.h <<_ACEOF
13757 #define SIZEOF_LONG $ac_cv_sizeof_long
13758 _ACEOF
13759
13760
13761 # The cast to long int works around a bug in the HP C Compiler
13762 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13763 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13764 # This bug is HP SR number 8606223364.
13765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
13766 $as_echo_n "checking size of int... " >&6; }
13767 if ${ac_cv_sizeof_int+:} false; then :
13768 $as_echo_n "(cached) " >&6
13769 else
13770 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
13771
13772 else
13773 if test "$ac_cv_type_int" = yes; then
13774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13775 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13776 as_fn_error 77 "cannot compute sizeof (int)
13777 See \`config.log' for more details" "$LINENO" 5; }
13778 else
13779 ac_cv_sizeof_int=0
13780 fi
13781 fi
13782
13783 fi
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
13785 $as_echo "$ac_cv_sizeof_int" >&6; }
13786
13787
13788
13789 cat >>confdefs.h <<_ACEOF
13790 #define SIZEOF_INT $ac_cv_sizeof_int
13791 _ACEOF
13792
13793
13794 # The cast to long int works around a bug in the HP C Compiler
13795 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13796 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13797 # This bug is HP SR number 8606223364.
13798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
13799 $as_echo_n "checking size of short... " >&6; }
13800 if ${ac_cv_sizeof_short+:} false; then :
13801 $as_echo_n "(cached) " >&6
13802 else
13803 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
13804
13805 else
13806 if test "$ac_cv_type_short" = yes; then
13807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13808 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13809 as_fn_error 77 "cannot compute sizeof (short)
13810 See \`config.log' for more details" "$LINENO" 5; }
13811 else
13812 ac_cv_sizeof_short=0
13813 fi
13814 fi
13815
13816 fi
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
13818 $as_echo "$ac_cv_sizeof_short" >&6; }
13819
13820
13821
13822 cat >>confdefs.h <<_ACEOF
13823 #define SIZEOF_SHORT $ac_cv_sizeof_short
13824 _ACEOF
13825
13826
13827 # The cast to long int works around a bug in the HP C Compiler
13828 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13829 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13830 # This bug is HP SR number 8606223364.
13831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
13832 $as_echo_n "checking size of char... " >&6; }
13833 if ${ac_cv_sizeof_char+:} false; then :
13834 $as_echo_n "(cached) " >&6
13835 else
13836 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
13837
13838 else
13839 if test "$ac_cv_type_char" = yes; then
13840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13841 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13842 as_fn_error 77 "cannot compute sizeof (char)
13843 See \`config.log' for more details" "$LINENO" 5; }
13844 else
13845 ac_cv_sizeof_char=0
13846 fi
13847 fi
13848
13849 fi
13850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
13851 $as_echo "$ac_cv_sizeof_char" >&6; }
13852
13853
13854
13855 cat >>confdefs.h <<_ACEOF
13856 #define SIZEOF_CHAR $ac_cv_sizeof_char
13857 _ACEOF
13858
13859
13860 # The cast to long int works around a bug in the HP C Compiler
13861 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13862 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13863 # This bug is HP SR number 8606223364.
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13865 $as_echo_n "checking size of size_t... " >&6; }
13866 if ${ac_cv_sizeof_size_t+:} false; then :
13867 $as_echo_n "(cached) " >&6
13868 else
13869 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
13870
13871 else
13872 if test "$ac_cv_type_size_t" = yes; then
13873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13874 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13875 as_fn_error 77 "cannot compute sizeof (size_t)
13876 See \`config.log' for more details" "$LINENO" 5; }
13877 else
13878 ac_cv_sizeof_size_t=0
13879 fi
13880 fi
13881
13882 fi
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13884 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13885
13886
13887
13888 cat >>confdefs.h <<_ACEOF
13889 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13890 _ACEOF
13891
13892
13893 # The cast to long int works around a bug in the HP C Compiler
13894 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13895 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13896 # This bug is HP SR number 8606223364.
13897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
13898 $as_echo_n "checking size of long long... " >&6; }
13899 if ${ac_cv_sizeof_long_long+:} false; then :
13900 $as_echo_n "(cached) " >&6
13901 else
13902 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
13903
13904 else
13905 if test "$ac_cv_type_long_long" = yes; then
13906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13907 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13908 as_fn_error 77 "cannot compute sizeof (long long)
13909 See \`config.log' for more details" "$LINENO" 5; }
13910 else
13911 ac_cv_sizeof_long_long=0
13912 fi
13913 fi
13914
13915 fi
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
13917 $as_echo "$ac_cv_sizeof_long_long" >&6; }
13918
13919
13920
13921 cat >>confdefs.h <<_ACEOF
13922 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
13923 _ACEOF
13924
13925
13926 # The cast to long int works around a bug in the HP C Compiler
13927 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13928 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13929 # This bug is HP SR number 8606223364.
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
13931 $as_echo_n "checking size of unsigned long long... " >&6; }
13932 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
13933 $as_echo_n "(cached) " >&6
13934 else
13935 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
13936
13937 else
13938 if test "$ac_cv_type_unsigned_long_long" = yes; then
13939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13940 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13941 as_fn_error 77 "cannot compute sizeof (unsigned long long)
13942 See \`config.log' for more details" "$LINENO" 5; }
13943 else
13944 ac_cv_sizeof_unsigned_long_long=0
13945 fi
13946 fi
13947
13948 fi
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
13950 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
13951
13952
13953
13954 cat >>confdefs.h <<_ACEOF
13955 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
13956 _ACEOF
13957
13958
13959 # The cast to long int works around a bug in the HP C Compiler
13960 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13961 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13962 # This bug is HP SR number 8606223364.
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13964 $as_echo_n "checking size of void *... " >&6; }
13965 if ${ac_cv_sizeof_void_p+:} false; then :
13966 $as_echo_n "(cached) " >&6
13967 else
13968 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
13969
13970 else
13971 if test "$ac_cv_type_void_p" = yes; then
13972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13973 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13974 as_fn_error 77 "cannot compute sizeof (void *)
13975 See \`config.log' for more details" "$LINENO" 5; }
13976 else
13977 ac_cv_sizeof_void_p=0
13978 fi
13979 fi
13980
13981 fi
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13983 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13984
13985
13986
13987 cat >>confdefs.h <<_ACEOF
13988 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13989 _ACEOF
13990
13991
13992
13993 for ac_header in stdlib.h
13994 do :
13995 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13996 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13997 cat >>confdefs.h <<_ACEOF
13998 #define HAVE_STDLIB_H 1
13999 _ACEOF
14000
14001 fi
14002
14003 done
14004
14005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14006 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14007 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
14008 $as_echo_n "(cached) " >&6
14009 else
14010 if test "$cross_compiling" = yes; then :
14011 ac_cv_func_malloc_0_nonnull=no
14012 else
14013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14014 /* end confdefs.h. */
14015 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
14016 # include <stdlib.h>
14017 #else
14018 char *malloc ();
14019 #endif
14020
14021 int
14022 main ()
14023 {
14024 return ! malloc (0);
14025 ;
14026 return 0;
14027 }
14028 _ACEOF
14029 if ac_fn_c_try_run "$LINENO"; then :
14030 ac_cv_func_malloc_0_nonnull=yes
14031 else
14032 ac_cv_func_malloc_0_nonnull=no
14033 fi
14034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14035 conftest.$ac_objext conftest.beam conftest.$ac_ext
14036 fi
14037
14038 fi
14039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14040 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14041 if test $ac_cv_func_malloc_0_nonnull = yes; then :
14042
14043 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
14044
14045 else
14046 $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
14047
14048 case " $LIBOBJS " in
14049 *" malloc.$ac_objext "* ) ;;
14050 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
14051 ;;
14052 esac
14053
14054
14055 $as_echo "#define malloc rpl_malloc" >>confdefs.h
14056
14057 fi
14058
14059
14060 for ac_header in stdlib.h
14061 do :
14062 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14063 if test "x$ac_cv_header_stdlib_h" = xyes; then :
14064 cat >>confdefs.h <<_ACEOF
14065 #define HAVE_STDLIB_H 1
14066 _ACEOF
14067
14068 fi
14069
14070 done
14071
14072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
14073 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
14074 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
14075 $as_echo_n "(cached) " >&6
14076 else
14077 if test "$cross_compiling" = yes; then :
14078 ac_cv_func_realloc_0_nonnull=no
14079 else
14080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14081 /* end confdefs.h. */
14082 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
14083 # include <stdlib.h>
14084 #else
14085 char *realloc ();
14086 #endif
14087
14088 int
14089 main ()
14090 {
14091 return ! realloc (0, 0);
14092 ;
14093 return 0;
14094 }
14095 _ACEOF
14096 if ac_fn_c_try_run "$LINENO"; then :
14097 ac_cv_func_realloc_0_nonnull=yes
14098 else
14099 ac_cv_func_realloc_0_nonnull=no
14100 fi
14101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14102 conftest.$ac_objext conftest.beam conftest.$ac_ext
14103 fi
14104
14105 fi
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
14107 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
14108 if test $ac_cv_func_realloc_0_nonnull = yes; then :
14109
14110 $as_echo "#define HAVE_REALLOC 1" >>confdefs.h
14111
14112 else
14113 $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
14114
14115 case " $LIBOBJS " in
14116 *" realloc.$ac_objext "* ) ;;
14117 *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
14118 ;;
14119 esac
14120
14121
14122 $as_echo "#define realloc rpl_realloc" >>confdefs.h
14123
14124 fi
14125
14126
14127
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strlcat" >&5
14129 $as_echo_n "checking for library containing strlcat... " >&6; }
14130 if ${ac_cv_search_strlcat+:} false; then :
14131 $as_echo_n "(cached) " >&6
14132 else
14133 ac_func_search_save_LIBS=$LIBS
14134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14135 /* end confdefs.h. */
14136
14137 /* Override any GCC internal prototype to avoid an error.
14138 Use char because int might match the return type of a GCC
14139 builtin and then its argument prototype would still apply. */
14140 #ifdef __cplusplus
14141 extern "C"
14142 #endif
14143 char strlcat ();
14144 int
14145 main ()
14146 {
14147 return strlcat ();
14148 ;
14149 return 0;
14150 }
14151 _ACEOF
14152 for ac_lib in '' bsd strl; do
14153 if test -z "$ac_lib"; then
14154 ac_res="none required"
14155 else
14156 ac_res=-l$ac_lib
14157 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14158 fi
14159 if ac_fn_c_try_link "$LINENO"; then :
14160 ac_cv_search_strlcat=$ac_res
14161 fi
14162 rm -f core conftest.err conftest.$ac_objext \
14163 conftest$ac_exeext
14164 if ${ac_cv_search_strlcat+:} false; then :
14165 break
14166 fi
14167 done
14168 if ${ac_cv_search_strlcat+:} false; then :
14169
14170 else
14171 ac_cv_search_strlcat=no
14172 fi
14173 rm conftest.$ac_ext
14174 LIBS=$ac_func_search_save_LIBS
14175 fi
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strlcat" >&5
14177 $as_echo "$ac_cv_search_strlcat" >&6; }
14178 ac_res=$ac_cv_search_strlcat
14179 if test "$ac_res" != no; then :
14180 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14181
14182 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
14183
14184 fi
14185
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strlcpy" >&5
14187 $as_echo_n "checking for library containing strlcpy... " >&6; }
14188 if ${ac_cv_search_strlcpy+:} false; then :
14189 $as_echo_n "(cached) " >&6
14190 else
14191 ac_func_search_save_LIBS=$LIBS
14192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14193 /* end confdefs.h. */
14194
14195 /* Override any GCC internal prototype to avoid an error.
14196 Use char because int might match the return type of a GCC
14197 builtin and then its argument prototype would still apply. */
14198 #ifdef __cplusplus
14199 extern "C"
14200 #endif
14201 char strlcpy ();
14202 int
14203 main ()
14204 {
14205 return strlcpy ();
14206 ;
14207 return 0;
14208 }
14209 _ACEOF
14210 for ac_lib in '' bsd strl; do
14211 if test -z "$ac_lib"; then
14212 ac_res="none required"
14213 else
14214 ac_res=-l$ac_lib
14215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14216 fi
14217 if ac_fn_c_try_link "$LINENO"; then :
14218 ac_cv_search_strlcpy=$ac_res
14219 fi
14220 rm -f core conftest.err conftest.$ac_objext \
14221 conftest$ac_exeext
14222 if ${ac_cv_search_strlcpy+:} false; then :
14223 break
14224 fi
14225 done
14226 if ${ac_cv_search_strlcpy+:} false; then :
14227
14228 else
14229 ac_cv_search_strlcpy=no
14230 fi
14231 rm conftest.$ac_ext
14232 LIBS=$ac_func_search_save_LIBS
14233 fi
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strlcpy" >&5
14235 $as_echo "$ac_cv_search_strlcpy" >&6; }
14236 ac_res=$ac_cv_search_strlcpy
14237 if test "$ac_res" != no; then :
14238 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14239
14240 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
14241
14242 fi
14243
14244
14245 for ac_func in basename
14246 do :
14247 ac_fn_c_check_func "$LINENO" "basename" "ac_cv_func_basename"
14248 if test "x$ac_cv_func_basename" = xyes; then :
14249 cat >>confdefs.h <<_ACEOF
14250 #define HAVE_BASENAME 1
14251 _ACEOF
14252
14253 fi
14254 done
14255
14256 for ac_func in syslog
14257 do :
14258 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
14259 if test "x$ac_cv_func_syslog" = xyes; then :
14260 cat >>confdefs.h <<_ACEOF
14261 #define HAVE_SYSLOG 1
14262 _ACEOF
14263
14264 fi
14265 done
14266
14267 for ac_func in cuserid
14268 do :
14269 ac_fn_c_check_func "$LINENO" "cuserid" "ac_cv_func_cuserid"
14270 if test "x$ac_cv_func_cuserid" = xyes; then :
14271 cat >>confdefs.h <<_ACEOF
14272 #define HAVE_CUSERID 1
14273 _ACEOF
14274
14275 fi
14276 done
14277
14278 for ac_func in memset bzero
14279 do :
14280 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14281 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14282 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14283 cat >>confdefs.h <<_ACEOF
14284 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14285 _ACEOF
14286 break
14287 fi
14288 done
14289
14290 for ac_func in memcpy bcopy
14291 do :
14292 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14293 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14294 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14295 cat >>confdefs.h <<_ACEOF
14296 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14297 _ACEOF
14298 break
14299 fi
14300 done
14301
14302 for ac_func in strerror
14303 do :
14304 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
14305 if test "x$ac_cv_func_strerror" = xyes; then :
14306 cat >>confdefs.h <<_ACEOF
14307 #define HAVE_STRERROR 1
14308 _ACEOF
14309
14310 fi
14311 done
14312
14313 for ac_func in strchr
14314 do :
14315 ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
14316 if test "x$ac_cv_func_strchr" = xyes; then :
14317 cat >>confdefs.h <<_ACEOF
14318 #define HAVE_STRCHR 1
14319 _ACEOF
14320
14321 fi
14322 done
14323
14324 for ac_func in strrchr
14325 do :
14326 ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
14327 if test "x$ac_cv_func_strrchr" = xyes; then :
14328 cat >>confdefs.h <<_ACEOF
14329 #define HAVE_STRRCHR 1
14330 _ACEOF
14331
14332 fi
14333 done
14334
14335 for ac_func in strdup
14336 do :
14337 ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
14338 if test "x$ac_cv_func_strdup" = xyes; then :
14339 cat >>confdefs.h <<_ACEOF
14340 #define HAVE_STRDUP 1
14341 _ACEOF
14342
14343 fi
14344 done
14345
14346 for ac_func in strpbrk
14347 do :
14348 ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
14349 if test "x$ac_cv_func_strpbrk" = xyes; then :
14350 cat >>confdefs.h <<_ACEOF
14351 #define HAVE_STRPBRK 1
14352 _ACEOF
14353
14354 fi
14355 done
14356
14357 for ac_func in inet_ntoa
14358 do :
14359 ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
14360 if test "x$ac_cv_func_inet_ntoa" = xyes; then :
14361 cat >>confdefs.h <<_ACEOF
14362 #define HAVE_INET_NTOA 1
14363 _ACEOF
14364
14365 fi
14366 done
14367
14368 for ac_func in strcasecmp
14369 do :
14370 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
14371 if test "x$ac_cv_func_strcasecmp" = xyes; then :
14372 cat >>confdefs.h <<_ACEOF
14373 #define HAVE_STRCASECMP 1
14374 _ACEOF
14375
14376 fi
14377 done
14378
14379 for ac_func in strncasecmp
14380 do :
14381 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
14382 if test "x$ac_cv_func_strncasecmp" = xyes; then :
14383 cat >>confdefs.h <<_ACEOF
14384 #define HAVE_STRNCASECMP 1
14385 _ACEOF
14386
14387 fi
14388 done
14389
14390
14391 for ac_header in signal.h
14392 do :
14393 ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
14394 if test "x$ac_cv_header_signal_h" = xyes; then :
14395 cat >>confdefs.h <<_ACEOF
14396 #define HAVE_SIGNAL_H 1
14397 _ACEOF
14398
14399 fi
14400
14401 done
14402
14403 for ac_header in regex.h
14404 do :
14405 ac_fn_c_check_header_mongrel "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default"
14406 if test "x$ac_cv_header_regex_h" = xyes; then :
14407 cat >>confdefs.h <<_ACEOF
14408 #define HAVE_REGEX_H 1
14409 _ACEOF
14410
14411 fi
14412
14413 done
14414
14415
14416 bsdstrl_h_found="no"
14417 strl_h_found="no"
14418 for ac_header in bsd/string.h
14419 do :
14420 ac_fn_c_check_header_mongrel "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default"
14421 if test "x$ac_cv_header_bsd_string_h" = xyes; then :
14422 cat >>confdefs.h <<_ACEOF
14423 #define HAVE_BSD_STRING_H 1
14424 _ACEOF
14425 bsdstrl_h_found="yes"
14426 fi
14427
14428 done
14429
14430 for ac_header in strl.h
14431 do :
14432 ac_fn_c_check_header_mongrel "$LINENO" "strl.h" "ac_cv_header_strl_h" "$ac_includes_default"
14433 if test "x$ac_cv_header_strl_h" = xyes; then :
14434 cat >>confdefs.h <<_ACEOF
14435 #define HAVE_STRL_H 1
14436 _ACEOF
14437 strl_h_found="yes"
14438 fi
14439
14440 done
14441
14442
14443 # we need to include <strl.h> if an installed strl.h was found and no
14444 # bsd/string.h was found
14445 if test x"$strl_h_found" = x"yes" -a x"$bsdstrl_h_found" = x"no"
14446 then
14447
14448 $as_echo "#define USE_STRL_H 1" >>confdefs.h
14449
14450 fi
14451
14452 if test x"$bsdstrl_h_found" = x"yes"
14453 then
14454
14455 $as_echo "#define USE_BSD_H 1" >>confdefs.h
14456
14457 fi
14458
14459 # Use opendmarc strl if neither a system strl nor libbsd are found
14460 if test x"$strl_h_found" = x"no" -a x"$bsdstrl_h_found" = x"no"
14461 then
14462
14463 $as_echo "#define USE_DMARCSTRL_H 1" >>confdefs.h
14464
14465 fi
14466
14467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
14468 $as_echo_n "checking whether ln -s works... " >&6; }
14469 LN_S=$as_ln_s
14470 if test "$LN_S" = "ln -s"; then
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14472 $as_echo "yes" >&6; }
14473 else
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
14475 $as_echo "no, using $LN_S" >&6; }
14476 fi
14477
14478 # Extract the first word of "miltertest", so it can be a program name with args.
14479 set dummy miltertest; ac_word=$2
14480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14481 $as_echo_n "checking for $ac_word... " >&6; }
14482 if ${ac_cv_prog_miltertest+:} false; then :
14483 $as_echo_n "(cached) " >&6
14484 else
14485 if test -n "$miltertest"; then
14486 ac_cv_prog_miltertest="$miltertest" # Let the user override the test.
14487 else
14488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14489 for as_dir in $PATH
14490 do
14491 IFS=$as_save_IFS
14492 test -z "$as_dir" && as_dir=.
14493 for ac_exec_ext in '' $ac_executable_extensions; do
14494 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14495 ac_cv_prog_miltertest=""yes""
14496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14497 break 2
14498 fi
14499 done
14500 done
14501 IFS=$as_save_IFS
14502
14503 test -z "$ac_cv_prog_miltertest" && ac_cv_prog_miltertest=""no""
14504 fi
14505 fi
14506 miltertest=$ac_cv_prog_miltertest
14507 if test -n "$miltertest"; then
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $miltertest" >&5
14509 $as_echo "$miltertest" >&6; }
14510 else
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14512 $as_echo "no" >&6; }
14513 fi
14514
14515
14516
14517
14518
14519 # Check whether --with-wall was given.
14520 if test "${with_wall+set}" = set; then :
14521 withval=$with_wall; CC="gcc -Wall"
14522 fi
14523
14524
14525
14526 #
14527 # See if we will need -lresolv
14528 #
14529 dnscheck='
14530 #include "confdefs.h"
14531 #include <sys/types.h>
14532 #include <netinet/in.h>
14533 #include <arpa/nameser.h>
14534 #include <resolv.h>
14535 int main() {
14536 res_mkquery (0, 0, 0, 0, 0, 0, 0, 0, 0);
14537 dn_expand (0, 0, 0, 0, 0);
14538 dn_skipname (0, 0);
14539 dn_comp (0, 0, 0, 0, 0);
14540 return 0;
14541 }'
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the resolver works without -lresolv" >&5
14543 $as_echo_n "checking whether the resolver works without -lresolv... " >&6; }
14544 LIBRESOLV=
14545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14546 /* end confdefs.h. */
14547
14548 $dnscheck
14549
14550 _ACEOF
14551 if ac_fn_c_try_link "$LINENO"; then :
14552
14553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14554 $as_echo "yes" >&6; }
14555
14556 else
14557
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14559 $as_echo "no" >&6; }
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the resolver works with -lresolv" >&5
14561 $as_echo_n "checking whether the resolver works with -lresolv... " >&6; }
14562 saved_LIBS="$LIBS"
14563 LIBS=-lresolv
14564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14565 /* end confdefs.h. */
14566
14567 $dnscheck
14568
14569 _ACEOF
14570 if ac_fn_c_try_link "$LINENO"; then :
14571
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14573 $as_echo "yes" >&6; }
14574 LIBRESOLV=-lresolv
14575
14576 else
14577
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14579 $as_echo "no" >&6; }
14580 as_fn_error $? "need workable resolver library" "$LINENO" 5
14581
14582 fi
14583 rm -f core conftest.err conftest.$ac_objext \
14584 conftest$ac_exeext conftest.$ac_ext
14585 LIBS="$saved_LIBS"
14586
14587 fi
14588 rm -f core conftest.err conftest.$ac_objext \
14589 conftest$ac_exeext conftest.$ac_ext
14590
14591
14592 #
14593 # --with-sql-backend -- configures some defaults for DB access
14594 #
14595
14596 # Check whether --with-sql-backend was given.
14597 if test "${with_sql_backend+set}" = set; then :
14598 withval=$with_sql_backend; SQL_BACKEND="$withval"
14599 else
14600 SQL_BACKEND="mysql"
14601 fi
14602
14603 if test x"$SQL_BACKEND" = x"yes"
14604 then
14605 SQL_BACKEND="mysql"
14606 fi
14607
14608
14609 cat >>confdefs.h <<_ACEOF
14610 #define SQL_BACKEND "$SQL_BACKEND"
14611 _ACEOF
14612
14613
14614
14615 # Check whether --with-spf was given.
14616 if test "${with_spf+set}" = set; then :
14617 withval=$with_spf;
14618 $as_echo "#define WITH_SPF 1" >>confdefs.h
14619
14620 fi
14621
14622
14623
14624 # Check whether --with-spf2-include was given.
14625 if test "${with_spf2_include+set}" = set; then :
14626 withval=$with_spf2_include; SPF2_INCLUDE="$withval"
14627 fi
14628
14629
14630 # Check whether --with-spf2-lib was given.
14631 if test "${with_spf2_lib+set}" = set; then :
14632 withval=$with_spf2_lib; SPF2_LIB="$withval"
14633 fi
14634
14635 use_spf="no"
14636 if test "x$SPF2_INCLUDE" != "x" -a "x$SPF2_LIB" != "x"
14637 then
14638 use_spf="yes"
14639 if test -f ${SPF2_INCLUDE}/spf.h
14640 then
14641
14642 $as_echo "#define HAVE_SPF2_H 1" >>confdefs.h
14643
14644 spf2_include="-I $SPF2_INCLUDE"
14645 saved_CFLAGS="$CFLAGS"
14646 saved_LDFLAGS="$LDFLAGS"
14647 CFLAGS="$spf2_include $saved_CFLAGS"
14648 LDFLAGS="$saved_LDFLAGS -L${SPF2_LIB}"
14649 fi
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SPF_record_new" >&5
14651 $as_echo_n "checking for library containing SPF_record_new... " >&6; }
14652 if ${ac_cv_search_SPF_record_new+:} false; then :
14653 $as_echo_n "(cached) " >&6
14654 else
14655 ac_func_search_save_LIBS=$LIBS
14656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14657 /* end confdefs.h. */
14658
14659 /* Override any GCC internal prototype to avoid an error.
14660 Use char because int might match the return type of a GCC
14661 builtin and then its argument prototype would still apply. */
14662 #ifdef __cplusplus
14663 extern "C"
14664 #endif
14665 char SPF_record_new ();
14666 int
14667 main ()
14668 {
14669 return SPF_record_new ();
14670 ;
14671 return 0;
14672 }
14673 _ACEOF
14674 for ac_lib in '' spf2; do
14675 if test -z "$ac_lib"; then
14676 ac_res="none required"
14677 else
14678 ac_res=-l$ac_lib
14679 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14680 fi
14681 if ac_fn_c_try_link "$LINENO"; then :
14682 ac_cv_search_SPF_record_new=$ac_res
14683 fi
14684 rm -f core conftest.err conftest.$ac_objext \
14685 conftest$ac_exeext
14686 if ${ac_cv_search_SPF_record_new+:} false; then :
14687 break
14688 fi
14689 done
14690 if ${ac_cv_search_SPF_record_new+:} false; then :
14691
14692 else
14693 ac_cv_search_SPF_record_new=no
14694 fi
14695 rm conftest.$ac_ext
14696 LIBS=$ac_func_search_save_LIBS
14697 fi
14698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SPF_record_new" >&5
14699 $as_echo "$ac_cv_search_SPF_record_new" >&6; }
14700 ac_res=$ac_cv_search_SPF_record_new
14701 if test "$ac_res" != no; then :
14702 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14703
14704 fi
14705
14706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SPF_server_new" >&5
14707 $as_echo_n "checking for library containing SPF_server_new... " >&6; }
14708 if ${ac_cv_search_SPF_server_new+:} false; then :
14709 $as_echo_n "(cached) " >&6
14710 else
14711 ac_func_search_save_LIBS=$LIBS
14712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14713 /* end confdefs.h. */
14714
14715 /* Override any GCC internal prototype to avoid an error.
14716 Use char because int might match the return type of a GCC
14717 builtin and then its argument prototype would still apply. */
14718 #ifdef __cplusplus
14719 extern "C"
14720 #endif
14721 char SPF_server_new ();
14722 int
14723 main ()
14724 {
14725 return SPF_server_new ();
14726 ;
14727 return 0;
14728 }
14729 _ACEOF
14730 for ac_lib in '' spf2; do
14731 if test -z "$ac_lib"; then
14732 ac_res="none required"
14733 else
14734 ac_res=-l$ac_lib
14735 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14736 fi
14737 if ac_fn_c_try_link "$LINENO"; then :
14738 ac_cv_search_SPF_server_new=$ac_res
14739 fi
14740 rm -f core conftest.err conftest.$ac_objext \
14741 conftest$ac_exeext
14742 if ${ac_cv_search_SPF_server_new+:} false; then :
14743 break
14744 fi
14745 done
14746 if ${ac_cv_search_SPF_server_new+:} false; then :
14747
14748 else
14749 ac_cv_search_SPF_server_new=no
14750 fi
14751 rm conftest.$ac_ext
14752 LIBS=$ac_func_search_save_LIBS
14753 fi
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SPF_server_new" >&5
14755 $as_echo "$ac_cv_search_SPF_server_new" >&6; }
14756 ac_res=$ac_cv_search_SPF_server_new
14757 if test "$ac_res" != no; then :
14758 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14759
14760 fi
14761
14762 fi
14763
14764 if test x"$use_spf" = x"yes"; then
14765 USE_SPF_TRUE=
14766 USE_SPF_FALSE='#'
14767 else
14768 USE_SPF_TRUE='#'
14769 USE_SPF_FALSE=
14770 fi
14771
14772
14773 #
14774 # opendmarc
14775 #
14776 # Check whether --enable-filter was given.
14777 if test "${enable_filter+set}" = set; then :
14778 enableval=$enable_filter; enable_filter=$enableval
14779 else
14780 enable_filter=yes
14781 fi
14782
14783 if test x"$enable_filter" != x"no"; then
14784 BUILD_FILTER_TRUE=
14785 BUILD_FILTER_FALSE='#'
14786 else
14787 BUILD_FILTER_TRUE='#'
14788 BUILD_FILTER_FALSE=
14789 fi
14790
14791
14792 # Check whether --enable-live-tests was given.
14793 if test "${enable_live_tests+set}" = set; then :
14794 enableval=$enable_live_tests; enable_live_tests=$enableval
14795 else
14796 enable_live_tests=no
14797 fi
14798
14799 if test x"$enable_live_tests" = x"yes"; then
14800 LIVE_TESTS_TRUE=
14801 LIVE_TESTS_FALSE='#'
14802 else
14803 LIVE_TESTS_TRUE='#'
14804 LIVE_TESTS_FALSE=
14805 fi
14806
14807
14808 # Check whether --enable-filter-tests was given.
14809 if test "${enable_filter_tests+set}" = set; then :
14810 enableval=$enable_filter_tests; enable_filter_tests=$enableval
14811 else
14812 enable_filter_tests=no
14813 fi
14814
14815 if test x"$enable_filter_tests" = x"yes"; then
14816 FILTER_TESTS_TRUE=
14817 FILTER_TESTS_FALSE='#'
14818 else
14819 FILTER_TESTS_TRUE='#'
14820 FILTER_TESTS_FALSE=
14821 fi
14822
14823 if test x"$enable_filter_tests" = x"yes" -a x"$miltertest" != x"yes"
14824 then
14825 as_fn_error $? "miltertest is required for filter tests" "$LINENO" 5
14826 fi
14827
14828 #
14829 # libmilter
14830 #
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for milter library and includes" >&5
14832 $as_echo_n "checking for milter library and includes... " >&6; }
14833
14834 # Check whether --with-milter was given.
14835 if test "${with_milter+set}" = set; then :
14836 withval=$with_milter; milterpath="$withval"
14837 else
14838 milterpath="auto"
14839 fi
14840
14841
14842 if test x"$enable_filter" = x"no"
14843 then
14844 milterpath="no"
14845 fi
14846
14847 if test "$milterpath" = "auto" -o "$milterpath" = "yes"
14848 then
14849 milterdirs="/usr/local /opt/local /usr"
14850 for d in $milterdirs
14851 do
14852 if test -f $d/include/libmilter/mfapi.h
14853 then
14854 milterpath=$d
14855 break
14856 fi
14857 done
14858 fi
14859 case "$milterpath" in
14860 no)
14861 if test x"$enable_filter" = x"yes"
14862 then
14863 as_fn_error $? "milter is required" "$LINENO" 5
14864 fi
14865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14866 $as_echo "disabled" >&6; }
14867 ;;
14868 auto)
14869 as_fn_error $? "milter not found" "$LINENO" 5
14870 ;;
14871 */*)
14872 if ! test -f $milterpath/include/libmilter/mfapi.h
14873 then
14874 as_fn_error $? "milter includes not found at $milterpath" "$LINENO" 5
14875 fi
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $milterpath" >&5
14877 $as_echo "$milterpath" >&6; }
14878 ;;
14879 *)
14880 as_fn_error $? "milter not found" "$LINENO" 5
14881 ;;
14882 esac
14883
14884 LIBMILTER_INCDIRS=""
14885 LIBMILTER_LIBDIRS=""
14886 LIBMILTER_LIBS=""
14887
14888 if test x"$milterpath" != x"no"
14889 then
14890 LIBMILTER_INCDIRS="-I$milterpath/include"
14891
14892 saved_CC="$CC"
14893 saved_CFLAGS="$CFLAGS"
14894 saved_CPPFLAGS="$CPPFLAGS"
14895 saved_LDFLAGS="$LDFLAGS"
14896 saved_LIBS="$LIBS"
14897
14898 CC="$PTHREAD_CC"
14899 LIBS="$PTHREAD_LIBS $saved_LIBS"
14900 CPPFLAGS="$LIBMILTER_INCDIRS $saved_CPPFLAGS"
14901 CFLAGS="$PTHREAD_CFLAGS $saved_CFLAGS"
14902 LDFLAGS="$PTHREAD_CFLAGS $saved_LDFLAGS"
14903
14904 breakloop="no"
14905 for d in lib lib/libmilter
14906 do
14907 unset ac_cv_search_smfi_register
14908 LDFLAGS="$PTHREAD_CFLAGS -L$milterpath/$d $saved_LDFLAGS"
14909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing smfi_register" >&5
14910 $as_echo_n "checking for library containing smfi_register... " >&6; }
14911 if ${ac_cv_search_smfi_register+:} false; then :
14912 $as_echo_n "(cached) " >&6
14913 else
14914 ac_func_search_save_LIBS=$LIBS
14915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14916 /* end confdefs.h. */
14917
14918 /* Override any GCC internal prototype to avoid an error.
14919 Use char because int might match the return type of a GCC
14920 builtin and then its argument prototype would still apply. */
14921 #ifdef __cplusplus
14922 extern "C"
14923 #endif
14924 char smfi_register ();
14925 int
14926 main ()
14927 {
14928 return smfi_register ();
14929 ;
14930 return 0;
14931 }
14932 _ACEOF
14933 for ac_lib in '' milter; do
14934 if test -z "$ac_lib"; then
14935 ac_res="none required"
14936 else
14937 ac_res=-l$ac_lib
14938 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14939 fi
14940 if ac_fn_c_try_link "$LINENO"; then :
14941 ac_cv_search_smfi_register=$ac_res
14942 fi
14943 rm -f core conftest.err conftest.$ac_objext \
14944 conftest$ac_exeext
14945 if ${ac_cv_search_smfi_register+:} false; then :
14946 break
14947 fi
14948 done
14949 if ${ac_cv_search_smfi_register+:} false; then :
14950
14951 else
14952 ac_cv_search_smfi_register=no
14953 fi
14954 rm conftest.$ac_ext
14955 LIBS=$ac_func_search_save_LIBS
14956 fi
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_smfi_register" >&5
14958 $as_echo "$ac_cv_search_smfi_register" >&6; }
14959 ac_res=$ac_cv_search_smfi_register
14960 if test "$ac_res" != no; then :
14961 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14962
14963 LIBMILTER_LIBDIRS="-L$milterpath/$d"
14964 LIBMILTER_LIBS="-lmilter"
14965 breakloop="yes"
14966
14967 fi
14968
14969
14970 ac_fn_c_check_func "$LINENO" "smfi_insheader" "ac_cv_func_smfi_insheader"
14971 if test "x$ac_cv_func_smfi_insheader" = xyes; then :
14972
14973 $as_echo "#define HAVE_SMFI_INSHEADER 1" >>confdefs.h
14974
14975 fi
14976
14977
14978 ac_fn_c_check_func "$LINENO" "smfi_opensocket" "ac_cv_func_smfi_opensocket"
14979 if test "x$ac_cv_func_smfi_opensocket" = xyes; then :
14980
14981 $as_echo "#define HAVE_SMFI_OPENSOCKET 1" >>confdefs.h
14982
14983 fi
14984
14985
14986 ac_fn_c_check_func "$LINENO" "smfi_progress" "ac_cv_func_smfi_progress"
14987 if test "x$ac_cv_func_smfi_progress" = xyes; then :
14988
14989 $as_echo "#define HAVE_SMFI_PROGRESS 1" >>confdefs.h
14990
14991 fi
14992
14993
14994 ac_fn_c_check_func "$LINENO" "smfi_setsymlist" "ac_cv_func_smfi_setsymlist"
14995 if test "x$ac_cv_func_smfi_setsymlist" = xyes; then :
14996
14997 $as_echo "#define HAVE_SMFI_SETSYMLIST 1" >>confdefs.h
14998
14999 fi
15000
15001
15002 ac_fn_c_check_func "$LINENO" "smfi_version" "ac_cv_func_smfi_version"
15003 if test "x$ac_cv_func_smfi_version" = xyes; then :
15004
15005 $as_echo "#define HAVE_SMFI_VERSION 1" >>confdefs.h
15006
15007 fi
15008
15009
15010 if test x"$breakloop" = x"yes"
15011 then
15012 break
15013 fi
15014 done
15015 if test x"$LIBMILTER_LIBDIRS" = x""
15016 then
15017 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libmilter not found" >&5
15018 $as_echo "$as_me: WARNING: libmilter not found" >&2;}
15019 fi
15020
15021 CC="$saved_CC"
15022 CPPFLAGS="$saved_CPPFLAGS"
15023 CFLAGS="$saved_CFLAGS"
15024 LDFLAGS="$saved_LDFLAGS"
15025 LIBS="$saved_LIBS"
15026 fi
15027
15028
15029
15030
15031
15032 #
15033 # Final substitutions
15034 #
15035 CPPFLAGS="$CPPFLAGS -DCONFIG_BASE=\\\"$sysconfdir\\\""
15036 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15037 SYSCONFDIR=`eval echo "$sysconfdir"`
15038
15039
15040 #
15041 # Generate files
15042 #
15043 ac_config_files="$ac_config_files Makefile contrib/Makefile contrib/init/Makefile contrib/init/generic/Makefile contrib/init/redhat/Makefile contrib/init/redhat/opendmarc contrib/rddmarc/Makefile contrib/service/Makefile contrib/service/opendmarc.service contrib/spec/Makefile contrib/spec/opendmarc.spec db/Makefile docs/Makefile libopendmarc/Makefile libopendmarc/tests/Makefile libopendmarc/tests/testfiles/Makefile libopendmarc/docs/Makefile opendmarc/Makefile opendmarc/opendmarc.conf.5 opendmarc/opendmarc.8 opendmarc/opendmarc-check.8 opendmarc/tests/Makefile reports/Makefile reports/opendmarc-expire reports/opendmarc-expire.8 reports/opendmarc-import reports/opendmarc-import.8 reports/opendmarc-importstats.8 reports/opendmarc-params reports/opendmarc-params.8 reports/opendmarc-reports reports/opendmarc-reports.8"
15044
15045 cat >confcache <<\_ACEOF
15046 # This file is a shell script that caches the results of configure
15047 # tests run on this system so they can be shared between configure
15048 # scripts and configure runs, see configure's option --config-cache.
15049 # It is not useful on other systems. If it contains results you don't
15050 # want to keep, you may remove or edit it.
15051 #
15052 # config.status only pays attention to the cache file if you give it
15053 # the --recheck option to rerun configure.
15054 #
15055 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15056 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15057 # following values.
15058
15059 _ACEOF
15060
15061 # The following way of writing the cache mishandles newlines in values,
15062 # but we know of no workaround that is simple, portable, and efficient.
15063 # So, we kill variables containing newlines.
15064 # Ultrix sh set writes to stderr and can't be redirected directly,
15065 # and sets the high bit in the cache file unless we assign to the vars.
15066 (
15067 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15068 eval ac_val=\$$ac_var
15069 case $ac_val in #(
15070 *${as_nl}*)
15071 case $ac_var in #(
15072 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15073 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15074 esac
15075 case $ac_var in #(
15076 _ | IFS | as_nl) ;; #(
15077 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15078 *) { eval $ac_var=; unset $ac_var;} ;;
15079 esac ;;
15080 esac
15081 done
15082
15083 (set) 2>&1 |
15084 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15085 *${as_nl}ac_space=\ *)
15086 # `set' does not quote correctly, so add quotes: double-quote
15087 # substitution turns \\\\ into \\, and sed turns \\ into \.
15088 sed -n \
15089 "s/'/'\\\\''/g;
15090 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15091 ;; #(
15092 *)
15093 # `set' quotes correctly as required by POSIX, so do not add quotes.
15094 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15095 ;;
15096 esac |
15097 sort
15098 ) |
15099 sed '
15100 /^ac_cv_env_/b end
15101 t clear
15102 :clear
15103 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15104 t end
15105 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15106 :end' >>confcache
15107 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15108 if test -w "$cache_file"; then
15109 if test "x$cache_file" != "x/dev/null"; then
15110 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15111 $as_echo "$as_me: updating cache $cache_file" >&6;}
15112 if test ! -f "$cache_file" || test -h "$cache_file"; then
15113 cat confcache >"$cache_file"
15114 else
15115 case $cache_file in #(
15116 */* | ?:*)
15117 mv -f confcache "$cache_file"$$ &&
15118 mv -f "$cache_file"$$ "$cache_file" ;; #(
15119 *)
15120 mv -f confcache "$cache_file" ;;
15121 esac
15122 fi
15123 fi
15124 else
15125 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15126 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15127 fi
15128 fi
15129 rm -f confcache
15130
15131 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15132 # Let make expand exec_prefix.
15133 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15134
15135 DEFS=-DHAVE_CONFIG_H
15136
15137 ac_libobjs=
15138 ac_ltlibobjs=
15139 U=
15140 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15141 # 1. Remove the extension, and $U if already installed.
15142 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15143 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15144 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15145 # will be set to the directory where LIBOBJS objects are built.
15146 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15147 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15148 done
15149 LIBOBJS=$ac_libobjs
15150
15151 LTLIBOBJS=$ac_ltlibobjs
15152
15153
15154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
15155 $as_echo_n "checking that generated files are newer than configure... " >&6; }
15156 if test -n "$am_sleep_pid"; then
15157 # Hide warnings about reused PIDs.
15158 wait $am_sleep_pid 2>/dev/null
15159 fi
15160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15161 $as_echo "done" >&6; }
15162 if test -n "$EXEEXT"; then
15163 am__EXEEXT_TRUE=
15164 am__EXEEXT_FALSE='#'
15165 else
15166 am__EXEEXT_TRUE='#'
15167 am__EXEEXT_FALSE=
15168 fi
15169
15170 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
15171 as_fn_error $? "conditional \"AMDEP\" was never defined.
15172 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15173 fi
15174 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
15175 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
15176 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15177 fi
15178
15179 if test -z "${USE_SPF_TRUE}" && test -z "${USE_SPF_FALSE}"; then
15180 as_fn_error $? "conditional \"USE_SPF\" was never defined.
15181 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15182 fi
15183 if test -z "${BUILD_FILTER_TRUE}" && test -z "${BUILD_FILTER_FALSE}"; then
15184 as_fn_error $? "conditional \"BUILD_FILTER\" was never defined.
15185 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15186 fi
15187 if test -z "${LIVE_TESTS_TRUE}" && test -z "${LIVE_TESTS_FALSE}"; then
15188 as_fn_error $? "conditional \"LIVE_TESTS\" was never defined.
15189 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15190 fi
15191 if test -z "${FILTER_TESTS_TRUE}" && test -z "${FILTER_TESTS_FALSE}"; then
15192 as_fn_error $? "conditional \"FILTER_TESTS\" was never defined.
15193 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15194 fi
15195
15196 : "${CONFIG_STATUS=./config.status}"
15197 ac_write_fail=0
15198 ac_clean_files_save=$ac_clean_files
15199 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15200 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15201 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15202 as_write_fail=0
15203 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15204 #! $SHELL
15205 # Generated by $as_me.
15206 # Run this file to recreate the current configuration.
15207 # Compiler output produced by configure, useful for debugging
15208 # configure, is in config.log if it exists.
15209
15210 debug=false
15211 ac_cs_recheck=false
15212 ac_cs_silent=false
15213
15214 SHELL=\${CONFIG_SHELL-$SHELL}
15215 export SHELL
15216 _ASEOF
15217 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15218 ## -------------------- ##
15219 ## M4sh Initialization. ##
15220 ## -------------------- ##
15221
15222 # Be more Bourne compatible
15223 DUALCASE=1; export DUALCASE # for MKS sh
15224 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15225 emulate sh
15226 NULLCMD=:
15227 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15228 # is contrary to our usage. Disable this feature.
15229 alias -g '${1+"$@"}'='"$@"'
15230 setopt NO_GLOB_SUBST
15231 else
15232 case `(set -o) 2>/dev/null` in #(
15233 *posix*) :
15234 set -o posix ;; #(
15235 *) :
15236 ;;
15237 esac
15238 fi
15239
15240
15241 as_nl='
15242 '
15243 export as_nl
15244 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15245 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15246 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15247 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15248 # Prefer a ksh shell builtin over an external printf program on Solaris,
15249 # but without wasting forks for bash or zsh.
15250 if test -z "$BASH_VERSION$ZSH_VERSION" \
15251 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15252 as_echo='print -r --'
15253 as_echo_n='print -rn --'
15254 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15255 as_echo='printf %s\n'
15256 as_echo_n='printf %s'
15257 else
15258 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15259 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15260 as_echo_n='/usr/ucb/echo -n'
15261 else
15262 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15263 as_echo_n_body='eval
15264 arg=$1;
15265 case $arg in #(
15266 *"$as_nl"*)
15267 expr "X$arg" : "X\\(.*\\)$as_nl";
15268 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15269 esac;
15270 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15271 '
15272 export as_echo_n_body
15273 as_echo_n='sh -c $as_echo_n_body as_echo'
15274 fi
15275 export as_echo_body
15276 as_echo='sh -c $as_echo_body as_echo'
15277 fi
15278
15279 # The user is always right.
15280 if test "${PATH_SEPARATOR+set}" != set; then
15281 PATH_SEPARATOR=:
15282 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15283 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15284 PATH_SEPARATOR=';'
15285 }
15286 fi
15287
15288
15289 # IFS
15290 # We need space, tab and new line, in precisely that order. Quoting is
15291 # there to prevent editors from complaining about space-tab.
15292 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15293 # splitting by setting IFS to empty value.)
15294 IFS=" "" $as_nl"
15295
15296 # Find who we are. Look in the path if we contain no directory separator.
15297 as_myself=
15298 case $0 in #((
15299 *[\\/]* ) as_myself=$0 ;;
15300 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15301 for as_dir in $PATH
15302 do
15303 IFS=$as_save_IFS
15304 test -z "$as_dir" && as_dir=.
15305 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15306 done
15307 IFS=$as_save_IFS
15308
15309 ;;
15310 esac
15311 # We did not find ourselves, most probably we were run as `sh COMMAND'
15312 # in which case we are not to be found in the path.
15313 if test "x$as_myself" = x; then
15314 as_myself=$0
15315 fi
15316 if test ! -f "$as_myself"; then
15317 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15318 exit 1
15319 fi
15320
15321 # Unset variables that we do not need and which cause bugs (e.g. in
15322 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15323 # suppresses any "Segmentation fault" message there. '((' could
15324 # trigger a bug in pdksh 5.2.14.
15325 for as_var in BASH_ENV ENV MAIL MAILPATH
15326 do eval test x\${$as_var+set} = xset \
15327 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15328 done
15329 PS1='$ '
15330 PS2='> '
15331 PS4='+ '
15332
15333 # NLS nuisances.
15334 LC_ALL=C
15335 export LC_ALL
15336 LANGUAGE=C
15337 export LANGUAGE
15338
15339 # CDPATH.
15340 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15341
15342
15343 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15344 # ----------------------------------------
15345 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15346 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15347 # script with STATUS, using 1 if that was 0.
15348 as_fn_error ()
15349 {
15350 as_status=$1; test $as_status -eq 0 && as_status=1
15351 if test "$4"; then
15352 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15353 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15354 fi
15355 $as_echo "$as_me: error: $2" >&2
15356 as_fn_exit $as_status
15357 } # as_fn_error
15358
15359
15360 # as_fn_set_status STATUS
15361 # -----------------------
15362 # Set $? to STATUS, without forking.
15363 as_fn_set_status ()
15364 {
15365 return $1
15366 } # as_fn_set_status
15367
15368 # as_fn_exit STATUS
15369 # -----------------
15370 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15371 as_fn_exit ()
15372 {
15373 set +e
15374 as_fn_set_status $1
15375 exit $1
15376 } # as_fn_exit
15377
15378 # as_fn_unset VAR
15379 # ---------------
15380 # Portably unset VAR.
15381 as_fn_unset ()
15382 {
15383 { eval $1=; unset $1;}
15384 }
15385 as_unset=as_fn_unset
15386 # as_fn_append VAR VALUE
15387 # ----------------------
15388 # Append the text in VALUE to the end of the definition contained in VAR. Take
15389 # advantage of any shell optimizations that allow amortized linear growth over
15390 # repeated appends, instead of the typical quadratic growth present in naive
15391 # implementations.
15392 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15393 eval 'as_fn_append ()
15394 {
15395 eval $1+=\$2
15396 }'
15397 else
15398 as_fn_append ()
15399 {
15400 eval $1=\$$1\$2
15401 }
15402 fi # as_fn_append
15403
15404 # as_fn_arith ARG...
15405 # ------------------
15406 # Perform arithmetic evaluation on the ARGs, and store the result in the
15407 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15408 # must be portable across $(()) and expr.
15409 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15410 eval 'as_fn_arith ()
15411 {
15412 as_val=$(( $* ))
15413 }'
15414 else
15415 as_fn_arith ()
15416 {
15417 as_val=`expr "$@" || test $? -eq 1`
15418 }
15419 fi # as_fn_arith
15420
15421
15422 if expr a : '\(a\)' >/dev/null 2>&1 &&
15423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15424 as_expr=expr
15425 else
15426 as_expr=false
15427 fi
15428
15429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15430 as_basename=basename
15431 else
15432 as_basename=false
15433 fi
15434
15435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15436 as_dirname=dirname
15437 else
15438 as_dirname=false
15439 fi
15440
15441 as_me=`$as_basename -- "$0" ||
15442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15443 X"$0" : 'X\(//\)$' \| \
15444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15445 $as_echo X/"$0" |
15446 sed '/^.*\/\([^/][^/]*\)\/*$/{
15447 s//\1/
15448 q
15449 }
15450 /^X\/\(\/\/\)$/{
15451 s//\1/
15452 q
15453 }
15454 /^X\/\(\/\).*/{
15455 s//\1/
15456 q
15457 }
15458 s/.*/./; q'`
15459
15460 # Avoid depending upon Character Ranges.
15461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15464 as_cr_digits='0123456789'
15465 as_cr_alnum=$as_cr_Letters$as_cr_digits
15466
15467 ECHO_C= ECHO_N= ECHO_T=
15468 case `echo -n x` in #(((((
15469 -n*)
15470 case `echo 'xy\c'` in
15471 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15472 xy) ECHO_C='\c';;
15473 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15474 ECHO_T=' ';;
15475 esac;;
15476 *)
15477 ECHO_N='-n';;
15478 esac
15479
15480 rm -f conf$$ conf$$.exe conf$$.file
15481 if test -d conf$$.dir; then
15482 rm -f conf$$.dir/conf$$.file
15483 else
15484 rm -f conf$$.dir
15485 mkdir conf$$.dir 2>/dev/null
15486 fi
15487 if (echo >conf$$.file) 2>/dev/null; then
15488 if ln -s conf$$.file conf$$ 2>/dev/null; then
15489 as_ln_s='ln -s'
15490 # ... but there are two gotchas:
15491 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15492 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15493 # In both cases, we have to default to `cp -pR'.
15494 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15495 as_ln_s='cp -pR'
15496 elif ln conf$$.file conf$$ 2>/dev/null; then
15497 as_ln_s=ln
15498 else
15499 as_ln_s='cp -pR'
15500 fi
15501 else
15502 as_ln_s='cp -pR'
15503 fi
15504 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15505 rmdir conf$$.dir 2>/dev/null
15506
15507
15508 # as_fn_mkdir_p
15509 # -------------
15510 # Create "$as_dir" as a directory, including parents if necessary.
15511 as_fn_mkdir_p ()
15512 {
15513
15514 case $as_dir in #(
15515 -*) as_dir=./$as_dir;;
15516 esac
15517 test -d "$as_dir" || eval $as_mkdir_p || {
15518 as_dirs=
15519 while :; do
15520 case $as_dir in #(
15521 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15522 *) as_qdir=$as_dir;;
15523 esac
15524 as_dirs="'$as_qdir' $as_dirs"
15525 as_dir=`$as_dirname -- "$as_dir" ||
15526 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15527 X"$as_dir" : 'X\(//\)[^/]' \| \
15528 X"$as_dir" : 'X\(//\)$' \| \
15529 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15530 $as_echo X"$as_dir" |
15531 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15532 s//\1/
15533 q
15534 }
15535 /^X\(\/\/\)[^/].*/{
15536 s//\1/
15537 q
15538 }
15539 /^X\(\/\/\)$/{
15540 s//\1/
15541 q
15542 }
15543 /^X\(\/\).*/{
15544 s//\1/
15545 q
15546 }
15547 s/.*/./; q'`
15548 test -d "$as_dir" && break
15549 done
15550 test -z "$as_dirs" || eval "mkdir $as_dirs"
15551 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15552
15553
15554 } # as_fn_mkdir_p
15555 if mkdir -p . 2>/dev/null; then
15556 as_mkdir_p='mkdir -p "$as_dir"'
15557 else
15558 test -d ./-p && rmdir ./-p
15559 as_mkdir_p=false
15560 fi
15561
15562
15563 # as_fn_executable_p FILE
15564 # -----------------------
15565 # Test if FILE is an executable regular file.
15566 as_fn_executable_p ()
15567 {
15568 test -f "$1" && test -x "$1"
15569 } # as_fn_executable_p
15570 as_test_x='test -x'
15571 as_executable_p=as_fn_executable_p
15572
15573 # Sed expression to map a string onto a valid CPP name.
15574 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15575
15576 # Sed expression to map a string onto a valid variable name.
15577 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15578
15579
15580 exec 6>&1
15581 ## ----------------------------------- ##
15582 ## Main body of $CONFIG_STATUS script. ##
15583 ## ----------------------------------- ##
15584 _ASEOF
15585 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15586
15587 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15588 # Save the log message, to keep $0 and so on meaningful, and to
15589 # report actual input values of CONFIG_FILES etc. instead of their
15590 # values after options handling.
15591 ac_log="
15592 This file was extended by OpenDMARC $as_me 1.3.2, which was
15593 generated by GNU Autoconf 2.69. Invocation command line was
15594
15595 CONFIG_FILES = $CONFIG_FILES
15596 CONFIG_HEADERS = $CONFIG_HEADERS
15597 CONFIG_LINKS = $CONFIG_LINKS
15598 CONFIG_COMMANDS = $CONFIG_COMMANDS
15599 $ $0 $@
15600
15601 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15602 "
15603
15604 _ACEOF
15605
15606 case $ac_config_files in *"
15607 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15608 esac
15609
15610 case $ac_config_headers in *"
15611 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15612 esac
15613
15614
15615 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15616 # Files that config.status was made for.
15617 config_files="$ac_config_files"
15618 config_headers="$ac_config_headers"
15619 config_commands="$ac_config_commands"
15620
15621 _ACEOF
15622
15623 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15624 ac_cs_usage="\
15625 \`$as_me' instantiates files and other configuration actions
15626 from templates according to the current configuration. Unless the files
15627 and actions are specified as TAGs, all are instantiated by default.
15628
15629 Usage: $0 [OPTION]... [TAG]...
15630
15631 -h, --help print this help, then exit
15632 -V, --version print version number and configuration settings, then exit
15633 --config print configuration, then exit
15634 -q, --quiet, --silent
15635 do not print progress messages
15636 -d, --debug don't remove temporary files
15637 --recheck update $as_me by reconfiguring in the same conditions
15638 --file=FILE[:TEMPLATE]
15639 instantiate the configuration file FILE
15640 --header=FILE[:TEMPLATE]
15641 instantiate the configuration header FILE
15642
15643 Configuration files:
15644 $config_files
15645
15646 Configuration headers:
15647 $config_headers
15648
15649 Configuration commands:
15650 $config_commands
15651
15652 Report bugs to <bcx+libdmarc@bcx.com>."
15653
15654 _ACEOF
15655 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15656 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15657 ac_cs_version="\\
15658 OpenDMARC config.status 1.3.2
15659 configured by $0, generated by GNU Autoconf 2.69,
15660 with options \\"\$ac_cs_config\\"
15661
15662 Copyright (C) 2012 Free Software Foundation, Inc.
15663 This config.status script is free software; the Free Software Foundation
15664 gives unlimited permission to copy, distribute and modify it."
15665
15666 ac_pwd='$ac_pwd'
15667 srcdir='$srcdir'
15668 INSTALL='$INSTALL'
15669 MKDIR_P='$MKDIR_P'
15670 AWK='$AWK'
15671 test -n "\$AWK" || AWK=awk
15672 _ACEOF
15673
15674 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15675 # The default lists apply if the user does not specify any file.
15676 ac_need_defaults=:
15677 while test $# != 0
15678 do
15679 case $1 in
15680 --*=?*)
15681 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15682 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15683 ac_shift=:
15684 ;;
15685 --*=)
15686 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15687 ac_optarg=
15688 ac_shift=:
15689 ;;
15690 *)
15691 ac_option=$1
15692 ac_optarg=$2
15693 ac_shift=shift
15694 ;;
15695 esac
15696
15697 case $ac_option in
15698 # Handling of the options.
15699 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15700 ac_cs_recheck=: ;;
15701 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15702 $as_echo "$ac_cs_version"; exit ;;
15703 --config | --confi | --conf | --con | --co | --c )
15704 $as_echo "$ac_cs_config"; exit ;;
15705 --debug | --debu | --deb | --de | --d | -d )
15706 debug=: ;;
15707 --file | --fil | --fi | --f )
15708 $ac_shift
15709 case $ac_optarg in
15710 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15711 '') as_fn_error $? "missing file argument" ;;
15712 esac
15713 as_fn_append CONFIG_FILES " '$ac_optarg'"
15714 ac_need_defaults=false;;
15715 --header | --heade | --head | --hea )
15716 $ac_shift
15717 case $ac_optarg in
15718 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15719 esac
15720 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15721 ac_need_defaults=false;;
15722 --he | --h)
15723 # Conflict between --help and --header
15724 as_fn_error $? "ambiguous option: \`$1'
15725 Try \`$0 --help' for more information.";;
15726 --help | --hel | -h )
15727 $as_echo "$ac_cs_usage"; exit ;;
15728 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15729 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15730 ac_cs_silent=: ;;
15731
15732 # This is an error.
15733 -*) as_fn_error $? "unrecognized option: \`$1'
15734 Try \`$0 --help' for more information." ;;
15735
15736 *) as_fn_append ac_config_targets " $1"
15737 ac_need_defaults=false ;;
15738
15739 esac
15740 shift
15741 done
15742
15743 ac_configure_extra_args=
15744
15745 if $ac_cs_silent; then
15746 exec 6>/dev/null
15747 ac_configure_extra_args="$ac_configure_extra_args --silent"
15748 fi
15749
15750 _ACEOF
15751 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15752 if \$ac_cs_recheck; then
15753 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15754 shift
15755 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15756 CONFIG_SHELL='$SHELL'
15757 export CONFIG_SHELL
15758 exec "\$@"
15759 fi
15760
15761 _ACEOF
15762 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15763 exec 5>>config.log
15764 {
15765 echo
15766 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15767 ## Running $as_me. ##
15768 _ASBOX
15769 $as_echo "$ac_log"
15770 } >&5
15771
15772 _ACEOF
15773 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15774 #
15775 # INIT-COMMANDS
15776 #
15777 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
15778
15779
15780 # The HP-UX ksh and POSIX shell print the target directory to stdout
15781 # if CDPATH is set.
15782 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15783
15784 sed_quote_subst='$sed_quote_subst'
15785 double_quote_subst='$double_quote_subst'
15786 delay_variable_subst='$delay_variable_subst'
15787 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
15788 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
15789 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
15790 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
15791 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
15792 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
15793 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
15794 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
15795 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
15796 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
15797 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
15798 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
15799 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
15800 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
15801 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
15802 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
15803 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
15804 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
15805 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
15806 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
15807 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
15808 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
15809 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
15810 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
15811 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
15812 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
15813 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
15814 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
15815 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
15816 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
15817 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
15818 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
15819 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
15820 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
15821 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
15822 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
15823 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
15824 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
15825 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
15826 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
15827 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
15828 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
15829 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
15830 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
15831 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
15832 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
15833 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
15834 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
15835 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
15836 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
15837 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
15838 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
15839 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
15840 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
15841 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
15842 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
15843 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
15844 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
15845 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
15846 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
15847 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
15848 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
15849 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
15850 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
15851 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
15852 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
15853 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
15854 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
15855 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
15856 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
15857 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
15858 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
15859 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
15860 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
15861 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
15862 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
15863 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
15864 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
15865 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
15866 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
15867 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
15868 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
15869 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
15870 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
15871 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
15872 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
15873 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
15874 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
15875 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
15876 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
15877 hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
15878 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
15879 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
15880 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
15881 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
15882 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
15883 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
15884 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
15885 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
15886 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
15887 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
15888 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
15889 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
15890 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
15891 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
15892 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
15893 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
15894 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
15895 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
15896 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
15897 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
15898 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
15899 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
15900 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
15901 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
15902 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
15903 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
15904 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
15905 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
15906 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
15907 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
15908 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
15909 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
15910 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
15911 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
15912 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
15913 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
15914 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
15915 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
15916 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
15917
15918 LTCC='$LTCC'
15919 LTCFLAGS='$LTCFLAGS'
15920 compiler='$compiler_DEFAULT'
15921
15922 # A function that is used when there is no print builtin or printf.
15923 func_fallback_echo ()
15924 {
15925 eval 'cat <<_LTECHO_EOF
15926 \$1
15927 _LTECHO_EOF'
15928 }
15929
15930 # Quote evaled strings.
15931 for var in SHELL \
15932 ECHO \
15933 SED \
15934 GREP \
15935 EGREP \
15936 FGREP \
15937 LD \
15938 NM \
15939 LN_S \
15940 lt_SP2NL \
15941 lt_NL2SP \
15942 reload_flag \
15943 OBJDUMP \
15944 deplibs_check_method \
15945 file_magic_cmd \
15946 file_magic_glob \
15947 want_nocaseglob \
15948 DLLTOOL \
15949 sharedlib_from_linklib_cmd \
15950 AR \
15951 AR_FLAGS \
15952 archiver_list_spec \
15953 STRIP \
15954 RANLIB \
15955 CC \
15956 CFLAGS \
15957 compiler \
15958 lt_cv_sys_global_symbol_pipe \
15959 lt_cv_sys_global_symbol_to_cdecl \
15960 lt_cv_sys_global_symbol_to_c_name_address \
15961 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
15962 nm_file_list_spec \
15963 lt_prog_compiler_no_builtin_flag \
15964 lt_prog_compiler_pic \
15965 lt_prog_compiler_wl \
15966 lt_prog_compiler_static \
15967 lt_cv_prog_compiler_c_o \
15968 need_locks \
15969 MANIFEST_TOOL \
15970 DSYMUTIL \
15971 NMEDIT \
15972 LIPO \
15973 OTOOL \
15974 OTOOL64 \
15975 shrext_cmds \
15976 export_dynamic_flag_spec \
15977 whole_archive_flag_spec \
15978 compiler_needs_object \
15979 with_gnu_ld \
15980 allow_undefined_flag \
15981 no_undefined_flag \
15982 hardcode_libdir_flag_spec \
15983 hardcode_libdir_flag_spec_ld \
15984 hardcode_libdir_separator \
15985 exclude_expsyms \
15986 include_expsyms \
15987 file_list_spec \
15988 variables_saved_for_relink \
15989 libname_spec \
15990 library_names_spec \
15991 soname_spec \
15992 install_override_mode \
15993 finish_eval \
15994 old_striplib \
15995 striplib; do
15996 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
15997 *[\\\\\\\`\\"\\\$]*)
15998 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
15999 ;;
16000 *)
16001 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
16002 ;;
16003 esac
16004 done
16005
16006 # Double-quote double-evaled strings.
16007 for var in reload_cmds \
16008 old_postinstall_cmds \
16009 old_postuninstall_cmds \
16010 old_archive_cmds \
16011 extract_expsyms_cmds \
16012 old_archive_from_new_cmds \
16013 old_archive_from_expsyms_cmds \
16014 archive_cmds \
16015 archive_expsym_cmds \
16016 module_cmds \
16017 module_expsym_cmds \
16018 export_symbols_cmds \
16019 prelink_cmds \
16020 postlink_cmds \
16021 postinstall_cmds \
16022 postuninstall_cmds \
16023 finish_cmds \
16024 sys_lib_search_path_spec \
16025 sys_lib_dlsearch_path_spec; do
16026 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
16027 *[\\\\\\\`\\"\\\$]*)
16028 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
16029 ;;
16030 *)
16031 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
16032 ;;
16033 esac
16034 done
16035
16036 ac_aux_dir='$ac_aux_dir'
16037 xsi_shell='$xsi_shell'
16038 lt_shell_append='$lt_shell_append'
16039
16040 # See if we are running on zsh, and set the options which allow our
16041 # commands through without removal of \ escapes INIT.
16042 if test -n "\${ZSH_VERSION+set}" ; then
16043 setopt NO_GLOB_SUBST
16044 fi
16045
16046
16047 PACKAGE='$PACKAGE'
16048 VERSION='$VERSION'
16049 TIMESTAMP='$TIMESTAMP'
16050 RM='$RM'
16051 ofile='$ofile'
16052
16053
16054
16055
16056 _ACEOF
16057
16058 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16059
16060 # Handling of arguments.
16061 for ac_config_target in $ac_config_targets
16062 do
16063 case $ac_config_target in
16064 "build-config.h") CONFIG_HEADERS="$CONFIG_HEADERS build-config.h" ;;
16065 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
16066 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
16067 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16068 "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
16069 "contrib/init/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/init/Makefile" ;;
16070 "contrib/init/generic/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/init/generic/Makefile" ;;
16071 "contrib/init/redhat/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/init/redhat/Makefile" ;;
16072 "contrib/init/redhat/opendmarc") CONFIG_FILES="$CONFIG_FILES contrib/init/redhat/opendmarc" ;;
16073 "contrib/rddmarc/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/rddmarc/Makefile" ;;
16074 "contrib/service/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/service/Makefile" ;;
16075 "contrib/service/opendmarc.service") CONFIG_FILES="$CONFIG_FILES contrib/service/opendmarc.service" ;;
16076 "contrib/spec/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/spec/Makefile" ;;
16077 "contrib/spec/opendmarc.spec") CONFIG_FILES="$CONFIG_FILES contrib/spec/opendmarc.spec" ;;
16078 "db/Makefile") CONFIG_FILES="$CONFIG_FILES db/Makefile" ;;
16079 "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
16080 "libopendmarc/Makefile") CONFIG_FILES="$CONFIG_FILES libopendmarc/Makefile" ;;
16081 "libopendmarc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES libopendmarc/tests/Makefile" ;;
16082 "libopendmarc/tests/testfiles/Makefile") CONFIG_FILES="$CONFIG_FILES libopendmarc/tests/testfiles/Makefile" ;;
16083 "libopendmarc/docs/Makefile") CONFIG_FILES="$CONFIG_FILES libopendmarc/docs/Makefile" ;;
16084 "opendmarc/Makefile") CONFIG_FILES="$CONFIG_FILES opendmarc/Makefile" ;;
16085 "opendmarc/opendmarc.conf.5") CONFIG_FILES="$CONFIG_FILES opendmarc/opendmarc.conf.5" ;;
16086 "opendmarc/opendmarc.8") CONFIG_FILES="$CONFIG_FILES opendmarc/opendmarc.8" ;;
16087 "opendmarc/opendmarc-check.8") CONFIG_FILES="$CONFIG_FILES opendmarc/opendmarc-check.8" ;;
16088 "opendmarc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES opendmarc/tests/Makefile" ;;
16089 "reports/Makefile") CONFIG_FILES="$CONFIG_FILES reports/Makefile" ;;
16090 "reports/opendmarc-expire") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-expire" ;;
16091 "reports/opendmarc-expire.8") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-expire.8" ;;
16092 "reports/opendmarc-import") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-import" ;;
16093 "reports/opendmarc-import.8") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-import.8" ;;
16094 "reports/opendmarc-importstats.8") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-importstats.8" ;;
16095 "reports/opendmarc-params") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-params" ;;
16096 "reports/opendmarc-params.8") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-params.8" ;;
16097 "reports/opendmarc-reports") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-reports" ;;
16098 "reports/opendmarc-reports.8") CONFIG_FILES="$CONFIG_FILES reports/opendmarc-reports.8" ;;
16099
16100 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16101 esac
16102 done
16103
16104
16105 # If the user did not use the arguments to specify the items to instantiate,
16106 # then the envvar interface is used. Set only those that are not.
16107 # We use the long form for the default assignment because of an extremely
16108 # bizarre bug on SunOS 4.1.3.
16109 if $ac_need_defaults; then
16110 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16111 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16112 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16113 fi
16114
16115 # Have a temporary directory for convenience. Make it in the build tree
16116 # simply because there is no reason against having it here, and in addition,
16117 # creating and moving files from /tmp can sometimes cause problems.
16118 # Hook for its removal unless debugging.
16119 # Note that there is a small window in which the directory will not be cleaned:
16120 # after its creation but before its name has been assigned to `$tmp'.
16121 $debug ||
16122 {
16123 tmp= ac_tmp=
16124 trap 'exit_status=$?
16125 : "${ac_tmp:=$tmp}"
16126 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16127 ' 0
16128 trap 'as_fn_exit 1' 1 2 13 15
16129 }
16130 # Create a (secure) tmp directory for tmp files.
16131
16132 {
16133 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16134 test -d "$tmp"
16135 } ||
16136 {
16137 tmp=./conf$$-$RANDOM
16138 (umask 077 && mkdir "$tmp")
16139 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16140 ac_tmp=$tmp
16141
16142 # Set up the scripts for CONFIG_FILES section.
16143 # No need to generate them if there are no CONFIG_FILES.
16144 # This happens for instance with `./config.status config.h'.
16145 if test -n "$CONFIG_FILES"; then
16146
16147
16148 ac_cr=`echo X | tr X '\015'`
16149 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16150 # But we know of no other shell where ac_cr would be empty at this
16151 # point, so we can use a bashism as a fallback.
16152 if test "x$ac_cr" = x; then
16153 eval ac_cr=\$\'\\r\'
16154 fi
16155 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16156 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16157 ac_cs_awk_cr='\\r'
16158 else
16159 ac_cs_awk_cr=$ac_cr
16160 fi
16161
16162 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16163 _ACEOF
16164
16165
16166 {
16167 echo "cat >conf$$subs.awk <<_ACEOF" &&
16168 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16169 echo "_ACEOF"
16170 } >conf$$subs.sh ||
16171 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16172 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16173 ac_delim='%!_!# '
16174 for ac_last_try in false false false false false :; do
16175 . ./conf$$subs.sh ||
16176 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16177
16178 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16179 if test $ac_delim_n = $ac_delim_num; then
16180 break
16181 elif $ac_last_try; then
16182 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16183 else
16184 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16185 fi
16186 done
16187 rm -f conf$$subs.sh
16188
16189 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16190 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16191 _ACEOF
16192 sed -n '
16193 h
16194 s/^/S["/; s/!.*/"]=/
16195 p
16196 g
16197 s/^[^!]*!//
16198 :repl
16199 t repl
16200 s/'"$ac_delim"'$//
16201 t delim
16202 :nl
16203 h
16204 s/\(.\{148\}\)..*/\1/
16205 t more1
16206 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16207 p
16208 n
16209 b repl
16210 :more1
16211 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16212 p
16213 g
16214 s/.\{148\}//
16215 t nl
16216 :delim
16217 h
16218 s/\(.\{148\}\)..*/\1/
16219 t more2
16220 s/["\\]/\\&/g; s/^/"/; s/$/"/
16221 p
16222 b
16223 :more2
16224 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16225 p
16226 g
16227 s/.\{148\}//
16228 t delim
16229 ' <conf$$subs.awk | sed '
16230 /^[^""]/{
16231 N
16232 s/\n//
16233 }
16234 ' >>$CONFIG_STATUS || ac_write_fail=1
16235 rm -f conf$$subs.awk
16236 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16237 _ACAWK
16238 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16239 for (key in S) S_is_set[key] = 1
16240 FS = ""
16241
16242 }
16243 {
16244 line = $ 0
16245 nfields = split(line, field, "@")
16246 substed = 0
16247 len = length(field[1])
16248 for (i = 2; i < nfields; i++) {
16249 key = field[i]
16250 keylen = length(key)
16251 if (S_is_set[key]) {
16252 value = S[key]
16253 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16254 len += length(value) + length(field[++i])
16255 substed = 1
16256 } else
16257 len += 1 + keylen
16258 }
16259
16260 print line
16261 }
16262
16263 _ACAWK
16264 _ACEOF
16265 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16266 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16267 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16268 else
16269 cat
16270 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16271 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16272 _ACEOF
16273
16274 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16275 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16276 # trailing colons and then remove the whole line if VPATH becomes empty
16277 # (actually we leave an empty line to preserve line numbers).
16278 if test "x$srcdir" = x.; then
16279 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16280 h
16281 s///
16282 s/^/:/
16283 s/[ ]*$/:/
16284 s/:\$(srcdir):/:/g
16285 s/:\${srcdir}:/:/g
16286 s/:@srcdir@:/:/g
16287 s/^:*//
16288 s/:*$//
16289 x
16290 s/\(=[ ]*\).*/\1/
16291 G
16292 s/\n//
16293 s/^[^=]*=[ ]*$//
16294 }'
16295 fi
16296
16297 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16298 fi # test -n "$CONFIG_FILES"
16299
16300 # Set up the scripts for CONFIG_HEADERS section.
16301 # No need to generate them if there are no CONFIG_HEADERS.
16302 # This happens for instance with `./config.status Makefile'.
16303 if test -n "$CONFIG_HEADERS"; then
16304 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16305 BEGIN {
16306 _ACEOF
16307
16308 # Transform confdefs.h into an awk script `defines.awk', embedded as
16309 # here-document in config.status, that substitutes the proper values into
16310 # config.h.in to produce config.h.
16311
16312 # Create a delimiter string that does not exist in confdefs.h, to ease
16313 # handling of long lines.
16314 ac_delim='%!_!# '
16315 for ac_last_try in false false :; do
16316 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16317 if test -z "$ac_tt"; then
16318 break
16319 elif $ac_last_try; then
16320 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16321 else
16322 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16323 fi
16324 done
16325
16326 # For the awk script, D is an array of macro values keyed by name,
16327 # likewise P contains macro parameters if any. Preserve backslash
16328 # newline sequences.
16329
16330 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16331 sed -n '
16332 s/.\{148\}/&'"$ac_delim"'/g
16333 t rset
16334 :rset
16335 s/^[ ]*#[ ]*define[ ][ ]*/ /
16336 t def
16337 d
16338 :def
16339 s/\\$//
16340 t bsnl
16341 s/["\\]/\\&/g
16342 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16343 D["\1"]=" \3"/p
16344 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16345 d
16346 :bsnl
16347 s/["\\]/\\&/g
16348 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16349 D["\1"]=" \3\\\\\\n"\\/p
16350 t cont
16351 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16352 t cont
16353 d
16354 :cont
16355 n
16356 s/.\{148\}/&'"$ac_delim"'/g
16357 t clear
16358 :clear
16359 s/\\$//
16360 t bsnlc
16361 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16362 d
16363 :bsnlc
16364 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16365 b cont
16366 ' <confdefs.h | sed '
16367 s/'"$ac_delim"'/"\\\
16368 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16369
16370 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16371 for (key in D) D_is_set[key] = 1
16372 FS = ""
16373 }
16374 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16375 line = \$ 0
16376 split(line, arg, " ")
16377 if (arg[1] == "#") {
16378 defundef = arg[2]
16379 mac1 = arg[3]
16380 } else {
16381 defundef = substr(arg[1], 2)
16382 mac1 = arg[2]
16383 }
16384 split(mac1, mac2, "(") #)
16385 macro = mac2[1]
16386 prefix = substr(line, 1, index(line, defundef) - 1)
16387 if (D_is_set[macro]) {
16388 # Preserve the white space surrounding the "#".
16389 print prefix "define", macro P[macro] D[macro]
16390 next
16391 } else {
16392 # Replace #undef with comments. This is necessary, for example,
16393 # in the case of _POSIX_SOURCE, which is predefined and required
16394 # on some systems where configure will not decide to define it.
16395 if (defundef == "undef") {
16396 print "/*", prefix defundef, macro, "*/"
16397 next
16398 }
16399 }
16400 }
16401 { print }
16402 _ACAWK
16403 _ACEOF
16404 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16405 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16406 fi # test -n "$CONFIG_HEADERS"
16407
16408
16409 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
16410 shift
16411 for ac_tag
16412 do
16413 case $ac_tag in
16414 :[FHLC]) ac_mode=$ac_tag; continue;;
16415 esac
16416 case $ac_mode$ac_tag in
16417 :[FHL]*:*);;
16418 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16419 :[FH]-) ac_tag=-:-;;
16420 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16421 esac
16422 ac_save_IFS=$IFS
16423 IFS=:
16424 set x $ac_tag
16425 IFS=$ac_save_IFS
16426 shift
16427 ac_file=$1
16428 shift
16429
16430 case $ac_mode in
16431 :L) ac_source=$1;;
16432 :[FH])
16433 ac_file_inputs=
16434 for ac_f
16435 do
16436 case $ac_f in
16437 -) ac_f="$ac_tmp/stdin";;
16438 *) # Look for the file first in the build tree, then in the source tree
16439 # (if the path is not absolute). The absolute path cannot be DOS-style,
16440 # because $ac_f cannot contain `:'.
16441 test -f "$ac_f" ||
16442 case $ac_f in
16443 [\\/$]*) false;;
16444 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16445 esac ||
16446 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16447 esac
16448 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16449 as_fn_append ac_file_inputs " '$ac_f'"
16450 done
16451
16452 # Let's still pretend it is `configure' which instantiates (i.e., don't
16453 # use $as_me), people would be surprised to read:
16454 # /* config.h. Generated by config.status. */
16455 configure_input='Generated from '`
16456 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16457 `' by configure.'
16458 if test x"$ac_file" != x-; then
16459 configure_input="$ac_file. $configure_input"
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16461 $as_echo "$as_me: creating $ac_file" >&6;}
16462 fi
16463 # Neutralize special characters interpreted by sed in replacement strings.
16464 case $configure_input in #(
16465 *\&* | *\|* | *\\* )
16466 ac_sed_conf_input=`$as_echo "$configure_input" |
16467 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16468 *) ac_sed_conf_input=$configure_input;;
16469 esac
16470
16471 case $ac_tag in
16472 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16473 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16474 esac
16475 ;;
16476 esac
16477
16478 ac_dir=`$as_dirname -- "$ac_file" ||
16479 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16480 X"$ac_file" : 'X\(//\)[^/]' \| \
16481 X"$ac_file" : 'X\(//\)$' \| \
16482 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16483 $as_echo X"$ac_file" |
16484 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16485 s//\1/
16486 q
16487 }
16488 /^X\(\/\/\)[^/].*/{
16489 s//\1/
16490 q
16491 }
16492 /^X\(\/\/\)$/{
16493 s//\1/
16494 q
16495 }
16496 /^X\(\/\).*/{
16497 s//\1/
16498 q
16499 }
16500 s/.*/./; q'`
16501 as_dir="$ac_dir"; as_fn_mkdir_p
16502 ac_builddir=.
16503
16504 case "$ac_dir" in
16505 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16506 *)
16507 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16508 # A ".." for each directory in $ac_dir_suffix.
16509 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16510 case $ac_top_builddir_sub in
16511 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16512 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16513 esac ;;
16514 esac
16515 ac_abs_top_builddir=$ac_pwd
16516 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16517 # for backward compatibility:
16518 ac_top_builddir=$ac_top_build_prefix
16519
16520 case $srcdir in
16521 .) # We are building in place.
16522 ac_srcdir=.
16523 ac_top_srcdir=$ac_top_builddir_sub
16524 ac_abs_top_srcdir=$ac_pwd ;;
16525 [\\/]* | ?:[\\/]* ) # Absolute name.
16526 ac_srcdir=$srcdir$ac_dir_suffix;
16527 ac_top_srcdir=$srcdir
16528 ac_abs_top_srcdir=$srcdir ;;
16529 *) # Relative name.
16530 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16531 ac_top_srcdir=$ac_top_build_prefix$srcdir
16532 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16533 esac
16534 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16535
16536
16537 case $ac_mode in
16538 :F)
16539 #
16540 # CONFIG_FILE
16541 #
16542
16543 case $INSTALL in
16544 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16545 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16546 esac
16547 ac_MKDIR_P=$MKDIR_P
16548 case $MKDIR_P in
16549 [\\/$]* | ?:[\\/]* ) ;;
16550 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16551 esac
16552 _ACEOF
16553
16554 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16555 # If the template does not know about datarootdir, expand it.
16556 # FIXME: This hack should be removed a few years after 2.60.
16557 ac_datarootdir_hack=; ac_datarootdir_seen=
16558 ac_sed_dataroot='
16559 /datarootdir/ {
16560 p
16561 q
16562 }
16563 /@datadir@/p
16564 /@docdir@/p
16565 /@infodir@/p
16566 /@localedir@/p
16567 /@mandir@/p'
16568 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16569 *datarootdir*) ac_datarootdir_seen=yes;;
16570 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16572 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16573 _ACEOF
16574 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16575 ac_datarootdir_hack='
16576 s&@datadir@&$datadir&g
16577 s&@docdir@&$docdir&g
16578 s&@infodir@&$infodir&g
16579 s&@localedir@&$localedir&g
16580 s&@mandir@&$mandir&g
16581 s&\\\${datarootdir}&$datarootdir&g' ;;
16582 esac
16583 _ACEOF
16584
16585 # Neutralize VPATH when `$srcdir' = `.'.
16586 # Shell code in configure.ac might set extrasub.
16587 # FIXME: do we really want to maintain this feature?
16588 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16589 ac_sed_extra="$ac_vpsub
16590 $extrasub
16591 _ACEOF
16592 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16593 :t
16594 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16595 s|@configure_input@|$ac_sed_conf_input|;t t
16596 s&@top_builddir@&$ac_top_builddir_sub&;t t
16597 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16598 s&@srcdir@&$ac_srcdir&;t t
16599 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16600 s&@top_srcdir@&$ac_top_srcdir&;t t
16601 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16602 s&@builddir@&$ac_builddir&;t t
16603 s&@abs_builddir@&$ac_abs_builddir&;t t
16604 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16605 s&@INSTALL@&$ac_INSTALL&;t t
16606 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16607 $ac_datarootdir_hack
16608 "
16609 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16610 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16611
16612 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16613 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16614 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16615 "$ac_tmp/out"`; test -z "$ac_out"; } &&
16616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16617 which seems to be undefined. Please make sure it is defined" >&5
16618 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16619 which seems to be undefined. Please make sure it is defined" >&2;}
16620
16621 rm -f "$ac_tmp/stdin"
16622 case $ac_file in
16623 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16624 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16625 esac \
16626 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16627 ;;
16628 :H)
16629 #
16630 # CONFIG_HEADER
16631 #
16632 if test x"$ac_file" != x-; then
16633 {
16634 $as_echo "/* $configure_input */" \
16635 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16636 } >"$ac_tmp/config.h" \
16637 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16638 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16640 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16641 else
16642 rm -f "$ac_file"
16643 mv "$ac_tmp/config.h" "$ac_file" \
16644 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16645 fi
16646 else
16647 $as_echo "/* $configure_input */" \
16648 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16649 || as_fn_error $? "could not create -" "$LINENO" 5
16650 fi
16651 # Compute "$ac_file"'s index in $config_headers.
16652 _am_arg="$ac_file"
16653 _am_stamp_count=1
16654 for _am_header in $config_headers :; do
16655 case $_am_header in
16656 $_am_arg | $_am_arg:* )
16657 break ;;
16658 * )
16659 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
16660 esac
16661 done
16662 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
16663 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16664 X"$_am_arg" : 'X\(//\)[^/]' \| \
16665 X"$_am_arg" : 'X\(//\)$' \| \
16666 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
16667 $as_echo X"$_am_arg" |
16668 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16669 s//\1/
16670 q
16671 }
16672 /^X\(\/\/\)[^/].*/{
16673 s//\1/
16674 q
16675 }
16676 /^X\(\/\/\)$/{
16677 s//\1/
16678 q
16679 }
16680 /^X\(\/\).*/{
16681 s//\1/
16682 q
16683 }
16684 s/.*/./; q'`/stamp-h$_am_stamp_count
16685 ;;
16686
16687 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16688 $as_echo "$as_me: executing $ac_file commands" >&6;}
16689 ;;
16690 esac
16691
16692
16693 case $ac_file$ac_mode in
16694 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
16695 # Older Autoconf quotes --file arguments for eval, but not when files
16696 # are listed without --file. Let's play safe and only enable the eval
16697 # if we detect the quoting.
16698 case $CONFIG_FILES in
16699 *\'*) eval set x "$CONFIG_FILES" ;;
16700 *) set x $CONFIG_FILES ;;
16701 esac
16702 shift
16703 for mf
16704 do
16705 # Strip MF so we end up with the name of the file.
16706 mf=`echo "$mf" | sed -e 's/:.*$//'`
16707 # Check whether this is an Automake generated Makefile or not.
16708 # We used to match only the files named 'Makefile.in', but
16709 # some people rename them; so instead we look at the file content.
16710 # Grep'ing the first line is not enough: some people post-process
16711 # each Makefile.in and add a new line on top of each file to say so.
16712 # Grep'ing the whole file is not good either: AIX grep has a line
16713 # limit of 2048, but all sed's we know have understand at least 4000.
16714 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
16715 dirpart=`$as_dirname -- "$mf" ||
16716 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16717 X"$mf" : 'X\(//\)[^/]' \| \
16718 X"$mf" : 'X\(//\)$' \| \
16719 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
16720 $as_echo X"$mf" |
16721 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16722 s//\1/
16723 q
16724 }
16725 /^X\(\/\/\)[^/].*/{
16726 s//\1/
16727 q
16728 }
16729 /^X\(\/\/\)$/{
16730 s//\1/
16731 q
16732 }
16733 /^X\(\/\).*/{
16734 s//\1/
16735 q
16736 }
16737 s/.*/./; q'`
16738 else
16739 continue
16740 fi
16741 # Extract the definition of DEPDIR, am__include, and am__quote
16742 # from the Makefile without running 'make'.
16743 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
16744 test -z "$DEPDIR" && continue
16745 am__include=`sed -n 's/^am__include = //p' < "$mf"`
16746 test -z "$am__include" && continue
16747 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
16748 # Find all dependency output files, they are included files with
16749 # $(DEPDIR) in their names. We invoke sed twice because it is the
16750 # simplest approach to changing $(DEPDIR) to its actual value in the
16751 # expansion.
16752 for file in `sed -n "
16753 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
16754 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
16755 # Make sure the directory exists.
16756 test -f "$dirpart/$file" && continue
16757 fdir=`$as_dirname -- "$file" ||
16758 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16759 X"$file" : 'X\(//\)[^/]' \| \
16760 X"$file" : 'X\(//\)$' \| \
16761 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
16762 $as_echo X"$file" |
16763 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16764 s//\1/
16765 q
16766 }
16767 /^X\(\/\/\)[^/].*/{
16768 s//\1/
16769 q
16770 }
16771 /^X\(\/\/\)$/{
16772 s//\1/
16773 q
16774 }
16775 /^X\(\/\).*/{
16776 s//\1/
16777 q
16778 }
16779 s/.*/./; q'`
16780 as_dir=$dirpart/$fdir; as_fn_mkdir_p
16781 # echo "creating $dirpart/$file"
16782 echo '# dummy' > "$dirpart/$file"
16783 done
16784 done
16785 }
16786 ;;
16787 "libtool":C)
16788
16789 # See if we are running on zsh, and set the options which allow our
16790 # commands through without removal of \ escapes.
16791 if test -n "${ZSH_VERSION+set}" ; then
16792 setopt NO_GLOB_SUBST
16793 fi
16794
16795 cfgfile="${ofile}T"
16796 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
16797 $RM "$cfgfile"
16798
16799 cat <<_LT_EOF >> "$cfgfile"
16800 #! $SHELL
16801
16802 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
16803 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
16804 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16805 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
16806 #
16807 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
16808 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
16809 # Inc.
16810 # Written by Gordon Matzigkeit, 1996
16811 #
16812 # This file is part of GNU Libtool.
16813 #
16814 # GNU Libtool is free software; you can redistribute it and/or
16815 # modify it under the terms of the GNU General Public License as
16816 # published by the Free Software Foundation; either version 2 of
16817 # the License, or (at your option) any later version.
16818 #
16819 # As a special exception to the GNU General Public License,
16820 # if you distribute this file as part of a program or library that
16821 # is built using GNU Libtool, you may include this file under the
16822 # same distribution terms that you use for the rest of that program.
16823 #
16824 # GNU Libtool is distributed in the hope that it will be useful,
16825 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16826 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16827 # GNU General Public License for more details.
16828 #
16829 # You should have received a copy of the GNU General Public License
16830 # along with GNU Libtool; see the file COPYING. If not, a copy
16831 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
16832 # obtained by writing to the Free Software Foundation, Inc.,
16833 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16834
16835
16836 # The names of the tagged configurations supported by this script.
16837 available_tags=""
16838
16839 # ### BEGIN LIBTOOL CONFIG
16840
16841 # Which release of libtool.m4 was used?
16842 macro_version=$macro_version
16843 macro_revision=$macro_revision
16844
16845 # Whether or not to build shared libraries.
16846 build_libtool_libs=$enable_shared
16847
16848 # Whether or not to build static libraries.
16849 build_old_libs=$enable_static
16850
16851 # What type of objects to build.
16852 pic_mode=$pic_mode
16853
16854 # Whether or not to optimize for fast installation.
16855 fast_install=$enable_fast_install
16856
16857 # Shell to use when invoking shell scripts.
16858 SHELL=$lt_SHELL
16859
16860 # An echo program that protects backslashes.
16861 ECHO=$lt_ECHO
16862
16863 # The host system.
16864 host_alias=$host_alias
16865 host=$host
16866 host_os=$host_os
16867
16868 # The build system.
16869 build_alias=$build_alias
16870 build=$build
16871 build_os=$build_os
16872
16873 # A sed program that does not truncate output.
16874 SED=$lt_SED
16875
16876 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
16877 Xsed="\$SED -e 1s/^X//"
16878
16879 # A grep program that handles long lines.
16880 GREP=$lt_GREP
16881
16882 # An ERE matcher.
16883 EGREP=$lt_EGREP
16884
16885 # A literal string matcher.
16886 FGREP=$lt_FGREP
16887
16888 # A BSD- or MS-compatible name lister.
16889 NM=$lt_NM
16890
16891 # Whether we need soft or hard links.
16892 LN_S=$lt_LN_S
16893
16894 # What is the maximum length of a command?
16895 max_cmd_len=$max_cmd_len
16896
16897 # Object file suffix (normally "o").
16898 objext=$ac_objext
16899
16900 # Executable file suffix (normally "").
16901 exeext=$exeext
16902
16903 # whether the shell understands "unset".
16904 lt_unset=$lt_unset
16905
16906 # turn spaces into newlines.
16907 SP2NL=$lt_lt_SP2NL
16908
16909 # turn newlines into spaces.
16910 NL2SP=$lt_lt_NL2SP
16911
16912 # convert \$build file names to \$host format.
16913 to_host_file_cmd=$lt_cv_to_host_file_cmd
16914
16915 # convert \$build files to toolchain format.
16916 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
16917
16918 # An object symbol dumper.
16919 OBJDUMP=$lt_OBJDUMP
16920
16921 # Method to check whether dependent libraries are shared objects.
16922 deplibs_check_method=$lt_deplibs_check_method
16923
16924 # Command to use when deplibs_check_method = "file_magic".
16925 file_magic_cmd=$lt_file_magic_cmd
16926
16927 # How to find potential files when deplibs_check_method = "file_magic".
16928 file_magic_glob=$lt_file_magic_glob
16929
16930 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
16931 want_nocaseglob=$lt_want_nocaseglob
16932
16933 # DLL creation program.
16934 DLLTOOL=$lt_DLLTOOL
16935
16936 # Command to associate shared and link libraries.
16937 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
16938
16939 # The archiver.
16940 AR=$lt_AR
16941
16942 # Flags to create an archive.
16943 AR_FLAGS=$lt_AR_FLAGS
16944
16945 # How to feed a file listing to the archiver.
16946 archiver_list_spec=$lt_archiver_list_spec
16947
16948 # A symbol stripping program.
16949 STRIP=$lt_STRIP
16950
16951 # Commands used to install an old-style archive.
16952 RANLIB=$lt_RANLIB
16953 old_postinstall_cmds=$lt_old_postinstall_cmds
16954 old_postuninstall_cmds=$lt_old_postuninstall_cmds
16955
16956 # Whether to use a lock for old archive extraction.
16957 lock_old_archive_extraction=$lock_old_archive_extraction
16958
16959 # A C compiler.
16960 LTCC=$lt_CC
16961
16962 # LTCC compiler flags.
16963 LTCFLAGS=$lt_CFLAGS
16964
16965 # Take the output of nm and produce a listing of raw symbols and C names.
16966 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
16967
16968 # Transform the output of nm in a proper C declaration.
16969 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
16970
16971 # Transform the output of nm in a C name address pair.
16972 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
16973
16974 # Transform the output of nm in a C name address pair when lib prefix is needed.
16975 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
16976
16977 # Specify filename containing input files for \$NM.
16978 nm_file_list_spec=$lt_nm_file_list_spec
16979
16980 # The root where to search for dependent libraries,and in which our libraries should be installed.
16981 lt_sysroot=$lt_sysroot
16982
16983 # The name of the directory that contains temporary libtool files.
16984 objdir=$objdir
16985
16986 # Used to examine libraries when file_magic_cmd begins with "file".
16987 MAGIC_CMD=$MAGIC_CMD
16988
16989 # Must we lock files when doing compilation?
16990 need_locks=$lt_need_locks
16991
16992 # Manifest tool.
16993 MANIFEST_TOOL=$lt_MANIFEST_TOOL
16994
16995 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
16996 DSYMUTIL=$lt_DSYMUTIL
16997
16998 # Tool to change global to local symbols on Mac OS X.
16999 NMEDIT=$lt_NMEDIT
17000
17001 # Tool to manipulate fat objects and archives on Mac OS X.
17002 LIPO=$lt_LIPO
17003
17004 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
17005 OTOOL=$lt_OTOOL
17006
17007 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
17008 OTOOL64=$lt_OTOOL64
17009
17010 # Old archive suffix (normally "a").
17011 libext=$libext
17012
17013 # Shared library suffix (normally ".so").
17014 shrext_cmds=$lt_shrext_cmds
17015
17016 # The commands to extract the exported symbol list from a shared archive.
17017 extract_expsyms_cmds=$lt_extract_expsyms_cmds
17018
17019 # Variables whose values should be saved in libtool wrapper scripts and
17020 # restored at link time.
17021 variables_saved_for_relink=$lt_variables_saved_for_relink
17022
17023 # Do we need the "lib" prefix for modules?
17024 need_lib_prefix=$need_lib_prefix
17025
17026 # Do we need a version for libraries?
17027 need_version=$need_version
17028
17029 # Library versioning type.
17030 version_type=$version_type
17031
17032 # Shared library runtime path variable.
17033 runpath_var=$runpath_var
17034
17035 # Shared library path variable.
17036 shlibpath_var=$shlibpath_var
17037
17038 # Is shlibpath searched before the hard-coded library search path?
17039 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
17040
17041 # Format of library name prefix.
17042 libname_spec=$lt_libname_spec
17043
17044 # List of archive names. First name is the real one, the rest are links.
17045 # The last name is the one that the linker finds with -lNAME
17046 library_names_spec=$lt_library_names_spec
17047
17048 # The coded name of the library, if different from the real name.
17049 soname_spec=$lt_soname_spec
17050
17051 # Permission mode override for installation of shared libraries.
17052 install_override_mode=$lt_install_override_mode
17053
17054 # Command to use after installation of a shared archive.
17055 postinstall_cmds=$lt_postinstall_cmds
17056
17057 # Command to use after uninstallation of a shared archive.
17058 postuninstall_cmds=$lt_postuninstall_cmds
17059
17060 # Commands used to finish a libtool library installation in a directory.
17061 finish_cmds=$lt_finish_cmds
17062
17063 # As "finish_cmds", except a single script fragment to be evaled but
17064 # not shown.
17065 finish_eval=$lt_finish_eval
17066
17067 # Whether we should hardcode library paths into libraries.
17068 hardcode_into_libs=$hardcode_into_libs
17069
17070 # Compile-time system search path for libraries.
17071 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
17072
17073 # Run-time system search path for libraries.
17074 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
17075
17076 # Whether dlopen is supported.
17077 dlopen_support=$enable_dlopen
17078
17079 # Whether dlopen of programs is supported.
17080 dlopen_self=$enable_dlopen_self
17081
17082 # Whether dlopen of statically linked programs is supported.
17083 dlopen_self_static=$enable_dlopen_self_static
17084
17085 # Commands to strip libraries.
17086 old_striplib=$lt_old_striplib
17087 striplib=$lt_striplib
17088
17089
17090 # The linker used to build libraries.
17091 LD=$lt_LD
17092
17093 # How to create reloadable object files.
17094 reload_flag=$lt_reload_flag
17095 reload_cmds=$lt_reload_cmds
17096
17097 # Commands used to build an old-style archive.
17098 old_archive_cmds=$lt_old_archive_cmds
17099
17100 # A language specific compiler.
17101 CC=$lt_compiler
17102
17103 # Is the compiler the GNU compiler?
17104 with_gcc=$GCC
17105
17106 # Compiler flag to turn off builtin functions.
17107 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
17108
17109 # Additional compiler flags for building library objects.
17110 pic_flag=$lt_lt_prog_compiler_pic
17111
17112 # How to pass a linker flag through the compiler.
17113 wl=$lt_lt_prog_compiler_wl
17114
17115 # Compiler flag to prevent dynamic linking.
17116 link_static_flag=$lt_lt_prog_compiler_static
17117
17118 # Does compiler simultaneously support -c and -o options?
17119 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
17120
17121 # Whether or not to add -lc for building shared libraries.
17122 build_libtool_need_lc=$archive_cmds_need_lc
17123
17124 # Whether or not to disallow shared libs when runtime libs are static.
17125 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
17126
17127 # Compiler flag to allow reflexive dlopens.
17128 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
17129
17130 # Compiler flag to generate shared objects directly from archives.
17131 whole_archive_flag_spec=$lt_whole_archive_flag_spec
17132
17133 # Whether the compiler copes with passing no objects directly.
17134 compiler_needs_object=$lt_compiler_needs_object
17135
17136 # Create an old-style archive from a shared archive.
17137 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
17138
17139 # Create a temporary old-style archive to link instead of a shared archive.
17140 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
17141
17142 # Commands used to build a shared archive.
17143 archive_cmds=$lt_archive_cmds
17144 archive_expsym_cmds=$lt_archive_expsym_cmds
17145
17146 # Commands used to build a loadable module if different from building
17147 # a shared archive.
17148 module_cmds=$lt_module_cmds
17149 module_expsym_cmds=$lt_module_expsym_cmds
17150
17151 # Whether we are building with GNU ld or not.
17152 with_gnu_ld=$lt_with_gnu_ld
17153
17154 # Flag that allows shared libraries with undefined symbols to be built.
17155 allow_undefined_flag=$lt_allow_undefined_flag
17156
17157 # Flag that enforces no undefined symbols.
17158 no_undefined_flag=$lt_no_undefined_flag
17159
17160 # Flag to hardcode \$libdir into a binary during linking.
17161 # This must work even if \$libdir does not exist
17162 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
17163
17164 # If ld is used when linking, flag to hardcode \$libdir into a binary
17165 # during linking. This must work even if \$libdir does not exist.
17166 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
17167
17168 # Whether we need a single "-rpath" flag with a separated argument.
17169 hardcode_libdir_separator=$lt_hardcode_libdir_separator
17170
17171 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
17172 # DIR into the resulting binary.
17173 hardcode_direct=$hardcode_direct
17174
17175 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
17176 # DIR into the resulting binary and the resulting library dependency is
17177 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
17178 # library is relocated.
17179 hardcode_direct_absolute=$hardcode_direct_absolute
17180
17181 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
17182 # into the resulting binary.
17183 hardcode_minus_L=$hardcode_minus_L
17184
17185 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
17186 # into the resulting binary.
17187 hardcode_shlibpath_var=$hardcode_shlibpath_var
17188
17189 # Set to "yes" if building a shared library automatically hardcodes DIR
17190 # into the library and all subsequent libraries and executables linked
17191 # against it.
17192 hardcode_automatic=$hardcode_automatic
17193
17194 # Set to yes if linker adds runtime paths of dependent libraries
17195 # to runtime path list.
17196 inherit_rpath=$inherit_rpath
17197
17198 # Whether libtool must link a program against all its dependency libraries.
17199 link_all_deplibs=$link_all_deplibs
17200
17201 # Set to "yes" if exported symbols are required.
17202 always_export_symbols=$always_export_symbols
17203
17204 # The commands to list exported symbols.
17205 export_symbols_cmds=$lt_export_symbols_cmds
17206
17207 # Symbols that should not be listed in the preloaded symbols.
17208 exclude_expsyms=$lt_exclude_expsyms
17209
17210 # Symbols that must always be exported.
17211 include_expsyms=$lt_include_expsyms
17212
17213 # Commands necessary for linking programs (against libraries) with templates.
17214 prelink_cmds=$lt_prelink_cmds
17215
17216 # Commands necessary for finishing linking programs.
17217 postlink_cmds=$lt_postlink_cmds
17218
17219 # Specify filename containing input files.
17220 file_list_spec=$lt_file_list_spec
17221
17222 # How to hardcode a shared library path into an executable.
17223 hardcode_action=$hardcode_action
17224
17225 # ### END LIBTOOL CONFIG
17226
17227 _LT_EOF
17228
17229 case $host_os in
17230 aix3*)
17231 cat <<\_LT_EOF >> "$cfgfile"
17232 # AIX sometimes has problems with the GCC collect2 program. For some
17233 # reason, if we set the COLLECT_NAMES environment variable, the problems
17234 # vanish in a puff of smoke.
17235 if test "X${COLLECT_NAMES+set}" != Xset; then
17236 COLLECT_NAMES=
17237 export COLLECT_NAMES
17238 fi
17239 _LT_EOF
17240 ;;
17241 esac
17242
17243
17244 ltmain="$ac_aux_dir/ltmain.sh"
17245
17246
17247 # We use sed instead of cat because bash on DJGPP gets confused if
17248 # if finds mixed CR/LF and LF-only lines. Since sed operates in
17249 # text mode, it properly converts lines to CR/LF. This bash problem
17250 # is reportedly fixed, but why not run on old versions too?
17251 sed '$q' "$ltmain" >> "$cfgfile" \
17252 || (rm -f "$cfgfile"; exit 1)
17253
17254 if test x"$xsi_shell" = xyes; then
17255 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
17256 func_dirname ()\
17257 {\
17258 \ case ${1} in\
17259 \ */*) func_dirname_result="${1%/*}${2}" ;;\
17260 \ * ) func_dirname_result="${3}" ;;\
17261 \ esac\
17262 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
17263 && mv -f "$cfgfile.tmp" "$cfgfile" \
17264 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17265 test 0 -eq $? || _lt_function_replace_fail=:
17266
17267
17268 sed -e '/^func_basename ()$/,/^} # func_basename /c\
17269 func_basename ()\
17270 {\
17271 \ func_basename_result="${1##*/}"\
17272 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
17273 && mv -f "$cfgfile.tmp" "$cfgfile" \
17274 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17275 test 0 -eq $? || _lt_function_replace_fail=:
17276
17277
17278 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
17279 func_dirname_and_basename ()\
17280 {\
17281 \ case ${1} in\
17282 \ */*) func_dirname_result="${1%/*}${2}" ;;\
17283 \ * ) func_dirname_result="${3}" ;;\
17284 \ esac\
17285 \ func_basename_result="${1##*/}"\
17286 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
17287 && mv -f "$cfgfile.tmp" "$cfgfile" \
17288 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17289 test 0 -eq $? || _lt_function_replace_fail=:
17290
17291
17292 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
17293 func_stripname ()\
17294 {\
17295 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
17296 \ # positional parameters, so assign one to ordinary parameter first.\
17297 \ func_stripname_result=${3}\
17298 \ func_stripname_result=${func_stripname_result#"${1}"}\
17299 \ func_stripname_result=${func_stripname_result%"${2}"}\
17300 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
17301 && mv -f "$cfgfile.tmp" "$cfgfile" \
17302 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17303 test 0 -eq $? || _lt_function_replace_fail=:
17304
17305
17306 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
17307 func_split_long_opt ()\
17308 {\
17309 \ func_split_long_opt_name=${1%%=*}\
17310 \ func_split_long_opt_arg=${1#*=}\
17311 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
17312 && mv -f "$cfgfile.tmp" "$cfgfile" \
17313 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17314 test 0 -eq $? || _lt_function_replace_fail=:
17315
17316
17317 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
17318 func_split_short_opt ()\
17319 {\
17320 \ func_split_short_opt_arg=${1#??}\
17321 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
17322 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
17323 && mv -f "$cfgfile.tmp" "$cfgfile" \
17324 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17325 test 0 -eq $? || _lt_function_replace_fail=:
17326
17327
17328 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
17329 func_lo2o ()\
17330 {\
17331 \ case ${1} in\
17332 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
17333 \ *) func_lo2o_result=${1} ;;\
17334 \ esac\
17335 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
17336 && mv -f "$cfgfile.tmp" "$cfgfile" \
17337 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17338 test 0 -eq $? || _lt_function_replace_fail=:
17339
17340
17341 sed -e '/^func_xform ()$/,/^} # func_xform /c\
17342 func_xform ()\
17343 {\
17344 func_xform_result=${1%.*}.lo\
17345 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
17346 && mv -f "$cfgfile.tmp" "$cfgfile" \
17347 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17348 test 0 -eq $? || _lt_function_replace_fail=:
17349
17350
17351 sed -e '/^func_arith ()$/,/^} # func_arith /c\
17352 func_arith ()\
17353 {\
17354 func_arith_result=$(( $* ))\
17355 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
17356 && mv -f "$cfgfile.tmp" "$cfgfile" \
17357 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17358 test 0 -eq $? || _lt_function_replace_fail=:
17359
17360
17361 sed -e '/^func_len ()$/,/^} # func_len /c\
17362 func_len ()\
17363 {\
17364 func_len_result=${#1}\
17365 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
17366 && mv -f "$cfgfile.tmp" "$cfgfile" \
17367 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17368 test 0 -eq $? || _lt_function_replace_fail=:
17369
17370 fi
17371
17372 if test x"$lt_shell_append" = xyes; then
17373 sed -e '/^func_append ()$/,/^} # func_append /c\
17374 func_append ()\
17375 {\
17376 eval "${1}+=\\${2}"\
17377 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
17378 && mv -f "$cfgfile.tmp" "$cfgfile" \
17379 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17380 test 0 -eq $? || _lt_function_replace_fail=:
17381
17382
17383 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
17384 func_append_quoted ()\
17385 {\
17386 \ func_quote_for_eval "${2}"\
17387 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
17388 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
17389 && mv -f "$cfgfile.tmp" "$cfgfile" \
17390 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17391 test 0 -eq $? || _lt_function_replace_fail=:
17392
17393
17394 # Save a `func_append' function call where possible by direct use of '+='
17395 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
17396 && mv -f "$cfgfile.tmp" "$cfgfile" \
17397 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17398 test 0 -eq $? || _lt_function_replace_fail=:
17399 else
17400 # Save a `func_append' function call even when '+=' is not available
17401 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
17402 && mv -f "$cfgfile.tmp" "$cfgfile" \
17403 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
17404 test 0 -eq $? || _lt_function_replace_fail=:
17405 fi
17406
17407 if test x"$_lt_function_replace_fail" = x":"; then
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
17409 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
17410 fi
17411
17412
17413 mv -f "$cfgfile" "$ofile" ||
17414 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
17415 chmod +x "$ofile"
17416
17417 ;;
17418
17419 esac
17420 done # for ac_tag
17421
17422
17423 as_fn_exit 0
17424 _ACEOF
17425 ac_clean_files=$ac_clean_files_save
17426
17427 test $ac_write_fail = 0 ||
17428 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17429
17430
17431 # configure is writing to config.log, and then calls config.status.
17432 # config.status does its own redirection, appending to config.log.
17433 # Unfortunately, on DOS this fails, as config.log is still kept open
17434 # by configure, so config.status won't be able to write to it; its
17435 # output is simply discarded. So we exec the FD to /dev/null,
17436 # effectively closing config.log, so it can be properly (re)opened and
17437 # appended to by config.status. When coming back to configure, we
17438 # need to make the FD available again.
17439 if test "$no_create" != yes; then
17440 ac_cs_success=:
17441 ac_config_status_args=
17442 test "$silent" = yes &&
17443 ac_config_status_args="$ac_config_status_args --quiet"
17444 exec 5>/dev/null
17445 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17446 exec 5>>config.log
17447 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17448 # would make configure fail if this is the last instruction.
17449 $ac_cs_success || as_fn_exit 1
17450 fi
17451 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17452 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17453 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17454 fi
17455
17456
17457 # @end1
0 # -*- Autoconf -*-
1 # Process this file with autoconf to produce a configure script.
2 #
3 # Copyright (c) 2012-2017, The Trusted Domain Project. All rights reserved.
4
5 # Acceptable arguments to configure are:
6 # The usual CC= etc.
7 # --with-wall forces CC=gcc -Wall
8
9 # SPF support:
10 # Define --with-spf to include either internal OR libspf2 support. For libspf2
11 # support, also define these:
12 # --with-spf2-include=path
13 # --with-spf2-lib=path
14
15 #
16 # Setup
17 #
18 AC_PREREQ(2.61)
19
20 #
21 # Package version
22 #
23 m4_define([VERSION_RELEASE], 1)
24 m4_define([VERSION_MAJOR_REV], 3)
25 m4_define([VERSION_MINOR_REV], 2)
26 m4_define([VERSION_PATCH], 0)
27
28 #
29 # Library version
30 # - bump "current" and reset "revision" with API changes
31 # - bump "revision" with internal source code changes
32 #
33
34 m4_define([LIBVERSION_CURRENT], 2)
35 m4_define([LIBVERSION_REVISION], 2)
36 m4_define([LIBVERSION_AGE], 0)
37
38 #
39 # Autotools setup
40 #
41 AC_INIT([OpenDMARC], [VERSION_RELEASE.VERSION_MAJOR_REV.VERSION_MINOR_REV], [bcx+libdmarc@bcx.com])
42 AC_CONFIG_AUX_DIR(build-aux)
43 AM_INIT_AUTOMAKE
44 AC_CONFIG_SRCDIR([.])
45 AC_CONFIG_HEADERS(build-config.h)
46
47 AC_CONFIG_MACRO_DIR([m4])
48
49 #
50 # Hexadecimal version, for use in generating dmarc.h
51 #
52 HEX_VERSION=$(printf %08x $(( ((VERSION_RELEASE << 8 | VERSION_MAJOR_REV) << 8 | VERSION_MINOR_REV) << 8 | VERSION_PATCH )))
53 AC_SUBST([HEX_VERSION])
54
55 #
56 # library version, passed to libtool
57 #
58 LIBOPENDMARC_VERSION_INFO=$(printf %d:%d:%d LIBVERSION_CURRENT LIBVERSION_REVISION LIBVERSION_AGE)
59 AC_SUBST([LIBOPENDMARC_VERSION_INFO])
60
61 #
62 # Checks for programs
63 #
64 AC_PROG_CC
65 AC_PROG_CC_C99
66 AM_PROG_CC_C_O
67 AC_PROG_LIBTOOL
68
69 PKG_PROG_PKG_CONFIG
70
71 AC_ARG_WITH([installdir],
72 AC_HELP_STRING([--with-installdir=/path], [(default =/usr/local)]),
73 LIBDMARC_BASE=$withval, LIBDMARC_BASE=/usr/local/)
74 AC_SUBST(LIBDMARC_DIR, $LIBDMARC_BASE)
75
76 #
77 # Check for how to compile threaded stuff
78 #
79 AX_PTHREAD
80
81
82 AC_HEADER_STDC
83 AC_HEADER_TIME
84 AC_CHECK_HEADERS(stdio.h)
85 AC_CHECK_HEADERS(syslog.h)
86 AC_CHECK_HEADERS(sysexits.h)
87 AC_CHECK_HEADERS(poll.h)
88 AC_CHECK_HEADERS(time.h)
89 AC_CHECK_HEADERS(netdb.h)
90 AC_CHECK_HEADERS(errno.h)
91 AC_CHECK_HEADERS(ctype.h)
92 AC_CHECK_HEADERS(fcntl.h)
93 AC_CHECK_HEADERS(string.h)
94 AC_CHECK_HEADERS(sys/param.h)
95 AC_CHECK_HEADERS(sys/socket.h)
96 AC_CHECK_HEADERS(sys/types.h)
97 AC_CHECK_HEADERS(sys/types.h)
98 AC_CHECK_HEADERS(arpa/inet.h sys/socket.h netdb.h sys/ioctl.h)
99 AC_CHECK_HEADERS(iso/limits_iso.h)
100
101 AC_CHECK_HEADERS([netinet/in.h], [], [],
102 [#if HAVE_SYS_TYPES_H
103 # include <sys/types.h>
104 #endif
105 ])
106 AC_CHECK_HEADERS([arpa/nameser.h], [], [],
107 [#if HAVE_SYS_TYPES_H
108 # include <sys/types.h>
109 #endif
110 ])
111 AC_CHECK_HEADERS([resolv.h], [], [],
112 [#if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_NETINET_IN_H
116 # include <netinet/in.h>
117 #endif
118 #if HAVE_ARPA_NAMESER_H
119 # include <arpa/nameser.h>
120 #endif
121 ])
122 AC_CHECK_LIB(socket, connect)
123 AC_CHECK_LIB(resolv, hstrerror, , , [-lnsl -lsocket])
124 AC_CHECK_LIB(resolv, inet_aton, , , [-lnsl -lsocket])
125 AC_SEARCH_LIBS(res_ninit, resolv,
126 AC_DEFINE(HAVE_RES_NINIT, 1,
127 [Define to 1 if you have the `res_ninit()' function.]))
128 AC_CHECK_LIB(idn, idn_free)
129 AC_CHECK_LIB(rt, nanosleep)
130 AC_SEARCH_LIBS(inet_addr, nsl)
131 AC_SEARCH_LIBS(freehostent, resolv)
132 AC_SEARCH_LIBS(inet_pton, resolv,
133 AC_DEFINE(HAVE_INET_PTON, 1,
134 [Define to 1 if you have the `inet_pton()' function.]))
135 AC_SEARCH_LIBS(inet_ntop, resolv,
136 AC_DEFINE(HAVE_INET_NTOP, 1,
137 [Define to 1 if you have the `inet_ntop()' function.]))
138 AC_SEARCH_LIBS(getipnodebyname, resolv,
139 AC_DEFINE(HAVE_GETADDRINFO, 1,
140 [Define to 1 if you have the `getipnodebyname()' function.]))
141
142 AC_HEADER_RESOLV
143
144 AC_C_BIGENDIAN
145 AC_STRUCT_TM
146 AC_C_CONST
147 AC_TYPE_SIZE_T
148 AC_CHECK_SIZEOF(long)
149 AC_CHECK_SIZEOF(int)
150 AC_CHECK_SIZEOF(short)
151 AC_CHECK_SIZEOF(char)
152 AC_CHECK_SIZEOF(size_t)
153 AC_CHECK_SIZEOF(long long)
154 AC_CHECK_SIZEOF(unsigned long long)
155 AC_CHECK_SIZEOF(void *)
156
157 AC_FUNC_MALLOC
158 AC_FUNC_REALLOC
159
160 AC_SEARCH_LIBS(strlcat, bsd strl,
161 AC_DEFINE(HAVE_STRLCAT, 1,
162 [Define to 1 if you have the `strlcat()' function.]))
163 AC_SEARCH_LIBS(strlcpy, bsd strl,
164 AC_DEFINE(HAVE_STRLCPY, 1,
165 [Define to 1 if you have the `strlcpy()' function.]))
166
167 AC_CHECK_FUNCS(basename)
168 AC_CHECK_FUNCS(syslog)
169 AC_CHECK_FUNCS(cuserid)
170 AC_CHECK_FUNCS(memset bzero, break)
171 AC_CHECK_FUNCS(memcpy bcopy, break)
172 AC_CHECK_FUNCS(strerror)
173 AC_CHECK_FUNCS(strchr)
174 AC_CHECK_FUNCS(strrchr)
175 AC_CHECK_FUNCS(strdup)
176 AC_CHECK_FUNCS(strpbrk)
177 AC_CHECK_FUNCS(inet_ntoa)
178 AC_CHECK_FUNCS(strcasecmp)
179 AC_CHECK_FUNCS(strncasecmp)
180
181 AC_CHECK_HEADERS(signal.h)
182 AC_CHECK_HEADERS(regex.h)
183
184 bsdstrl_h_found="no"
185 strl_h_found="no"
186 AC_CHECK_HEADERS([bsd/string.h], [bsdstrl_h_found="yes"])
187 AC_CHECK_HEADERS([strl.h], [strl_h_found="yes"])
188
189 # we need to include <strl.h> if an installed strl.h was found and no
190 # bsd/string.h was found
191 if test x"$strl_h_found" = x"yes" -a x"$bsdstrl_h_found" = x"no"
192 then
193 AC_DEFINE([USE_STRL_H], 1,
194 [Define to 1 if you need to include <strl.h> to get the `strlcat()' and `strlcpy()' functions.])
195 fi
196
197 if test x"$bsdstrl_h_found" = x"yes"
198 then
199 AC_DEFINE([USE_BSD_H], 1,
200 [Define to 1 if you need to include <bsd/string.h> to get the `strlcat()' and `strlcpy()' functions.])
201 fi
202
203 # Use opendmarc strl if neither a system strl nor libbsd are found
204 if test x"$strl_h_found" = x"no" -a x"$bsdstrl_h_found" = x"no"
205 then
206 AC_DEFINE([USE_DMARCSTRL_H], 1,
207 [Define to 1 if you need to include <opendmarc_strl.h> to get the `strlcat()' and `strlcpy()' functions.])
208 fi
209
210 AC_PROG_LN_S
211 AC_CHECK_PROG(miltertest, miltertest, "yes", "no")
212 AC_SUBST(ac_aux_dir)
213
214 AC_ARG_WITH([wall],
215 AC_HELP_STRING([--with-wall], [(no default)]),
216 CC="gcc -Wall",)
217
218
219 #
220 # See if we will need -lresolv
221 #
222 dnscheck='
223 #include "confdefs.h"
224 #include <sys/types.h>
225 #include <netinet/in.h>
226 #include <arpa/nameser.h>
227 #include <resolv.h>
228 int main() {
229 res_mkquery (0, 0, 0, 0, 0, 0, 0, 0, 0);
230 dn_expand (0, 0, 0, 0, 0);
231 dn_skipname (0, 0);
232 dn_comp (0, 0, 0, 0, 0);
233 return 0;
234 }'
235 AC_MSG_CHECKING([whether the resolver works without -lresolv])
236 LIBRESOLV=
237 AC_LINK_IFELSE([AC_LANG_SOURCE([
238 $dnscheck
239 ])] , [
240 AC_MSG_RESULT(yes)
241 ] , [
242 AC_MSG_RESULT(no)
243 AC_MSG_CHECKING([whether the resolver works with -lresolv])
244 saved_LIBS="$LIBS"
245 LIBS=-lresolv
246 AC_LINK_IFELSE([AC_LANG_SOURCE([
247 $dnscheck
248 ])] , [
249 AC_MSG_RESULT(yes)
250 LIBRESOLV=-lresolv
251 ] , [
252 AC_MSG_RESULT(no)
253 AC_MSG_ERROR([need workable resolver library])
254 ])
255 LIBS="$saved_LIBS"
256 ])
257 AC_SUBST([LIBRESOLV])
258
259 #
260 # --with-sql-backend -- configures some defaults for DB access
261 #
262 AC_ARG_WITH([sql-backend],
263 AS_HELP_STRING([--with-sql-backend],
264 [selection of SQL backend in use]),
265 [SQL_BACKEND="$withval"], [SQL_BACKEND="mysql"])
266 if test x"$SQL_BACKEND" = x"yes"
267 then
268 SQL_BACKEND="mysql"
269 fi
270 AC_SUBST(SQL_BACKEND)
271 AC_DEFINE_UNQUOTED(SQL_BACKEND, "$SQL_BACKEND", [default SQL back-end])
272
273 AC_ARG_WITH([spf],
274 AC_HELP_STRING([--with-spf], [enable SPF checking]),
275 AC_DEFINE(WITH_SPF, 1, [Define to 1 if you want SPF support.]),
276 [])
277
278 AC_ARG_WITH([spf2-include],
279 AC_HELP_STRING([--with-spf2-include], [path to libspf2 includes]),
280 SPF2_INCLUDE="$withval",
281 [])
282 AC_ARG_WITH([spf2-lib],
283 AC_HELP_STRING([--with-spf2-lib], [path to libspf2 libraries]),
284 SPF2_LIB="$withval",
285 [])
286 use_spf="no"
287 if test "x$SPF2_INCLUDE" != "x" -a "x$SPF2_LIB" != "x"
288 then
289 use_spf="yes"
290 if test -f ${SPF2_INCLUDE}/spf.h
291 then
292 AC_DEFINE(HAVE_SPF2_H, 1,
293 [Define to 1 if you have libspf2's `spf.h'])
294 spf2_include="-I $SPF2_INCLUDE"
295 saved_CFLAGS="$CFLAGS"
296 saved_LDFLAGS="$LDFLAGS"
297 CFLAGS="$spf2_include $saved_CFLAGS"
298 LDFLAGS="$saved_LDFLAGS -L${SPF2_LIB}"
299 fi
300 AC_SEARCH_LIBS(SPF_record_new, spf2)
301 AC_SEARCH_LIBS(SPF_server_new, spf2)
302 fi
303
304 AM_CONDITIONAL([USE_SPF], [test x"$use_spf" = x"yes"])
305
306 #
307 # opendmarc
308 #
309 AC_ARG_ENABLE([filter],
310 AS_HELP_STRING([--disable-filter],
311 [do not compile the opendmarc filter]),
312 [enable_filter=$enableval],
313 [enable_filter=yes])
314 AM_CONDITIONAL([BUILD_FILTER], [test x"$enable_filter" != x"no"])
315
316 AC_ARG_ENABLE([live-tests],
317 AS_HELP_STRING([--enable-live-tests],
318 [enable live unit tests]),
319 [enable_live_tests=$enableval],
320 [enable_live_tests=no])
321 AM_CONDITIONAL([LIVE_TESTS], [test x"$enable_live_tests" = x"yes"])
322
323 AC_ARG_ENABLE([filter-tests],
324 AS_HELP_STRING([--enable-filter-tests],
325 [enable Lua-based filter unit tests]),
326 [enable_filter_tests=$enableval],
327 [enable_filter_tests=no])
328 AM_CONDITIONAL([FILTER_TESTS], [test x"$enable_filter_tests" = x"yes"])
329 if test x"$enable_filter_tests" = x"yes" -a x"$miltertest" != x"yes"
330 then
331 AC_MSG_ERROR([miltertest is required for filter tests])
332 fi
333
334 #
335 # libmilter
336 #
337 AC_MSG_CHECKING([for milter library and includes])
338 AC_ARG_WITH([milter],
339 AS_HELP_STRING([--with-milter],
340 [location of milter includes and library]),
341 [milterpath="$withval"], [milterpath="auto"])
342
343 if test x"$enable_filter" = x"no"
344 then
345 milterpath="no"
346 fi
347
348 if test "$milterpath" = "auto" -o "$milterpath" = "yes"
349 then
350 milterdirs="/usr/local /opt/local /usr"
351 for d in $milterdirs
352 do
353 if test -f $d/include/libmilter/mfapi.h
354 then
355 milterpath=$d
356 break
357 fi
358 done
359 fi
360 case "$milterpath" in
361 no)
362 if test x"$enable_filter" = x"yes"
363 then
364 AC_MSG_ERROR([milter is required])
365 fi
366 AC_MSG_RESULT(disabled)
367 ;;
368 auto)
369 AC_MSG_ERROR([milter not found])
370 ;;
371 */*)
372 if ! test -f $milterpath/include/libmilter/mfapi.h
373 then
374 AC_MSG_ERROR([milter includes not found at $milterpath])
375 fi
376 AC_MSG_RESULT([$milterpath])
377 ;;
378 *)
379 AC_MSG_ERROR([milter not found])
380 ;;
381 esac
382
383 LIBMILTER_INCDIRS=""
384 LIBMILTER_LIBDIRS=""
385 LIBMILTER_LIBS=""
386
387 if test x"$milterpath" != x"no"
388 then
389 LIBMILTER_INCDIRS="-I$milterpath/include"
390
391 saved_CC="$CC"
392 saved_CFLAGS="$CFLAGS"
393 saved_CPPFLAGS="$CPPFLAGS"
394 saved_LDFLAGS="$LDFLAGS"
395 saved_LIBS="$LIBS"
396
397 CC="$PTHREAD_CC"
398 LIBS="$PTHREAD_LIBS $saved_LIBS"
399 CPPFLAGS="$LIBMILTER_INCDIRS $saved_CPPFLAGS"
400 CFLAGS="$PTHREAD_CFLAGS $saved_CFLAGS"
401 LDFLAGS="$PTHREAD_CFLAGS $saved_LDFLAGS"
402
403 breakloop="no"
404 for d in lib lib/libmilter
405 do
406 unset ac_cv_search_smfi_register
407 LDFLAGS="$PTHREAD_CFLAGS -L$milterpath/$d $saved_LDFLAGS"
408 AC_SEARCH_LIBS([smfi_register], [milter],
409 [
410 LIBMILTER_LIBDIRS="-L$milterpath/$d"
411 LIBMILTER_LIBS="-lmilter"
412 breakloop="yes"
413 ])
414
415 AC_CHECK_FUNC([smfi_insheader],
416 AC_DEFINE([HAVE_SMFI_INSHEADER], 1,
417 [Define if libmilter has smfi_insheader()]))
418
419 AC_CHECK_FUNC([smfi_opensocket],
420 AC_DEFINE([HAVE_SMFI_OPENSOCKET], 1,
421 [Define if libmilter has smfi_opensocket()]))
422
423 AC_CHECK_FUNC([smfi_progress],
424 AC_DEFINE([HAVE_SMFI_PROGRESS], 1,
425 [Define if libmilter has smfi_progress()]))
426
427 AC_CHECK_FUNC([smfi_setsymlist],
428 AC_DEFINE([HAVE_SMFI_SETSYMLIST], 1,
429 [Define if libmilter has smfi_setsymlist()]))
430
431 AC_CHECK_FUNC([smfi_version],
432 AC_DEFINE([HAVE_SMFI_VERSION], 1,
433 [Define if libmilter has smfi_version()]))
434
435 if test x"$breakloop" = x"yes"
436 then
437 break
438 fi
439 done
440 if test x"$LIBMILTER_LIBDIRS" = x""
441 then
442 AC_MSG_WARN([libmilter not found])
443 fi
444
445 CC="$saved_CC"
446 CPPFLAGS="$saved_CPPFLAGS"
447 CFLAGS="$saved_CFLAGS"
448 LDFLAGS="$saved_LDFLAGS"
449 LIBS="$saved_LIBS"
450 fi
451
452 AC_SUBST(LIBMILTER_INCDIRS)
453 AC_SUBST(LIBMILTER_LIBDIRS)
454 AC_SUBST(LIBMILTER_LIBS)
455
456 #
457 # Final substitutions
458 #
459 CPPFLAGS="$CPPFLAGS -DCONFIG_BASE=\\\"$sysconfdir\\\""
460 test "x$prefix" = xNONE && prefix=$ac_default_prefix
461 SYSCONFDIR=`eval echo "$sysconfdir"`
462 AC_SUBST([SYSCONFDIR])
463
464 #
465 # Generate files
466 #
467 AC_OUTPUT([ Makefile
468 contrib/Makefile
469 contrib/init/Makefile
470 contrib/init/generic/Makefile
471 contrib/init/redhat/Makefile
472 contrib/init/redhat/opendmarc
473 contrib/rddmarc/Makefile
474 contrib/service/Makefile
475 contrib/service/opendmarc.service
476 contrib/spec/Makefile
477 contrib/spec/opendmarc.spec
478 db/Makefile
479 docs/Makefile
480 libopendmarc/Makefile
481 libopendmarc/tests/Makefile
482 libopendmarc/tests/testfiles/Makefile
483 libopendmarc/docs/Makefile
484 opendmarc/Makefile
485 opendmarc/opendmarc.conf.5
486 opendmarc/opendmarc.8
487 opendmarc/opendmarc-check.8
488 opendmarc/tests/Makefile
489 reports/Makefile
490 reports/opendmarc-expire
491 reports/opendmarc-expire.8
492 reports/opendmarc-import
493 reports/opendmarc-import.8
494 reports/opendmarc-importstats.8
495 reports/opendmarc-params
496 reports/opendmarc-params.8
497 reports/opendmarc-reports
498 reports/opendmarc-reports.8
499 ])
500
501 # @end1
0 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1
2 SUBDIRS = init rddmarc service spec
3
4 dist_doc_DATA = README
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
17
18 VPATH = @srcdir@
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = contrib
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(dist_doc_DATA) README
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES =
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
111 ctags-recursive dvi-recursive html-recursive info-recursive \
112 install-data-recursive install-dvi-recursive \
113 install-exec-recursive install-html-recursive \
114 install-info-recursive install-pdf-recursive \
115 install-ps-recursive install-recursive installcheck-recursive \
116 installdirs-recursive pdf-recursive ps-recursive \
117 tags-recursive uninstall-recursive
118 am__can_run_installinfo = \
119 case $$AM_UPDATE_INFO_DIR in \
120 n|no|NO) false;; \
121 *) (install-info --version) >/dev/null 2>&1;; \
122 esac
123 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
124 am__vpath_adj = case $$p in \
125 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
126 *) f=$$p;; \
127 esac;
128 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
129 am__install_max = 40
130 am__nobase_strip_setup = \
131 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
132 am__nobase_strip = \
133 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
134 am__nobase_list = $(am__nobase_strip_setup); \
135 for p in $$list; do echo "$$p $$p"; done | \
136 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
137 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
138 if (++n[$$2] == $(am__install_max)) \
139 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
140 END { for (dir in files) print dir, files[dir] }'
141 am__base_list = \
142 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
143 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
144 am__uninstall_files_from_dir = { \
145 test -z "$$files" \
146 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
147 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
148 $(am__cd) "$$dir" && rm -f $$files; }; \
149 }
150 am__installdirs = "$(DESTDIR)$(docdir)"
151 DATA = $(dist_doc_DATA)
152 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
153 distclean-recursive maintainer-clean-recursive
154 am__recursive_targets = \
155 $(RECURSIVE_TARGETS) \
156 $(RECURSIVE_CLEAN_TARGETS) \
157 $(am__extra_recursive_targets)
158 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
159 distdir
160 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
161 # Read a list of newline-separated strings from the standard input,
162 # and print each of them once, without duplicates. Input order is
163 # *not* preserved.
164 am__uniquify_input = $(AWK) '\
165 BEGIN { nonempty = 0; } \
166 { items[$$0] = 1; nonempty = 1; } \
167 END { if (nonempty) { for (i in items) print i; }; } \
168 '
169 # Make sure the list of sources is unique. This is necessary because,
170 # e.g., the same source file might be shared among _SOURCES variables
171 # for different programs/libraries.
172 am__define_uniq_tagged_files = \
173 list='$(am__tagged_files)'; \
174 unique=`for i in $$list; do \
175 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
176 done | $(am__uniquify_input)`
177 ETAGS = etags
178 CTAGS = ctags
179 DIST_SUBDIRS = $(SUBDIRS)
180 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
181 am__relativize = \
182 dir0=`pwd`; \
183 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
184 sed_rest='s,^[^/]*/*,,'; \
185 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
186 sed_butlast='s,/*[^/]*$$,,'; \
187 while test -n "$$dir1"; do \
188 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
189 if test "$$first" != "."; then \
190 if test "$$first" = ".."; then \
191 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
192 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
193 else \
194 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
195 if test "$$first2" = "$$first"; then \
196 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
197 else \
198 dir2="../$$dir2"; \
199 fi; \
200 dir0="$$dir0"/"$$first"; \
201 fi; \
202 fi; \
203 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
204 done; \
205 reldir="$$dir2"
206 ACLOCAL = @ACLOCAL@
207 AMTAR = @AMTAR@
208 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
209 AR = @AR@
210 AUTOCONF = @AUTOCONF@
211 AUTOHEADER = @AUTOHEADER@
212 AUTOMAKE = @AUTOMAKE@
213 AWK = @AWK@
214 CC = @CC@
215 CCDEPMODE = @CCDEPMODE@
216 CFLAGS = @CFLAGS@
217 CPP = @CPP@
218 CPPFLAGS = @CPPFLAGS@
219 CYGPATH_W = @CYGPATH_W@
220 DEFS = @DEFS@
221 DEPDIR = @DEPDIR@
222 DLLTOOL = @DLLTOOL@
223 DSYMUTIL = @DSYMUTIL@
224 DUMPBIN = @DUMPBIN@
225 ECHO_C = @ECHO_C@
226 ECHO_N = @ECHO_N@
227 ECHO_T = @ECHO_T@
228 EGREP = @EGREP@
229 EXEEXT = @EXEEXT@
230 FGREP = @FGREP@
231 GREP = @GREP@
232 HEX_VERSION = @HEX_VERSION@
233 INSTALL = @INSTALL@
234 INSTALL_DATA = @INSTALL_DATA@
235 INSTALL_PROGRAM = @INSTALL_PROGRAM@
236 INSTALL_SCRIPT = @INSTALL_SCRIPT@
237 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
238 LD = @LD@
239 LDFLAGS = @LDFLAGS@
240 LIBDMARC_DIR = @LIBDMARC_DIR@
241 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
242 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
243 LIBMILTER_LIBS = @LIBMILTER_LIBS@
244 LIBOBJS = @LIBOBJS@
245 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
246 LIBRESOLV = @LIBRESOLV@
247 LIBS = @LIBS@
248 LIBTOOL = @LIBTOOL@
249 LIPO = @LIPO@
250 LN_S = @LN_S@
251 LTLIBOBJS = @LTLIBOBJS@
252 MAKEINFO = @MAKEINFO@
253 MANIFEST_TOOL = @MANIFEST_TOOL@
254 MKDIR_P = @MKDIR_P@
255 NM = @NM@
256 NMEDIT = @NMEDIT@
257 OBJDUMP = @OBJDUMP@
258 OBJEXT = @OBJEXT@
259 OTOOL = @OTOOL@
260 OTOOL64 = @OTOOL64@
261 PACKAGE = @PACKAGE@
262 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
263 PACKAGE_NAME = @PACKAGE_NAME@
264 PACKAGE_STRING = @PACKAGE_STRING@
265 PACKAGE_TARNAME = @PACKAGE_TARNAME@
266 PACKAGE_URL = @PACKAGE_URL@
267 PACKAGE_VERSION = @PACKAGE_VERSION@
268 PATH_SEPARATOR = @PATH_SEPARATOR@
269 PKG_CONFIG = @PKG_CONFIG@
270 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
271 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
272 PTHREAD_CC = @PTHREAD_CC@
273 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
274 PTHREAD_LIBS = @PTHREAD_LIBS@
275 RANLIB = @RANLIB@
276 SED = @SED@
277 SET_MAKE = @SET_MAKE@
278 SHELL = @SHELL@
279 SQL_BACKEND = @SQL_BACKEND@
280 STRIP = @STRIP@
281 SYSCONFDIR = @SYSCONFDIR@
282 VERSION = @VERSION@
283 abs_builddir = @abs_builddir@
284 abs_srcdir = @abs_srcdir@
285 abs_top_builddir = @abs_top_builddir@
286 abs_top_srcdir = @abs_top_srcdir@
287 ac_aux_dir = @ac_aux_dir@
288 ac_ct_AR = @ac_ct_AR@
289 ac_ct_CC = @ac_ct_CC@
290 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
291 am__include = @am__include@
292 am__leading_dot = @am__leading_dot@
293 am__quote = @am__quote@
294 am__tar = @am__tar@
295 am__untar = @am__untar@
296 ax_pthread_config = @ax_pthread_config@
297 bindir = @bindir@
298 build = @build@
299 build_alias = @build_alias@
300 build_cpu = @build_cpu@
301 build_os = @build_os@
302 build_vendor = @build_vendor@
303 builddir = @builddir@
304 datadir = @datadir@
305 datarootdir = @datarootdir@
306 docdir = @docdir@
307 dvidir = @dvidir@
308 exec_prefix = @exec_prefix@
309 host = @host@
310 host_alias = @host_alias@
311 host_cpu = @host_cpu@
312 host_os = @host_os@
313 host_vendor = @host_vendor@
314 htmldir = @htmldir@
315 includedir = @includedir@
316 infodir = @infodir@
317 install_sh = @install_sh@
318 libdir = @libdir@
319 libexecdir = @libexecdir@
320 localedir = @localedir@
321 localstatedir = @localstatedir@
322 mandir = @mandir@
323 miltertest = @miltertest@
324 mkdir_p = @mkdir_p@
325 oldincludedir = @oldincludedir@
326 pdfdir = @pdfdir@
327 prefix = @prefix@
328 program_transform_name = @program_transform_name@
329 psdir = @psdir@
330 sbindir = @sbindir@
331 sharedstatedir = @sharedstatedir@
332 srcdir = @srcdir@
333 sysconfdir = @sysconfdir@
334 target_alias = @target_alias@
335 top_build_prefix = @top_build_prefix@
336 top_builddir = @top_builddir@
337 top_srcdir = @top_srcdir@
338 SUBDIRS = init rddmarc service spec
339 dist_doc_DATA = README
340 all: all-recursive
341
342 .SUFFIXES:
343 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
344 @for dep in $?; do \
345 case '$(am__configure_deps)' in \
346 *$$dep*) \
347 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
348 && { if test -f $@; then exit 0; else break; fi; }; \
349 exit 1;; \
350 esac; \
351 done; \
352 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
353 $(am__cd) $(top_srcdir) && \
354 $(AUTOMAKE) --foreign contrib/Makefile
355 .PRECIOUS: Makefile
356 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
357 @case '$?' in \
358 *config.status*) \
359 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
360 *) \
361 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
362 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
363 esac;
364
365 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
366 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
367
368 $(top_srcdir)/configure: $(am__configure_deps)
369 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
370 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
371 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
372 $(am__aclocal_m4_deps):
373
374 mostlyclean-libtool:
375 -rm -f *.lo
376
377 clean-libtool:
378 -rm -rf .libs _libs
379 install-dist_docDATA: $(dist_doc_DATA)
380 @$(NORMAL_INSTALL)
381 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
382 if test -n "$$list"; then \
383 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
384 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
385 fi; \
386 for p in $$list; do \
387 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
388 echo "$$d$$p"; \
389 done | $(am__base_list) | \
390 while read files; do \
391 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
392 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
393 done
394
395 uninstall-dist_docDATA:
396 @$(NORMAL_UNINSTALL)
397 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
398 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
399 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
400
401 # This directory's subdirectories are mostly independent; you can cd
402 # into them and run 'make' without going through this Makefile.
403 # To change the values of 'make' variables: instead of editing Makefiles,
404 # (1) if the variable is set in 'config.status', edit 'config.status'
405 # (which will cause the Makefiles to be regenerated when you run 'make');
406 # (2) otherwise, pass the desired values on the 'make' command line.
407 $(am__recursive_targets):
408 @fail=; \
409 if $(am__make_keepgoing); then \
410 failcom='fail=yes'; \
411 else \
412 failcom='exit 1'; \
413 fi; \
414 dot_seen=no; \
415 target=`echo $@ | sed s/-recursive//`; \
416 case "$@" in \
417 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
418 *) list='$(SUBDIRS)' ;; \
419 esac; \
420 for subdir in $$list; do \
421 echo "Making $$target in $$subdir"; \
422 if test "$$subdir" = "."; then \
423 dot_seen=yes; \
424 local_target="$$target-am"; \
425 else \
426 local_target="$$target"; \
427 fi; \
428 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
429 || eval $$failcom; \
430 done; \
431 if test "$$dot_seen" = "no"; then \
432 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
433 fi; test -z "$$fail"
434
435 ID: $(am__tagged_files)
436 $(am__define_uniq_tagged_files); mkid -fID $$unique
437 tags: tags-recursive
438 TAGS: tags
439
440 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
441 set x; \
442 here=`pwd`; \
443 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
444 include_option=--etags-include; \
445 empty_fix=.; \
446 else \
447 include_option=--include; \
448 empty_fix=; \
449 fi; \
450 list='$(SUBDIRS)'; for subdir in $$list; do \
451 if test "$$subdir" = .; then :; else \
452 test ! -f $$subdir/TAGS || \
453 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
454 fi; \
455 done; \
456 $(am__define_uniq_tagged_files); \
457 shift; \
458 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
459 test -n "$$unique" || unique=$$empty_fix; \
460 if test $$# -gt 0; then \
461 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
462 "$$@" $$unique; \
463 else \
464 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
465 $$unique; \
466 fi; \
467 fi
468 ctags: ctags-recursive
469
470 CTAGS: ctags
471 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
472 $(am__define_uniq_tagged_files); \
473 test -z "$(CTAGS_ARGS)$$unique" \
474 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
475 $$unique
476
477 GTAGS:
478 here=`$(am__cd) $(top_builddir) && pwd` \
479 && $(am__cd) $(top_srcdir) \
480 && gtags -i $(GTAGS_ARGS) "$$here"
481 cscopelist: cscopelist-recursive
482
483 cscopelist-am: $(am__tagged_files)
484 list='$(am__tagged_files)'; \
485 case "$(srcdir)" in \
486 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
487 *) sdir=$(subdir)/$(srcdir) ;; \
488 esac; \
489 for i in $$list; do \
490 if test -f "$$i"; then \
491 echo "$(subdir)/$$i"; \
492 else \
493 echo "$$sdir/$$i"; \
494 fi; \
495 done >> $(top_builddir)/cscope.files
496
497 distclean-tags:
498 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
499
500 distdir: $(DISTFILES)
501 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
502 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
503 list='$(DISTFILES)'; \
504 dist_files=`for file in $$list; do echo $$file; done | \
505 sed -e "s|^$$srcdirstrip/||;t" \
506 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
507 case $$dist_files in \
508 */*) $(MKDIR_P) `echo "$$dist_files" | \
509 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
510 sort -u` ;; \
511 esac; \
512 for file in $$dist_files; do \
513 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
514 if test -d $$d/$$file; then \
515 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
516 if test -d "$(distdir)/$$file"; then \
517 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
518 fi; \
519 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
520 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
521 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
522 fi; \
523 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
524 else \
525 test -f "$(distdir)/$$file" \
526 || cp -p $$d/$$file "$(distdir)/$$file" \
527 || exit 1; \
528 fi; \
529 done
530 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
531 if test "$$subdir" = .; then :; else \
532 $(am__make_dryrun) \
533 || test -d "$(distdir)/$$subdir" \
534 || $(MKDIR_P) "$(distdir)/$$subdir" \
535 || exit 1; \
536 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
537 $(am__relativize); \
538 new_distdir=$$reldir; \
539 dir1=$$subdir; dir2="$(top_distdir)"; \
540 $(am__relativize); \
541 new_top_distdir=$$reldir; \
542 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
543 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
544 ($(am__cd) $$subdir && \
545 $(MAKE) $(AM_MAKEFLAGS) \
546 top_distdir="$$new_top_distdir" \
547 distdir="$$new_distdir" \
548 am__remove_distdir=: \
549 am__skip_length_check=: \
550 am__skip_mode_fix=: \
551 distdir) \
552 || exit 1; \
553 fi; \
554 done
555 check-am: all-am
556 check: check-recursive
557 all-am: Makefile $(DATA)
558 installdirs: installdirs-recursive
559 installdirs-am:
560 for dir in "$(DESTDIR)$(docdir)"; do \
561 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
562 done
563 install: install-recursive
564 install-exec: install-exec-recursive
565 install-data: install-data-recursive
566 uninstall: uninstall-recursive
567
568 install-am: all-am
569 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
570
571 installcheck: installcheck-recursive
572 install-strip:
573 if test -z '$(STRIP)'; then \
574 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
575 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
576 install; \
577 else \
578 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
579 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
580 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
581 fi
582 mostlyclean-generic:
583
584 clean-generic:
585
586 distclean-generic:
587 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
588 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
589
590 maintainer-clean-generic:
591 @echo "This command is intended for maintainers to use"
592 @echo "it deletes files that may require special tools to rebuild."
593 clean: clean-recursive
594
595 clean-am: clean-generic clean-libtool mostlyclean-am
596
597 distclean: distclean-recursive
598 -rm -f Makefile
599 distclean-am: clean-am distclean-generic distclean-tags
600
601 dvi: dvi-recursive
602
603 dvi-am:
604
605 html: html-recursive
606
607 html-am:
608
609 info: info-recursive
610
611 info-am:
612
613 install-data-am: install-dist_docDATA
614
615 install-dvi: install-dvi-recursive
616
617 install-dvi-am:
618
619 install-exec-am:
620
621 install-html: install-html-recursive
622
623 install-html-am:
624
625 install-info: install-info-recursive
626
627 install-info-am:
628
629 install-man:
630
631 install-pdf: install-pdf-recursive
632
633 install-pdf-am:
634
635 install-ps: install-ps-recursive
636
637 install-ps-am:
638
639 installcheck-am:
640
641 maintainer-clean: maintainer-clean-recursive
642 -rm -f Makefile
643 maintainer-clean-am: distclean-am maintainer-clean-generic
644
645 mostlyclean: mostlyclean-recursive
646
647 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
648
649 pdf: pdf-recursive
650
651 pdf-am:
652
653 ps: ps-recursive
654
655 ps-am:
656
657 uninstall-am: uninstall-dist_docDATA
658
659 .MAKE: $(am__recursive_targets) install-am install-strip
660
661 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
662 check-am clean clean-generic clean-libtool cscopelist-am ctags \
663 ctags-am distclean distclean-generic distclean-libtool \
664 distclean-tags distdir dvi dvi-am html html-am info info-am \
665 install install-am install-data install-data-am \
666 install-dist_docDATA install-dvi install-dvi-am install-exec \
667 install-exec-am install-html install-html-am install-info \
668 install-info-am install-man install-pdf install-pdf-am \
669 install-ps install-ps-am install-strip installcheck \
670 installcheck-am installdirs installdirs-am maintainer-clean \
671 maintainer-clean-generic mostlyclean mostlyclean-generic \
672 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
673 uninstall-am uninstall-dist_docDATA
674
675
676 # Tell versions [3.59,3.63) of GNU make to not export all variables.
677 # Otherwise a system limit (for SysV at least) may be exceeded.
678 .NOEXPORT:
0 This "contrib" directory of the OpenDMARC package and its subdirectories
1 contain files contributed by members of the community that provide functions
2 not directly supported by the project team. The copyrights on the files in
3 and/or below this directory are owned by the files' owners and not by
4 The Trusted Domain Project.
5
6 Support for files contained here are provided only on a best-effort basis by
7 the project team and by the files' owners.
8
9 --
10 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
0 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1
2 AUTOMAKE_OPTIONS = foreign
3
4 SUBDIRS = generic redhat
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
17 VPATH = @srcdir@
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
19 am__make_running_with_option = \
20 case $${target_option-} in \
21 ?) ;; \
22 *) echo "am__make_running_with_option: internal error: invalid" \
23 "target option '$${target_option-}' specified" >&2; \
24 exit 1;; \
25 esac; \
26 has_opt=no; \
27 sane_makeflags=$$MAKEFLAGS; \
28 if $(am__is_gnu_make); then \
29 sane_makeflags=$$MFLAGS; \
30 else \
31 case $$MAKEFLAGS in \
32 *\\[\ \ ]*) \
33 bs=\\; \
34 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
35 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
36 esac; \
37 fi; \
38 skip_next=no; \
39 strip_trailopt () \
40 { \
41 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
42 }; \
43 for flg in $$sane_makeflags; do \
44 test $$skip_next = yes && { skip_next=no; continue; }; \
45 case $$flg in \
46 *=*|--*) continue;; \
47 -*I) strip_trailopt 'I'; skip_next=yes;; \
48 -*I?*) strip_trailopt 'I';; \
49 -*O) strip_trailopt 'O'; skip_next=yes;; \
50 -*O?*) strip_trailopt 'O';; \
51 -*l) strip_trailopt 'l'; skip_next=yes;; \
52 -*l?*) strip_trailopt 'l';; \
53 -[dEDm]) skip_next=yes;; \
54 -[JT]) skip_next=yes;; \
55 esac; \
56 case $$flg in \
57 *$$target_option*) has_opt=yes; break;; \
58 esac; \
59 done; \
60 test $$has_opt = yes
61 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
62 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
63 pkgdatadir = $(datadir)/@PACKAGE@
64 pkgincludedir = $(includedir)/@PACKAGE@
65 pkglibdir = $(libdir)/@PACKAGE@
66 pkglibexecdir = $(libexecdir)/@PACKAGE@
67 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
68 install_sh_DATA = $(install_sh) -c -m 644
69 install_sh_PROGRAM = $(install_sh) -c
70 install_sh_SCRIPT = $(install_sh) -c
71 INSTALL_HEADER = $(INSTALL_DATA)
72 transform = $(program_transform_name)
73 NORMAL_INSTALL = :
74 PRE_INSTALL = :
75 POST_INSTALL = :
76 NORMAL_UNINSTALL = :
77 PRE_UNINSTALL = :
78 POST_UNINSTALL = :
79 build_triplet = @build@
80 host_triplet = @host@
81 subdir = contrib/init
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
83 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
84 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
85 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
86 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
87 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
88 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 $(ACLOCAL_M4)
90 mkinstalldirs = $(install_sh) -d
91 CONFIG_HEADER = $(top_builddir)/build-config.h
92 CONFIG_CLEAN_FILES =
93 CONFIG_CLEAN_VPATH_FILES =
94 AM_V_P = $(am__v_P_@AM_V@)
95 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
96 am__v_P_0 = false
97 am__v_P_1 = :
98 AM_V_GEN = $(am__v_GEN_@AM_V@)
99 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
100 am__v_GEN_0 = @echo " GEN " $@;
101 am__v_GEN_1 =
102 AM_V_at = $(am__v_at_@AM_V@)
103 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
104 am__v_at_0 = @
105 am__v_at_1 =
106 SOURCES =
107 DIST_SOURCES =
108 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
109 ctags-recursive dvi-recursive html-recursive info-recursive \
110 install-data-recursive install-dvi-recursive \
111 install-exec-recursive install-html-recursive \
112 install-info-recursive install-pdf-recursive \
113 install-ps-recursive install-recursive installcheck-recursive \
114 installdirs-recursive pdf-recursive ps-recursive \
115 tags-recursive uninstall-recursive
116 am__can_run_installinfo = \
117 case $$AM_UPDATE_INFO_DIR in \
118 n|no|NO) false;; \
119 *) (install-info --version) >/dev/null 2>&1;; \
120 esac
121 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
122 distclean-recursive maintainer-clean-recursive
123 am__recursive_targets = \
124 $(RECURSIVE_TARGETS) \
125 $(RECURSIVE_CLEAN_TARGETS) \
126 $(am__extra_recursive_targets)
127 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
128 distdir
129 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
130 # Read a list of newline-separated strings from the standard input,
131 # and print each of them once, without duplicates. Input order is
132 # *not* preserved.
133 am__uniquify_input = $(AWK) '\
134 BEGIN { nonempty = 0; } \
135 { items[$$0] = 1; nonempty = 1; } \
136 END { if (nonempty) { for (i in items) print i; }; } \
137 '
138 # Make sure the list of sources is unique. This is necessary because,
139 # e.g., the same source file might be shared among _SOURCES variables
140 # for different programs/libraries.
141 am__define_uniq_tagged_files = \
142 list='$(am__tagged_files)'; \
143 unique=`for i in $$list; do \
144 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
145 done | $(am__uniquify_input)`
146 ETAGS = etags
147 CTAGS = ctags
148 DIST_SUBDIRS = $(SUBDIRS)
149 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
150 am__relativize = \
151 dir0=`pwd`; \
152 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
153 sed_rest='s,^[^/]*/*,,'; \
154 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
155 sed_butlast='s,/*[^/]*$$,,'; \
156 while test -n "$$dir1"; do \
157 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
158 if test "$$first" != "."; then \
159 if test "$$first" = ".."; then \
160 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
161 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
162 else \
163 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
164 if test "$$first2" = "$$first"; then \
165 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
166 else \
167 dir2="../$$dir2"; \
168 fi; \
169 dir0="$$dir0"/"$$first"; \
170 fi; \
171 fi; \
172 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
173 done; \
174 reldir="$$dir2"
175 ACLOCAL = @ACLOCAL@
176 AMTAR = @AMTAR@
177 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
178 AR = @AR@
179 AUTOCONF = @AUTOCONF@
180 AUTOHEADER = @AUTOHEADER@
181 AUTOMAKE = @AUTOMAKE@
182 AWK = @AWK@
183 CC = @CC@
184 CCDEPMODE = @CCDEPMODE@
185 CFLAGS = @CFLAGS@
186 CPP = @CPP@
187 CPPFLAGS = @CPPFLAGS@
188 CYGPATH_W = @CYGPATH_W@
189 DEFS = @DEFS@
190 DEPDIR = @DEPDIR@
191 DLLTOOL = @DLLTOOL@
192 DSYMUTIL = @DSYMUTIL@
193 DUMPBIN = @DUMPBIN@
194 ECHO_C = @ECHO_C@
195 ECHO_N = @ECHO_N@
196 ECHO_T = @ECHO_T@
197 EGREP = @EGREP@
198 EXEEXT = @EXEEXT@
199 FGREP = @FGREP@
200 GREP = @GREP@
201 HEX_VERSION = @HEX_VERSION@
202 INSTALL = @INSTALL@
203 INSTALL_DATA = @INSTALL_DATA@
204 INSTALL_PROGRAM = @INSTALL_PROGRAM@
205 INSTALL_SCRIPT = @INSTALL_SCRIPT@
206 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
207 LD = @LD@
208 LDFLAGS = @LDFLAGS@
209 LIBDMARC_DIR = @LIBDMARC_DIR@
210 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
211 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
212 LIBMILTER_LIBS = @LIBMILTER_LIBS@
213 LIBOBJS = @LIBOBJS@
214 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
215 LIBRESOLV = @LIBRESOLV@
216 LIBS = @LIBS@
217 LIBTOOL = @LIBTOOL@
218 LIPO = @LIPO@
219 LN_S = @LN_S@
220 LTLIBOBJS = @LTLIBOBJS@
221 MAKEINFO = @MAKEINFO@
222 MANIFEST_TOOL = @MANIFEST_TOOL@
223 MKDIR_P = @MKDIR_P@
224 NM = @NM@
225 NMEDIT = @NMEDIT@
226 OBJDUMP = @OBJDUMP@
227 OBJEXT = @OBJEXT@
228 OTOOL = @OTOOL@
229 OTOOL64 = @OTOOL64@
230 PACKAGE = @PACKAGE@
231 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
232 PACKAGE_NAME = @PACKAGE_NAME@
233 PACKAGE_STRING = @PACKAGE_STRING@
234 PACKAGE_TARNAME = @PACKAGE_TARNAME@
235 PACKAGE_URL = @PACKAGE_URL@
236 PACKAGE_VERSION = @PACKAGE_VERSION@
237 PATH_SEPARATOR = @PATH_SEPARATOR@
238 PKG_CONFIG = @PKG_CONFIG@
239 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
240 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
241 PTHREAD_CC = @PTHREAD_CC@
242 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
243 PTHREAD_LIBS = @PTHREAD_LIBS@
244 RANLIB = @RANLIB@
245 SED = @SED@
246 SET_MAKE = @SET_MAKE@
247 SHELL = @SHELL@
248 SQL_BACKEND = @SQL_BACKEND@
249 STRIP = @STRIP@
250 SYSCONFDIR = @SYSCONFDIR@
251 VERSION = @VERSION@
252 abs_builddir = @abs_builddir@
253 abs_srcdir = @abs_srcdir@
254 abs_top_builddir = @abs_top_builddir@
255 abs_top_srcdir = @abs_top_srcdir@
256 ac_aux_dir = @ac_aux_dir@
257 ac_ct_AR = @ac_ct_AR@
258 ac_ct_CC = @ac_ct_CC@
259 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
260 am__include = @am__include@
261 am__leading_dot = @am__leading_dot@
262 am__quote = @am__quote@
263 am__tar = @am__tar@
264 am__untar = @am__untar@
265 ax_pthread_config = @ax_pthread_config@
266 bindir = @bindir@
267 build = @build@
268 build_alias = @build_alias@
269 build_cpu = @build_cpu@
270 build_os = @build_os@
271 build_vendor = @build_vendor@
272 builddir = @builddir@
273 datadir = @datadir@
274 datarootdir = @datarootdir@
275 docdir = @docdir@
276 dvidir = @dvidir@
277 exec_prefix = @exec_prefix@
278 host = @host@
279 host_alias = @host_alias@
280 host_cpu = @host_cpu@
281 host_os = @host_os@
282 host_vendor = @host_vendor@
283 htmldir = @htmldir@
284 includedir = @includedir@
285 infodir = @infodir@
286 install_sh = @install_sh@
287 libdir = @libdir@
288 libexecdir = @libexecdir@
289 localedir = @localedir@
290 localstatedir = @localstatedir@
291 mandir = @mandir@
292 miltertest = @miltertest@
293 mkdir_p = @mkdir_p@
294 oldincludedir = @oldincludedir@
295 pdfdir = @pdfdir@
296 prefix = @prefix@
297 program_transform_name = @program_transform_name@
298 psdir = @psdir@
299 sbindir = @sbindir@
300 sharedstatedir = @sharedstatedir@
301 srcdir = @srcdir@
302 sysconfdir = @sysconfdir@
303 target_alias = @target_alias@
304 top_build_prefix = @top_build_prefix@
305 top_builddir = @top_builddir@
306 top_srcdir = @top_srcdir@
307 AUTOMAKE_OPTIONS = foreign
308 SUBDIRS = generic redhat
309 all: all-recursive
310
311 .SUFFIXES:
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) --foreign contrib/init/Makefile'; \
322 $(am__cd) $(top_srcdir) && \
323 $(AUTOMAKE) --foreign contrib/init/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
343 mostlyclean-libtool:
344 -rm -f *.lo
345
346 clean-libtool:
347 -rm -rf .libs _libs
348
349 # This directory's subdirectories are mostly independent; you can cd
350 # into them and run 'make' without going through this Makefile.
351 # To change the values of 'make' variables: instead of editing Makefiles,
352 # (1) if the variable is set in 'config.status', edit 'config.status'
353 # (which will cause the Makefiles to be regenerated when you run 'make');
354 # (2) otherwise, pass the desired values on the 'make' command line.
355 $(am__recursive_targets):
356 @fail=; \
357 if $(am__make_keepgoing); then \
358 failcom='fail=yes'; \
359 else \
360 failcom='exit 1'; \
361 fi; \
362 dot_seen=no; \
363 target=`echo $@ | sed s/-recursive//`; \
364 case "$@" in \
365 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
366 *) list='$(SUBDIRS)' ;; \
367 esac; \
368 for subdir in $$list; do \
369 echo "Making $$target in $$subdir"; \
370 if test "$$subdir" = "."; then \
371 dot_seen=yes; \
372 local_target="$$target-am"; \
373 else \
374 local_target="$$target"; \
375 fi; \
376 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
377 || eval $$failcom; \
378 done; \
379 if test "$$dot_seen" = "no"; then \
380 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
381 fi; test -z "$$fail"
382
383 ID: $(am__tagged_files)
384 $(am__define_uniq_tagged_files); mkid -fID $$unique
385 tags: tags-recursive
386 TAGS: tags
387
388 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
389 set x; \
390 here=`pwd`; \
391 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
392 include_option=--etags-include; \
393 empty_fix=.; \
394 else \
395 include_option=--include; \
396 empty_fix=; \
397 fi; \
398 list='$(SUBDIRS)'; for subdir in $$list; do \
399 if test "$$subdir" = .; then :; else \
400 test ! -f $$subdir/TAGS || \
401 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
402 fi; \
403 done; \
404 $(am__define_uniq_tagged_files); \
405 shift; \
406 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
407 test -n "$$unique" || unique=$$empty_fix; \
408 if test $$# -gt 0; then \
409 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
410 "$$@" $$unique; \
411 else \
412 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
413 $$unique; \
414 fi; \
415 fi
416 ctags: ctags-recursive
417
418 CTAGS: ctags
419 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
420 $(am__define_uniq_tagged_files); \
421 test -z "$(CTAGS_ARGS)$$unique" \
422 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
423 $$unique
424
425 GTAGS:
426 here=`$(am__cd) $(top_builddir) && pwd` \
427 && $(am__cd) $(top_srcdir) \
428 && gtags -i $(GTAGS_ARGS) "$$here"
429 cscopelist: cscopelist-recursive
430
431 cscopelist-am: $(am__tagged_files)
432 list='$(am__tagged_files)'; \
433 case "$(srcdir)" in \
434 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
435 *) sdir=$(subdir)/$(srcdir) ;; \
436 esac; \
437 for i in $$list; do \
438 if test -f "$$i"; then \
439 echo "$(subdir)/$$i"; \
440 else \
441 echo "$$sdir/$$i"; \
442 fi; \
443 done >> $(top_builddir)/cscope.files
444
445 distclean-tags:
446 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
447
448 distdir: $(DISTFILES)
449 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
450 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
451 list='$(DISTFILES)'; \
452 dist_files=`for file in $$list; do echo $$file; done | \
453 sed -e "s|^$$srcdirstrip/||;t" \
454 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
455 case $$dist_files in \
456 */*) $(MKDIR_P) `echo "$$dist_files" | \
457 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
458 sort -u` ;; \
459 esac; \
460 for file in $$dist_files; do \
461 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
462 if test -d $$d/$$file; then \
463 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
464 if test -d "$(distdir)/$$file"; then \
465 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
466 fi; \
467 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
468 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
469 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
470 fi; \
471 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
472 else \
473 test -f "$(distdir)/$$file" \
474 || cp -p $$d/$$file "$(distdir)/$$file" \
475 || exit 1; \
476 fi; \
477 done
478 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
479 if test "$$subdir" = .; then :; else \
480 $(am__make_dryrun) \
481 || test -d "$(distdir)/$$subdir" \
482 || $(MKDIR_P) "$(distdir)/$$subdir" \
483 || exit 1; \
484 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
485 $(am__relativize); \
486 new_distdir=$$reldir; \
487 dir1=$$subdir; dir2="$(top_distdir)"; \
488 $(am__relativize); \
489 new_top_distdir=$$reldir; \
490 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
491 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
492 ($(am__cd) $$subdir && \
493 $(MAKE) $(AM_MAKEFLAGS) \
494 top_distdir="$$new_top_distdir" \
495 distdir="$$new_distdir" \
496 am__remove_distdir=: \
497 am__skip_length_check=: \
498 am__skip_mode_fix=: \
499 distdir) \
500 || exit 1; \
501 fi; \
502 done
503 check-am: all-am
504 check: check-recursive
505 all-am: Makefile
506 installdirs: installdirs-recursive
507 installdirs-am:
508 install: install-recursive
509 install-exec: install-exec-recursive
510 install-data: install-data-recursive
511 uninstall: uninstall-recursive
512
513 install-am: all-am
514 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
515
516 installcheck: installcheck-recursive
517 install-strip:
518 if test -z '$(STRIP)'; then \
519 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
520 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
521 install; \
522 else \
523 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
524 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
525 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
526 fi
527 mostlyclean-generic:
528
529 clean-generic:
530
531 distclean-generic:
532 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
533 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
534
535 maintainer-clean-generic:
536 @echo "This command is intended for maintainers to use"
537 @echo "it deletes files that may require special tools to rebuild."
538 clean: clean-recursive
539
540 clean-am: clean-generic clean-libtool mostlyclean-am
541
542 distclean: distclean-recursive
543 -rm -f Makefile
544 distclean-am: clean-am distclean-generic distclean-tags
545
546 dvi: dvi-recursive
547
548 dvi-am:
549
550 html: html-recursive
551
552 html-am:
553
554 info: info-recursive
555
556 info-am:
557
558 install-data-am:
559
560 install-dvi: install-dvi-recursive
561
562 install-dvi-am:
563
564 install-exec-am:
565
566 install-html: install-html-recursive
567
568 install-html-am:
569
570 install-info: install-info-recursive
571
572 install-info-am:
573
574 install-man:
575
576 install-pdf: install-pdf-recursive
577
578 install-pdf-am:
579
580 install-ps: install-ps-recursive
581
582 install-ps-am:
583
584 installcheck-am:
585
586 maintainer-clean: maintainer-clean-recursive
587 -rm -f Makefile
588 maintainer-clean-am: distclean-am maintainer-clean-generic
589
590 mostlyclean: mostlyclean-recursive
591
592 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
593
594 pdf: pdf-recursive
595
596 pdf-am:
597
598 ps: ps-recursive
599
600 ps-am:
601
602 uninstall-am:
603
604 .MAKE: $(am__recursive_targets) install-am install-strip
605
606 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
607 check-am clean clean-generic clean-libtool cscopelist-am ctags \
608 ctags-am distclean distclean-generic distclean-libtool \
609 distclean-tags distdir dvi dvi-am html html-am info info-am \
610 install install-am install-data install-data-am install-dvi \
611 install-dvi-am install-exec install-exec-am install-html \
612 install-html-am install-info install-info-am install-man \
613 install-pdf install-pdf-am install-ps install-ps-am \
614 install-strip installcheck installcheck-am installdirs \
615 installdirs-am maintainer-clean maintainer-clean-generic \
616 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
617 ps ps-am tags tags-am uninstall uninstall-am
618
619
620 # Tell versions [3.59,3.63) of GNU make to not export all variables.
621 # Otherwise a system limit (for SysV at least) may be exceeded.
622 .NOEXPORT:
0 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1
2 dist_doc_DATA = opendmarc
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
17
18 VPATH = @srcdir@
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = contrib/init/generic
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(dist_doc_DATA)
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES =
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 am__can_run_installinfo = \
111 case $$AM_UPDATE_INFO_DIR in \
112 n|no|NO) false;; \
113 *) (install-info --version) >/dev/null 2>&1;; \
114 esac
115 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
116 am__vpath_adj = case $$p in \
117 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
118 *) f=$$p;; \
119 esac;
120 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
121 am__install_max = 40
122 am__nobase_strip_setup = \
123 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
124 am__nobase_strip = \
125 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
126 am__nobase_list = $(am__nobase_strip_setup); \
127 for p in $$list; do echo "$$p $$p"; done | \
128 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
129 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
130 if (++n[$$2] == $(am__install_max)) \
131 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
132 END { for (dir in files) print dir, files[dir] }'
133 am__base_list = \
134 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
135 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
136 am__uninstall_files_from_dir = { \
137 test -z "$$files" \
138 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
139 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
140 $(am__cd) "$$dir" && rm -f $$files; }; \
141 }
142 am__installdirs = "$(DESTDIR)$(docdir)"
143 DATA = $(dist_doc_DATA)
144 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
145 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
146 ACLOCAL = @ACLOCAL@
147 AMTAR = @AMTAR@
148 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
149 AR = @AR@
150 AUTOCONF = @AUTOCONF@
151 AUTOHEADER = @AUTOHEADER@
152 AUTOMAKE = @AUTOMAKE@
153 AWK = @AWK@
154 CC = @CC@
155 CCDEPMODE = @CCDEPMODE@
156 CFLAGS = @CFLAGS@
157 CPP = @CPP@
158 CPPFLAGS = @CPPFLAGS@
159 CYGPATH_W = @CYGPATH_W@
160 DEFS = @DEFS@
161 DEPDIR = @DEPDIR@
162 DLLTOOL = @DLLTOOL@
163 DSYMUTIL = @DSYMUTIL@
164 DUMPBIN = @DUMPBIN@
165 ECHO_C = @ECHO_C@
166 ECHO_N = @ECHO_N@
167 ECHO_T = @ECHO_T@
168 EGREP = @EGREP@
169 EXEEXT = @EXEEXT@
170 FGREP = @FGREP@
171 GREP = @GREP@
172 HEX_VERSION = @HEX_VERSION@
173 INSTALL = @INSTALL@
174 INSTALL_DATA = @INSTALL_DATA@
175 INSTALL_PROGRAM = @INSTALL_PROGRAM@
176 INSTALL_SCRIPT = @INSTALL_SCRIPT@
177 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
178 LD = @LD@
179 LDFLAGS = @LDFLAGS@
180 LIBDMARC_DIR = @LIBDMARC_DIR@
181 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
182 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
183 LIBMILTER_LIBS = @LIBMILTER_LIBS@
184 LIBOBJS = @LIBOBJS@
185 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
186 LIBRESOLV = @LIBRESOLV@
187 LIBS = @LIBS@
188 LIBTOOL = @LIBTOOL@
189 LIPO = @LIPO@
190 LN_S = @LN_S@
191 LTLIBOBJS = @LTLIBOBJS@
192 MAKEINFO = @MAKEINFO@
193 MANIFEST_TOOL = @MANIFEST_TOOL@
194 MKDIR_P = @MKDIR_P@
195 NM = @NM@
196 NMEDIT = @NMEDIT@
197 OBJDUMP = @OBJDUMP@
198 OBJEXT = @OBJEXT@
199 OTOOL = @OTOOL@
200 OTOOL64 = @OTOOL64@
201 PACKAGE = @PACKAGE@
202 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203 PACKAGE_NAME = @PACKAGE_NAME@
204 PACKAGE_STRING = @PACKAGE_STRING@
205 PACKAGE_TARNAME = @PACKAGE_TARNAME@
206 PACKAGE_URL = @PACKAGE_URL@
207 PACKAGE_VERSION = @PACKAGE_VERSION@
208 PATH_SEPARATOR = @PATH_SEPARATOR@
209 PKG_CONFIG = @PKG_CONFIG@
210 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
211 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
212 PTHREAD_CC = @PTHREAD_CC@
213 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
214 PTHREAD_LIBS = @PTHREAD_LIBS@
215 RANLIB = @RANLIB@
216 SED = @SED@
217 SET_MAKE = @SET_MAKE@
218 SHELL = @SHELL@
219 SQL_BACKEND = @SQL_BACKEND@
220 STRIP = @STRIP@
221 SYSCONFDIR = @SYSCONFDIR@
222 VERSION = @VERSION@
223 abs_builddir = @abs_builddir@
224 abs_srcdir = @abs_srcdir@
225 abs_top_builddir = @abs_top_builddir@
226 abs_top_srcdir = @abs_top_srcdir@
227 ac_aux_dir = @ac_aux_dir@
228 ac_ct_AR = @ac_ct_AR@
229 ac_ct_CC = @ac_ct_CC@
230 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
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 ax_pthread_config = @ax_pthread_config@
237 bindir = @bindir@
238 build = @build@
239 build_alias = @build_alias@
240 build_cpu = @build_cpu@
241 build_os = @build_os@
242 build_vendor = @build_vendor@
243 builddir = @builddir@
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 miltertest = @miltertest@
264 mkdir_p = @mkdir_p@
265 oldincludedir = @oldincludedir@
266 pdfdir = @pdfdir@
267 prefix = @prefix@
268 program_transform_name = @program_transform_name@
269 psdir = @psdir@
270 sbindir = @sbindir@
271 sharedstatedir = @sharedstatedir@
272 srcdir = @srcdir@
273 sysconfdir = @sysconfdir@
274 target_alias = @target_alias@
275 top_build_prefix = @top_build_prefix@
276 top_builddir = @top_builddir@
277 top_srcdir = @top_srcdir@
278 dist_doc_DATA = opendmarc
279 all: all-am
280
281 .SUFFIXES:
282 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
283 @for dep in $?; do \
284 case '$(am__configure_deps)' in \
285 *$$dep*) \
286 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
287 && { if test -f $@; then exit 0; else break; fi; }; \
288 exit 1;; \
289 esac; \
290 done; \
291 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/init/generic/Makefile'; \
292 $(am__cd) $(top_srcdir) && \
293 $(AUTOMAKE) --foreign contrib/init/generic/Makefile
294 .PRECIOUS: Makefile
295 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
296 @case '$?' in \
297 *config.status*) \
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
299 *) \
300 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
301 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
302 esac;
303
304 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
305 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
306
307 $(top_srcdir)/configure: $(am__configure_deps)
308 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
309 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
310 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
311 $(am__aclocal_m4_deps):
312
313 mostlyclean-libtool:
314 -rm -f *.lo
315
316 clean-libtool:
317 -rm -rf .libs _libs
318 install-dist_docDATA: $(dist_doc_DATA)
319 @$(NORMAL_INSTALL)
320 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
321 if test -n "$$list"; then \
322 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
323 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
324 fi; \
325 for p in $$list; do \
326 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
327 echo "$$d$$p"; \
328 done | $(am__base_list) | \
329 while read files; do \
330 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
331 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
332 done
333
334 uninstall-dist_docDATA:
335 @$(NORMAL_UNINSTALL)
336 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
337 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
338 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
339 tags TAGS:
340
341 ctags CTAGS:
342
343 cscope cscopelist:
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 $(DATA)
379 installdirs:
380 for dir in "$(DESTDIR)$(docdir)"; 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 if test -z '$(STRIP)'; then \
394 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
395 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
396 install; \
397 else \
398 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
399 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
400 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
401 fi
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: install-dist_docDATA
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: uninstall-dist_docDATA
478
479 .MAKE: install-am install-strip
480
481 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
482 cscopelist-am ctags-am distclean distclean-generic \
483 distclean-libtool distdir dvi dvi-am html html-am info info-am \
484 install install-am install-data install-data-am \
485 install-dist_docDATA install-dvi install-dvi-am install-exec \
486 install-exec-am install-html install-html-am install-info \
487 install-info-am install-man install-pdf install-pdf-am \
488 install-ps install-ps-am install-strip installcheck \
489 installcheck-am installdirs maintainer-clean \
490 maintainer-clean-generic mostlyclean mostlyclean-generic \
491 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
492 uninstall-am uninstall-dist_docDATA
493
494
495 # Tell versions [3.59,3.63) of GNU make to not export all variables.
496 # Otherwise a system limit (for SysV at least) may be exceeded.
497 .NOEXPORT:
0 #!/bin/bash
1 #
2 # opendmarc Start and stop OpenDMARC
3
4 # chkconfig: - 41 59
5 # description: OpenDMARC implements the DMARC milter spec for domain auth
6 # processname: opendmarc
7 # pidfile: /var/run/opendmarc/opendmarc.pid
8
9 ### BEGIN INIT INFO
10 # Provides: opendmarc
11 # Short-Description: Start and stop OpenDMARC
12 # Description: OpenDMARC implements the DMARC milter spec for domain auth
13 ### END INIT INFO
14
15 # OpenDMARC startup script v1.0 for RHEL/CentOS/Fedora
16 # by Steve Mays (steve@messagebus.com) - 7-23-2012
17 # Based on a script by Steve Jenkins (SteveJenkins.com) - 9-22-2011 for opendkim
18
19 . /etc/rc.d/init.d/functions
20
21 prefix=/usr/local
22 exec_prefix=${prefix}
23
24 RETVAL=0
25 prog="opendmarc"
26
27 DAEMON=${exec_prefix}/sbin/$prog
28 CONF_FILE=${prefix}/etc/$prog.conf
29 PID_FILE=${prefix}/var/run/$prog/$prog.pid
30
31 if [ -f /etc/sysconfig/opendmarc ]; then
32 . /etc/sysconfig/opendmarc
33 fi
34
35 start() {
36 echo -n $"Starting OpenDMARC Milter: "
37 if [ -f $PID_FILE ]; then
38 PID=`cat $PID_FILE`
39 echo OpenDMARC already running as pid $PID
40 exit 2;
41 else
42 daemon $DAEMON -c $CONF_FILE -P $PID_FILE
43 RETVAL=$?
44 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/opendmarc
45 echo
46 return $RETVAL
47 fi
48 }
49
50 stop() {
51 echo -n $"Stopping OpenDMARC Milter: "
52 killproc -p $PID_FILE opendmarc
53 RETVAL=$?
54 echo
55 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/opendmarc
56 return $RETVAL
57 }
58
59 restart() {
60 stop
61 start
62 }
63
64 reload() {
65 echo -n $"Reloading OpenDMARC Milter configuration: "
66 killproc -p $PID_FILE opendmarc -SIGUSR1
67 RETVAL=$?
68 echo
69 return $RETVAL
70 }
71
72 case "$1" in
73 start)
74 start
75 ;;
76 stop)
77 stop
78 ;;
79 reload)
80 reload
81 ;;
82 restart)
83 restart
84 ;;
85 status)
86 status -p $PID_FILE opendmarc
87 ;;
88 condrestart)
89 [ -f /var/lock/subsys/opendmarc ] && restart || :
90 ;;
91 *)
92 echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
93 exit 1
94 esac
95
96 exit $?
0 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1
2 dist_doc_DATA = opendmarc
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
17
18 VPATH = @srcdir@
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = contrib/init/redhat
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(srcdir)/opendmarc.in $(dist_doc_DATA)
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES = opendmarc
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 am__can_run_installinfo = \
111 case $$AM_UPDATE_INFO_DIR in \
112 n|no|NO) false;; \
113 *) (install-info --version) >/dev/null 2>&1;; \
114 esac
115 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
116 am__vpath_adj = case $$p in \
117 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
118 *) f=$$p;; \
119 esac;
120 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
121 am__install_max = 40
122 am__nobase_strip_setup = \
123 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
124 am__nobase_strip = \
125 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
126 am__nobase_list = $(am__nobase_strip_setup); \
127 for p in $$list; do echo "$$p $$p"; done | \
128 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
129 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
130 if (++n[$$2] == $(am__install_max)) \
131 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
132 END { for (dir in files) print dir, files[dir] }'
133 am__base_list = \
134 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
135 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
136 am__uninstall_files_from_dir = { \
137 test -z "$$files" \
138 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
139 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
140 $(am__cd) "$$dir" && rm -f $$files; }; \
141 }
142 am__installdirs = "$(DESTDIR)$(docdir)"
143 DATA = $(dist_doc_DATA)
144 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
145 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
146 ACLOCAL = @ACLOCAL@
147 AMTAR = @AMTAR@
148 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
149 AR = @AR@
150 AUTOCONF = @AUTOCONF@
151 AUTOHEADER = @AUTOHEADER@
152 AUTOMAKE = @AUTOMAKE@
153 AWK = @AWK@
154 CC = @CC@
155 CCDEPMODE = @CCDEPMODE@
156 CFLAGS = @CFLAGS@
157 CPP = @CPP@
158 CPPFLAGS = @CPPFLAGS@
159 CYGPATH_W = @CYGPATH_W@
160 DEFS = @DEFS@
161 DEPDIR = @DEPDIR@
162 DLLTOOL = @DLLTOOL@
163 DSYMUTIL = @DSYMUTIL@
164 DUMPBIN = @DUMPBIN@
165 ECHO_C = @ECHO_C@
166 ECHO_N = @ECHO_N@
167 ECHO_T = @ECHO_T@
168 EGREP = @EGREP@
169 EXEEXT = @EXEEXT@
170 FGREP = @FGREP@
171 GREP = @GREP@
172 HEX_VERSION = @HEX_VERSION@
173 INSTALL = @INSTALL@
174 INSTALL_DATA = @INSTALL_DATA@
175 INSTALL_PROGRAM = @INSTALL_PROGRAM@
176 INSTALL_SCRIPT = @INSTALL_SCRIPT@
177 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
178 LD = @LD@
179 LDFLAGS = @LDFLAGS@
180 LIBDMARC_DIR = @LIBDMARC_DIR@
181 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
182 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
183 LIBMILTER_LIBS = @LIBMILTER_LIBS@
184 LIBOBJS = @LIBOBJS@
185 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
186 LIBRESOLV = @LIBRESOLV@
187 LIBS = @LIBS@
188 LIBTOOL = @LIBTOOL@
189 LIPO = @LIPO@
190 LN_S = @LN_S@
191 LTLIBOBJS = @LTLIBOBJS@
192 MAKEINFO = @MAKEINFO@
193 MANIFEST_TOOL = @MANIFEST_TOOL@
194 MKDIR_P = @MKDIR_P@
195 NM = @NM@
196 NMEDIT = @NMEDIT@
197 OBJDUMP = @OBJDUMP@
198 OBJEXT = @OBJEXT@
199 OTOOL = @OTOOL@
200 OTOOL64 = @OTOOL64@
201 PACKAGE = @PACKAGE@
202 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203 PACKAGE_NAME = @PACKAGE_NAME@
204 PACKAGE_STRING = @PACKAGE_STRING@
205 PACKAGE_TARNAME = @PACKAGE_TARNAME@
206 PACKAGE_URL = @PACKAGE_URL@
207 PACKAGE_VERSION = @PACKAGE_VERSION@
208 PATH_SEPARATOR = @PATH_SEPARATOR@
209 PKG_CONFIG = @PKG_CONFIG@
210 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
211 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
212 PTHREAD_CC = @PTHREAD_CC@
213 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
214 PTHREAD_LIBS = @PTHREAD_LIBS@
215 RANLIB = @RANLIB@
216 SED = @SED@
217 SET_MAKE = @SET_MAKE@
218 SHELL = @SHELL@
219 SQL_BACKEND = @SQL_BACKEND@
220 STRIP = @STRIP@
221 SYSCONFDIR = @SYSCONFDIR@
222 VERSION = @VERSION@
223 abs_builddir = @abs_builddir@
224 abs_srcdir = @abs_srcdir@
225 abs_top_builddir = @abs_top_builddir@
226 abs_top_srcdir = @abs_top_srcdir@
227 ac_aux_dir = @ac_aux_dir@
228 ac_ct_AR = @ac_ct_AR@
229 ac_ct_CC = @ac_ct_CC@
230 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
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 ax_pthread_config = @ax_pthread_config@
237 bindir = @bindir@
238 build = @build@
239 build_alias = @build_alias@
240 build_cpu = @build_cpu@
241 build_os = @build_os@
242 build_vendor = @build_vendor@
243 builddir = @builddir@
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 miltertest = @miltertest@
264 mkdir_p = @mkdir_p@
265 oldincludedir = @oldincludedir@
266 pdfdir = @pdfdir@
267 prefix = @prefix@
268 program_transform_name = @program_transform_name@
269 psdir = @psdir@
270 sbindir = @sbindir@
271 sharedstatedir = @sharedstatedir@
272 srcdir = @srcdir@
273 sysconfdir = @sysconfdir@
274 target_alias = @target_alias@
275 top_build_prefix = @top_build_prefix@
276 top_builddir = @top_builddir@
277 top_srcdir = @top_srcdir@
278 dist_doc_DATA = opendmarc
279 all: all-am
280
281 .SUFFIXES:
282 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
283 @for dep in $?; do \
284 case '$(am__configure_deps)' in \
285 *$$dep*) \
286 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
287 && { if test -f $@; then exit 0; else break; fi; }; \
288 exit 1;; \
289 esac; \
290 done; \
291 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/init/redhat/Makefile'; \
292 $(am__cd) $(top_srcdir) && \
293 $(AUTOMAKE) --foreign contrib/init/redhat/Makefile
294 .PRECIOUS: Makefile
295 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
296 @case '$?' in \
297 *config.status*) \
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
299 *) \
300 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
301 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
302 esac;
303
304 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
305 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
306
307 $(top_srcdir)/configure: $(am__configure_deps)
308 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
309 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
310 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
311 $(am__aclocal_m4_deps):
312 opendmarc: $(top_builddir)/config.status $(srcdir)/opendmarc.in
313 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
314
315 mostlyclean-libtool:
316 -rm -f *.lo
317
318 clean-libtool:
319 -rm -rf .libs _libs
320 install-dist_docDATA: $(dist_doc_DATA)
321 @$(NORMAL_INSTALL)
322 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
323 if test -n "$$list"; then \
324 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
325 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
326 fi; \
327 for p in $$list; do \
328 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
329 echo "$$d$$p"; \
330 done | $(am__base_list) | \
331 while read files; do \
332 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
333 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
334 done
335
336 uninstall-dist_docDATA:
337 @$(NORMAL_UNINSTALL)
338 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
339 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
340 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
341 tags TAGS:
342
343 ctags CTAGS:
344
345 cscope cscopelist:
346
347
348 distdir: $(DISTFILES)
349 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
350 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
351 list='$(DISTFILES)'; \
352 dist_files=`for file in $$list; do echo $$file; done | \
353 sed -e "s|^$$srcdirstrip/||;t" \
354 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
355 case $$dist_files in \
356 */*) $(MKDIR_P) `echo "$$dist_files" | \
357 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
358 sort -u` ;; \
359 esac; \
360 for file in $$dist_files; do \
361 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
362 if test -d $$d/$$file; then \
363 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
364 if test -d "$(distdir)/$$file"; then \
365 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
366 fi; \
367 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
368 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
369 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
370 fi; \
371 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
372 else \
373 test -f "$(distdir)/$$file" \
374 || cp -p $$d/$$file "$(distdir)/$$file" \
375 || exit 1; \
376 fi; \
377 done
378 check-am: all-am
379 check: check-am
380 all-am: Makefile $(DATA)
381 installdirs:
382 for dir in "$(DESTDIR)$(docdir)"; do \
383 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
384 done
385 install: install-am
386 install-exec: install-exec-am
387 install-data: install-data-am
388 uninstall: uninstall-am
389
390 install-am: all-am
391 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
392
393 installcheck: installcheck-am
394 install-strip:
395 if test -z '$(STRIP)'; then \
396 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
397 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
398 install; \
399 else \
400 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
401 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
402 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
403 fi
404 mostlyclean-generic:
405
406 clean-generic:
407
408 distclean-generic:
409 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
410 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
411
412 maintainer-clean-generic:
413 @echo "This command is intended for maintainers to use"
414 @echo "it deletes files that may require special tools to rebuild."
415 clean: clean-am
416
417 clean-am: clean-generic clean-libtool mostlyclean-am
418
419 distclean: distclean-am
420 -rm -f Makefile
421 distclean-am: clean-am distclean-generic
422
423 dvi: dvi-am
424
425 dvi-am:
426
427 html: html-am
428
429 html-am:
430
431 info: info-am
432
433 info-am:
434
435 install-data-am: install-dist_docDATA
436
437 install-dvi: install-dvi-am
438
439 install-dvi-am:
440
441 install-exec-am:
442
443 install-html: install-html-am
444
445 install-html-am:
446
447 install-info: install-info-am
448
449 install-info-am:
450
451 install-man:
452
453 install-pdf: install-pdf-am
454
455 install-pdf-am:
456
457 install-ps: install-ps-am
458
459 install-ps-am:
460
461 installcheck-am:
462
463 maintainer-clean: maintainer-clean-am
464 -rm -f Makefile
465 maintainer-clean-am: distclean-am maintainer-clean-generic
466
467 mostlyclean: mostlyclean-am
468
469 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
470
471 pdf: pdf-am
472
473 pdf-am:
474
475 ps: ps-am
476
477 ps-am:
478
479 uninstall-am: uninstall-dist_docDATA
480
481 .MAKE: install-am install-strip
482
483 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
484 cscopelist-am ctags-am distclean distclean-generic \
485 distclean-libtool distdir dvi dvi-am html html-am info info-am \
486 install install-am install-data install-data-am \
487 install-dist_docDATA install-dvi install-dvi-am install-exec \
488 install-exec-am install-html install-html-am install-info \
489 install-info-am install-man install-pdf install-pdf-am \
490 install-ps install-ps-am install-strip installcheck \
491 installcheck-am installdirs maintainer-clean \
492 maintainer-clean-generic mostlyclean mostlyclean-generic \
493 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
494 uninstall-am uninstall-dist_docDATA
495
496
497 # Tell versions [3.59,3.63) of GNU make to not export all variables.
498 # Otherwise a system limit (for SysV at least) may be exceeded.
499 .NOEXPORT:
0 #!/bin/bash
1 #
2 # opendmarc Start and stop OpenDMARC
3
4 # chkconfig: - 41 59
5 # description: OpenDMARC implements the DMARC milter spec for domain auth
6 # processname: opendmarc
7 # pidfile: ${prefix}/var/run/opendmarc/opendmarc.pid
8
9 ### BEGIN INIT INFO
10 # Provides: opendmarc
11 # Required-Start: opendmarc
12 # Required-Stop: opendmarc
13 # Default-Start: 2 3 4 5
14 # Default-Stop: 0 1 6
15 # Short-Description: Start and stop OpenDMARC
16 # Description: OpenDMARC implements the DMARC milter spec for domain auth
17 ### END INIT INFO
18
19 # OpenDMARC startup script v1.0 for RHEL/CentOS/Fedora
20 # By Todd Lyons (tlyons@ivenue.com) - 8-12-2012
21 # Based on a scrypt by Steve Mays (steve@messagebus.com) - 7-23-2012
22 # Based on a script by Steve Jenkins (SteveJenkins.com) - 9-22-2011 for opendkim
23
24 . /etc/rc.d/init.d/functions
25
26 prefix=/usr/local
27 exec_prefix=${prefix}
28
29 RETVAL=0
30 prog="opendmarc"
31
32 DAEMON=${exec_prefix}/sbin/$prog
33 CONF_FILE=${prefix}/etc/$prog.conf
34 PID_FILE=${prefix}/var/run/$prog/$prog.pid
35
36 if [ -f /etc/sysconfig/opendmarc ]; then
37 . /etc/sysconfig/opendmarc
38 fi
39
40 start() {
41 echo -n $"Starting OpenDMARC Milter: "
42 if [ -f $PID_FILE ]; then
43 PID=`cat $PID_FILE`
44 echo OpenDMARC already running as pid $PID
45 exit 2;
46 else
47 daemon $DAEMON -c $CONF_FILE -P $PID_FILE
48 RETVAL=$?
49 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/opendmarc
50 echo
51 return $RETVAL
52 fi
53 }
54
55 stop() {
56 echo -n $"Stopping OpenDMARC Milter: "
57 killproc -p $PID_FILE opendmarc
58 RETVAL=$?
59 echo
60 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/opendmarc
61 return $RETVAL
62 }
63
64 restart() {
65 stop
66 start
67 }
68
69 reload() {
70 echo -n $"Reloading OpenDMARC Milter configuration: "
71 killproc -p $PID_FILE opendmarc -SIGUSR1
72 RETVAL=$?
73 echo
74 return $RETVAL
75 }
76
77 case "$1" in
78 start)
79 start
80 ;;
81 stop)
82 stop
83 ;;
84 reload)
85 reload
86 ;;
87 restart)
88 restart
89 ;;
90 status)
91 status -p $PID_FILE opendmarc
92 ;;
93 condrestart)
94 [ -f /var/lock/subsys/opendmarc ] && restart || :
95 ;;
96 *)
97 echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
98 exit 1
99 esac
100
101 exit $?
0 #!/bin/bash
1 #
2 # opendmarc Start and stop OpenDMARC
3
4 # chkconfig: - 41 59
5 # description: OpenDMARC implements the DMARC milter spec for domain auth
6 # processname: opendmarc
7 # pidfile: @localstatedir@/run/opendmarc/opendmarc.pid
8
9 ### BEGIN INIT INFO
10 # Provides: opendmarc
11 # Required-Start: opendmarc
12 # Required-Stop: opendmarc
13 # Default-Start: 2 3 4 5
14 # Default-Stop: 0 1 6
15 # Short-Description: Start and stop OpenDMARC
16 # Description: OpenDMARC implements the DMARC milter spec for domain auth
17 ### END INIT INFO
18
19 # OpenDMARC startup script v1.0 for RHEL/CentOS/Fedora
20 # By Todd Lyons (tlyons@ivenue.com) - 8-12-2012
21 # Based on a scrypt by Steve Mays (steve@messagebus.com) - 7-23-2012
22 # Based on a script by Steve Jenkins (SteveJenkins.com) - 9-22-2011 for opendkim
23
24 . /etc/rc.d/init.d/functions
25
26 prefix=@prefix@
27 exec_prefix=@exec_prefix@
28
29 RETVAL=0
30 prog="opendmarc"
31
32 DAEMON=@sbindir@/$prog
33 CONF_FILE=@sysconfdir@/$prog.conf
34 PID_FILE=@localstatedir@/run/$prog/$prog.pid
35
36 if [ -f /etc/sysconfig/opendmarc ]; then
37 . /etc/sysconfig/opendmarc
38 fi
39
40 start() {
41 echo -n $"Starting OpenDMARC Milter: "
42 if [ -f $PID_FILE ]; then
43 PID=`cat $PID_FILE`
44 echo OpenDMARC already running as pid $PID
45 exit 2;
46 else
47 daemon $DAEMON -c $CONF_FILE -P $PID_FILE
48 RETVAL=$?
49 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/opendmarc
50 echo
51 return $RETVAL
52 fi
53 }
54
55 stop() {
56 echo -n $"Stopping OpenDMARC Milter: "
57 killproc -p $PID_FILE opendmarc
58 RETVAL=$?
59 echo
60 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/opendmarc
61 return $RETVAL
62 }
63
64 restart() {
65 stop
66 start
67 }
68
69 reload() {
70 echo -n $"Reloading OpenDMARC Milter configuration: "
71 killproc -p $PID_FILE opendmarc -SIGUSR1
72 RETVAL=$?
73 echo
74 return $RETVAL
75 }
76
77 case "$1" in
78 start)
79 start
80 ;;
81 stop)
82 stop
83 ;;
84 reload)
85 reload
86 ;;
87 restart)
88 restart
89 ;;
90 status)
91 status -p $PID_FILE opendmarc
92 ;;
93 condrestart)
94 [ -f /var/lock/subsys/opendmarc ] && restart || :
95 ;;
96 *)
97 echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
98 exit 1
99 esac
100
101 exit $?
0 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1
2 dist_doc_DATA = README.rddmarc \
3 dmarcfail.py \
4 mkdmarc \
5 mysql_ip6.c \
6 rddmarc
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
17
18 VPATH = @srcdir@
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = contrib/rddmarc
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(dist_doc_DATA)
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES =
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 am__can_run_installinfo = \
111 case $$AM_UPDATE_INFO_DIR in \
112 n|no|NO) false;; \
113 *) (install-info --version) >/dev/null 2>&1;; \
114 esac
115 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
116 am__vpath_adj = case $$p in \
117 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
118 *) f=$$p;; \
119 esac;
120 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
121 am__install_max = 40
122 am__nobase_strip_setup = \
123 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
124 am__nobase_strip = \
125 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
126 am__nobase_list = $(am__nobase_strip_setup); \
127 for p in $$list; do echo "$$p $$p"; done | \
128 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
129 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
130 if (++n[$$2] == $(am__install_max)) \
131 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
132 END { for (dir in files) print dir, files[dir] }'
133 am__base_list = \
134 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
135 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
136 am__uninstall_files_from_dir = { \
137 test -z "$$files" \
138 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
139 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
140 $(am__cd) "$$dir" && rm -f $$files; }; \
141 }
142 am__installdirs = "$(DESTDIR)$(docdir)"
143 DATA = $(dist_doc_DATA)
144 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
145 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
146 ACLOCAL = @ACLOCAL@
147 AMTAR = @AMTAR@
148 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
149 AR = @AR@
150 AUTOCONF = @AUTOCONF@
151 AUTOHEADER = @AUTOHEADER@
152 AUTOMAKE = @AUTOMAKE@
153 AWK = @AWK@
154 CC = @CC@
155 CCDEPMODE = @CCDEPMODE@
156 CFLAGS = @CFLAGS@
157 CPP = @CPP@
158 CPPFLAGS = @CPPFLAGS@
159 CYGPATH_W = @CYGPATH_W@
160 DEFS = @DEFS@
161 DEPDIR = @DEPDIR@
162 DLLTOOL = @DLLTOOL@
163 DSYMUTIL = @DSYMUTIL@
164 DUMPBIN = @DUMPBIN@
165 ECHO_C = @ECHO_C@
166 ECHO_N = @ECHO_N@
167 ECHO_T = @ECHO_T@
168 EGREP = @EGREP@
169 EXEEXT = @EXEEXT@
170 FGREP = @FGREP@
171 GREP = @GREP@
172 HEX_VERSION = @HEX_VERSION@
173 INSTALL = @INSTALL@
174 INSTALL_DATA = @INSTALL_DATA@
175 INSTALL_PROGRAM = @INSTALL_PROGRAM@
176 INSTALL_SCRIPT = @INSTALL_SCRIPT@
177 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
178 LD = @LD@
179 LDFLAGS = @LDFLAGS@
180 LIBDMARC_DIR = @LIBDMARC_DIR@
181 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
182 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
183 LIBMILTER_LIBS = @LIBMILTER_LIBS@
184 LIBOBJS = @LIBOBJS@
185 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
186 LIBRESOLV = @LIBRESOLV@
187 LIBS = @LIBS@
188 LIBTOOL = @LIBTOOL@
189 LIPO = @LIPO@
190 LN_S = @LN_S@
191 LTLIBOBJS = @LTLIBOBJS@
192 MAKEINFO = @MAKEINFO@
193 MANIFEST_TOOL = @MANIFEST_TOOL@
194 MKDIR_P = @MKDIR_P@
195 NM = @NM@
196 NMEDIT = @NMEDIT@
197 OBJDUMP = @OBJDUMP@
198 OBJEXT = @OBJEXT@
199 OTOOL = @OTOOL@
200 OTOOL64 = @OTOOL64@
201 PACKAGE = @PACKAGE@
202 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203 PACKAGE_NAME = @PACKAGE_NAME@
204 PACKAGE_STRING = @PACKAGE_STRING@
205 PACKAGE_TARNAME = @PACKAGE_TARNAME@
206 PACKAGE_URL = @PACKAGE_URL@
207 PACKAGE_VERSION = @PACKAGE_VERSION@
208 PATH_SEPARATOR = @PATH_SEPARATOR@
209 PKG_CONFIG = @PKG_CONFIG@
210 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
211 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
212 PTHREAD_CC = @PTHREAD_CC@
213 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
214 PTHREAD_LIBS = @PTHREAD_LIBS@
215 RANLIB = @RANLIB@
216 SED = @SED@
217 SET_MAKE = @SET_MAKE@
218 SHELL = @SHELL@
219 SQL_BACKEND = @SQL_BACKEND@
220 STRIP = @STRIP@
221 SYSCONFDIR = @SYSCONFDIR@
222 VERSION = @VERSION@
223 abs_builddir = @abs_builddir@
224 abs_srcdir = @abs_srcdir@
225 abs_top_builddir = @abs_top_builddir@
226 abs_top_srcdir = @abs_top_srcdir@
227 ac_aux_dir = @ac_aux_dir@
228 ac_ct_AR = @ac_ct_AR@
229 ac_ct_CC = @ac_ct_CC@
230 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
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 ax_pthread_config = @ax_pthread_config@
237 bindir = @bindir@
238 build = @build@
239 build_alias = @build_alias@
240 build_cpu = @build_cpu@
241 build_os = @build_os@
242 build_vendor = @build_vendor@
243 builddir = @builddir@
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 miltertest = @miltertest@
264 mkdir_p = @mkdir_p@
265 oldincludedir = @oldincludedir@
266 pdfdir = @pdfdir@
267 prefix = @prefix@
268 program_transform_name = @program_transform_name@
269 psdir = @psdir@
270 sbindir = @sbindir@
271 sharedstatedir = @sharedstatedir@
272 srcdir = @srcdir@
273 sysconfdir = @sysconfdir@
274 target_alias = @target_alias@
275 top_build_prefix = @top_build_prefix@
276 top_builddir = @top_builddir@
277 top_srcdir = @top_srcdir@
278 dist_doc_DATA = README.rddmarc \
279 dmarcfail.py \
280 mkdmarc \
281 mysql_ip6.c \
282 rddmarc
283
284 all: all-am
285
286 .SUFFIXES:
287 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
288 @for dep in $?; do \
289 case '$(am__configure_deps)' in \
290 *$$dep*) \
291 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
292 && { if test -f $@; then exit 0; else break; fi; }; \
293 exit 1;; \
294 esac; \
295 done; \
296 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/rddmarc/Makefile'; \
297 $(am__cd) $(top_srcdir) && \
298 $(AUTOMAKE) --foreign contrib/rddmarc/Makefile
299 .PRECIOUS: Makefile
300 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
301 @case '$?' in \
302 *config.status*) \
303 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
304 *) \
305 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
306 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
307 esac;
308
309 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
310 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
311
312 $(top_srcdir)/configure: $(am__configure_deps)
313 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
314 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
315 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
316 $(am__aclocal_m4_deps):
317
318 mostlyclean-libtool:
319 -rm -f *.lo
320
321 clean-libtool:
322 -rm -rf .libs _libs
323 install-dist_docDATA: $(dist_doc_DATA)
324 @$(NORMAL_INSTALL)
325 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
326 if test -n "$$list"; then \
327 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
328 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
329 fi; \
330 for p in $$list; do \
331 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
332 echo "$$d$$p"; \
333 done | $(am__base_list) | \
334 while read files; do \
335 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
336 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
337 done
338
339 uninstall-dist_docDATA:
340 @$(NORMAL_UNINSTALL)
341 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
342 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
343 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
344 tags TAGS:
345
346 ctags CTAGS:
347
348 cscope cscopelist:
349
350
351 distdir: $(DISTFILES)
352 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
353 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
354 list='$(DISTFILES)'; \
355 dist_files=`for file in $$list; do echo $$file; done | \
356 sed -e "s|^$$srcdirstrip/||;t" \
357 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
358 case $$dist_files in \
359 */*) $(MKDIR_P) `echo "$$dist_files" | \
360 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
361 sort -u` ;; \
362 esac; \
363 for file in $$dist_files; do \
364 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
365 if test -d $$d/$$file; then \
366 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
367 if test -d "$(distdir)/$$file"; then \
368 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
369 fi; \
370 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
371 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
372 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
373 fi; \
374 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
375 else \
376 test -f "$(distdir)/$$file" \
377 || cp -p $$d/$$file "$(distdir)/$$file" \
378 || exit 1; \
379 fi; \
380 done
381 check-am: all-am
382 check: check-am
383 all-am: Makefile $(DATA)
384 installdirs:
385 for dir in "$(DESTDIR)$(docdir)"; do \
386 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
387 done
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 if test -z '$(STRIP)'; then \
399 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
400 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
401 install; \
402 else \
403 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
404 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
405 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
406 fi
407 mostlyclean-generic:
408
409 clean-generic:
410
411 distclean-generic:
412 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
413 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
414
415 maintainer-clean-generic:
416 @echo "This command is intended for maintainers to use"
417 @echo "it deletes files that may require special tools to rebuild."
418 clean: clean-am
419
420 clean-am: clean-generic clean-libtool mostlyclean-am
421
422 distclean: distclean-am
423 -rm -f Makefile
424 distclean-am: clean-am distclean-generic
425
426 dvi: dvi-am
427
428 dvi-am:
429
430 html: html-am
431
432 html-am:
433
434 info: info-am
435
436 info-am:
437
438 install-data-am: install-dist_docDATA
439
440 install-dvi: install-dvi-am
441
442 install-dvi-am:
443
444 install-exec-am:
445
446 install-html: install-html-am
447
448 install-html-am:
449
450 install-info: install-info-am
451
452 install-info-am:
453
454 install-man:
455
456 install-pdf: install-pdf-am
457
458 install-pdf-am:
459
460 install-ps: install-ps-am
461
462 install-ps-am:
463
464 installcheck-am:
465
466 maintainer-clean: maintainer-clean-am
467 -rm -f Makefile
468 maintainer-clean-am: distclean-am maintainer-clean-generic
469
470 mostlyclean: mostlyclean-am
471
472 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
473
474 pdf: pdf-am
475
476 pdf-am:
477
478 ps: ps-am
479
480 ps-am:
481
482 uninstall-am: uninstall-dist_docDATA
483
484 .MAKE: install-am install-strip
485
486 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
487 cscopelist-am ctags-am distclean distclean-generic \
488 distclean-libtool distdir dvi dvi-am html html-am info info-am \
489 install install-am install-data install-data-am \
490 install-dist_docDATA install-dvi install-dvi-am install-exec \
491 install-exec-am install-html install-html-am install-info \
492 install-info-am install-man install-pdf install-pdf-am \
493 install-ps install-ps-am install-strip installcheck \
494 installcheck-am installdirs maintainer-clean \
495 maintainer-clean-generic mostlyclean mostlyclean-generic \
496 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
497 uninstall-am uninstall-dist_docDATA
498
499
500 # Tell versions [3.59,3.63) of GNU make to not export all variables.
501 # Otherwise a system limit (for SysV at least) may be exceeded.
502 .NOEXPORT:
0 These are little scripts to parse DMARC reports.
1
2 The first, rddmarc, is a perl script that take an incoming DMARC
3 summary report email, extracts and unpacks the gzip or ZIP file,
4 parses the XML, and puts the parts about received mail into a MySQL
5 database. The database is set up to handle reports about multiple
6 domains from multiple reporters. It's handling reports from Google,
7 Yahoo, xs4all and Netease.
8
9 It expects filenames on the command line, each of which contains a
10 mail message, but it'd easy enough to adjust it to read stdin or
11 anywhere else.
12
13 It works great on FreeBSD, can probably be made to work on linux with
14 modest effort, no clue about other systems. It needs the
15 MIME::Parser, XML::Simple, and DBI perl modules and the freeware unzip
16 program to extract stuff from the gzip or ZIP file.
17
18 It now handles both IPv4 and IPv6 addresses. If you have been
19 running the ipv4 version, see mkdmarc for instructions on how
20 to update your database. The file mysql_ip6.c is a plugin for a
21 mysql server to add some IPv6 formatting functions that can be
22 handy when analyzing the reports. It's not needed for rddmarc.
23
24 The second is a python script to parse failure reports. It expects
25 file names on the command line, or if no arguments, it reads stdin. It
26 needs the usual MySQLdb module. It handles reports from Netease,
27 which are currently the only ones I'm getting.
28
29 mkdmarc - SQL to create the tables
30
31 rddmarc - the script to parse summary reports (Perl)
32
33 dmarcfail.py - the script to parse failure reports (python)
34
35 mysql_ip6.c - C language source for MySQL plugin for IPv6
36 formatting functions
0 #!/usr/local/bin/python
1 # $Header: /home/johnl/hack/dmarc/RCS/dmarcfail.py,v 1.1 2012/07/12 03:59:29 johnl Exp $
2 # parse DMARC failure reports, add it to the mysql database
3 # optional arguments are names of files containing ARF messages,
4 # otherwise it reads stdin
5
6 # Copyright 2012, Taughannock Networks. All rights reserved.
7
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions
10 # are met:
11
12 # Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14
15 # Redistributions in binary form must reproduce the above copyright
16 # notice, this list of conditions and the following disclaimer in the
17 # documentation and/or other materials provided with the distribution.
18
19 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
29 # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 # POSSIBILITY OF SUCH DAMAGE.
31
32 import re
33 import email
34 import time
35 import MySQLdb
36
37 def dmfail(db,h,f):
38 e = email.message_from_file(h)
39 if(e.get_content_type() != "multipart/report"):
40 print f,"is not a report"
41 return
42
43 for p in e.get_payload():
44 if(p.get_content_type() == "message/feedback-report"):
45 r = email.parser.Parser()
46 fr = r.parsestr(p.get_payload()[0].as_string(), True)
47 fx = re.search(r'<(.+?)@(.+?)>', fr['original-mail-from'])
48 origbox,origdom = fx.group(1,2)
49 arr = int(email.utils.mktime_tz(email.utils.parsedate_tz(fr['arrival-date'])))
50
51 elif(p.get_content_type() == "message/rfc822" or
52 p.get_content_type() == "text/rfc822-headers"):
53
54 m = email.message_from_string(p.get_payload())
55 frombox = fromdom = None
56 fx = re.search(r'<(.+?)@(.+?)>', m['from'])
57 if(fx): frombox,fromdom = fx.group(1,2)
58 else:
59 t = re.sub(m['from'],r"\s+|\([^)]*\)","")
60 fx = re.match(r'(.+?)@(.+?)', t)
61 if(fx): frombox,fromdom = fx.group(1,2)
62
63 # OK, parsed it, now add an entry to the database
64 c = db.cursor()
65 c.execute("""INSERT INTO failure(serial,org,bouncedomain,bouncebox,fromdomain,
66 frombox,arrival,sourceip,headers)
67 VALUES(NULL,%s,%s,%s,%s,%s,FROM_UNIXTIME(%s),INET_ATON(%s),%s)""",
68 (fr['reported-domain'],origdom,origbox,fromdom,frombox,arr,fr['source-ip'],m.as_string()))
69 print "Inserted failure report %s" % c.lastrowid
70 c.close()
71
72 #################################################################################################
73 if __name__ == "__main__":
74 import sys
75 import argparse
76
77 parser = argparse.ArgumentParser(description="process DMARC failures")
78 parser.add_argument("-n", "--dbname", dest="dbname", action="store",
79 type="string", help="database name",
80 default="opendmarc")
81 parser.add_argument("-p", "--dbpasswd", dest="dbpasswd", action="store",
82 type="string", help="database password",
83 default="opendmarc")
84 parser.add_argument("-u", "--dbuser", dest="dbuser", action="store",
85 type="string", help="database user",
86 default="opendmarc")
87 parser.add_argument("file", nargs="*")
88 args = parser.parse_args()
89
90 db = MySQLdb.connect(user=args.dbuser, passwd=args.dbpasswd,
91 db=args.dbname, use_unicode=True)
92 MySQLdb.paramstyle='format'
93
94 if(len(args.file) == 0):
95 dmfail(db,sys.stdin,"stdin");
96 else:
97 for f in args.file:
98 h = open(f)
99 dmfail(db,h,f)
100 h.close()
0 -- Create database for DMARC data
1
2 -- Copyright 2012, Taughannock Networks. All rights reserved.
3
4 -- Redistribution and use in source and binary forms, with or without
5 -- modification, are permitted provided that the following conditions
6 -- are met:
7
8 -- Redistributions of source code must retain the above copyright
9 -- notice, this list of conditions and the following disclaimer.
10
11 -- Redistributions in binary form must reproduce the above copyright
12 -- notice, this list of conditions and the following disclaimer in the
13 -- documentation and/or other materials provided with the distribution.
14
15 -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20 -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22 -- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 -- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
25 -- WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 -- POSSIBILITY OF SUCH DAMAGE.
27
28 USE dmarc
29
30 CREATE TABLE report (
31 serial int(10) unsigned NOT NULL AUTO_INCREMENT,
32 mindate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
33 maxdate timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
34 domain varchar(255) NOT NULL,
35 org varchar(255) NOT NULL,
36 reportid varchar(255) NOT NULL,
37 PRIMARY KEY (serial),
38 UNIQUE KEY domain (domain,reportid)
39 );
40
41 -- Use these commands to change the old IPv4 only DMARC table to the new one
42 /***
43 alter table rptrecord modify ip int(10) unsigned;
44 alter table rptrecord add column ip6 binary(16) after ip;
45 alter table rptrecord add key serial6(serial,ip6);
46 ***/
47
48 -- Use these commands to load in the optional IPv6 formatting functions
49 /***
50 CREATE FUNCTION inet_6top RETURNS STRING SONAME 'mysql_ip6.so';
51 CREATE FUNCTION inet_pto6 RETURNS STRING SONAME 'mysql_ip6.so';
52 ***/
53
54 CREATE TABLE rptrecord (
55 serial int(10) unsigned NOT NULL,
56 ip int(10) unsigned,
57 ip6 binary(16),
58 rcount int(10) unsigned NOT NULL,
59 disposition enum('none','quarantine','reject'),
60 reason varchar(255),
61 dkimdomain varchar(255),
62 dkimresult enum('none','pass','fail','neutral','policy','temperror','permerror'),
63 spfdomain varchar(255),
64 spfresult enum('none','neutral','pass','fail','softfail','temperror','permerror'),
65 KEY serial (serial,ip),
66 KEY serial6 (serial,ip6)
67 ) ENGINE=MyISAM;
68
69 CREATE TABLE failure (
70 serial int(10) unsigned NOT NULL AUTO_INCREMENT,
71 org varchar(255) NOT NULL, -- reported-domain
72 bouncedomain varchar(255), -- MAIL FROM bouncebox@bouncedomain
73 bouncebox varchar(255),
74 fromdomain varchar(255), -- From: frombox@fromdomain
75 frombox varchar(255),
76 arrival TIMESTAMP,
77 sourceip int unsigned, -- inet_aton(source-ip)
78 sourceip6 BINARY(16), -- inet_6top(source-ip)
79 headers TEXT,
80 PRIMARY KEY(serial),
81 KEY(sourceip),
82 KEY(fromdomain),
83 KEY(bouncedomain)
84 ) charset=utf8;
85
86 GRANT all on dmarc.* to dmarc identified by 'xxx';
87 GRANT all on dmarc.* to dmarc@localhost identified by 'xxx';
0 /*
1 * $Id: mysql_ip6.c,v 1.1 2010/01/25 17:29:14 johnl Exp $
2 * MySQL library functions for ipv6 conversion
3 *
4 * v6 internal format is 16 byte string or binary
5 *
6 * string = inet_6top(bin16) turn binary address into string rep
7 * bin16 = inet_pto6(string) turn string rep of address into binary
8 *
9 * cc -I/usr/local/include/mysql -fPIC -shared -o mysql_ip6.so mysql_ip6.c
10 */
11
12 #include <my_global.h>
13 #include <my_sys.h>
14 #include <string.h>
15 #include <mysql.h>
16 #include <ctype.h>
17
18 #include <sys/types.h>
19 #include <sys/socket.h>
20 #include <netinet/in.h>
21 #include <arpa/inet.h>
22
23 my_bool inet_6top_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
24 char *inet_6top(UDF_INIT *initid, UDF_ARGS *args, char *result,
25 unsigned long *length, char *is_null, char *error);
26
27 my_bool inet_pto6_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
28 char *inet_pto6(UDF_INIT *initid, UDF_ARGS *args, char *result,
29 unsigned long *length, char *is_null, char *error);
30
31 /*
32 * INET_6TOP( binary 16 ) -> string
33 */
34
35 my_bool
36 inet_6top_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
37 {
38 if (args->arg_count != 1 || args->arg_type[0] != STRING_RESULT) {
39 strcpy(message,"INET_6TOP() takes one 16-byte argument");
40 return 1;
41 }
42 initid->max_length = 40; /* max length of v6 string address */
43 return 0;
44 }
45
46 char *
47 inet_6top(UDF_INIT *initid, UDF_ARGS *args, char *result,
48 unsigned long *length, char *is_null, char *error)
49 {
50 char *p;
51
52 if (args->arg_count != 1 || args->arg_type[0] != STRING_RESULT
53 || (args->args[0] && args->lengths[0] != 16) ) {
54 *error = 1;
55 return NULL;
56 }
57
58 if(!args->args[0]) { /* NULL argument */
59 *is_null = 1;
60 return NULL;
61 }
62
63 p = (char *)inet_ntop(AF_INET6, args->args[0], result, 255); /* result buffer is at least that long */
64 if(!p) {
65 *error = 1;
66 return NULL;
67 }
68
69 *length = strlen(result);
70 return result;
71 }
72
73 /*
74 * INET_PTO6( string ) -> binary 16
75 */
76 my_bool
77 inet_pto6_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
78 {
79 if (args->arg_count != 1 || args->arg_type[0] != STRING_RESULT)
80 {
81 strcpy(message,"INET_PTO6() takes one string argument");
82 return 1;
83 }
84 initid->max_length = 16; /* length of v6 address */
85 return 0;
86 }
87
88 char *
89 inet_pto6(UDF_INIT *initid, UDF_ARGS *args, char *result,
90 unsigned long *length, char *is_null, char *error)
91 {
92 int i;
93 char buf[256];
94
95
96 if (args->arg_count != 1 || args->arg_type[0] != STRING_RESULT) {
97 *error = 1;
98 return NULL;
99 }
100
101 if(!args->args[0]) { /* NULL argument */
102 *is_null = 1;
103 return NULL;
104 }
105 if(args->lengths[0] >= sizeof(buf)) { /* ridiculous argument */
106 *error = 1;
107 return NULL;
108 }
109
110 /* need nul terminated string */
111 strncpy(buf, args->args[0], args->lengths[0]);
112 buf[args->lengths[0]] = 0;
113
114 i = inet_pton(AF_INET6, buf, result);
115
116 if(i != 1) { /* bad input */
117 *is_null = 1;
118 return NULL;
119 }
120
121 *length = 16;
122 return result;
123 }
0 #!/usr/bin/perl
1 # -*- perl -*-
2 # $Header: /home/johnl/hack/dmarc/RCS/rddmarc,v 1.5 2013/05/12 17:08:20 johnl Exp johnl $
3 #
4 # Script to read DMARC aggregate reports and put summary info
5 # into a database
6
7 # Options:
8 # -d print debug info
9 # -x read XML files rather than mail messages
10 # -r replace existing report rather than failing
11 # -u database user
12 # -p database password
13 # -n database name
14
15 # Copyright 2012-2013, Taughannock Networks. All rights reserved.
16
17 # Redistribution and use in source and binary forms, with or without
18 # modification, are permitted provided that the following conditions
19 # are met:
20
21 # Redistributions of source code must retain the above copyright
22 # notice, this list of conditions and the following disclaimer.
23
24 # Redistributions in binary form must reproduce the above copyright
25 # notice, this list of conditions and the following disclaimer in the
26 # documentation and/or other materials provided with the distribution.
27
28 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
35 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
36 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
38 # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39 # POSSIBILITY OF SUCH DAMAGE.
40
41 use strict;
42 use Getopt::Std;
43 use MIME::Parser;
44 use MIME::Words qw(:all);
45 use XML::Simple;
46 use DBI;
47 use Socket qw{:addrinfo inet_ntop inet_pton AF_INET6 AF_INET};
48 use PerlIO::gzip;
49
50 use vars qw{$opt_d $opt_r $opt_x $opt_u $opt_p $opt_n};
51
52 getopts('drxu:p:n:');
53 if (!defined($opt_u)) {
54 $opt_u = "opendmarc";
55 }
56 if (!defined($opt_p)) {
57 $opt_p = "opendmarc";
58 }
59 if (!defined($opt_n)) {
60 $opt_n = "opendmarc";
61 }
62
63 my $dbh = DBI->connect("DBI:mysql:database=$opt_n", $opt_u, $opt_p)
64 or die "Cannot connect to database\n";
65
66 foreach my $i (@ARGV) {
67 my ($zip, $ent, $isgzip);
68
69 print "parsing $i\n";
70
71 if($opt_x) {
72 open(XML, $i) or die "Cannot open XML file $i";
73 } else {
74 my $parser = new MIME::Parser;
75 $parser->output_dir("/tmp");
76
77 $ent = $parser->parse_open($i);
78
79 my $body = $ent->bodyhandle;
80 $zip = $body;
81 my $mtype = $ent->mime_type;
82 my $subj = decode_mimewords($ent->get('subject'));
83 print " $subj";
84 # if multipart/whatever, look through the parts to find a ZIP
85 if(lc $mtype =~ "multipart/") {
86 print "Look through $mtype\n";
87 $zip = undef;
88 my $npart = $ent->parts;
89 for my $n (0..($npart-1)) {
90 my $part = $ent->parts($n);
91 if(lc $part->mime_type eq "application/gzip") {
92 $zip = $part->bodyhandle;
93 $isgzip = 1;
94 last;
95 } elsif(lc $part->mime_type eq "application/zip"
96 or lc $part->mime_type eq "application/x-zip-compressed"
97 or lc $part->mime_type eq "application/octet-stream") {
98 $zip = $part->bodyhandle;
99 last;
100 } else {
101 $part->bodyhandle->purge; # not useful
102 }
103 }
104 die "no zip" unless $zip;
105 } elsif(lc $mtype ne "application/zip") {
106 print "don't understand $mtype\n";
107 next;
108 }
109 if(defined($zip->path)) {
110 print "body is in " . $zip->path . "\n" if $opt_d;
111 } else {
112 print "body is nowhere\n";
113 next;
114 }
115 if($isgzip) {
116 open(XML, "<:gzip", $zip->path)
117 or die "cannot ungzip $zip->path";
118 } else {
119 open(XML,"unzip -p " . $zip->path . " |")
120 or die "cannot unzip $zip->path";
121 }
122 }
123 my $xml = "";
124 $xml .= $_ while <XML>;
125 close XML;
126 $ent->purge if $ent;
127 $zip->purge if $zip;
128
129 my $xs = XML::Simple->new();
130
131 print "XML is ======\n$xml\n=====\n" if $opt_d;
132
133 my $ref = $xs->XMLin($xml);
134 my %xml = %{$ref};
135 #print join "\n",keys %xml;
136 #print "\n";
137 my $from = $xml{'report_metadata'}->{'date_range'}->{'begin'};
138 my $to = $xml{'report_metadata'}->{'date_range'}->{'end'};
139 my $org = $xml{'report_metadata'}->{'org_name'};
140 my $id = $xml{'report_metadata'}->{'report_id'};
141 my $domain = $xml{'policy_published'}->{'domain'};
142 print "report $org ($id) $from to $to for $domain\n" if $opt_d;
143 # see if already stored
144 my ($xorg, $xid, $serial) = $dbh->selectrow_array(qq{SELECT org,reportid,serial FROM report WHERE reportid=?}, undef, $id);
145 if($xorg) {
146 if($opt_r) {
147 print "Replacing $xorg $xid\n";
148 $dbh->do(qq{DELETE from rptrecord WHERE serial=?}, undef, $serial)
149 or die "cannot delete old records" . $dbh->errstr;
150 } else {
151 print "Already have $xorg $xid, skipped\n";
152 next;
153 }
154 }
155
156 my $sql = qq{INSERT INTO report(serial,mindate,maxdate,domain,org,reportid)
157 VALUES(NULL,FROM_UNIXTIME(?),FROM_UNIXTIME(?),?,?,?)};
158 $sql = qq{REPLACE INTO report(serial,mindate,maxdate,domain,org,reportid)
159 VALUES('$serial',FROM_UNIXTIME(?),FROM_UNIXTIME(?),?,?,?)} if $xorg;
160
161 $dbh->do($sql, undef, $from, $to, $domain, $org, $id)
162 or die "cannot make report" . $dbh->errstr;
163 $serial = $dbh->{'mysql_insertid'} || $dbh->{'insertid'} unless $xorg;
164 print " serial $serial ";
165 my $record = $xml{'record'};
166 sub dorow($$) {
167 my ($serial,$recp) = @_;
168 my %r = %$recp;
169
170 my $ip = $r{'row'}->{'source_ip'};
171 my $count = $r{'row'}->{'count'};
172 my $disp = $r{'row'}->{'policy_evaluated'}->{'disposition'};
173 print "\nip $ip, count $count, disp $disp" if $opt_d;
174 my ($dkim, $dkimresult, $spf, $spfresult, $reason);
175 my $rp = $r{'auth_results'}->{'dkim'};
176 printf " rp $rp\n" if $opt_d;
177 if(ref $rp eq "HASH") {
178 $dkim = $rp->{'domain'};
179 $dkim = undef if ref $dkim eq "HASH";
180 $dkimresult = $rp->{'result'};
181 } else { # array
182 # glom sigs together, report first result
183 $dkim = join '/',map { my $d = $_->{'domain'}; ref $d eq "HASH"?"": $d } @$rp;
184 $dkimresult = $rp->[0]->{'result'};
185 }
186 $rp = $r{'auth_results'}->{'spf'};
187 if(ref $rp eq "HASH") {
188 $spf = $rp->{'domain'};
189 $spfresult = $rp->{'result'};
190 } else { # array
191 # glom domains together, report first result
192 $spf = join '/',map { my $d = $_->{'domain'}; ref $d eq "HASH"? "": $d } @$rp;
193 $spfresult = $rp->[0]->{'result'};
194 }
195
196 $rp = $r{'row'}->{'policy_evaluated'}->{'reason'};
197 if(ref $rp eq "HASH") {
198 $reason = $rp->{'type'};
199 } else {
200 $reason = join '/',map { $_->{'type'} } @$rp;
201 }
202 #print "ip=$ip, count=$count, disp=$disp, r=$reason,";
203 #print "dkim=$dkim/$dkimresult, spf=$spf/$spfresult\n";
204 # figure out if it's IPv4 or IPv6
205 my ($nip, $iptype, $ipval);
206 if($nip = inet_pton(AF_INET, $ip)) {
207 $ipval = unpack "N", $nip;
208 $iptype = "ip";
209 } elsif($nip = inet_pton(AF_INET6, $ip)) {
210 $ipval = "X'" . unpack("H*",$nip) . "'";
211 $iptype = "ip6";
212 } else {
213 print "??? mystery ip $ip\n";
214 next;
215 }
216 print "$iptype = $ipval\n" if $opt_d;
217 $dbh->do(qq{INSERT INTO rptrecord(serial,$iptype,rcount,disposition,reason,dkimdomain,dkimresult,spfdomain,spfresult)
218 VALUES(?,$ipval,?,?,?,?,?,?,?)},undef, $serial,$count,$disp,$reason,$dkim,$dkimresult,$spf,$spfresult)
219 or die "cannot insert record " . $dbh->{'mysql_error'};
220 } # dorow
221
222 if(ref $record eq "HASH") {
223 print "single record\n";
224 dorow($serial,$record);
225 } elsif(ref $record eq "ARRAY") {
226 print "multi record\n";
227 foreach my $row (@$record) {
228 dorow($serial,$row);
229 }
230 } else {
231 print "mystery type " . ref($record) . "\n";
232 }
233 }
234
0 # Copyright (c) 2015, The Trusted Domain Project. All rights reserved.
1
2 AUTOMAKE_OPTIONS = foreign
3
4 dist_doc_DATA = opendmarc.service.in
5
6 EXTRA_DIST = opendmarc.service
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2015, The Trusted Domain Project. All rights reserved.
17
18 VPATH = @srcdir@
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = contrib/service
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(srcdir)/opendmarc.service.in $(dist_doc_DATA)
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES = opendmarc.service
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 am__can_run_installinfo = \
111 case $$AM_UPDATE_INFO_DIR in \
112 n|no|NO) false;; \
113 *) (install-info --version) >/dev/null 2>&1;; \
114 esac
115 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
116 am__vpath_adj = case $$p in \
117 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
118 *) f=$$p;; \
119 esac;
120 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
121 am__install_max = 40
122 am__nobase_strip_setup = \
123 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
124 am__nobase_strip = \
125 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
126 am__nobase_list = $(am__nobase_strip_setup); \
127 for p in $$list; do echo "$$p $$p"; done | \
128 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
129 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
130 if (++n[$$2] == $(am__install_max)) \
131 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
132 END { for (dir in files) print dir, files[dir] }'
133 am__base_list = \
134 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
135 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
136 am__uninstall_files_from_dir = { \
137 test -z "$$files" \
138 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
139 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
140 $(am__cd) "$$dir" && rm -f $$files; }; \
141 }
142 am__installdirs = "$(DESTDIR)$(docdir)"
143 DATA = $(dist_doc_DATA)
144 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
145 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
146 ACLOCAL = @ACLOCAL@
147 AMTAR = @AMTAR@
148 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
149 AR = @AR@
150 AUTOCONF = @AUTOCONF@
151 AUTOHEADER = @AUTOHEADER@
152 AUTOMAKE = @AUTOMAKE@
153 AWK = @AWK@
154 CC = @CC@
155 CCDEPMODE = @CCDEPMODE@
156 CFLAGS = @CFLAGS@
157 CPP = @CPP@
158 CPPFLAGS = @CPPFLAGS@
159 CYGPATH_W = @CYGPATH_W@
160 DEFS = @DEFS@
161 DEPDIR = @DEPDIR@
162 DLLTOOL = @DLLTOOL@
163 DSYMUTIL = @DSYMUTIL@
164 DUMPBIN = @DUMPBIN@
165 ECHO_C = @ECHO_C@
166 ECHO_N = @ECHO_N@
167 ECHO_T = @ECHO_T@
168 EGREP = @EGREP@
169 EXEEXT = @EXEEXT@
170 FGREP = @FGREP@
171 GREP = @GREP@
172 HEX_VERSION = @HEX_VERSION@
173 INSTALL = @INSTALL@
174 INSTALL_DATA = @INSTALL_DATA@
175 INSTALL_PROGRAM = @INSTALL_PROGRAM@
176 INSTALL_SCRIPT = @INSTALL_SCRIPT@
177 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
178 LD = @LD@
179 LDFLAGS = @LDFLAGS@
180 LIBDMARC_DIR = @LIBDMARC_DIR@
181 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
182 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
183 LIBMILTER_LIBS = @LIBMILTER_LIBS@
184 LIBOBJS = @LIBOBJS@
185 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
186 LIBRESOLV = @LIBRESOLV@
187 LIBS = @LIBS@
188 LIBTOOL = @LIBTOOL@
189 LIPO = @LIPO@
190 LN_S = @LN_S@
191 LTLIBOBJS = @LTLIBOBJS@
192 MAKEINFO = @MAKEINFO@
193 MANIFEST_TOOL = @MANIFEST_TOOL@
194 MKDIR_P = @MKDIR_P@
195 NM = @NM@
196 NMEDIT = @NMEDIT@
197 OBJDUMP = @OBJDUMP@
198 OBJEXT = @OBJEXT@
199 OTOOL = @OTOOL@
200 OTOOL64 = @OTOOL64@
201 PACKAGE = @PACKAGE@
202 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203 PACKAGE_NAME = @PACKAGE_NAME@
204 PACKAGE_STRING = @PACKAGE_STRING@
205 PACKAGE_TARNAME = @PACKAGE_TARNAME@
206 PACKAGE_URL = @PACKAGE_URL@
207 PACKAGE_VERSION = @PACKAGE_VERSION@
208 PATH_SEPARATOR = @PATH_SEPARATOR@
209 PKG_CONFIG = @PKG_CONFIG@
210 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
211 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
212 PTHREAD_CC = @PTHREAD_CC@
213 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
214 PTHREAD_LIBS = @PTHREAD_LIBS@
215 RANLIB = @RANLIB@
216 SED = @SED@
217 SET_MAKE = @SET_MAKE@
218 SHELL = @SHELL@
219 SQL_BACKEND = @SQL_BACKEND@
220 STRIP = @STRIP@
221 SYSCONFDIR = @SYSCONFDIR@
222 VERSION = @VERSION@
223 abs_builddir = @abs_builddir@
224 abs_srcdir = @abs_srcdir@
225 abs_top_builddir = @abs_top_builddir@
226 abs_top_srcdir = @abs_top_srcdir@
227 ac_aux_dir = @ac_aux_dir@
228 ac_ct_AR = @ac_ct_AR@
229 ac_ct_CC = @ac_ct_CC@
230 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
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 ax_pthread_config = @ax_pthread_config@
237 bindir = @bindir@
238 build = @build@
239 build_alias = @build_alias@
240 build_cpu = @build_cpu@
241 build_os = @build_os@
242 build_vendor = @build_vendor@
243 builddir = @builddir@
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 miltertest = @miltertest@
264 mkdir_p = @mkdir_p@
265 oldincludedir = @oldincludedir@
266 pdfdir = @pdfdir@
267 prefix = @prefix@
268 program_transform_name = @program_transform_name@
269 psdir = @psdir@
270 sbindir = @sbindir@
271 sharedstatedir = @sharedstatedir@
272 srcdir = @srcdir@
273 sysconfdir = @sysconfdir@
274 target_alias = @target_alias@
275 top_build_prefix = @top_build_prefix@
276 top_builddir = @top_builddir@
277 top_srcdir = @top_srcdir@
278 AUTOMAKE_OPTIONS = foreign
279 dist_doc_DATA = opendmarc.service.in
280 EXTRA_DIST = opendmarc.service
281 all: all-am
282
283 .SUFFIXES:
284 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
285 @for dep in $?; do \
286 case '$(am__configure_deps)' in \
287 *$$dep*) \
288 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
289 && { if test -f $@; then exit 0; else break; fi; }; \
290 exit 1;; \
291 esac; \
292 done; \
293 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/service/Makefile'; \
294 $(am__cd) $(top_srcdir) && \
295 $(AUTOMAKE) --foreign contrib/service/Makefile
296 .PRECIOUS: Makefile
297 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
298 @case '$?' in \
299 *config.status*) \
300 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
301 *) \
302 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
303 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
304 esac;
305
306 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
307 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
308
309 $(top_srcdir)/configure: $(am__configure_deps)
310 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
311 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
312 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
313 $(am__aclocal_m4_deps):
314 opendmarc.service: $(top_builddir)/config.status $(srcdir)/opendmarc.service.in
315 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
316
317 mostlyclean-libtool:
318 -rm -f *.lo
319
320 clean-libtool:
321 -rm -rf .libs _libs
322 install-dist_docDATA: $(dist_doc_DATA)
323 @$(NORMAL_INSTALL)
324 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
325 if test -n "$$list"; then \
326 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
327 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
328 fi; \
329 for p in $$list; do \
330 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
331 echo "$$d$$p"; \
332 done | $(am__base_list) | \
333 while read files; do \
334 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
335 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
336 done
337
338 uninstall-dist_docDATA:
339 @$(NORMAL_UNINSTALL)
340 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
341 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
342 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
343 tags TAGS:
344
345 ctags CTAGS:
346
347 cscope cscopelist:
348
349
350 distdir: $(DISTFILES)
351 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
352 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
353 list='$(DISTFILES)'; \
354 dist_files=`for file in $$list; do echo $$file; done | \
355 sed -e "s|^$$srcdirstrip/||;t" \
356 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
357 case $$dist_files in \
358 */*) $(MKDIR_P) `echo "$$dist_files" | \
359 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
360 sort -u` ;; \
361 esac; \
362 for file in $$dist_files; do \
363 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
364 if test -d $$d/$$file; then \
365 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
366 if test -d "$(distdir)/$$file"; then \
367 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
368 fi; \
369 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
370 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
371 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
372 fi; \
373 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
374 else \
375 test -f "$(distdir)/$$file" \
376 || cp -p $$d/$$file "$(distdir)/$$file" \
377 || exit 1; \
378 fi; \
379 done
380 check-am: all-am
381 check: check-am
382 all-am: Makefile $(DATA)
383 installdirs:
384 for dir in "$(DESTDIR)$(docdir)"; do \
385 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
386 done
387 install: install-am
388 install-exec: install-exec-am
389 install-data: install-data-am
390 uninstall: uninstall-am
391
392 install-am: all-am
393 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
394
395 installcheck: installcheck-am
396 install-strip:
397 if test -z '$(STRIP)'; then \
398 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
399 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
400 install; \
401 else \
402 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
403 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
404 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
405 fi
406 mostlyclean-generic:
407
408 clean-generic:
409
410 distclean-generic:
411 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
412 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
413
414 maintainer-clean-generic:
415 @echo "This command is intended for maintainers to use"
416 @echo "it deletes files that may require special tools to rebuild."
417 clean: clean-am
418
419 clean-am: clean-generic clean-libtool mostlyclean-am
420
421 distclean: distclean-am
422 -rm -f Makefile
423 distclean-am: clean-am distclean-generic
424
425 dvi: dvi-am
426
427 dvi-am:
428
429 html: html-am
430
431 html-am:
432
433 info: info-am
434
435 info-am:
436
437 install-data-am: install-dist_docDATA
438
439 install-dvi: install-dvi-am
440
441 install-dvi-am:
442
443 install-exec-am:
444
445 install-html: install-html-am
446
447 install-html-am:
448
449 install-info: install-info-am
450
451 install-info-am:
452
453 install-man:
454
455 install-pdf: install-pdf-am
456
457 install-pdf-am:
458
459 install-ps: install-ps-am
460
461 install-ps-am:
462
463 installcheck-am:
464
465 maintainer-clean: maintainer-clean-am
466 -rm -f Makefile
467 maintainer-clean-am: distclean-am maintainer-clean-generic
468
469 mostlyclean: mostlyclean-am
470
471 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
472
473 pdf: pdf-am
474
475 pdf-am:
476
477 ps: ps-am
478
479 ps-am:
480
481 uninstall-am: uninstall-dist_docDATA
482
483 .MAKE: install-am install-strip
484
485 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
486 cscopelist-am ctags-am distclean distclean-generic \
487 distclean-libtool distdir dvi dvi-am html html-am info info-am \
488 install install-am install-data install-data-am \
489 install-dist_docDATA install-dvi install-dvi-am install-exec \
490 install-exec-am install-html install-html-am install-info \
491 install-info-am install-man install-pdf install-pdf-am \
492 install-ps install-ps-am install-strip installcheck \
493 installcheck-am installdirs maintainer-clean \
494 maintainer-clean-generic mostlyclean mostlyclean-generic \
495 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
496 uninstall-am uninstall-dist_docDATA
497
498
499 # Tell versions [3.59,3.63) of GNU make to not export all variables.
500 # Otherwise a system limit (for SysV at least) may be exceeded.
501 .NOEXPORT:
0 [Unit]
1 Description=Domain-based Message Authentication, Reporting & Conformance (DMARC) Milter
2 Documentation=man:opendmarc(8) man:opendmarc.conf(5) man:opendmarc-import(8) man:opendmarc-reports(8) http://www.trusteddomain.org/opendmarc/
3 After=network.target nss-lookup.target syslog.target
4
5 [Service]
6 Type=forking
7 PIDFile=${prefix}/var/run/opendmarc/opendmarc.pid
8 EnvironmentFile=-${prefix}/etc/sysconfig/opendmarc
9 ExecStart=${exec_prefix}/sbin/opendmarc $OPTIONS
10 ExecReload=/bin/kill -USR1 $MAINPID
11 User=opendmarc
12 Group=opendmarc
13
14 [Install]
15 WantedBy=multi-user.target
0 [Unit]
1 Description=Domain-based Message Authentication, Reporting & Conformance (DMARC) Milter
2 Documentation=man:opendmarc(8) man:opendmarc.conf(5) man:opendmarc-import(8) man:opendmarc-reports(8) http://www.trusteddomain.org/opendmarc/
3 After=network.target nss-lookup.target syslog.target
4
5 [Service]
6 Type=forking
7 PIDFile=@localstatedir@/run/opendmarc/opendmarc.pid
8 EnvironmentFile=-@sysconfdir@/sysconfig/opendmarc
9 ExecStart=@sbindir@/opendmarc $OPTIONS
10 ExecReload=/bin/kill -USR1 $MAINPID
11 User=opendmarc
12 Group=opendmarc
13
14 [Install]
15 WantedBy=multi-user.target
0 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1 #
2
3 AUTOMAKE_OPTIONS = foreign
4
5 dist_doc_DATA = opendmarc.spec.in
6
7 EXTRA_DIST = opendmarc.spec
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
17 #
18
19 VPATH = @srcdir@
20 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
21 am__make_running_with_option = \
22 case $${target_option-} in \
23 ?) ;; \
24 *) echo "am__make_running_with_option: internal error: invalid" \
25 "target option '$${target_option-}' specified" >&2; \
26 exit 1;; \
27 esac; \
28 has_opt=no; \
29 sane_makeflags=$$MAKEFLAGS; \
30 if $(am__is_gnu_make); then \
31 sane_makeflags=$$MFLAGS; \
32 else \
33 case $$MAKEFLAGS in \
34 *\\[\ \ ]*) \
35 bs=\\; \
36 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
37 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
38 esac; \
39 fi; \
40 skip_next=no; \
41 strip_trailopt () \
42 { \
43 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
44 }; \
45 for flg in $$sane_makeflags; do \
46 test $$skip_next = yes && { skip_next=no; continue; }; \
47 case $$flg in \
48 *=*|--*) continue;; \
49 -*I) strip_trailopt 'I'; skip_next=yes;; \
50 -*I?*) strip_trailopt 'I';; \
51 -*O) strip_trailopt 'O'; skip_next=yes;; \
52 -*O?*) strip_trailopt 'O';; \
53 -*l) strip_trailopt 'l'; skip_next=yes;; \
54 -*l?*) strip_trailopt 'l';; \
55 -[dEDm]) skip_next=yes;; \
56 -[JT]) skip_next=yes;; \
57 esac; \
58 case $$flg in \
59 *$$target_option*) has_opt=yes; break;; \
60 esac; \
61 done; \
62 test $$has_opt = yes
63 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
64 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = contrib/spec
84 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
85 $(srcdir)/opendmarc.spec.in $(dist_doc_DATA)
86 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
87 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
88 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
89 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
90 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
91 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
92 $(ACLOCAL_M4)
93 mkinstalldirs = $(install_sh) -d
94 CONFIG_HEADER = $(top_builddir)/build-config.h
95 CONFIG_CLEAN_FILES = opendmarc.spec
96 CONFIG_CLEAN_VPATH_FILES =
97 AM_V_P = $(am__v_P_@AM_V@)
98 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
99 am__v_P_0 = false
100 am__v_P_1 = :
101 AM_V_GEN = $(am__v_GEN_@AM_V@)
102 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
103 am__v_GEN_0 = @echo " GEN " $@;
104 am__v_GEN_1 =
105 AM_V_at = $(am__v_at_@AM_V@)
106 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
107 am__v_at_0 = @
108 am__v_at_1 =
109 SOURCES =
110 DIST_SOURCES =
111 am__can_run_installinfo = \
112 case $$AM_UPDATE_INFO_DIR in \
113 n|no|NO) false;; \
114 *) (install-info --version) >/dev/null 2>&1;; \
115 esac
116 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
117 am__vpath_adj = case $$p in \
118 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
119 *) f=$$p;; \
120 esac;
121 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
122 am__install_max = 40
123 am__nobase_strip_setup = \
124 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
125 am__nobase_strip = \
126 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
127 am__nobase_list = $(am__nobase_strip_setup); \
128 for p in $$list; do echo "$$p $$p"; done | \
129 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
130 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
131 if (++n[$$2] == $(am__install_max)) \
132 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
133 END { for (dir in files) print dir, files[dir] }'
134 am__base_list = \
135 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
136 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
137 am__uninstall_files_from_dir = { \
138 test -z "$$files" \
139 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
140 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
141 $(am__cd) "$$dir" && rm -f $$files; }; \
142 }
143 am__installdirs = "$(DESTDIR)$(docdir)"
144 DATA = $(dist_doc_DATA)
145 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
146 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
147 ACLOCAL = @ACLOCAL@
148 AMTAR = @AMTAR@
149 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
150 AR = @AR@
151 AUTOCONF = @AUTOCONF@
152 AUTOHEADER = @AUTOHEADER@
153 AUTOMAKE = @AUTOMAKE@
154 AWK = @AWK@
155 CC = @CC@
156 CCDEPMODE = @CCDEPMODE@
157 CFLAGS = @CFLAGS@
158 CPP = @CPP@
159 CPPFLAGS = @CPPFLAGS@
160 CYGPATH_W = @CYGPATH_W@
161 DEFS = @DEFS@
162 DEPDIR = @DEPDIR@
163 DLLTOOL = @DLLTOOL@
164 DSYMUTIL = @DSYMUTIL@
165 DUMPBIN = @DUMPBIN@
166 ECHO_C = @ECHO_C@
167 ECHO_N = @ECHO_N@
168 ECHO_T = @ECHO_T@
169 EGREP = @EGREP@
170 EXEEXT = @EXEEXT@
171 FGREP = @FGREP@
172 GREP = @GREP@
173 HEX_VERSION = @HEX_VERSION@
174 INSTALL = @INSTALL@
175 INSTALL_DATA = @INSTALL_DATA@
176 INSTALL_PROGRAM = @INSTALL_PROGRAM@
177 INSTALL_SCRIPT = @INSTALL_SCRIPT@
178 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
179 LD = @LD@
180 LDFLAGS = @LDFLAGS@
181 LIBDMARC_DIR = @LIBDMARC_DIR@
182 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
183 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
184 LIBMILTER_LIBS = @LIBMILTER_LIBS@
185 LIBOBJS = @LIBOBJS@
186 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
187 LIBRESOLV = @LIBRESOLV@
188 LIBS = @LIBS@
189 LIBTOOL = @LIBTOOL@
190 LIPO = @LIPO@
191 LN_S = @LN_S@
192 LTLIBOBJS = @LTLIBOBJS@
193 MAKEINFO = @MAKEINFO@
194 MANIFEST_TOOL = @MANIFEST_TOOL@
195 MKDIR_P = @MKDIR_P@
196 NM = @NM@
197 NMEDIT = @NMEDIT@
198 OBJDUMP = @OBJDUMP@
199 OBJEXT = @OBJEXT@
200 OTOOL = @OTOOL@
201 OTOOL64 = @OTOOL64@
202 PACKAGE = @PACKAGE@
203 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
204 PACKAGE_NAME = @PACKAGE_NAME@
205 PACKAGE_STRING = @PACKAGE_STRING@
206 PACKAGE_TARNAME = @PACKAGE_TARNAME@
207 PACKAGE_URL = @PACKAGE_URL@
208 PACKAGE_VERSION = @PACKAGE_VERSION@
209 PATH_SEPARATOR = @PATH_SEPARATOR@
210 PKG_CONFIG = @PKG_CONFIG@
211 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
212 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
213 PTHREAD_CC = @PTHREAD_CC@
214 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
215 PTHREAD_LIBS = @PTHREAD_LIBS@
216 RANLIB = @RANLIB@
217 SED = @SED@
218 SET_MAKE = @SET_MAKE@
219 SHELL = @SHELL@
220 SQL_BACKEND = @SQL_BACKEND@
221 STRIP = @STRIP@
222 SYSCONFDIR = @SYSCONFDIR@
223 VERSION = @VERSION@
224 abs_builddir = @abs_builddir@
225 abs_srcdir = @abs_srcdir@
226 abs_top_builddir = @abs_top_builddir@
227 abs_top_srcdir = @abs_top_srcdir@
228 ac_aux_dir = @ac_aux_dir@
229 ac_ct_AR = @ac_ct_AR@
230 ac_ct_CC = @ac_ct_CC@
231 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
232 am__include = @am__include@
233 am__leading_dot = @am__leading_dot@
234 am__quote = @am__quote@
235 am__tar = @am__tar@
236 am__untar = @am__untar@
237 ax_pthread_config = @ax_pthread_config@
238 bindir = @bindir@
239 build = @build@
240 build_alias = @build_alias@
241 build_cpu = @build_cpu@
242 build_os = @build_os@
243 build_vendor = @build_vendor@
244 builddir = @builddir@
245 datadir = @datadir@
246 datarootdir = @datarootdir@
247 docdir = @docdir@
248 dvidir = @dvidir@
249 exec_prefix = @exec_prefix@
250 host = @host@
251 host_alias = @host_alias@
252 host_cpu = @host_cpu@
253 host_os = @host_os@
254 host_vendor = @host_vendor@
255 htmldir = @htmldir@
256 includedir = @includedir@
257 infodir = @infodir@
258 install_sh = @install_sh@
259 libdir = @libdir@
260 libexecdir = @libexecdir@
261 localedir = @localedir@
262 localstatedir = @localstatedir@
263 mandir = @mandir@
264 miltertest = @miltertest@
265 mkdir_p = @mkdir_p@
266 oldincludedir = @oldincludedir@
267 pdfdir = @pdfdir@
268 prefix = @prefix@
269 program_transform_name = @program_transform_name@
270 psdir = @psdir@
271 sbindir = @sbindir@
272 sharedstatedir = @sharedstatedir@
273 srcdir = @srcdir@
274 sysconfdir = @sysconfdir@
275 target_alias = @target_alias@
276 top_build_prefix = @top_build_prefix@
277 top_builddir = @top_builddir@
278 top_srcdir = @top_srcdir@
279 AUTOMAKE_OPTIONS = foreign
280 dist_doc_DATA = opendmarc.spec.in
281 EXTRA_DIST = opendmarc.spec
282 all: all-am
283
284 .SUFFIXES:
285 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
286 @for dep in $?; do \
287 case '$(am__configure_deps)' in \
288 *$$dep*) \
289 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
290 && { if test -f $@; then exit 0; else break; fi; }; \
291 exit 1;; \
292 esac; \
293 done; \
294 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/spec/Makefile'; \
295 $(am__cd) $(top_srcdir) && \
296 $(AUTOMAKE) --foreign contrib/spec/Makefile
297 .PRECIOUS: Makefile
298 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
299 @case '$?' in \
300 *config.status*) \
301 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
302 *) \
303 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
304 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
305 esac;
306
307 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
308 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
309
310 $(top_srcdir)/configure: $(am__configure_deps)
311 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
312 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
313 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
314 $(am__aclocal_m4_deps):
315 opendmarc.spec: $(top_builddir)/config.status $(srcdir)/opendmarc.spec.in
316 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
317
318 mostlyclean-libtool:
319 -rm -f *.lo
320
321 clean-libtool:
322 -rm -rf .libs _libs
323 install-dist_docDATA: $(dist_doc_DATA)
324 @$(NORMAL_INSTALL)
325 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
326 if test -n "$$list"; then \
327 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
328 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
329 fi; \
330 for p in $$list; do \
331 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
332 echo "$$d$$p"; \
333 done | $(am__base_list) | \
334 while read files; do \
335 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
336 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
337 done
338
339 uninstall-dist_docDATA:
340 @$(NORMAL_UNINSTALL)
341 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
342 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
343 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
344 tags TAGS:
345
346 ctags CTAGS:
347
348 cscope cscopelist:
349
350
351 distdir: $(DISTFILES)
352 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
353 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
354 list='$(DISTFILES)'; \
355 dist_files=`for file in $$list; do echo $$file; done | \
356 sed -e "s|^$$srcdirstrip/||;t" \
357 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
358 case $$dist_files in \
359 */*) $(MKDIR_P) `echo "$$dist_files" | \
360 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
361 sort -u` ;; \
362 esac; \
363 for file in $$dist_files; do \
364 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
365 if test -d $$d/$$file; then \
366 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
367 if test -d "$(distdir)/$$file"; then \
368 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
369 fi; \
370 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
371 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
372 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
373 fi; \
374 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
375 else \
376 test -f "$(distdir)/$$file" \
377 || cp -p $$d/$$file "$(distdir)/$$file" \
378 || exit 1; \
379 fi; \
380 done
381 check-am: all-am
382 check: check-am
383 all-am: Makefile $(DATA)
384 installdirs:
385 for dir in "$(DESTDIR)$(docdir)"; do \
386 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
387 done
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 if test -z '$(STRIP)'; then \
399 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
400 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
401 install; \
402 else \
403 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
404 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
405 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
406 fi
407 mostlyclean-generic:
408
409 clean-generic:
410
411 distclean-generic:
412 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
413 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
414
415 maintainer-clean-generic:
416 @echo "This command is intended for maintainers to use"
417 @echo "it deletes files that may require special tools to rebuild."
418 clean: clean-am
419
420 clean-am: clean-generic clean-libtool mostlyclean-am
421
422 distclean: distclean-am
423 -rm -f Makefile
424 distclean-am: clean-am distclean-generic
425
426 dvi: dvi-am
427
428 dvi-am:
429
430 html: html-am
431
432 html-am:
433
434 info: info-am
435
436 info-am:
437
438 install-data-am: install-dist_docDATA
439
440 install-dvi: install-dvi-am
441
442 install-dvi-am:
443
444 install-exec-am:
445
446 install-html: install-html-am
447
448 install-html-am:
449
450 install-info: install-info-am
451
452 install-info-am:
453
454 install-man:
455
456 install-pdf: install-pdf-am
457
458 install-pdf-am:
459
460 install-ps: install-ps-am
461
462 install-ps-am:
463
464 installcheck-am:
465
466 maintainer-clean: maintainer-clean-am
467 -rm -f Makefile
468 maintainer-clean-am: distclean-am maintainer-clean-generic
469
470 mostlyclean: mostlyclean-am
471
472 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
473
474 pdf: pdf-am
475
476 pdf-am:
477
478 ps: ps-am
479
480 ps-am:
481
482 uninstall-am: uninstall-dist_docDATA
483
484 .MAKE: install-am install-strip
485
486 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
487 cscopelist-am ctags-am distclean distclean-generic \
488 distclean-libtool distdir dvi dvi-am html html-am info info-am \
489 install install-am install-data install-data-am \
490 install-dist_docDATA install-dvi install-dvi-am install-exec \
491 install-exec-am install-html install-html-am install-info \
492 install-info-am install-man install-pdf install-pdf-am \
493 install-ps install-ps-am install-strip installcheck \
494 installcheck-am installdirs maintainer-clean \
495 maintainer-clean-generic mostlyclean mostlyclean-generic \
496 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
497 uninstall-am uninstall-dist_docDATA
498
499
500 # Tell versions [3.59,3.63) of GNU make to not export all variables.
501 # Otherwise a system limit (for SysV at least) may be exceeded.
502 .NOEXPORT:
0 # Pass --define "BETA 3" to build name-version.0.Beta3.1.arch
1 %define BetaTag %{?BETA:.Beta%{BETA}}
2
3 Summary: DMARC milter and library
4 Name: opendmarc
5 Version: 1.3.2
6 Release: %{?BETA:0%{BetaTag}.}1%{?dist}
7 License: BSD and Sendmail
8 URL: http://http://www.trusteddomain.org/opendmarc.html
9 Group: System Environment/Daemons
10 Requires: lib%{name} = %{version}-%{release}
11 Requires (pre): shadow-utils
12 Requires (post): chkconfig
13 Requires (preun): chkconfig, initscripts
14 Requires (postun): initscripts
15 BuildRequires: sendmail-devel, openssl-devel, libtool, pkgconfig
16 BuildRequires: mysql-devel
17 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}%{BetaTag}.tar.gz
18 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19
20 %description
21 OpenDMARC (Domain-based Message Authentication, Reporting & Conformance)
22 provides an open source library that implements the DMARC verification
23 service plus a milter-based filter application that can plug in to any
24 milter-aware MTA, including sendmail, Postfix, or any other MTA that supports
25 the milter protocol.
26
27 The DMARC sender authentication system is still a draft standard, working
28 towards RFC status.
29
30 %package -n libopendmarc
31 Summary: An open source DMARC library
32 Group: System Environment/Libraries
33
34 %description -n libopendmarc
35 This package contains the library files required for running services built
36 using libopendmarc.
37
38 %package -n libopendmarc-devel
39 Summary: Development files for libopendmarc
40 Group: Development/Libraries
41 Requires: libopendmarc = %{version}-%{release}
42
43 %description -n libopendmarc-devel
44 This package contains the static libraries, headers, and other support files
45 required for developing applications against libopendmarc.
46
47 %prep
48 %setup -q
49
50 %build
51 # Always use system libtool instead of opendkim provided one
52 %global LIBTOOL LIBTOOL=`which libtool`
53
54 %configure
55 make DESTDIR=%{buildroot} %{?_smp_mflags} %{LIBTOOL}
56
57 %install
58 rm -rf %{buildroot}
59
60 make DESTDIR=%{buildroot} install %{?_smp_mflags} %{LIBTOOL}
61 mkdir -p %{buildroot}%{_sysconfdir}
62 mkdir -p %{buildroot}%{_initrddir}
63 install -m 0755 contrib/init/redhat/%{name} %{buildroot}%{_initrddir}/%{name}
64 install -m 0755 opendmarc/%{name}.conf.sample %{buildroot}%{_sysconfdir}/%{name}.conf
65 perl -pi -e 's|^# (HistoryFile /var/run)/(opendmarc.dat)|$1/opendmarc/$2|;
66 s|^# (Socket )|$1|;
67 s|^# (UserID )|$1|;
68 ' %{buildroot}%{_sysconfdir}/%{name}.conf
69
70 install -p -d %{buildroot}%{_sysconfdir}/tmpfiles.d
71 cat > %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf <<EOF
72 D %{_localstatedir}/run/%{name} 0700 %{name} %{name} -
73 EOF
74
75 mv %{buildroot}%{_prefix}/share/doc/%{name} %{buildroot}%{_prefix}/share/doc/%{name}-%{version}
76 rm %{buildroot}%{_libdir}/*.{la,a}
77
78 mkdir -p %{buildroot}%{_includedir}/%{name}
79 install -m 0755 libopendmarc/dmarc.h %{buildroot}%{_includedir}/%{name}/
80
81 mkdir -p %{buildroot}%{_localstatedir}/spool/%{name}
82 mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
83
84
85 %pre
86 getent group %{name} >/dev/null || groupadd -r %{name}
87 getent passwd %{name} >/dev/null || \
88 useradd -r -g %{name} -G mail -d %{_localstatedir}/run/%{name} -s /sbin/nologin \
89 -c "OpenDMARC Milter" %{name}
90 exit 0
91
92 %post
93 /sbin/chkconfig --add %{name} || :
94
95 %post -n libopendmarc -p /sbin/ldconfig
96
97 %preun
98 if [ $1 -eq 0 ]; then
99 service %{name} stop >/dev/null || :
100 /sbin/chkconfig --del %{name} || :
101 fi
102 exit 0
103
104 %postun
105 if [ "$1" -ge "1" ] ; then
106 /sbin/service %{name} condrestart >/dev/null 2>&1 || :
107 fi
108 exit 0
109
110 %postun -n libopendmarc -p /sbin/ldconfig
111
112
113 %clean
114 rm -rf %{buildroot}
115
116 %files
117 %defattr(-,root,root)
118 %doc INSTALL README RELEASE_NOTES docs/draft-dmarc-base-02.txt
119 %doc db/README.schema db/schema.mysql
120 %config(noreplace) %{_sysconfdir}/%{name}.conf
121 %config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
122 %{_initrddir}/%{name}
123 %{_sbindir}/*
124 %{_mandir}/*/*
125 %dir %attr(-,%{name},%{name}) %{_localstatedir}/spool/%{name}
126 %dir %attr(-,%{name},%{name}) %{_localstatedir}/run/%{name}
127
128 %files -n libopendmarc
129 %defattr(-,root,root)
130 %{_libdir}/libopendmarc.so.*
131
132 %files -n libopendmarc-devel
133 %defattr(-,root,root)
134 %doc libopendmarc/docs/*.html
135 %{_includedir}/%{name}
136 %{_libdir}/*.so
0 # Pass --define "BETA 3" to build name-version.0.Beta3.1.arch
1 %define BetaTag %{?BETA:.Beta%{BETA}}
2
3 Summary: DMARC milter and library
4 Name: opendmarc
5 Version: @VERSION@
6 Release: %{?BETA:0%{BetaTag}.}1%{?dist}
7 License: BSD and Sendmail
8 URL: http://http://www.trusteddomain.org/opendmarc.html
9 Group: System Environment/Daemons
10 Requires: lib%{name} = %{version}-%{release}
11 Requires (pre): shadow-utils
12 Requires (post): chkconfig
13 Requires (preun): chkconfig, initscripts
14 Requires (postun): initscripts
15 BuildRequires: sendmail-devel, openssl-devel, libtool, pkgconfig
16 BuildRequires: mysql-devel
17 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}%{BetaTag}.tar.gz
18 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19
20 %description
21 OpenDMARC (Domain-based Message Authentication, Reporting & Conformance)
22 provides an open source library that implements the DMARC verification
23 service plus a milter-based filter application that can plug in to any
24 milter-aware MTA, including sendmail, Postfix, or any other MTA that supports
25 the milter protocol.
26
27 The DMARC sender authentication system is still a draft standard, working
28 towards RFC status.
29
30 %package -n libopendmarc
31 Summary: An open source DMARC library
32 Group: System Environment/Libraries
33
34 %description -n libopendmarc
35 This package contains the library files required for running services built
36 using libopendmarc.
37
38 %package -n libopendmarc-devel
39 Summary: Development files for libopendmarc
40 Group: Development/Libraries
41 Requires: libopendmarc = %{version}-%{release}
42
43 %description -n libopendmarc-devel
44 This package contains the static libraries, headers, and other support files
45 required for developing applications against libopendmarc.
46
47 %prep
48 %setup -q
49
50 %build
51 # Always use system libtool instead of opendkim provided one
52 %global LIBTOOL LIBTOOL=`which libtool`
53
54 %configure
55 make DESTDIR=%{buildroot} %{?_smp_mflags} %{LIBTOOL}
56
57 %install
58 rm -rf %{buildroot}
59
60 make DESTDIR=%{buildroot} install %{?_smp_mflags} %{LIBTOOL}
61 mkdir -p %{buildroot}%{_sysconfdir}
62 mkdir -p %{buildroot}%{_initrddir}
63 install -m 0755 contrib/init/redhat/%{name} %{buildroot}%{_initrddir}/%{name}
64 install -m 0755 opendmarc/%{name}.conf.sample %{buildroot}%{_sysconfdir}/%{name}.conf
65 perl -pi -e 's|^# (HistoryFile /var/run)/(opendmarc.dat)|$1/opendmarc/$2|;
66 s|^# (Socket )|$1|;
67 s|^# (UserID )|$1|;
68 ' %{buildroot}%{_sysconfdir}/%{name}.conf
69
70 install -p -d %{buildroot}%{_sysconfdir}/tmpfiles.d
71 cat > %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf <<EOF
72 D %{_localstatedir}/run/%{name} 0700 %{name} %{name} -
73 EOF
74
75 mv %{buildroot}%{_prefix}/share/doc/%{name} %{buildroot}%{_prefix}/share/doc/%{name}-%{version}
76 rm %{buildroot}%{_libdir}/*.{la,a}
77
78 mkdir -p %{buildroot}%{_includedir}/%{name}
79 install -m 0755 libopendmarc/dmarc.h %{buildroot}%{_includedir}/%{name}/
80
81 mkdir -p %{buildroot}%{_localstatedir}/spool/%{name}
82 mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
83
84
85 %pre
86 getent group %{name} >/dev/null || groupadd -r %{name}
87 getent passwd %{name} >/dev/null || \
88 useradd -r -g %{name} -G mail -d %{_localstatedir}/run/%{name} -s /sbin/nologin \
89 -c "OpenDMARC Milter" %{name}
90 exit 0
91
92 %post
93 /sbin/chkconfig --add %{name} || :
94
95 %post -n libopendmarc -p /sbin/ldconfig
96
97 %preun
98 if [ $1 -eq 0 ]; then
99 service %{name} stop >/dev/null || :
100 /sbin/chkconfig --del %{name} || :
101 fi
102 exit 0
103
104 %postun
105 if [ "$1" -ge "1" ] ; then
106 /sbin/service %{name} condrestart >/dev/null 2>&1 || :
107 fi
108 exit 0
109
110 %postun -n libopendmarc -p /sbin/ldconfig
111
112
113 %clean
114 rm -rf %{buildroot}
115
116 %files
117 %defattr(-,root,root)
118 %doc INSTALL README RELEASE_NOTES docs/draft-dmarc-base-02.txt
119 %doc db/README.schema db/schema.mysql
120 %config(noreplace) %{_sysconfdir}/%{name}.conf
121 %config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
122 %{_initrddir}/%{name}
123 %{_sbindir}/*
124 %{_mandir}/*/*
125 %dir %attr(-,%{name},%{name}) %{_localstatedir}/spool/%{name}
126 %dir %attr(-,%{name},%{name}) %{_localstatedir}/run/%{name}
127
128 %files -n libopendmarc
129 %defattr(-,root,root)
130 %{_libdir}/libopendmarc.so.*
131
132 %files -n libopendmarc-devel
133 %defattr(-,root,root)
134 %doc libopendmarc/docs/*.html
135 %{_includedir}/%{name}
136 %{_libdir}/*.so
0 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1
2 dist_doc_DATA = README.schema schema.mysql
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
17
18 VPATH = @srcdir@
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = db
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(dist_doc_DATA)
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES =
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 am__can_run_installinfo = \
111 case $$AM_UPDATE_INFO_DIR in \
112 n|no|NO) false;; \
113 *) (install-info --version) >/dev/null 2>&1;; \
114 esac
115 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
116 am__vpath_adj = case $$p in \
117 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
118 *) f=$$p;; \
119 esac;
120 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
121 am__install_max = 40
122 am__nobase_strip_setup = \
123 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
124 am__nobase_strip = \
125 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
126 am__nobase_list = $(am__nobase_strip_setup); \
127 for p in $$list; do echo "$$p $$p"; done | \
128 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
129 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
130 if (++n[$$2] == $(am__install_max)) \
131 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
132 END { for (dir in files) print dir, files[dir] }'
133 am__base_list = \
134 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
135 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
136 am__uninstall_files_from_dir = { \
137 test -z "$$files" \
138 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
139 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
140 $(am__cd) "$$dir" && rm -f $$files; }; \
141 }
142 am__installdirs = "$(DESTDIR)$(docdir)"
143 DATA = $(dist_doc_DATA)
144 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
145 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
146 ACLOCAL = @ACLOCAL@
147 AMTAR = @AMTAR@
148 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
149 AR = @AR@
150 AUTOCONF = @AUTOCONF@
151 AUTOHEADER = @AUTOHEADER@
152 AUTOMAKE = @AUTOMAKE@
153 AWK = @AWK@
154 CC = @CC@
155 CCDEPMODE = @CCDEPMODE@
156 CFLAGS = @CFLAGS@
157 CPP = @CPP@
158 CPPFLAGS = @CPPFLAGS@
159 CYGPATH_W = @CYGPATH_W@
160 DEFS = @DEFS@
161 DEPDIR = @DEPDIR@
162 DLLTOOL = @DLLTOOL@
163 DSYMUTIL = @DSYMUTIL@
164 DUMPBIN = @DUMPBIN@
165 ECHO_C = @ECHO_C@
166 ECHO_N = @ECHO_N@
167 ECHO_T = @ECHO_T@
168 EGREP = @EGREP@
169 EXEEXT = @EXEEXT@
170 FGREP = @FGREP@
171 GREP = @GREP@
172 HEX_VERSION = @HEX_VERSION@
173 INSTALL = @INSTALL@
174 INSTALL_DATA = @INSTALL_DATA@
175 INSTALL_PROGRAM = @INSTALL_PROGRAM@
176 INSTALL_SCRIPT = @INSTALL_SCRIPT@
177 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
178 LD = @LD@
179 LDFLAGS = @LDFLAGS@
180 LIBDMARC_DIR = @LIBDMARC_DIR@
181 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
182 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
183 LIBMILTER_LIBS = @LIBMILTER_LIBS@
184 LIBOBJS = @LIBOBJS@
185 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
186 LIBRESOLV = @LIBRESOLV@
187 LIBS = @LIBS@
188 LIBTOOL = @LIBTOOL@
189 LIPO = @LIPO@
190 LN_S = @LN_S@
191 LTLIBOBJS = @LTLIBOBJS@
192 MAKEINFO = @MAKEINFO@
193 MANIFEST_TOOL = @MANIFEST_TOOL@
194 MKDIR_P = @MKDIR_P@
195 NM = @NM@
196 NMEDIT = @NMEDIT@
197 OBJDUMP = @OBJDUMP@
198 OBJEXT = @OBJEXT@
199 OTOOL = @OTOOL@
200 OTOOL64 = @OTOOL64@
201 PACKAGE = @PACKAGE@
202 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203 PACKAGE_NAME = @PACKAGE_NAME@
204 PACKAGE_STRING = @PACKAGE_STRING@
205 PACKAGE_TARNAME = @PACKAGE_TARNAME@
206 PACKAGE_URL = @PACKAGE_URL@
207 PACKAGE_VERSION = @PACKAGE_VERSION@
208 PATH_SEPARATOR = @PATH_SEPARATOR@
209 PKG_CONFIG = @PKG_CONFIG@
210 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
211 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
212 PTHREAD_CC = @PTHREAD_CC@
213 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
214 PTHREAD_LIBS = @PTHREAD_LIBS@
215 RANLIB = @RANLIB@
216 SED = @SED@
217 SET_MAKE = @SET_MAKE@
218 SHELL = @SHELL@
219 SQL_BACKEND = @SQL_BACKEND@
220 STRIP = @STRIP@
221 SYSCONFDIR = @SYSCONFDIR@
222 VERSION = @VERSION@
223 abs_builddir = @abs_builddir@
224 abs_srcdir = @abs_srcdir@
225 abs_top_builddir = @abs_top_builddir@
226 abs_top_srcdir = @abs_top_srcdir@
227 ac_aux_dir = @ac_aux_dir@
228 ac_ct_AR = @ac_ct_AR@
229 ac_ct_CC = @ac_ct_CC@
230 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
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 ax_pthread_config = @ax_pthread_config@
237 bindir = @bindir@
238 build = @build@
239 build_alias = @build_alias@
240 build_cpu = @build_cpu@
241 build_os = @build_os@
242 build_vendor = @build_vendor@
243 builddir = @builddir@
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 miltertest = @miltertest@
264 mkdir_p = @mkdir_p@
265 oldincludedir = @oldincludedir@
266 pdfdir = @pdfdir@
267 prefix = @prefix@
268 program_transform_name = @program_transform_name@
269 psdir = @psdir@
270 sbindir = @sbindir@
271 sharedstatedir = @sharedstatedir@
272 srcdir = @srcdir@
273 sysconfdir = @sysconfdir@
274 target_alias = @target_alias@
275 top_build_prefix = @top_build_prefix@
276 top_builddir = @top_builddir@
277 top_srcdir = @top_srcdir@
278 dist_doc_DATA = README.schema schema.mysql
279 all: all-am
280
281 .SUFFIXES:
282 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
283 @for dep in $?; do \
284 case '$(am__configure_deps)' in \
285 *$$dep*) \
286 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
287 && { if test -f $@; then exit 0; else break; fi; }; \
288 exit 1;; \
289 esac; \
290 done; \
291 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign db/Makefile'; \
292 $(am__cd) $(top_srcdir) && \
293 $(AUTOMAKE) --foreign db/Makefile
294 .PRECIOUS: Makefile
295 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
296 @case '$?' in \
297 *config.status*) \
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
299 *) \
300 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
301 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
302 esac;
303
304 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
305 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
306
307 $(top_srcdir)/configure: $(am__configure_deps)
308 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
309 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
310 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
311 $(am__aclocal_m4_deps):
312
313 mostlyclean-libtool:
314 -rm -f *.lo
315
316 clean-libtool:
317 -rm -rf .libs _libs
318 install-dist_docDATA: $(dist_doc_DATA)
319 @$(NORMAL_INSTALL)
320 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
321 if test -n "$$list"; then \
322 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
323 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
324 fi; \
325 for p in $$list; do \
326 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
327 echo "$$d$$p"; \
328 done | $(am__base_list) | \
329 while read files; do \
330 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
331 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
332 done
333
334 uninstall-dist_docDATA:
335 @$(NORMAL_UNINSTALL)
336 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
337 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
338 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
339 tags TAGS:
340
341 ctags CTAGS:
342
343 cscope cscopelist:
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 $(DATA)
379 installdirs:
380 for dir in "$(DESTDIR)$(docdir)"; 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 if test -z '$(STRIP)'; then \
394 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
395 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
396 install; \
397 else \
398 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
399 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
400 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
401 fi
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: install-dist_docDATA
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: uninstall-dist_docDATA
478
479 .MAKE: install-am install-strip
480
481 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
482 cscopelist-am ctags-am distclean distclean-generic \
483 distclean-libtool distdir dvi dvi-am html html-am info info-am \
484 install install-am install-data install-data-am \
485 install-dist_docDATA install-dvi install-dvi-am install-exec \
486 install-exec-am install-html install-html-am install-info \
487 install-info-am install-man install-pdf install-pdf-am \
488 install-ps install-ps-am install-strip installcheck \
489 installcheck-am installdirs maintainer-clean \
490 maintainer-clean-generic mostlyclean mostlyclean-generic \
491 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
492 uninstall-am uninstall-dist_docDATA
493
494
495 # Tell versions [3.59,3.63) of GNU make to not export all variables.
496 # Otherwise a system limit (for SysV at least) may be exceeded.
497 .NOEXPORT:
0 This directory contains the OpenDMARC schema plus any related files.
1
2 The tables in this schema are populated by the opendmarc filter as it processes
3 messages and downloads policies. The rows are then consumed by the scripts
4 in the "reports" directory to generate regular aggregate reports.
5
6 The tables are summarized here:
7
8 domains A table that maps domain names to unique integer IDs.
9 Automatically tracks a "first seen" timestamp, and includes
10 a column to record when the last report was sent.
11
12 reporters A table mapping reporting hosts to unique integer IDs.
13 Intended for use by multi-MX systems so it's possible to tell
14 where an inbound message landed.
15
16 ipaddr A table mapping IP addresses (as strings) to unique IDs.
17 Also tracks the "first seen" timestamp for each.
18
19 messages A table tracking salient properties of all messages received.
20 A messages is uniquely identified by a {date, jobid, reporter}
21 tuple. Includes references to the "domains" table to track
22 the RFC5321.MailFrom domain, the RFC5322.From domain.
23 Also records the count of DKIM signatures, the SPF result,
24 and whether or not the SPF result was aligned with the
25 RFC5322.From domain.
26
27 signatures A table tracking DKIM signatures, each of which refers to
28 a rown in the "messages" table. Tracks the signing domain,
29 whether the signature passed, whether there was a verification
30 error other than a broken signature, and whether or not the
31 signing domain aligned with the RFC5322.From domain.
32
33 requests A table containing a cache of DMARC reporting requests.
34 For each domain, the destination reporting URI for aggregate
35 reports is recorded along with a "last report sent" timestamp.
36
37 --
38 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
0 -- OpenDMARC database schema
1 --
2 -- Copyright (c) 2012, 2016, The Trusted Domain Project.
3 -- All rights reserved.
4
5 CREATE DATABASE IF NOT EXISTS opendmarc;
6 USE opendmarc;
7
8 -- A table for mapping domain names and their DMARC policies to IDs
9 CREATE TABLE IF NOT EXISTS domains (
10 id INT NOT NULL AUTO_INCREMENT,
11 name VARCHAR(255) NOT NULL,
12 firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
13
14 PRIMARY KEY(id),
15 UNIQUE KEY(name)
16 );
17
18 -- A table for logging reporting requests
19 CREATE TABLE IF NOT EXISTS requests (
20 id INT NOT NULL AUTO_INCREMENT,
21 domain INT NOT NULL,
22 repuri VARCHAR(255) NOT NULL,
23 adkim TINYINT NOT NULL,
24 aspf TINYINT NOT NULL,
25 policy TINYINT NOT NULL,
26 spolicy TINYINT NOT NULL,
27 pct TINYINT NOT NULL,
28 locked TINYINT NOT NULL DEFAULT '0',
29 firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
30 lastsent TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
31
32 PRIMARY KEY(id),
33 KEY(lastsent),
34 UNIQUE KEY(domain)
35 );
36
37 -- A table for reporting hosts
38 CREATE TABLE IF NOT EXISTS reporters (
39 id INT NOT NULL AUTO_INCREMENT,
40 name VARCHAR(255) NOT NULL,
41 firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
42
43 PRIMARY KEY(id),
44 UNIQUE KEY(name)
45 );
46
47 -- A table for IP addresses
48 CREATE TABLE IF NOT EXISTS ipaddr (
49 id INT NOT NULL AUTO_INCREMENT,
50 addr VARCHAR(64) NOT NULL,
51 firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
52
53 PRIMARY KEY(id),
54 UNIQUE KEY(addr)
55 );
56
57 -- A table for messages
58 CREATE TABLE IF NOT EXISTS messages (
59 id INT NOT NULL AUTO_INCREMENT,
60 date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
61 jobid VARCHAR(128) NOT NULL,
62 reporter INT UNSIGNED NOT NULL,
63 policy TINYINT UNSIGNED NOT NULL,
64 disp TINYINT UNSIGNED NOT NULL,
65 ip INT UNSIGNED NOT NULL,
66 env_domain INT UNSIGNED NOT NULL,
67 from_domain INT UNSIGNED NOT NULL,
68 policy_domain INT UNSIGNED NOT NULL,
69 spf TINYINT NOT NULL,
70 align_dkim TINYINT UNSIGNED NOT NULL,
71 align_spf TINYINT UNSIGNED NOT NULL,
72 sigcount TINYINT UNSIGNED NOT NULL,
73
74 PRIMARY KEY(id),
75 KEY(date),
76 UNIQUE KEY(reporter, date, jobid)
77 );
78
79 -- A table for signatures
80 CREATE TABLE IF NOT EXISTS signatures (
81 id INT NOT NULL AUTO_INCREMENT,
82 message INT NOT NULL,
83 domain INT NOT NULL,
84 pass TINYINT NOT NULL,
85 error TINYINT NOT NULL,
86
87 PRIMARY KEY(id),
88 KEY(message)
89 );
90
91 -- CREATE USER 'opendmarc'@'localhost' IDENTIFIED BY 'changeme';
92 -- GRANT ALL ON opendmarc.* to 'opendmarc'@'localhost';
0 # Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved.
1
2 dist_doc_DATA = README.specs.html
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved.
17
18 VPATH = @srcdir@
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = docs
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(dist_doc_DATA)
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES =
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 am__can_run_installinfo = \
111 case $$AM_UPDATE_INFO_DIR in \
112 n|no|NO) false;; \
113 *) (install-info --version) >/dev/null 2>&1;; \
114 esac
115 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
116 am__vpath_adj = case $$p in \
117 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
118 *) f=$$p;; \
119 esac;
120 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
121 am__install_max = 40
122 am__nobase_strip_setup = \
123 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
124 am__nobase_strip = \
125 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
126 am__nobase_list = $(am__nobase_strip_setup); \
127 for p in $$list; do echo "$$p $$p"; done | \
128 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
129 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
130 if (++n[$$2] == $(am__install_max)) \
131 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
132 END { for (dir in files) print dir, files[dir] }'
133 am__base_list = \
134 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
135 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
136 am__uninstall_files_from_dir = { \
137 test -z "$$files" \
138 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
139 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
140 $(am__cd) "$$dir" && rm -f $$files; }; \
141 }
142 am__installdirs = "$(DESTDIR)$(docdir)"
143 DATA = $(dist_doc_DATA)
144 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
145 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
146 ACLOCAL = @ACLOCAL@
147 AMTAR = @AMTAR@
148 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
149 AR = @AR@
150 AUTOCONF = @AUTOCONF@
151 AUTOHEADER = @AUTOHEADER@
152 AUTOMAKE = @AUTOMAKE@
153 AWK = @AWK@
154 CC = @CC@
155 CCDEPMODE = @CCDEPMODE@
156 CFLAGS = @CFLAGS@
157 CPP = @CPP@
158 CPPFLAGS = @CPPFLAGS@
159 CYGPATH_W = @CYGPATH_W@
160 DEFS = @DEFS@
161 DEPDIR = @DEPDIR@
162 DLLTOOL = @DLLTOOL@
163 DSYMUTIL = @DSYMUTIL@
164 DUMPBIN = @DUMPBIN@
165 ECHO_C = @ECHO_C@
166 ECHO_N = @ECHO_N@
167 ECHO_T = @ECHO_T@
168 EGREP = @EGREP@
169 EXEEXT = @EXEEXT@
170 FGREP = @FGREP@
171 GREP = @GREP@
172 HEX_VERSION = @HEX_VERSION@
173 INSTALL = @INSTALL@
174 INSTALL_DATA = @INSTALL_DATA@
175 INSTALL_PROGRAM = @INSTALL_PROGRAM@
176 INSTALL_SCRIPT = @INSTALL_SCRIPT@
177 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
178 LD = @LD@
179 LDFLAGS = @LDFLAGS@
180 LIBDMARC_DIR = @LIBDMARC_DIR@
181 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
182 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
183 LIBMILTER_LIBS = @LIBMILTER_LIBS@
184 LIBOBJS = @LIBOBJS@
185 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
186 LIBRESOLV = @LIBRESOLV@
187 LIBS = @LIBS@
188 LIBTOOL = @LIBTOOL@
189 LIPO = @LIPO@
190 LN_S = @LN_S@
191 LTLIBOBJS = @LTLIBOBJS@
192 MAKEINFO = @MAKEINFO@
193 MANIFEST_TOOL = @MANIFEST_TOOL@
194 MKDIR_P = @MKDIR_P@
195 NM = @NM@
196 NMEDIT = @NMEDIT@
197 OBJDUMP = @OBJDUMP@
198 OBJEXT = @OBJEXT@
199 OTOOL = @OTOOL@
200 OTOOL64 = @OTOOL64@
201 PACKAGE = @PACKAGE@
202 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203 PACKAGE_NAME = @PACKAGE_NAME@
204 PACKAGE_STRING = @PACKAGE_STRING@
205 PACKAGE_TARNAME = @PACKAGE_TARNAME@
206 PACKAGE_URL = @PACKAGE_URL@
207 PACKAGE_VERSION = @PACKAGE_VERSION@
208 PATH_SEPARATOR = @PATH_SEPARATOR@
209 PKG_CONFIG = @PKG_CONFIG@
210 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
211 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
212 PTHREAD_CC = @PTHREAD_CC@
213 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
214 PTHREAD_LIBS = @PTHREAD_LIBS@
215 RANLIB = @RANLIB@
216 SED = @SED@
217 SET_MAKE = @SET_MAKE@
218 SHELL = @SHELL@
219 SQL_BACKEND = @SQL_BACKEND@
220 STRIP = @STRIP@
221 SYSCONFDIR = @SYSCONFDIR@
222 VERSION = @VERSION@
223 abs_builddir = @abs_builddir@
224 abs_srcdir = @abs_srcdir@
225 abs_top_builddir = @abs_top_builddir@
226 abs_top_srcdir = @abs_top_srcdir@
227 ac_aux_dir = @ac_aux_dir@
228 ac_ct_AR = @ac_ct_AR@
229 ac_ct_CC = @ac_ct_CC@
230 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
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 ax_pthread_config = @ax_pthread_config@
237 bindir = @bindir@
238 build = @build@
239 build_alias = @build_alias@
240 build_cpu = @build_cpu@
241 build_os = @build_os@
242 build_vendor = @build_vendor@
243 builddir = @builddir@
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 miltertest = @miltertest@
264 mkdir_p = @mkdir_p@
265 oldincludedir = @oldincludedir@
266 pdfdir = @pdfdir@
267 prefix = @prefix@
268 program_transform_name = @program_transform_name@
269 psdir = @psdir@
270 sbindir = @sbindir@
271 sharedstatedir = @sharedstatedir@
272 srcdir = @srcdir@
273 sysconfdir = @sysconfdir@
274 target_alias = @target_alias@
275 top_build_prefix = @top_build_prefix@
276 top_builddir = @top_builddir@
277 top_srcdir = @top_srcdir@
278 dist_doc_DATA = README.specs.html
279 all: all-am
280
281 .SUFFIXES:
282 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
283 @for dep in $?; do \
284 case '$(am__configure_deps)' in \
285 *$$dep*) \
286 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
287 && { if test -f $@; then exit 0; else break; fi; }; \
288 exit 1;; \
289 esac; \
290 done; \
291 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
292 $(am__cd) $(top_srcdir) && \
293 $(AUTOMAKE) --foreign docs/Makefile
294 .PRECIOUS: Makefile
295 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
296 @case '$?' in \
297 *config.status*) \
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
299 *) \
300 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
301 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
302 esac;
303
304 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
305 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
306
307 $(top_srcdir)/configure: $(am__configure_deps)
308 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
309 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
310 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
311 $(am__aclocal_m4_deps):
312
313 mostlyclean-libtool:
314 -rm -f *.lo
315
316 clean-libtool:
317 -rm -rf .libs _libs
318 install-dist_docDATA: $(dist_doc_DATA)
319 @$(NORMAL_INSTALL)
320 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
321 if test -n "$$list"; then \
322 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
323 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
324 fi; \
325 for p in $$list; do \
326 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
327 echo "$$d$$p"; \
328 done | $(am__base_list) | \
329 while read files; do \
330 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
331 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
332 done
333
334 uninstall-dist_docDATA:
335 @$(NORMAL_UNINSTALL)
336 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
337 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
338 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
339 tags TAGS:
340
341 ctags CTAGS:
342
343 cscope cscopelist:
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 $(DATA)
379 installdirs:
380 for dir in "$(DESTDIR)$(docdir)"; 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 if test -z '$(STRIP)'; then \
394 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
395 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
396 install; \
397 else \
398 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
399 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
400 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
401 fi
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: install-dist_docDATA
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: uninstall-dist_docDATA
478
479 .MAKE: install-am install-strip
480
481 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
482 cscopelist-am ctags-am distclean distclean-generic \
483 distclean-libtool distdir dvi dvi-am html html-am info info-am \
484 install install-am install-data install-data-am \
485 install-dist_docDATA install-dvi install-dvi-am install-exec \
486 install-exec-am install-html install-html-am install-info \
487 install-info-am install-man install-pdf install-pdf-am \
488 install-ps install-ps-am install-strip installcheck \
489 installcheck-am installdirs maintainer-clean \
490 maintainer-clean-generic mostlyclean mostlyclean-generic \
491 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
492 uninstall-am uninstall-dist_docDATA
493
494
495 # Tell versions [3.59,3.63) of GNU make to not export all variables.
496 # Otherwise a system limit (for SysV at least) may be exceeded.
497 .NOEXPORT:
0 <html>
1 <head>
2 <title>
3 OpenDMARC Reference Documentation
4 </title>
5 </head>
6
7 <body>
8 <p>
9 This page includes links to all standards reference documentation
10 on which OpenDMARC is built.
11 </p>
12
13 <h2> DMARC and Related Protocols </h2>
14 <a href="http://tools.ietf.org/html/rfc7489">
15 RFC7489: Domain-based Message Authentication, Reporting, and Conformance (DMARC) [INFORMATIONAL]
16 </a> <br>
17 <a href="https://tools.ietf.org/html/rfc7208">
18 RFC7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1 [PROPOSED STANDARD]
19 </a> <br>
20
21 <h2> Email Format </h2>
22 <a href="http://tools.ietf.org/html/rfc5322">
23 RFC5322: Internet Message Format [DRAFT STANDARD]
24 </a> <br>
25
26 <h2> Reporting Authentication Results </h2>
27 <a href="http://tools.ietf.org/html/rfc7601">
28 RFC7601: Message Header Field for Indicating Message Authentication
29 Status [PROPOSED STANDARD]
30 </a> <br>
31 <a href="http://tools.ietf.org/html/rfc6577">
32 RFC6577: Authentication-Results Registration Update for Sender
33 Policy Framework (SPF) Results [PROPOSED STANDARD]
34 </a> <br>
35
36 <h2> Abuse Reporting </h2>
37 <a href="http://tools.ietf.org/html/rfc5965">
38 RFC5965: An Extensible Format for Email Feedback Reports
39 [PROPOSED STANDARD]
40 </a> <br>
41 <a href="http://tools.ietf.org/html/rfc6591">
42 RFC6591: Authentication Failure Reporting Using the Abuse Reporting
43 Format [PROPOSED STANDARD]
44 </a> <br>
45
46 <h2> Other Specifications </h2>
47 <a href="http://tools.ietf.org/html/rfc2254">
48 RFC2254: The String Representation of LDAP Search Filters
49 [PROPOSED STANDARD]
50 </a> <br>
51 </body>
52 </html>
0 SUBDIRS=tests docs
1 AM_CPPFLAGS = -I. -I..
2 LDADD = ./libopendmarc.la
3 lib_LTLIBRARIES = libopendmarc.la
4 libopendmarc_la_SOURCES = dmarc.h \
5 opendmarc_dns.c \
6 opendmarc_xml.c \
7 opendmarc_tld.c \
8 opendmarc_policy.c \
9 opendmarc_util.c \
10 opendmarc_hash.c \
11 opendmarc_strl.c \
12 opendmarc_strl.h \
13 opendmarc_spf.c \
14 opendmarc_spf_dns.c \
15 opendmarc_internal.h
16 libopendmarc_la_LDFLAGS = -version-info $(LIBOPENDMARC_VERSION_INFO)
17 libopendmarc_includedir = $(includedir)/opendmarc
18 libopendmarc_include_HEADERS = dmarc.h
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16
17 VPATH = @srcdir@
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
19 am__make_running_with_option = \
20 case $${target_option-} in \
21 ?) ;; \
22 *) echo "am__make_running_with_option: internal error: invalid" \
23 "target option '$${target_option-}' specified" >&2; \
24 exit 1;; \
25 esac; \
26 has_opt=no; \
27 sane_makeflags=$$MAKEFLAGS; \
28 if $(am__is_gnu_make); then \
29 sane_makeflags=$$MFLAGS; \
30 else \
31 case $$MAKEFLAGS in \
32 *\\[\ \ ]*) \
33 bs=\\; \
34 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
35 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
36 esac; \
37 fi; \
38 skip_next=no; \
39 strip_trailopt () \
40 { \
41 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
42 }; \
43 for flg in $$sane_makeflags; do \
44 test $$skip_next = yes && { skip_next=no; continue; }; \
45 case $$flg in \
46 *=*|--*) continue;; \
47 -*I) strip_trailopt 'I'; skip_next=yes;; \
48 -*I?*) strip_trailopt 'I';; \
49 -*O) strip_trailopt 'O'; skip_next=yes;; \
50 -*O?*) strip_trailopt 'O';; \
51 -*l) strip_trailopt 'l'; skip_next=yes;; \
52 -*l?*) strip_trailopt 'l';; \
53 -[dEDm]) skip_next=yes;; \
54 -[JT]) skip_next=yes;; \
55 esac; \
56 case $$flg in \
57 *$$target_option*) has_opt=yes; break;; \
58 esac; \
59 done; \
60 test $$has_opt = yes
61 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
62 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
63 pkgdatadir = $(datadir)/@PACKAGE@
64 pkgincludedir = $(includedir)/@PACKAGE@
65 pkglibdir = $(libdir)/@PACKAGE@
66 pkglibexecdir = $(libexecdir)/@PACKAGE@
67 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
68 install_sh_DATA = $(install_sh) -c -m 644
69 install_sh_PROGRAM = $(install_sh) -c
70 install_sh_SCRIPT = $(install_sh) -c
71 INSTALL_HEADER = $(INSTALL_DATA)
72 transform = $(program_transform_name)
73 NORMAL_INSTALL = :
74 PRE_INSTALL = :
75 POST_INSTALL = :
76 NORMAL_UNINSTALL = :
77 PRE_UNINSTALL = :
78 POST_UNINSTALL = :
79 build_triplet = @build@
80 host_triplet = @host@
81 subdir = libopendmarc
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/build-aux/depcomp \
84 $(libopendmarc_include_HEADERS)
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES =
95 CONFIG_CLEAN_VPATH_FILES =
96 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
97 am__vpath_adj = case $$p in \
98 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
99 *) f=$$p;; \
100 esac;
101 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
102 am__install_max = 40
103 am__nobase_strip_setup = \
104 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
105 am__nobase_strip = \
106 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
107 am__nobase_list = $(am__nobase_strip_setup); \
108 for p in $$list; do echo "$$p $$p"; done | \
109 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
110 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
111 if (++n[$$2] == $(am__install_max)) \
112 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
113 END { for (dir in files) print dir, files[dir] }'
114 am__base_list = \
115 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
116 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
117 am__uninstall_files_from_dir = { \
118 test -z "$$files" \
119 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
120 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
121 $(am__cd) "$$dir" && rm -f $$files; }; \
122 }
123 am__installdirs = "$(DESTDIR)$(libdir)" \
124 "$(DESTDIR)$(libopendmarc_includedir)"
125 LTLIBRARIES = $(lib_LTLIBRARIES)
126 libopendmarc_la_LIBADD =
127 am_libopendmarc_la_OBJECTS = opendmarc_dns.lo opendmarc_xml.lo \
128 opendmarc_tld.lo opendmarc_policy.lo opendmarc_util.lo \
129 opendmarc_hash.lo opendmarc_strl.lo opendmarc_spf.lo \
130 opendmarc_spf_dns.lo
131 libopendmarc_la_OBJECTS = $(am_libopendmarc_la_OBJECTS)
132 AM_V_lt = $(am__v_lt_@AM_V@)
133 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
134 am__v_lt_0 = --silent
135 am__v_lt_1 =
136 libopendmarc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
137 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
138 $(AM_CFLAGS) $(CFLAGS) $(libopendmarc_la_LDFLAGS) $(LDFLAGS) \
139 -o $@
140 AM_V_P = $(am__v_P_@AM_V@)
141 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
142 am__v_P_0 = false
143 am__v_P_1 = :
144 AM_V_GEN = $(am__v_GEN_@AM_V@)
145 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
146 am__v_GEN_0 = @echo " GEN " $@;
147 am__v_GEN_1 =
148 AM_V_at = $(am__v_at_@AM_V@)
149 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
150 am__v_at_0 = @
151 am__v_at_1 =
152 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
153 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
154 am__depfiles_maybe = depfiles
155 am__mv = mv -f
156 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
157 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
158 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
159 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
160 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
161 $(AM_CFLAGS) $(CFLAGS)
162 AM_V_CC = $(am__v_CC_@AM_V@)
163 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
164 am__v_CC_0 = @echo " CC " $@;
165 am__v_CC_1 =
166 CCLD = $(CC)
167 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
168 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
169 $(AM_LDFLAGS) $(LDFLAGS) -o $@
170 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
171 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
172 am__v_CCLD_0 = @echo " CCLD " $@;
173 am__v_CCLD_1 =
174 SOURCES = $(libopendmarc_la_SOURCES)
175 DIST_SOURCES = $(libopendmarc_la_SOURCES)
176 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
177 ctags-recursive dvi-recursive html-recursive info-recursive \
178 install-data-recursive install-dvi-recursive \
179 install-exec-recursive install-html-recursive \
180 install-info-recursive install-pdf-recursive \
181 install-ps-recursive install-recursive installcheck-recursive \
182 installdirs-recursive pdf-recursive ps-recursive \
183 tags-recursive uninstall-recursive
184 am__can_run_installinfo = \
185 case $$AM_UPDATE_INFO_DIR in \
186 n|no|NO) false;; \
187 *) (install-info --version) >/dev/null 2>&1;; \
188 esac
189 HEADERS = $(libopendmarc_include_HEADERS)
190 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
191 distclean-recursive maintainer-clean-recursive
192 am__recursive_targets = \
193 $(RECURSIVE_TARGETS) \
194 $(RECURSIVE_CLEAN_TARGETS) \
195 $(am__extra_recursive_targets)
196 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
197 distdir
198 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
199 # Read a list of newline-separated strings from the standard input,
200 # and print each of them once, without duplicates. Input order is
201 # *not* preserved.
202 am__uniquify_input = $(AWK) '\
203 BEGIN { nonempty = 0; } \
204 { items[$$0] = 1; nonempty = 1; } \
205 END { if (nonempty) { for (i in items) print i; }; } \
206 '
207 # Make sure the list of sources is unique. This is necessary because,
208 # e.g., the same source file might be shared among _SOURCES variables
209 # for different programs/libraries.
210 am__define_uniq_tagged_files = \
211 list='$(am__tagged_files)'; \
212 unique=`for i in $$list; do \
213 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
214 done | $(am__uniquify_input)`
215 ETAGS = etags
216 CTAGS = ctags
217 DIST_SUBDIRS = $(SUBDIRS)
218 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
219 am__relativize = \
220 dir0=`pwd`; \
221 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
222 sed_rest='s,^[^/]*/*,,'; \
223 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
224 sed_butlast='s,/*[^/]*$$,,'; \
225 while test -n "$$dir1"; do \
226 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
227 if test "$$first" != "."; then \
228 if test "$$first" = ".."; then \
229 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
230 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
231 else \
232 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
233 if test "$$first2" = "$$first"; then \
234 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
235 else \
236 dir2="../$$dir2"; \
237 fi; \
238 dir0="$$dir0"/"$$first"; \
239 fi; \
240 fi; \
241 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
242 done; \
243 reldir="$$dir2"
244 ACLOCAL = @ACLOCAL@
245 AMTAR = @AMTAR@
246 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
247 AR = @AR@
248 AUTOCONF = @AUTOCONF@
249 AUTOHEADER = @AUTOHEADER@
250 AUTOMAKE = @AUTOMAKE@
251 AWK = @AWK@
252 CC = @CC@
253 CCDEPMODE = @CCDEPMODE@
254 CFLAGS = @CFLAGS@
255 CPP = @CPP@
256 CPPFLAGS = @CPPFLAGS@
257 CYGPATH_W = @CYGPATH_W@
258 DEFS = @DEFS@
259 DEPDIR = @DEPDIR@
260 DLLTOOL = @DLLTOOL@
261 DSYMUTIL = @DSYMUTIL@
262 DUMPBIN = @DUMPBIN@
263 ECHO_C = @ECHO_C@
264 ECHO_N = @ECHO_N@
265 ECHO_T = @ECHO_T@
266 EGREP = @EGREP@
267 EXEEXT = @EXEEXT@
268 FGREP = @FGREP@
269 GREP = @GREP@
270 HEX_VERSION = @HEX_VERSION@
271 INSTALL = @INSTALL@
272 INSTALL_DATA = @INSTALL_DATA@
273 INSTALL_PROGRAM = @INSTALL_PROGRAM@
274 INSTALL_SCRIPT = @INSTALL_SCRIPT@
275 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
276 LD = @LD@
277 LDFLAGS = @LDFLAGS@
278 LIBDMARC_DIR = @LIBDMARC_DIR@
279 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
280 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
281 LIBMILTER_LIBS = @LIBMILTER_LIBS@
282 LIBOBJS = @LIBOBJS@
283 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
284 LIBRESOLV = @LIBRESOLV@
285 LIBS = @LIBS@
286 LIBTOOL = @LIBTOOL@
287 LIPO = @LIPO@
288 LN_S = @LN_S@
289 LTLIBOBJS = @LTLIBOBJS@
290 MAKEINFO = @MAKEINFO@
291 MANIFEST_TOOL = @MANIFEST_TOOL@
292 MKDIR_P = @MKDIR_P@
293 NM = @NM@
294 NMEDIT = @NMEDIT@
295 OBJDUMP = @OBJDUMP@
296 OBJEXT = @OBJEXT@
297 OTOOL = @OTOOL@
298 OTOOL64 = @OTOOL64@
299 PACKAGE = @PACKAGE@
300 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
301 PACKAGE_NAME = @PACKAGE_NAME@
302 PACKAGE_STRING = @PACKAGE_STRING@
303 PACKAGE_TARNAME = @PACKAGE_TARNAME@
304 PACKAGE_URL = @PACKAGE_URL@
305 PACKAGE_VERSION = @PACKAGE_VERSION@
306 PATH_SEPARATOR = @PATH_SEPARATOR@
307 PKG_CONFIG = @PKG_CONFIG@
308 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
309 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
310 PTHREAD_CC = @PTHREAD_CC@
311 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
312 PTHREAD_LIBS = @PTHREAD_LIBS@
313 RANLIB = @RANLIB@
314 SED = @SED@
315 SET_MAKE = @SET_MAKE@
316 SHELL = @SHELL@
317 SQL_BACKEND = @SQL_BACKEND@
318 STRIP = @STRIP@
319 SYSCONFDIR = @SYSCONFDIR@
320 VERSION = @VERSION@
321 abs_builddir = @abs_builddir@
322 abs_srcdir = @abs_srcdir@
323 abs_top_builddir = @abs_top_builddir@
324 abs_top_srcdir = @abs_top_srcdir@
325 ac_aux_dir = @ac_aux_dir@
326 ac_ct_AR = @ac_ct_AR@
327 ac_ct_CC = @ac_ct_CC@
328 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
329 am__include = @am__include@
330 am__leading_dot = @am__leading_dot@
331 am__quote = @am__quote@
332 am__tar = @am__tar@
333 am__untar = @am__untar@
334 ax_pthread_config = @ax_pthread_config@
335 bindir = @bindir@
336 build = @build@
337 build_alias = @build_alias@
338 build_cpu = @build_cpu@
339 build_os = @build_os@
340 build_vendor = @build_vendor@
341 builddir = @builddir@
342 datadir = @datadir@
343 datarootdir = @datarootdir@
344 docdir = @docdir@
345 dvidir = @dvidir@
346 exec_prefix = @exec_prefix@
347 host = @host@
348 host_alias = @host_alias@
349 host_cpu = @host_cpu@
350 host_os = @host_os@
351 host_vendor = @host_vendor@
352 htmldir = @htmldir@
353 includedir = @includedir@
354 infodir = @infodir@
355 install_sh = @install_sh@
356 libdir = @libdir@
357 libexecdir = @libexecdir@
358 localedir = @localedir@
359 localstatedir = @localstatedir@
360 mandir = @mandir@
361 miltertest = @miltertest@
362 mkdir_p = @mkdir_p@
363 oldincludedir = @oldincludedir@
364 pdfdir = @pdfdir@
365 prefix = @prefix@
366 program_transform_name = @program_transform_name@
367 psdir = @psdir@
368 sbindir = @sbindir@
369 sharedstatedir = @sharedstatedir@
370 srcdir = @srcdir@
371 sysconfdir = @sysconfdir@
372 target_alias = @target_alias@
373 top_build_prefix = @top_build_prefix@
374 top_builddir = @top_builddir@
375 top_srcdir = @top_srcdir@
376 SUBDIRS = tests docs
377 AM_CPPFLAGS = -I. -I..
378 LDADD = ./libopendmarc.la
379 lib_LTLIBRARIES = libopendmarc.la
380 libopendmarc_la_SOURCES = dmarc.h \
381 opendmarc_dns.c \
382 opendmarc_xml.c \
383 opendmarc_tld.c \
384 opendmarc_policy.c \
385 opendmarc_util.c \
386 opendmarc_hash.c \
387 opendmarc_strl.c \
388 opendmarc_strl.h \
389 opendmarc_spf.c \
390 opendmarc_spf_dns.c \
391 opendmarc_internal.h
392
393 libopendmarc_la_LDFLAGS = -version-info $(LIBOPENDMARC_VERSION_INFO)
394 libopendmarc_includedir = $(includedir)/opendmarc
395 libopendmarc_include_HEADERS = dmarc.h
396 all: all-recursive
397
398 .SUFFIXES:
399 .SUFFIXES: .c .lo .o .obj
400 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
401 @for dep in $?; do \
402 case '$(am__configure_deps)' in \
403 *$$dep*) \
404 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
405 && { if test -f $@; then exit 0; else break; fi; }; \
406 exit 1;; \
407 esac; \
408 done; \
409 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/Makefile'; \
410 $(am__cd) $(top_srcdir) && \
411 $(AUTOMAKE) --foreign libopendmarc/Makefile
412 .PRECIOUS: Makefile
413 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
414 @case '$?' in \
415 *config.status*) \
416 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
417 *) \
418 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
419 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
420 esac;
421
422 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
423 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
424
425 $(top_srcdir)/configure: $(am__configure_deps)
426 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
427 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
428 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
429 $(am__aclocal_m4_deps):
430
431 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
432 @$(NORMAL_INSTALL)
433 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
434 list2=; for p in $$list; do \
435 if test -f $$p; then \
436 list2="$$list2 $$p"; \
437 else :; fi; \
438 done; \
439 test -z "$$list2" || { \
440 echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
441 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
442 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
443 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
444 }
445
446 uninstall-libLTLIBRARIES:
447 @$(NORMAL_UNINSTALL)
448 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
449 for p in $$list; do \
450 $(am__strip_dir) \
451 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
452 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
453 done
454
455 clean-libLTLIBRARIES:
456 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
457 @list='$(lib_LTLIBRARIES)'; \
458 locs=`for p in $$list; do echo $$p; done | \
459 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
460 sort -u`; \
461 test -z "$$locs" || { \
462 echo rm -f $${locs}; \
463 rm -f $${locs}; \
464 }
465
466 libopendmarc.la: $(libopendmarc_la_OBJECTS) $(libopendmarc_la_DEPENDENCIES) $(EXTRA_libopendmarc_la_DEPENDENCIES)
467 $(AM_V_CCLD)$(libopendmarc_la_LINK) -rpath $(libdir) $(libopendmarc_la_OBJECTS) $(libopendmarc_la_LIBADD) $(LIBS)
468
469 mostlyclean-compile:
470 -rm -f *.$(OBJEXT)
471
472 distclean-compile:
473 -rm -f *.tab.c
474
475 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_dns.Plo@am__quote@
476 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_hash.Plo@am__quote@
477 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_policy.Plo@am__quote@
478 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_spf.Plo@am__quote@
479 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_spf_dns.Plo@am__quote@
480 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_strl.Plo@am__quote@
481 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_tld.Plo@am__quote@
482 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_util.Plo@am__quote@
483 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_xml.Plo@am__quote@
484
485 .c.o:
486 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
487 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
488 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
489 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
490 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
491
492 .c.obj:
493 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
494 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
495 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
496 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
497 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
498
499 .c.lo:
500 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
501 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
502 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
503 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
504 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
505
506 mostlyclean-libtool:
507 -rm -f *.lo
508
509 clean-libtool:
510 -rm -rf .libs _libs
511 install-libopendmarc_includeHEADERS: $(libopendmarc_include_HEADERS)
512 @$(NORMAL_INSTALL)
513 @list='$(libopendmarc_include_HEADERS)'; test -n "$(libopendmarc_includedir)" || list=; \
514 if test -n "$$list"; then \
515 echo " $(MKDIR_P) '$(DESTDIR)$(libopendmarc_includedir)'"; \
516 $(MKDIR_P) "$(DESTDIR)$(libopendmarc_includedir)" || exit 1; \
517 fi; \
518 for p in $$list; do \
519 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
520 echo "$$d$$p"; \
521 done | $(am__base_list) | \
522 while read files; do \
523 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libopendmarc_includedir)'"; \
524 $(INSTALL_HEADER) $$files "$(DESTDIR)$(libopendmarc_includedir)" || exit $$?; \
525 done
526
527 uninstall-libopendmarc_includeHEADERS:
528 @$(NORMAL_UNINSTALL)
529 @list='$(libopendmarc_include_HEADERS)'; test -n "$(libopendmarc_includedir)" || list=; \
530 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
531 dir='$(DESTDIR)$(libopendmarc_includedir)'; $(am__uninstall_files_from_dir)
532
533 # This directory's subdirectories are mostly independent; you can cd
534 # into them and run 'make' without going through this Makefile.
535 # To change the values of 'make' variables: instead of editing Makefiles,
536 # (1) if the variable is set in 'config.status', edit 'config.status'
537 # (which will cause the Makefiles to be regenerated when you run 'make');
538 # (2) otherwise, pass the desired values on the 'make' command line.
539 $(am__recursive_targets):
540 @fail=; \
541 if $(am__make_keepgoing); then \
542 failcom='fail=yes'; \
543 else \
544 failcom='exit 1'; \
545 fi; \
546 dot_seen=no; \
547 target=`echo $@ | sed s/-recursive//`; \
548 case "$@" in \
549 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
550 *) list='$(SUBDIRS)' ;; \
551 esac; \
552 for subdir in $$list; do \
553 echo "Making $$target in $$subdir"; \
554 if test "$$subdir" = "."; then \
555 dot_seen=yes; \
556 local_target="$$target-am"; \
557 else \
558 local_target="$$target"; \
559 fi; \
560 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
561 || eval $$failcom; \
562 done; \
563 if test "$$dot_seen" = "no"; then \
564 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
565 fi; test -z "$$fail"
566
567 ID: $(am__tagged_files)
568 $(am__define_uniq_tagged_files); mkid -fID $$unique
569 tags: tags-recursive
570 TAGS: tags
571
572 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
573 set x; \
574 here=`pwd`; \
575 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
576 include_option=--etags-include; \
577 empty_fix=.; \
578 else \
579 include_option=--include; \
580 empty_fix=; \
581 fi; \
582 list='$(SUBDIRS)'; for subdir in $$list; do \
583 if test "$$subdir" = .; then :; else \
584 test ! -f $$subdir/TAGS || \
585 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
586 fi; \
587 done; \
588 $(am__define_uniq_tagged_files); \
589 shift; \
590 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
591 test -n "$$unique" || unique=$$empty_fix; \
592 if test $$# -gt 0; then \
593 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
594 "$$@" $$unique; \
595 else \
596 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
597 $$unique; \
598 fi; \
599 fi
600 ctags: ctags-recursive
601
602 CTAGS: ctags
603 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
604 $(am__define_uniq_tagged_files); \
605 test -z "$(CTAGS_ARGS)$$unique" \
606 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
607 $$unique
608
609 GTAGS:
610 here=`$(am__cd) $(top_builddir) && pwd` \
611 && $(am__cd) $(top_srcdir) \
612 && gtags -i $(GTAGS_ARGS) "$$here"
613 cscopelist: cscopelist-recursive
614
615 cscopelist-am: $(am__tagged_files)
616 list='$(am__tagged_files)'; \
617 case "$(srcdir)" in \
618 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
619 *) sdir=$(subdir)/$(srcdir) ;; \
620 esac; \
621 for i in $$list; do \
622 if test -f "$$i"; then \
623 echo "$(subdir)/$$i"; \
624 else \
625 echo "$$sdir/$$i"; \
626 fi; \
627 done >> $(top_builddir)/cscope.files
628
629 distclean-tags:
630 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
631
632 distdir: $(DISTFILES)
633 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
634 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
635 list='$(DISTFILES)'; \
636 dist_files=`for file in $$list; do echo $$file; done | \
637 sed -e "s|^$$srcdirstrip/||;t" \
638 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
639 case $$dist_files in \
640 */*) $(MKDIR_P) `echo "$$dist_files" | \
641 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
642 sort -u` ;; \
643 esac; \
644 for file in $$dist_files; do \
645 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
646 if test -d $$d/$$file; then \
647 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
648 if test -d "$(distdir)/$$file"; then \
649 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
650 fi; \
651 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
652 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
653 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
654 fi; \
655 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
656 else \
657 test -f "$(distdir)/$$file" \
658 || cp -p $$d/$$file "$(distdir)/$$file" \
659 || exit 1; \
660 fi; \
661 done
662 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
663 if test "$$subdir" = .; then :; else \
664 $(am__make_dryrun) \
665 || test -d "$(distdir)/$$subdir" \
666 || $(MKDIR_P) "$(distdir)/$$subdir" \
667 || exit 1; \
668 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
669 $(am__relativize); \
670 new_distdir=$$reldir; \
671 dir1=$$subdir; dir2="$(top_distdir)"; \
672 $(am__relativize); \
673 new_top_distdir=$$reldir; \
674 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
675 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
676 ($(am__cd) $$subdir && \
677 $(MAKE) $(AM_MAKEFLAGS) \
678 top_distdir="$$new_top_distdir" \
679 distdir="$$new_distdir" \
680 am__remove_distdir=: \
681 am__skip_length_check=: \
682 am__skip_mode_fix=: \
683 distdir) \
684 || exit 1; \
685 fi; \
686 done
687 check-am: all-am
688 check: check-recursive
689 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
690 installdirs: installdirs-recursive
691 installdirs-am:
692 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libopendmarc_includedir)"; do \
693 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
694 done
695 install: install-recursive
696 install-exec: install-exec-recursive
697 install-data: install-data-recursive
698 uninstall: uninstall-recursive
699
700 install-am: all-am
701 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
702
703 installcheck: installcheck-recursive
704 install-strip:
705 if test -z '$(STRIP)'; then \
706 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
707 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
708 install; \
709 else \
710 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
711 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
712 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
713 fi
714 mostlyclean-generic:
715
716 clean-generic:
717
718 distclean-generic:
719 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
720 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
721
722 maintainer-clean-generic:
723 @echo "This command is intended for maintainers to use"
724 @echo "it deletes files that may require special tools to rebuild."
725 clean: clean-recursive
726
727 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
728 mostlyclean-am
729
730 distclean: distclean-recursive
731 -rm -rf ./$(DEPDIR)
732 -rm -f Makefile
733 distclean-am: clean-am distclean-compile distclean-generic \
734 distclean-tags
735
736 dvi: dvi-recursive
737
738 dvi-am:
739
740 html: html-recursive
741
742 html-am:
743
744 info: info-recursive
745
746 info-am:
747
748 install-data-am: install-libopendmarc_includeHEADERS
749
750 install-dvi: install-dvi-recursive
751
752 install-dvi-am:
753
754 install-exec-am: install-libLTLIBRARIES
755
756 install-html: install-html-recursive
757
758 install-html-am:
759
760 install-info: install-info-recursive
761
762 install-info-am:
763
764 install-man:
765
766 install-pdf: install-pdf-recursive
767
768 install-pdf-am:
769
770 install-ps: install-ps-recursive
771
772 install-ps-am:
773
774 installcheck-am:
775
776 maintainer-clean: maintainer-clean-recursive
777 -rm -rf ./$(DEPDIR)
778 -rm -f Makefile
779 maintainer-clean-am: distclean-am maintainer-clean-generic
780
781 mostlyclean: mostlyclean-recursive
782
783 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
784 mostlyclean-libtool
785
786 pdf: pdf-recursive
787
788 pdf-am:
789
790 ps: ps-recursive
791
792 ps-am:
793
794 uninstall-am: uninstall-libLTLIBRARIES \
795 uninstall-libopendmarc_includeHEADERS
796
797 .MAKE: $(am__recursive_targets) install-am install-strip
798
799 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
800 check-am clean clean-generic clean-libLTLIBRARIES \
801 clean-libtool cscopelist-am ctags ctags-am distclean \
802 distclean-compile distclean-generic distclean-libtool \
803 distclean-tags distdir dvi dvi-am html html-am info info-am \
804 install install-am install-data install-data-am install-dvi \
805 install-dvi-am install-exec install-exec-am install-html \
806 install-html-am install-info install-info-am \
807 install-libLTLIBRARIES install-libopendmarc_includeHEADERS \
808 install-man install-pdf install-pdf-am install-ps \
809 install-ps-am install-strip installcheck installcheck-am \
810 installdirs installdirs-am maintainer-clean \
811 maintainer-clean-generic mostlyclean mostlyclean-compile \
812 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
813 tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \
814 uninstall-libopendmarc_includeHEADERS
815
816
817 # Tell versions [3.59,3.63) of GNU make to not export all variables.
818 # Otherwise a system limit (for SysV at least) may be exceeded.
819 .NOEXPORT:
0 /* Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. */
1
2 #ifndef DMARC_H
3 #define DMARC_H
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif /* __cplusplus */
8
9 #include <sys/param.h>
10 #include <sys/types.h>
11 #include <sys/socket.h>
12 #include <netinet/in.h>
13 #include <resolv.h>
14
15 #define OPENDMARC_LIB_VERSION 0x01030200
16
17 #define DMARC_MAXHOSTNAMELEN (256)
18
19 # define DMARC_POLICY_IP_TYPE_IPV4 (4)
20 # define DMARC_POLICY_IP_TYPE_IPV6 (6)
21
22 # define DMARC_POLICY_SPF_ORIGIN_MAILFROM (1)
23 # define DMARC_POLICY_SPF_ORIGIN_HELO (2)
24
25 # define DMARC_POLICY_SPF_OUTCOME_NONE (0)
26 # define DMARC_POLICY_SPF_OUTCOME_PASS (1)
27 # define DMARC_POLICY_SPF_OUTCOME_FAIL (2)
28 # define DMARC_POLICY_SPF_OUTCOME_TMPFAIL (3)
29 # define DMARC_POLICY_SPF_ALIGNMENT_PASS (4)
30 # define DMARC_POLICY_SPF_ALIGNMENT_FAIL (5)
31
32 # define DMARC_POLICY_DKIM_OUTCOME_NONE (0)
33 # define DMARC_POLICY_DKIM_OUTCOME_PASS (1)
34 # define DMARC_POLICY_DKIM_OUTCOME_FAIL (2)
35 # define DMARC_POLICY_DKIM_OUTCOME_TMPFAIL (3)
36 # define DMARC_POLICY_DKIM_ALIGNMENT_PASS (4)
37 # define DMARC_POLICY_DKIM_ALIGNMENT_FAIL (5)
38
39 #define DMARC_RECORD_A_UNSPECIFIED ('\0') /* adkim and aspf */
40 #define DMARC_RECORD_A_STRICT ('s') /* adkim and aspf */
41 #define DMARC_RECORD_A_RELAXED ('r') /* adkim and aspf */
42 #define DMARC_RECORD_P_UNSPECIFIED ('\0') /* p and sp */
43 #define DMARC_RECORD_P_NONE ('n') /* p and sp */
44 #define DMARC_RECORD_P_QUARANTINE ('q') /* p and sp */
45 #define DMARC_RECORD_P_REJECT ('r') /* p and sp */
46 #define DMARC_RECORD_RF_UNSPECIFIED (0x0) /* rf, a bitmap */
47 #define DMARC_RECORD_RF_AFRF (0x1) /* rf, a bitmap */
48 #define DMARC_RECORD_RF_IODEF (0x2) /* rf, a bitmap */
49 #define DMARC_RECORD_FO_UNSPECIFIED (0x0) /* fo, a bitmap */
50 #define DMARC_RECORD_FO_0 (0x1) /* fo, a bitmap */
51 #define DMARC_RECORD_FO_1 (0x2) /* fo, a bitmap */
52 #define DMARC_RECORD_FO_D (0x4) /* fo, a bitmap */
53 #define DMARC_RECORD_FO_S (0x8) /* fo, a bitmap */
54
55 #define DMARC_PARSE_OKAY (0) /* Okay to continue */
56 #define DMARC_PARSE_ERROR_EMPTY (1) /* Nothing to parse */
57 #define DMARC_PARSE_ERROR_NULL_CTX (2) /* Got a NULL context */
58 #define DMARC_PARSE_ERROR_BAD_VERSION (3) /* Such as v=DBOB1 */
59 #define DMARC_PARSE_ERROR_BAD_VALUE (4) /* Bad token value like p=bob */
60 #define DMARC_PARSE_ERROR_NO_REQUIRED_P (5) /* Required p= missing */
61 #define DMARC_PARSE_ERROR_NO_DOMAIN (6) /* No domain, e.g. <> */
62 #define DMARC_PARSE_ERROR_NO_ALLOC (7) /* Memory Allocation Faliure */
63 #define DMARC_PARSE_ERROR_BAD_SPF_MACRO (8) /* Was not a macro from above */
64 #define DMARC_PARSE_ERROR_BAD_DKIM_MACRO DMARC_PARSE_ERROR_BAD_SPF_MACRO
65 #define DMARC_DNS_ERROR_NO_RECORD (9) /* No DMARC record was found */
66 #define DMARC_DNS_ERROR_NXDOMAIN (10) /* No such domain exists */
67 #define DMARC_DNS_ERROR_TMPERR (11) /* Recoverable DNS error */
68 #define DMARC_TLD_ERROR_UNKNOWN (12) /* Undefined TLD type */
69 #define DMARC_FROM_DOMAIN_ABSENT (13) /* No From: domain was supplied */
70
71 #define DMARC_POLICY_ABSENT (14) /* Policy up to you. No DMARC record found */
72 #define DMARC_POLICY_PASS (15) /* Policy OK so accept message */
73 #define DMARC_POLICY_REJECT (16) /* Policy says to reject message */
74 #define DMARC_POLICY_QUARANTINE (17) /* Policy says to quarantine message */
75 #define DMARC_POLICY_NONE (18) /* Policy says to monitor and report */
76
77 #define DMARC_USED_POLICY_IS_P (19) /* Domain policy taken (aka 'p')*/
78 #define DMARC_USED_POLICY_IS_SP (20) /* Sub-domain policy taken (aka 'sp')*/
79
80 #ifndef OPENDMARC_POLICY_C
81 typedef struct dmarc_policy_t DMARC_POLICY_T;
82 #endif
83
84 #define OPENDMARC_STATUS_T int
85
86 #ifndef MAXPATHLEN
87 # define MAXPATHLEN (2048)
88 #endif
89 #ifndef MAXNS
90 # define MAXNS (3)
91 #endif
92 #define OPENDMARC_MAX_NSADDRLIST (8)
93 typedef struct {
94 int tld_type;
95 u_char tld_source_file[MAXPATHLEN];
96 int nscount;
97 struct sockaddr_in nsaddr_list[MAXNS];
98 } OPENDMARC_LIB_T;
99
100 #define OPENDMARC_TLD_TYPE_NONE (0) /* Will not use a tld file */
101 #define OPENDMARC_TLD_TYPE_MOZILLA (1) /* mozilla.org effective_tld_names.dat */
102
103 /*
104 * Library one time initialization.
105 */
106 OPENDMARC_STATUS_T opendmarc_policy_library_init(OPENDMARC_LIB_T *lib_init);
107 OPENDMARC_STATUS_T opendmarc_policy_library_shutdown(OPENDMARC_LIB_T *lib_init);
108
109 /*
110 * Context management.
111 */
112 DMARC_POLICY_T * opendmarc_policy_connect_init(u_char *ip_addr, int ip_type);
113 DMARC_POLICY_T * opendmarc_policy_connect_clear(DMARC_POLICY_T *pctx);
114 DMARC_POLICY_T * opendmarc_policy_connect_rset(DMARC_POLICY_T *pctx);
115 DMARC_POLICY_T * opendmarc_policy_connect_shutdown(DMARC_POLICY_T *pctx);
116
117 /*
118 * Store information routines.
119 */
120 OPENDMARC_STATUS_T opendmarc_policy_store_from_domain(DMARC_POLICY_T *pctx, u_char *domain);
121 OPENDMARC_STATUS_T opendmarc_policy_store_dkim(DMARC_POLICY_T *pctx, u_char *domain, int result, u_char *human_result);
122 OPENDMARC_STATUS_T opendmarc_policy_store_spf(DMARC_POLICY_T *pctx, u_char *domain, int result, int origin, u_char *human_result);
123
124 /*
125 * The DMARC record itself.
126 */
127 OPENDMARC_STATUS_T opendmarc_policy_query_dmarc(DMARC_POLICY_T *pctx, u_char *domain);
128 OPENDMARC_STATUS_T opendmarc_policy_parse_dmarc(DMARC_POLICY_T *pctx, u_char *domain, u_char *record);
129 OPENDMARC_STATUS_T opendmarc_policy_store_dmarc(DMARC_POLICY_T *pctx, u_char *dmarc_record, u_char *domain, u_char *organizationaldomain);
130
131 /*
132 * Access to parts of the DMARC record.
133 */
134 OPENDMARC_STATUS_T opendmarc_get_policy_to_enforce(DMARC_POLICY_T *pctx);
135 OPENDMARC_STATUS_T opendmarc_policy_fetch_alignment(DMARC_POLICY_T *pctx, int *dkim_alignment, int *spf_alignment);
136 OPENDMARC_STATUS_T opendmarc_policy_fetch_pct(DMARC_POLICY_T *pctx, int *pctp);
137 OPENDMARC_STATUS_T opendmarc_policy_fetch_adkim(DMARC_POLICY_T *pctx, int *adkim);
138 OPENDMARC_STATUS_T opendmarc_policy_fetch_aspf(DMARC_POLICY_T *pctx, int *aspf);
139 OPENDMARC_STATUS_T opendmarc_policy_fetch_p(DMARC_POLICY_T *pctx, int *p);
140 OPENDMARC_STATUS_T opendmarc_policy_fetch_sp(DMARC_POLICY_T *pctx, int *sp);
141 u_char ** opendmarc_policy_fetch_rua(DMARC_POLICY_T *pctx, u_char *list_buf, size_t size_of_buf, int constant);
142 u_char ** opendmarc_policy_fetch_ruf(DMARC_POLICY_T *pctx, u_char *list_buf, size_t size_of_buf, int constant);
143 OPENDMARC_STATUS_T opendmarc_policy_fetch_utilized_domain(DMARC_POLICY_T *pctx, u_char *buf, size_t buflen);
144 OPENDMARC_STATUS_T opendmarc_policy_query_dmarc_xdomain(DMARC_POLICY_T *pctx, u_char *uri);
145 OPENDMARC_STATUS_T opendmarc_get_policy_token_used(DMARC_POLICY_T *pctx);
146
147 /*
148 * TLD processing
149 */
150 int opendmarc_tld_read_file(char *path_fname, char *commentstring, char *drop, char *except);
151 void opendmarc_tld_shutdown();
152
153 /*
154 * XML Parsing
155 */
156 u_char ** opendmarc_xml(char *b, size_t blen, char *e, size_t elen);
157 u_char ** opendmarc_xml_parse(char *fname, char *err_buf, size_t err_len);
158
159 /*
160 * Utility routines
161 */
162 void opendmarc_dns_fake_record(const char *name, const char *answer);
163 u_char ** opendmarc_util_clearargv(u_char **ary);
164 const char * opendmarc_policy_status_to_str(OPENDMARC_STATUS_T status);
165 int opendmarc_policy_check_alignment(u_char *subdomain, u_char *tld, int mode);
166 int opendmarc_policy_to_buf(DMARC_POLICY_T *pctx, char *buf, size_t buflen);
167
168 /*
169 * SPF Processing
170 */
171 int opendmarc_spf_test(char *ip_address, char *mail_from_domain, char *helo_domain, char *spf_record, int soft_fail_as_pass, char *human_readable, size_t human_readable_len, int *use_mailfrom);
172 int opendmarc_spf2_test(char *ip_address, char *mail_from_domain, char *helo_domain, char *spf_record, int softfail_okay_flag, char *human_readable, size_t human_readable_len, int *used_mfrom);
173
174 #ifdef __cplusplus
175 }
176 #endif /* __cplusplus */
177
178 #endif /* DMARC_H */
0 dist_doc_DATA = index.html \
1 dmarc_policy_t.html \
2 opendmarc_dns_fake_record.html \
3 opendmarc_get_policy_to_enforce.html \
4 opendmarc_lib_t.html \
5 opendmarc_policy_connect_clear.html \
6 opendmarc_policy_connect_init.html \
7 opendmarc_policy_connect_rset.html \
8 opendmarc_policy_connect_shutdown.html \
9 opendmarc_policy_fetch_adkim.html \
10 opendmarc_policy_fetch_alignment.html \
11 opendmarc_policy_fetch_aspf.html \
12 opendmarc_policy_fetch_fo.html \
13 opendmarc_policy_fetch_p.html \
14 opendmarc_policy_fetch_pct.html \
15 opendmarc_policy_fetch_rf.html \
16 opendmarc_policy_fetch_rua.html \
17 opendmarc_policy_fetch_ruf.html \
18 opendmarc_policy_fetch_sp.html \
19 opendmarc_policy_fetch_utilized_domain.html \
20 opendmarc_policy_library_init.html \
21 opendmarc_policy_library_shutdown.html \
22 opendmarc_policy_parse_dmarc.html \
23 opendmarc_policy_query_dmarc.html \
24 opendmarc_policy_status_to_str.html \
25 opendmarc_policy_store_dkim.html \
26 opendmarc_policy_store_dmarc.html \
27 opendmarc_policy_store_from_domain.html \
28 opendmarc_policy_store_spf.html \
29 opendmarc_policy_to_buf.html \
30 opendmarc_spf_test.html \
31 opendmarc_status_t.html \
32 opendmarc_tld_read_file.html \
33 opendmarc_tld_shutdown.html \
34 opendmarc_util_clearargv.html \
35 opendmarc_xml.html \
36 opendmarc_xml_parse.html \
37 overview.html
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
30 case $$MAKEFLAGS in \
31 *\\[\ \ ]*) \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
35 esac; \
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = libopendmarc/docs
81 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
82 $(dist_doc_DATA)
83 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
84 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
85 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
86 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
87 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
88 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 $(ACLOCAL_M4)
90 mkinstalldirs = $(install_sh) -d
91 CONFIG_HEADER = $(top_builddir)/build-config.h
92 CONFIG_CLEAN_FILES =
93 CONFIG_CLEAN_VPATH_FILES =
94 AM_V_P = $(am__v_P_@AM_V@)
95 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
96 am__v_P_0 = false
97 am__v_P_1 = :
98 AM_V_GEN = $(am__v_GEN_@AM_V@)
99 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
100 am__v_GEN_0 = @echo " GEN " $@;
101 am__v_GEN_1 =
102 AM_V_at = $(am__v_at_@AM_V@)
103 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
104 am__v_at_0 = @
105 am__v_at_1 =
106 SOURCES =
107 DIST_SOURCES =
108 am__can_run_installinfo = \
109 case $$AM_UPDATE_INFO_DIR in \
110 n|no|NO) false;; \
111 *) (install-info --version) >/dev/null 2>&1;; \
112 esac
113 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
114 am__vpath_adj = case $$p in \
115 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
116 *) f=$$p;; \
117 esac;
118 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
119 am__install_max = 40
120 am__nobase_strip_setup = \
121 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
122 am__nobase_strip = \
123 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
124 am__nobase_list = $(am__nobase_strip_setup); \
125 for p in $$list; do echo "$$p $$p"; done | \
126 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
127 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
128 if (++n[$$2] == $(am__install_max)) \
129 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
130 END { for (dir in files) print dir, files[dir] }'
131 am__base_list = \
132 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
133 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
134 am__uninstall_files_from_dir = { \
135 test -z "$$files" \
136 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
137 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
138 $(am__cd) "$$dir" && rm -f $$files; }; \
139 }
140 am__installdirs = "$(DESTDIR)$(docdir)"
141 DATA = $(dist_doc_DATA)
142 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
143 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
144 ACLOCAL = @ACLOCAL@
145 AMTAR = @AMTAR@
146 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
147 AR = @AR@
148 AUTOCONF = @AUTOCONF@
149 AUTOHEADER = @AUTOHEADER@
150 AUTOMAKE = @AUTOMAKE@
151 AWK = @AWK@
152 CC = @CC@
153 CCDEPMODE = @CCDEPMODE@
154 CFLAGS = @CFLAGS@
155 CPP = @CPP@
156 CPPFLAGS = @CPPFLAGS@
157 CYGPATH_W = @CYGPATH_W@
158 DEFS = @DEFS@
159 DEPDIR = @DEPDIR@
160 DLLTOOL = @DLLTOOL@
161 DSYMUTIL = @DSYMUTIL@
162 DUMPBIN = @DUMPBIN@
163 ECHO_C = @ECHO_C@
164 ECHO_N = @ECHO_N@
165 ECHO_T = @ECHO_T@
166 EGREP = @EGREP@
167 EXEEXT = @EXEEXT@
168 FGREP = @FGREP@
169 GREP = @GREP@
170 HEX_VERSION = @HEX_VERSION@
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 LD = @LD@
177 LDFLAGS = @LDFLAGS@
178 LIBDMARC_DIR = @LIBDMARC_DIR@
179 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
180 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
181 LIBMILTER_LIBS = @LIBMILTER_LIBS@
182 LIBOBJS = @LIBOBJS@
183 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
184 LIBRESOLV = @LIBRESOLV@
185 LIBS = @LIBS@
186 LIBTOOL = @LIBTOOL@
187 LIPO = @LIPO@
188 LN_S = @LN_S@
189 LTLIBOBJS = @LTLIBOBJS@
190 MAKEINFO = @MAKEINFO@
191 MANIFEST_TOOL = @MANIFEST_TOOL@
192 MKDIR_P = @MKDIR_P@
193 NM = @NM@
194 NMEDIT = @NMEDIT@
195 OBJDUMP = @OBJDUMP@
196 OBJEXT = @OBJEXT@
197 OTOOL = @OTOOL@
198 OTOOL64 = @OTOOL64@
199 PACKAGE = @PACKAGE@
200 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
201 PACKAGE_NAME = @PACKAGE_NAME@
202 PACKAGE_STRING = @PACKAGE_STRING@
203 PACKAGE_TARNAME = @PACKAGE_TARNAME@
204 PACKAGE_URL = @PACKAGE_URL@
205 PACKAGE_VERSION = @PACKAGE_VERSION@
206 PATH_SEPARATOR = @PATH_SEPARATOR@
207 PKG_CONFIG = @PKG_CONFIG@
208 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
209 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
210 PTHREAD_CC = @PTHREAD_CC@
211 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
212 PTHREAD_LIBS = @PTHREAD_LIBS@
213 RANLIB = @RANLIB@
214 SED = @SED@
215 SET_MAKE = @SET_MAKE@
216 SHELL = @SHELL@
217 SQL_BACKEND = @SQL_BACKEND@
218 STRIP = @STRIP@
219 SYSCONFDIR = @SYSCONFDIR@
220 VERSION = @VERSION@
221 abs_builddir = @abs_builddir@
222 abs_srcdir = @abs_srcdir@
223 abs_top_builddir = @abs_top_builddir@
224 abs_top_srcdir = @abs_top_srcdir@
225 ac_aux_dir = @ac_aux_dir@
226 ac_ct_AR = @ac_ct_AR@
227 ac_ct_CC = @ac_ct_CC@
228 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
229 am__include = @am__include@
230 am__leading_dot = @am__leading_dot@
231 am__quote = @am__quote@
232 am__tar = @am__tar@
233 am__untar = @am__untar@
234 ax_pthread_config = @ax_pthread_config@
235 bindir = @bindir@
236 build = @build@
237 build_alias = @build_alias@
238 build_cpu = @build_cpu@
239 build_os = @build_os@
240 build_vendor = @build_vendor@
241 builddir = @builddir@
242 datadir = @datadir@
243 datarootdir = @datarootdir@
244 docdir = @docdir@
245 dvidir = @dvidir@
246 exec_prefix = @exec_prefix@
247 host = @host@
248 host_alias = @host_alias@
249 host_cpu = @host_cpu@
250 host_os = @host_os@
251 host_vendor = @host_vendor@
252 htmldir = @htmldir@
253 includedir = @includedir@
254 infodir = @infodir@
255 install_sh = @install_sh@
256 libdir = @libdir@
257 libexecdir = @libexecdir@
258 localedir = @localedir@
259 localstatedir = @localstatedir@
260 mandir = @mandir@
261 miltertest = @miltertest@
262 mkdir_p = @mkdir_p@
263 oldincludedir = @oldincludedir@
264 pdfdir = @pdfdir@
265 prefix = @prefix@
266 program_transform_name = @program_transform_name@
267 psdir = @psdir@
268 sbindir = @sbindir@
269 sharedstatedir = @sharedstatedir@
270 srcdir = @srcdir@
271 sysconfdir = @sysconfdir@
272 target_alias = @target_alias@
273 top_build_prefix = @top_build_prefix@
274 top_builddir = @top_builddir@
275 top_srcdir = @top_srcdir@
276 dist_doc_DATA = index.html \
277 dmarc_policy_t.html \
278 opendmarc_dns_fake_record.html \
279 opendmarc_get_policy_to_enforce.html \
280 opendmarc_lib_t.html \
281 opendmarc_policy_connect_clear.html \
282 opendmarc_policy_connect_init.html \
283 opendmarc_policy_connect_rset.html \
284 opendmarc_policy_connect_shutdown.html \
285 opendmarc_policy_fetch_adkim.html \
286 opendmarc_policy_fetch_alignment.html \
287 opendmarc_policy_fetch_aspf.html \
288 opendmarc_policy_fetch_fo.html \
289 opendmarc_policy_fetch_p.html \
290 opendmarc_policy_fetch_pct.html \
291 opendmarc_policy_fetch_rf.html \
292 opendmarc_policy_fetch_rua.html \
293 opendmarc_policy_fetch_ruf.html \
294 opendmarc_policy_fetch_sp.html \
295 opendmarc_policy_fetch_utilized_domain.html \
296 opendmarc_policy_library_init.html \
297 opendmarc_policy_library_shutdown.html \
298 opendmarc_policy_parse_dmarc.html \
299 opendmarc_policy_query_dmarc.html \
300 opendmarc_policy_status_to_str.html \
301 opendmarc_policy_store_dkim.html \
302 opendmarc_policy_store_dmarc.html \
303 opendmarc_policy_store_from_domain.html \
304 opendmarc_policy_store_spf.html \
305 opendmarc_policy_to_buf.html \
306 opendmarc_spf_test.html \
307 opendmarc_status_t.html \
308 opendmarc_tld_read_file.html \
309 opendmarc_tld_shutdown.html \
310 opendmarc_util_clearargv.html \
311 opendmarc_xml.html \
312 opendmarc_xml_parse.html \
313 overview.html
314
315 all: all-am
316
317 .SUFFIXES:
318 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
319 @for dep in $?; do \
320 case '$(am__configure_deps)' in \
321 *$$dep*) \
322 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
323 && { if test -f $@; then exit 0; else break; fi; }; \
324 exit 1;; \
325 esac; \
326 done; \
327 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/docs/Makefile'; \
328 $(am__cd) $(top_srcdir) && \
329 $(AUTOMAKE) --foreign libopendmarc/docs/Makefile
330 .PRECIOUS: Makefile
331 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
332 @case '$?' in \
333 *config.status*) \
334 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
335 *) \
336 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
337 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
338 esac;
339
340 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
341 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
342
343 $(top_srcdir)/configure: $(am__configure_deps)
344 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
345 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
346 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
347 $(am__aclocal_m4_deps):
348
349 mostlyclean-libtool:
350 -rm -f *.lo
351
352 clean-libtool:
353 -rm -rf .libs _libs
354 install-dist_docDATA: $(dist_doc_DATA)
355 @$(NORMAL_INSTALL)
356 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
357 if test -n "$$list"; then \
358 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
359 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
360 fi; \
361 for p in $$list; do \
362 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
363 echo "$$d$$p"; \
364 done | $(am__base_list) | \
365 while read files; do \
366 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
367 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
368 done
369
370 uninstall-dist_docDATA:
371 @$(NORMAL_UNINSTALL)
372 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
373 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
374 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
375 tags TAGS:
376
377 ctags CTAGS:
378
379 cscope cscopelist:
380
381
382 distdir: $(DISTFILES)
383 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
384 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
385 list='$(DISTFILES)'; \
386 dist_files=`for file in $$list; do echo $$file; done | \
387 sed -e "s|^$$srcdirstrip/||;t" \
388 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
389 case $$dist_files in \
390 */*) $(MKDIR_P) `echo "$$dist_files" | \
391 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
392 sort -u` ;; \
393 esac; \
394 for file in $$dist_files; do \
395 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
396 if test -d $$d/$$file; then \
397 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
398 if test -d "$(distdir)/$$file"; then \
399 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
400 fi; \
401 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
402 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
403 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
404 fi; \
405 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
406 else \
407 test -f "$(distdir)/$$file" \
408 || cp -p $$d/$$file "$(distdir)/$$file" \
409 || exit 1; \
410 fi; \
411 done
412 check-am: all-am
413 check: check-am
414 all-am: Makefile $(DATA)
415 installdirs:
416 for dir in "$(DESTDIR)$(docdir)"; do \
417 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
418 done
419 install: install-am
420 install-exec: install-exec-am
421 install-data: install-data-am
422 uninstall: uninstall-am
423
424 install-am: all-am
425 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
426
427 installcheck: installcheck-am
428 install-strip:
429 if test -z '$(STRIP)'; then \
430 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
431 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
432 install; \
433 else \
434 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
435 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
436 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
437 fi
438 mostlyclean-generic:
439
440 clean-generic:
441
442 distclean-generic:
443 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
444 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
445
446 maintainer-clean-generic:
447 @echo "This command is intended for maintainers to use"
448 @echo "it deletes files that may require special tools to rebuild."
449 clean: clean-am
450
451 clean-am: clean-generic clean-libtool mostlyclean-am
452
453 distclean: distclean-am
454 -rm -f Makefile
455 distclean-am: clean-am distclean-generic
456
457 dvi: dvi-am
458
459 dvi-am:
460
461 html: html-am
462
463 html-am:
464
465 info: info-am
466
467 info-am:
468
469 install-data-am: install-dist_docDATA
470
471 install-dvi: install-dvi-am
472
473 install-dvi-am:
474
475 install-exec-am:
476
477 install-html: install-html-am
478
479 install-html-am:
480
481 install-info: install-info-am
482
483 install-info-am:
484
485 install-man:
486
487 install-pdf: install-pdf-am
488
489 install-pdf-am:
490
491 install-ps: install-ps-am
492
493 install-ps-am:
494
495 installcheck-am:
496
497 maintainer-clean: maintainer-clean-am
498 -rm -f Makefile
499 maintainer-clean-am: distclean-am maintainer-clean-generic
500
501 mostlyclean: mostlyclean-am
502
503 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
504
505 pdf: pdf-am
506
507 pdf-am:
508
509 ps: ps-am
510
511 ps-am:
512
513 uninstall-am: uninstall-dist_docDATA
514
515 .MAKE: install-am install-strip
516
517 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
518 cscopelist-am ctags-am distclean distclean-generic \
519 distclean-libtool distdir dvi dvi-am html html-am info info-am \
520 install install-am install-data install-data-am \
521 install-dist_docDATA install-dvi install-dvi-am install-exec \
522 install-exec-am install-html install-html-am install-info \
523 install-info-am install-man install-pdf install-pdf-am \
524 install-ps install-ps-am install-strip installcheck \
525 installcheck-am installdirs maintainer-clean \
526 maintainer-clean-generic mostlyclean mostlyclean-generic \
527 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
528 uninstall-am uninstall-dist_docDATA
529
530
531 # Tell versions [3.59,3.63) of GNU make to not export all variables.
532 # Otherwise a system limit (for SysV at least) may be exceeded.
533 .NOEXPORT:
0 <html>
1 <head><title>DMARC_POLICY_T</title></head>
2 <body>
3 <!--
4 $Id: dmarc_policy_t.html,v 1.2 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>DMARC_POLICY_T</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!----------- Description ---------->
11 <tr><th valign="top" align=left>DESCRIPTION</th><td>
12 <table border="1" cellspacing=1 cellpadding=4>
13 <tr align="left" valign=top>
14 <th width="80">Purpose</th>
15 <td>The <tt>DMARC_POLICY_T</tt> is an opaque structure used to communicate on a per message
16 basis with the library. It is to enter information into policy and to receive information
17 from policy.
18 </tr>
19
20 <tr align="left" valign=top>
21 <th width="80">Synopsis</th>
22 <td>
23 <blockquote>
24 #include &lt;dmarc.h&gt;
25 <p>
26 DMARC_POLICY_T *pctx;
27 </blockquote>
28 </td>
29 </tr>
30
31 <tr align="left" valign=top>
32 <th width="80">DMARC_POLICY_T</th>
33 <td>
34 This opaque data type must be initialized using <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a> and later freed using <a href="opendmarc_policy_connect_shutdown.html">opendmarc_policy_connect_shutdown()</a>.
35 <p>
36 In generally you may initialize it when the connection is first accepted and keep it active until the remote client disconnects. If there are multiple envelopes per envelope, you may call <a href="opendmarc_policy_connect_rset.html">opendmarc_policy_connect_rset()</a> to reset the opaque structure for re-use with the next message.
37 </td>
38 </tr>
39
40 <tr align="left" valign=top>
41 <th width="80">Usage</th>
42 <td>
43 Each connection from a client to your SMTP server will require its own <tt>DMARC_POLICY_T</tt> pointer. Be certain to free this structure by calling <a href="opendmarc_policy_connect_shutdown.html"></a> when the connection is discontinued to avoid a memory leak.
44 </td>
45 </tr>
46
47
48 <tr>
49 <th valign="top" align=left>NOTES</th>
50 <td>
51 <ul>
52 <li><tt>DMARC_POLICY_T</tt> is thread safe provided it is not used concurrently by two or more threads. There should be a minimum of one DMARC_POLICY_T pointer per thread.
53 </ul>
54 </td>
55 </tr>
56
57 </table>
58
59 <hr size="1">
60 <font size="-1">
61 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
62
63 <br>
64 By using this file, you agree to the terms and conditions set
65 forth in the license.
66 </font>
67 </body>
68 </html>
0 <html>
1 <head>
2 <title>OpenDMARC Library (libopendmarc)</title>
3 </head>
4 <body>
5 <!--
6 $Id: index.html,v 1.12 2010/08/30 22:01:56 cm-msk Exp $
7 -->
8
9 <h1>OpenDMARC Library (libopendmarc)</h1>
10
11 <h2>Introduction</h2>
12
13 <b>DMARC</b> stands for "Domain-based Message Authentication, Reporting &amp; Conformance".
14 It is a technical specification created by a group of organizations to help reduce the potential for
15 email-based abuse by solving long-standing operational, deployment, and reporting
16 issues related to the existing email authentication protocols of DKIM and SPF. More information
17 about <b>DMARC</b> can be found at the <a href="http://www.dmarc.org">dmarc.org</a> website.
18 <p>
19 This API (<tt>libopendmarc</tt>) at its current release, allows an application
20 to look up DMARC records and to apply policy to application supplied DKIM and SPF results.
21 An implementation of a filter, using Sendmail's <b>milter</b>
22 package, uses this <tt>libopendmarc</tt> library.
23
24
25 <h2>Data Types</h2>
26
27 <table columns="2" border="1">
28 <tr>
29 <td> <b> Data Type </b> </td>
30 <td> <b> Description </b> </td>
31 </tr>
32
33 <tr>
34 <td> <a href="opendmarc_lib_t.html"> <tt>OPENDMARC_LIB_T</tt> </a> </td>
35 <td>The structure used to initialize the library at startup</td>
36 </tr>
37
38 <tr>
39 <td> <a href="dmarc_policy_t.html"> <tt>DMARC_POLICY_T</tt> </a> </td>
40 <td>The context used per in-bound envelope.</td>
41 </tr>
42
43 <tr>
44 <td> <a href="opendmarc_status_t.html"> <tt>OPENDMARC_STATUS_T</tt> </a> </td>
45 <td>The type returned by many library functions.</td>
46 </tr>
47
48 </table>
49
50 <h2>Functions</h2>
51
52 <table columns="2" border="1">
53 <tr>
54 <td> <b> Function </b> </td>
55 <td> <b> Description </b> </td>
56 </tr>
57
58 <tr>
59 <td colspan="2"> <b>Program Startup/Shutdown</b>
60 </tr>
61 <tr>
62 <td> <a href="opendmarc_policy_library_init.html"> <tt>opendmarc_policy_library_init()</tt> </a> </td>
63 <td> Initialize the library on program startup. </td>
64 </tr>
65 <tr>
66 <td> <a href="opendmarc_policy_library_shutdown.html"> <tt>opendmarc_policy_library_shutdown()</tt> </a> </td>
67 <td> Shut down the library to free resources. </td>
68 </tr>
69
70
71 <tr>
72 <td colspan="2"> <b>Per-Envelope Context Functions</b>
73 </tr>
74 <tr>
75 <td> <a href="opendmarc_policy_connect_init.html"> <tt>opendmarc_policy_connect_init()</tt> </a> </td>
76 <td> Allocate a new context for an in-bound envelope. </td>
77 </tr>
78 <tr>
79 <td> <a href="opendmarc_policy_connect_clear.html"> <tt>opendmarc_policy_connect_clear()</tt> </a> </td>
80 <td> Clears (zeros) a context for reuse. </td>
81 </tr>
82 <tr>
83 <td> <a href="opendmarc_policy_connect_rset.html"> <tt>opendmarc_policy_connect_rset()</tt> </a> </td>
84 <td> Partially clears the context as part of an SMTP RSET. </td>
85 </tr>
86 <tr>
87 <td> <a href="opendmarc_policy_connect_shutdown.html"> <tt>opendmarc_policy_connect_shutdown()</tt> </a> </td>
88 <td> Deallocate and free a context to conclude its use. </td>
89 </tr>
90
91 <tr>
92 <td colspan="2"> <b>Information Storage Functions</b>
93 </tr>
94 <tr>
95 <td> <a href="opendmarc_policy_store_from_domain.html"> <tt>opendmarc_policy_store_from_domain()</tt> </a> </td>
96 <td> Give the policy processor the From: header's domain. </td>
97 </tr>
98 <tr>
99 <td> <a href="opendmarc_policy_store_dkim.html"> <tt>opendmarc_policy_store_dkim()</tt> </a> </td>
100 <td> Give the policy processor the results of DKIM processing. </td>
101 </tr>
102 <tr>
103 <td> <a href="opendmarc_policy_store_spf.html"> <tt>opendmarc_policy_store_spf()</tt> </a> </td>
104 <td> Give the policy processor the results of SPF processing. </td>
105 </tr>
106
107 <tr>
108 <td colspan="2"> <b>DMARC Record Functions</b>
109 </tr>
110 <tr>
111 <td> <a href="opendmarc_policy_query_dmarc.html"> <tt>opendmarc_policy_query_dmarc()</tt> </a> </td>
112 <td> DNS lookup a DMARC record and parse it. </td>
113 </tr>
114 <tr>
115 <td> <a href="opendmarc_policy_parse_dmarc.html"> <tt>opendmarc_policy_parse_dmarc()</tt> </a> </td>
116 <td> Parse a user supplied DMARC record. </td>
117 </tr>
118 <tr>
119 <td> <a href="opendmarc_policy_store_dmarc.html"> <tt>opendmarc_policy_store_dmarc()</tt> </a> </td>
120 <td> The user process looked up the DMARC record and provides it to the library in one gulp. </td>
121 </tr>
122
123 <tr>
124 <td colspan="2"> <b>DMARC Result Functions</b>
125 </tr>
126 <tr>
127 <td> <a href="opendmarc_get_policy_to_enforce.html"> <tt>opendmarc_get_policy_to_enforce()</tt> </a> </td>
128 <td> Returns the policy for the MTA to enforce. </td>
129 </tr>
130 <tr>
131 <td> <a href="opendmarc_policy_fetch_pct.html"> <tt>opendmarc_policy_fetch_pct()</tt> </a> </td>
132 <td> Fetch the value of the pct= DMARC setting to determine sampling rate. </td>
133 </tr>
134 <tr>
135 <td> <a href="opendmarc_policy_fetch_adkim.html"> <tt>opendmarc_policy_fetch_adkim()</tt> </a> </td>
136 <td> Fetch the value of the adkim= DMARC setting to determine alignment policy. </td>
137 </tr>
138 <tr>
139 <td> <a href="opendmarc_policy_fetch_aspf.html"> <tt>opendmarc_policy_fetch_aspf()</tt> </a> </td>
140 <td> Fetch the value of the aspf= DMARC setting to determine alignment policy. </td>
141 </tr>
142 <tr>
143 <td> <a href="opendmarc_policy_fetch_p.html"> <tt>opendmarc_policy_fetch_p()</tt> </a> </td>
144 <td> Fetch the value of the p= DMARC setting to determine desired policy. </td>
145 </tr>
146 <tr>
147 <td> <a href="opendmarc_policy_fetch_sp.html"> <tt>opendmarc_policy_fetch_sp()</tt> </a> </td>
148 <td> Fetch the value of the sp= DMARC setting to determine desired subdomain policy. </td>
149 </tr>
150 <tr>
151 <td> <a href="opendmarc_policy_fetch_rua.html"> <tt>opendmarc_policy_fetch_rua()</tt> </a> </td>
152 <td> Fetch a list of the rua= DMARC URI stating where to send reports. </td>
153 </tr>
154 <tr>
155 <td> <a href="opendmarc_policy_fetch_ruf.html"> <tt>opendmarc_policy_fetch_ruf()</tt> </a> </td>
156 <td> Fetch a list of the ruf= DMARC URI stating where to send failed messages notifications. </td>
157 </tr>
158 <tr>
159 <td> <a href="opendmarc_policy_fetch_fo.html"> <tt>opendmarc_policy_fetch_fo()</tt> </a> </td>
160 <td> Fetch a bitmap that shows how/when that RUF reports should be sent. </td>
161 </tr>
162 <tr>
163 <td> <a href="opendmarc_policy_fetch_rf.html"> <tt>opendmarc_policy_fetch_rf()</tt> </a> </td>
164 <td> Fetch a bitmap that shows which format (arfrf versus iodef) should be used. </td>
165 </tr>
166 <tr>
167 <td> <a href="opendmarc_policy_fetch_alignment.html"> <tt>opendmarc_policy_fetch_alignment()</tt> </a> </td>
168 <td> Fetch the result of SPF and DKIM alignment checks.
169 </tr>
170 <tr>
171 <td> <a href="opendmarc_policy_fetch_utilized_domain.html"> <tt>opendmarc_policy_fetch_utilized_domain()</tt> </a> </td>
172 <td> Fetch the domain that was used to find the DMARC record. </td>
173 </tr>
174
175 <tr>
176 <td colspan="2"> <b>TLD Functions</b>
177 </tr>
178 <tr>
179 <td> <a href="opendmarc_tld_read_file.html"> <tt>opendmarc_tld_read_file()</tt> </a> </td>
180 <td> Read and re-read a <tt>TLD</tt> file for library use.
181 (See also <a href="opendmarc_policy_library_init.html"> <tt>opendmarc_policy_library_init()</tt>)
182 </td>
183 </tr>
184 <tr>
185 <td> <a href="opendmarc_tld_shutdown.html"> <tt>opendmarc_tld_shutdown()</tt> </a>
186 <td> Deallocate the cached <tt>TLD</tt> information as part of program shutdown.
187 </td>
188 </tr>
189
190 <tr>
191 <td colspan="2"> <b>XML File Functions</b>
192 </tr>
193 <tr>
194 <td> <a href="opendmarc_xml.html"> <tt>opendmarc_xml()</tt> </a> </td>
195 <td> Parse an XML Report file that was read into a memory buffer and produce CSV output. </td>
196 </tr>
197 <tr>
198 <td> <a href="opendmarc_xml_parse.html"> <tt>opendmarc_xml_parse()</tt> </a>
199 <td> Read an XML Report file from disk and parse it into CSV output.
200 </td>
201 </tr>
202
203 <tr>
204 <td colspan="2"> <b>SPF Checking Functions</b>
205 </tr>
206 <tr>
207 <td> <a href="opendmarc_spf_test.html"> <tt>opendmarc_spf_test.html()</tt> </a> </td>
208 <td> Look up an SPF record and determine if it is a pass or fail. </td>
209 </tr>
210
211 <tr>
212 <td colspan="2"> <b>Handy Utility Functions</b>
213 </tr>
214 <tr>
215 <td> <a href="opendmarc_dns_fake_record.html"> <tt>opendmarc_dns_fake_record()</tt> </a> </td>
216 <td> Hard-code some DNS replies. Intended for use during unit tests.
217 </tr>
218 <tr>
219 <td> <a href="opendmarc_util_clearargv.html"> <tt>opendmarc_util_clearargv()</tt> </a> </td>
220 <td> Free a NULL terminated array of strings.
221 </tr>
222 <tr>
223 <td> <a href="opendmarc_policy_status_to_str.html"> <tt>opendmarc_policy_status_to_str()</tt> </a> </td>
224 <td> Fetch a human readable string correspoding to a
225 <a href="opendmarc_status_t.html"> <tt>OPENDMARC_STATUS_T</tt></a> value returned by a function.
226 </tr>
227 <tr>
228 <td> <a href="opendmarc_policy_to_buf.html"> <tt>opendmarc_policy_to_buf()</tt> </a> </td>
229 <td> Fetch a human readable copy of the opaque <a href="dmarc_policy_t.html"> <tt>DMARC_POLICY_T</tt></a>
230 into a text buffer.
231 </tr>
232 </table> <br>
233
234 <hr size="1">
235 <font size="-1">
236 Copyright (c) 2012, 2014, The Trusted Domain Project. All rights reserved.
237 <br>
238 By using this file, you agree to the terms and conditions set
239 forth in the license.
240 </font>
241 </body>
242 </html>
0 <html>
1 <head><title>opendmarc_dns_fake_record()</title></head>
2 <body>
3 <h1>opendmarc_dns_fake_record()</h1>
4 <p align="right"><a href="index.html">[back to index]</a></p>
5
6 <table border="0" cellspacing=4 cellpadding=4>
7 <!---------- Synopsis ----------->
8 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
9 <pre>
10 #include &lt;dmarc.h&gt;
11 <tt>void</tt>opendmarc_dns_fake_record(
12 char *name,
13 char *answer
14 );
15 </pre>
16 Updates a list of hard-coded DNS replies. Intended for by unit tests.
17 </td></tr>
18
19 <!----------- Description ---------->
20 <tr><th valign="top" align=left>DESCRIPTION</th><td>
21 <table border="1" cellspacing=1 cellpadding=4>
22 <tr align="left" valign=top>
23 <th width="80">Called When</th>
24 <td><tt>opendmarc_dns_fake_record()</tt>
25 may be called at any time. </td>
26 </tr>
27 </table>
28
29 <!----------- Arguments ---------->
30 <tr><th valign="top" align=left>ARGUMENTS</th><td>
31 <table border="1" cellspacing=0>
32 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
33 <tr valign="top"><td>name</td>
34 <td>The name of a DNS TXT record whose response should be hard-coded.
35 </td></tr>
36 <tr valign="top"><td>answer</td>
37 <td>The content that should be returned in place of live content
38 for the named record.
39 </td></tr>
40 </table>
41 </td></tr>
42
43 <!----------- Return Values ---------->
44 <tr>
45 <th valign="top" align=left>RETURN VALUES</th>
46 <td>
47 <ul>
48 <li>None.
49 </ul>
50 </td>
51 </tr>
52
53 </table>
54
55 <hr size="1">
56 <font size="-1">
57 Copyright (c) 2013, The Trusted Domain Project. All rights reserved.
58
59 <br>
60 By using this file, you agree to the terms and conditions set
61 forth in the license.
62 </font>
63 </body>
64 </html>
0 <html>
1 <head><title>opendmarc_get_policy_to_enforce()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_get_policy_to_enforce.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_get_policy_to_enforce()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_get_policy_to_enforce(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx
16 );
17 </pre>
18 Query the library to find the policy to follow.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_get_policy_to_enforce()</tt>
27 is called after the DMARC record has been fetched and parsed.
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>pctx</td>
36 <td>The address of a structure of type <a href="dmarc_policy_t.html">
37 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
38 </td></tr>
39 </table>
40 </td></tr>
41
42 <!----------- Return Values ---------->
43 <tr>
44 <th valign="top" align=left>RETURN VALUES</th>
45 <td>
46 <ul>
47 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>pctx</tt> value that was NULL.
48 <li><tt>DMARC_POLICY_ABSENT</tt> -- No <tt>DMARC</tt> record was found.
49 <li><tt>DMARC_FROM_DOMAIN_ABSENT</tt> -- No <tt>From:</tt> domain was ever supplied to look up.
50 <li><tt>DMARC_POLICY_NONE</tt> -- Accept (only if other policy allows)
51 <li><tt>DMARC_POLICY_REJECT</tt> -- Policy advises to reject the message.
52 <li><tt>DMARC_POLICY_QUARANTINE</tt> -- Policy advises to quarantine the message.
53 <li><tt>DMARC_POLICY_PASS</tt> -- Policy advises to accept the message
54 </ul>
55 </td>
56 </tr>
57
58 <!----------- Notes ---------->
59 <tr>
60 <th valign="top" align=left>NOTES</th>
61 <td>
62 <ul>
63 <li> Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
64 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
65 or supplied to the library with
66 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
67 <li> The "pct" value of the DMARC policy record is not applied by this function. That is, the applicable policy is always returned, and the caller must apply the semantics requested by a "pct" value other than 100.
68 </ul>
69 </td>
70 </tr>
71 </table>
72
73 <hr size="1">
74 <font size="-1">
75 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
76
77 <br>
78 By using this file, you agree to the terms and conditions set
79 forth in the license.
80 </font>
81 </body>
82 </html>
0 <html>
1 <head><title>OPENDMARC_LIB_T</title></head>
2 <body>
3 <!--
4 $Id: dkim_alg_t.html,v 1.2 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>OPENDMARC_LIB_T</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!----------- Description ---------->
11 <tr><th valign="top" align=left>DESCRIPTION</th><td>
12 <table border="1" cellspacing=1 cellpadding=4>
13 <tr align="left" valign=top>
14 <th width="80">Purpose</th>
15 <td>The <tt>OPENDMARC_LIB_T</tt> is used to pass startup information into the library.
16 It is designed to require that nothing inside it needs to ever be allocated nor freed.
17 </tr>
18
19 <tr align="left" valign=top>
20 <th width="80">Synopsis</th>
21 <td>
22 <blockquote>
23 #include &lt;dmarc.h&gt;
24 <p>
25 OPENDMARC_LIB_T lib;
26 </blockquote>
27 </td>
28 </tr>
29
30 <tr align="left" valign=top>
31 <th width="80">OPENDMARC_LIB_T</th>
32 <td>
33 The items inside the <tt>OPENDMARC_LIB_T</tt> structure, and their legal values are:
34 <p>
35 <tt>int tld_type</tt>
36 <blockquote>
37 Can be assigned one of two possible values:
38 <ul>
39 <li><tt>OPENDMARC_TLD_TYPE_NONE</tt> -- If you do not want to use any TLD file to resolve the organizational domain
40 </li>
41 <li><tt>OPENDMARC_TLD_TYPE_MOZILLA</tt> -- If you will supply a current version of the <tt>effective_tld_names.dat</tt>
42 file from mozilla.org.
43 </li>
44 </ul>
45 </blockquote>
46
47 <tt>u_char&nbsp;tld_source_file[MAXPATHLEN]</tt>
48 <blockquote>
49 The full or relative path to the TLD file to parse and use.
50 </blockquote>
51
52 <p>NOTE:<br>If and only if your resolver library lacks the <tt>res_setservers()<tt> interface, the following hooks
53 are avaliable as a substitute.
54
55 <p><tt>int nscount</tt>
56 <blockquote>
57 If you want the dmarc records looked up by other than the name servers listed in
58 <tt>/etc/resolv.conf</tt> and your resolver library lacks the <tt>res_setservers()<tt> interface. This is the count of the number of entries in <tt>nsaddr_list</tt>.
59 </blockquote>
60
61 <tt>struct&nbsp;sockaddr_in&nbsp;nsaddr_list[MAXNS]</tt>
62 <blockquote>
63 If your resolver library lacks the <tt>res_setservers()<tt> interface,
64 this is an array of IP addresses of name servers to use
65 converted to the type <tt>struct sockaddr_in</tt>.
66 </blockquote>
67
68 </td>
69 </tr>
70
71 <tr align="left" valign=top>
72 <th width="80">Usage</th>
73 <td>
74 When your program first starts to run, it should pass a pointer to this <tt>OPENDMARC_LIB_T</tt> structure
75 to the <a href="opendmarc_policy_library_init.html"><tt>opendmarc_policy_library_init</tt></a> function, and when
76 your program finally shuts down, it should pass a pointer to this <tt>OPENDMARC_LIB_T</tt> structure
77 to the <a href="opendmarc_policy_library_shutdown.html"><tt>opendmarc_policy_library_shutdown</tt></a> function.
78 </td>
79 </tr>
80
81
82 <tr>
83 <th valign="top" align=left>NOTES</th>
84 <td>
85 <ul>
86 <li><tt>OPENDMARC_LIB_T</tt> is <i>not</i> thread safe. It <i>must only</i> be used once from inside
87 the main thread for startup and shutdown purposes. Multiple threads <i>must not</i> independently
88 attempt to start/stop the library with separate settings.
89 </ul>
90 </td>
91 </tr>
92
93 </table>
94
95 <hr size="1">
96 <font size="-1">
97 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
98
99 <br>
100 By using this file, you agree to the terms and conditions set
101 forth in the license.
102 </font>
103 </body>
104 </html>
0 <html>
1 <head><title>opendmarc_policy_connect_clear()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_connect_clear.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_connect_clear()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * opendmarc_policy_connect_clear(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * pctx
16 );
17 </pre>
18 Clears an already allocated opaque context to all NULLs and zeros. This is appropriate for a program that wishes to preallocate a fixed number of opaque contexts and to clear and reuse them as needed.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_policy_connect_clear()</tt>
27 may be called anytime you want to completely clear an opaque context.
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>pctx</td>
36 <td>A pointer to type <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a>.
37 </td></tr>
38 </table>
39 </td></tr>
40
41 <!----------- Return Values ---------->
42 <tr>
43 <th valign="top" align=left>RETURN VALUES</th>
44 <td>
45 <ul>
46 <li><a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * -- on success
47 <li>NULL -- Only if the pointer passed into it is NULL.
48 </ul>
49 </td>
50 </tr>
51
52 <!----------- Notes ---------->
53 <tr>
54 <th valign="top" align=left>NOTES</th>
55 <td>
56 <ul>
57 <li>You should not use this function to handle an SMTP RSET. Instead use
58 <a href="opendmarc_policy_connect_rset.html">opendmarc_policy_connect_rset()</a>.
59 </ul>
60 </td>
61 </tr>
62 </table>
63
64 <hr size="1">
65 <font size="-1">
66 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
67
68 <br>
69 By using this file, you agree to the terms and conditions set
70 forth in the license.
71 </font>
72 </body>
73 </html>
0 <html>
1 <head><title>opendmarc_policy_connect_init()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_connect_init.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_connect_init()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * opendmarc_policy_connect_init(
15 u_char *ip_addr, int is_ipv6
16 );
17 </pre>
18 Start processing a connection by fetching a pointer of type <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a>.
19 Pre-fill the opaque structure behind that pointer with the connecting IP address and whether or not it is
20 an IPv6 address.
21 </td></tr>
22
23 <!----------- Description ---------->
24 <tr><th valign="top" align=left>DESCRIPTION</th><td>
25 <table border="1" cellspacing=1 cellpadding=4>
26 <tr align="left" valign=top>
27 <th width="80">Called When</th>
28 <td><tt>opendmarc_policy_connect_init()</tt>
29 may be called after the initial client connection, but before you use any of the library
30 routines that require the <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> pointer type as input.
31 </tr>
32 </table>
33
34 <!----------- Arguments ---------->
35 <tr><th valign="top" align=left>ARGUMENTS</th><td>
36 <table border="1" cellspacing=0>
37 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
38 <tr valign="top"><td>ip_addr</td>
39 <td>A string containing the IP address of the connecting client.
40 </td></tr>
41 <tr valign="top"><td>is_ipv6</td>
42 <td>An integer of value 0 if the address in <tt>ip_addr</tt> is an IPv4 address.
43 Or the value non-zero if the address in <tt>ip_addr</tt> is an IPv6 address.
44 </td></tr>
45 </table>
46 </td></tr>
47
48 <!----------- Return Values ---------->
49 <tr>
50 <th valign="top" align=left>RETURN VALUES</th>
51 <td>
52 <ul>
53 <li><a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * -- on success
54 <li>NULL -- On error and sets <tt>errno</tt>
55 </ul>
56 </td>
57 </tr>
58
59 <!----------- Notes ---------->
60 <tr>
61 <th valign="top" align=left>NOTES</th>
62 <td>
63 <ul>
64 <li>If this function returns NULL it means that no more memory could be allocated.
65 </ul>
66 </td>
67 </tr>
68 </table>
69
70 <hr size="1">
71 <font size="-1">
72 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
73
74 <br>
75 By using this file, you agree to the terms and conditions set
76 forth in the license.
77 </font>
78 </body>
79 </html>
0 <html>
1 <head><title>opendmarc_policy_connect_rset()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_connect_rset.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_connect_rset()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * opendmarc_policy_connect_rset(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * pctx
16 );
17 </pre>
18 Partly clears the opaque context for reuse on the same connection, perhaps as a result of an SMTP RSET.
19 The IP address and address type are preserved but everything else is freed and zeroed.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_connect_rset()</tt>
28 may be called anytime you want to partly reset an opaque context such as a result of an SMTP RSET.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>A pointer to type <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a>.
38 </td></tr>
39 </table>
40 </td></tr>
41
42 <!----------- Return Values ---------->
43 <tr>
44 <th valign="top" align=left>RETURN VALUES</th>
45 <td>
46 <ul>
47 <li><a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * -- on success
48 <li>NULL -- Only if the pointer passed into it is NULL.
49 </ul>
50 </td>
51 </tr>
52
53 <!----------- Notes ---------->
54 <tr>
55 <th valign="top" align=left>NOTES</th>
56 <td>
57 <ul>
58 <li>You should not use this function to clear opaque structures for arbitrary re-use, instead use
59 <a href="opendmarc_policy_connect_rset.html">opendmarc_policy_connect_clear()</a>.
60 </ul>
61 </td>
62 </tr>
63 </table>
64
65 <hr size="1">
66 <font size="-1">
67 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
68
69 <br>
70 By using this file, you agree to the terms and conditions set
71 forth in the license.
72 </font>
73 </body>
74 </html>
0 <html>
1 <head><title>opendmarc_policy_connect_shutdown()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_connect_shutdown.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_connect_shutdown()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * opendmarc_policy_connect_shutdown(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * pctx
16 );
17 </pre>
18 Clear and completely free the the opaque context. Once freed it can never be reused.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_policy_connect_shutdown()</tt>
27 may be called as part of shutting down the current client connection.
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>pctx</td>
36 <td>A pointer to type <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a>.
37 </td></tr>
38 </table>
39 </td></tr>
40
41 <!----------- Return Values ---------->
42 <tr>
43 <th valign="top" align=left>RETURN VALUES</th>
44 <td>
45 <ul>
46 <li>NULL -- Always
47 </ul>
48 </td>
49 </tr>
50
51 <!----------- Notes ---------->
52 <tr>
53 <th valign="top" align=left>NOTES</th>
54 <td>
55 <ul>
56 <li>For each context you get with
57 <a href="opendmarc_policy_connect_shutdown.html">opendmarc_policy_connect_init()</a>,
58 you should have exactly one corresponding call to this shutdown function.
59 <li>Passing NULL is allowed and has no effect.
60 </ul>
61 </td>
62 </tr>
63 </table>
64
65 <hr size="1">
66 <font size="-1">
67 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
68
69 <br>
70 By using this file, you agree to the terms and conditions set
71 forth in the license.
72 </font>
73 </body>
74 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_adkim()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_adkim.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_adkim()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_adkim(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 int *adkim
17 );
18 </pre>
19 Query the library to find the <tt>adkim=</tt> value from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_adkim()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>adkim</td>
41 <td>The address of an integer to receive the value following the <tt>adkim=</tt>, a value of:
42 <br><tt>DMARC_RECORD_A_UNSPECIFIED</tt> if the <tt>adkim=</tt> was absent or
43 <br><tt>DMARC_RECORD_A_STRICT</tt> if <tt>adkim=s</tt> or
44 <br><tt>DMARC_RECORD_A_RELAXED</tt> if <tt>adkim=r</tt>.
45 </td></tr>
46 </table>
47 </td></tr>
48
49 <!----------- Return Values ---------->
50 <tr>
51 <th valign="top" align=left>RETURN VALUES</th>
52 <td>
53 <ul>
54 <li><tt>DMARC_PARSE_OKAY</tt> -- On success.
55 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- The <tt>pctp</tt> pointer was NULL.
56 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>adkim</tt> value that was NULL.
57 </ul>
58 </td>
59 </tr>
60
61 <!----------- Notes ---------->
62 <tr>
63 <th valign="top" align=left>NOTES</th>
64 <td>
65 <ul>
66 Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
67 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
68 or supplied to the library with
69 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
70 </ul>
71 </td>
72 </tr>
73 </table>
74
75 <hr size="1">
76 <font size="-1">
77 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
78
79 <br>
80 By using this file, you agree to the terms and conditions set
81 forth in the license.
82 </font>
83 </body>
84 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_alignment()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_alignment.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_alignment()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_alignment(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 int *dkim_alignment, int *spf_alignment
17 );
18 </pre>
19 Find out the Alignment results for the SPF and DKIM checks.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_alignment()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>dkim_alignment</td>
41 <td>The address of an integer that will be set to either
42 <br><tt>DMARC_POLICY_DKIM_ALIGNMENT_PASS</tt> or
43 <br><tt>DMARC_POLICY_DKIM_ALIGNMENT_FAIL</tt>
44 </td></tr>
45 <tr valign="top"><td>spf_alignment</td>
46 <td>The address of an integer that will be set to either
47 <br><tt>DMARC_POLICY_SPF_ALIGNMENT_PASS</tt> or
48 <br><tt>DMARC_POLICY_SPF_ALIGNMENT_FAIL</tt>
49 </td></tr>
50 </table>
51 </td></tr>
52
53 <!----------- Return Values ---------->
54 <tr>
55 <th valign="top" align=left>RETURN VALUES</th>
56 <td>
57 <ul>
58 <li><tt>DMARC_PARSE_OKAY</tt> -- Success.
59 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>pctx</tt> value that was NULL.
60 </ul>
61 </td>
62 </tr>
63
64 <!----------- Notes ---------->
65 <tr>
66 <th valign="top" align=left>NOTES</th>
67 <td>
68 <ul>
69 <li>This function should only be called after feeding the library the SPF and DKIM results with
70 <a href="opendmarc_policy_store_spf.html">opendmarc_policy_store_spf()</a> or
71 <a href="opendmarc_policy_store_dkim.html">opendmarc_policy_store_dkim()</a>.
72 And should only be called after providing the From header domain with
73 <a href="opendmarc_policy_store_from_domain.html">opendmarc_policy_store_from_domain()</a>.
74 And should only be called after the DMARC record has been fetched with
75 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
76 or supplied to the library with
77 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
78 And shoud only be called after the policy to enforce has been retrieved
79 and processed using
80 <a href="opendmarc_get_policy_to_enforce.html">opendmarc_get_policy_to_enforce()</a>.
81 </ul>
82 </td>
83 </tr>
84 </table>
85
86 <hr size="1">
87 <font size="-1">
88 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
89
90 <br>
91 By using this file, you agree to the terms and conditions set
92 forth in the license.
93 </font>
94 </body>
95 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_aspf()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_aspf.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_aspf()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_aspf(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 int *aspf
17 );
18 </pre>
19 Query the library to find the <tt>aspf=</tt> value from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_aspf()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>aspf</td>
41 <td>The address of an integer to receive the value following the <tt>aspf=</tt>, a value of:
42 <br><tt>DMARC_RECORD_A_UNSPECIFIED</tt> if the <tt>aspf=</tt> was absent or
43 <br><tt>DMARC_RECORD_A_STRICT</tt> if <tt>aspf=s</tt> or
44 <br><tt>DMARC_RECORD_A_RELAXED</tt> if <tt>aspf=r</tt>.
45 </td></tr>
46 </table>
47 </td></tr>
48
49 <!----------- Return Values ---------->
50 <tr>
51 <th valign="top" align=left>RETURN VALUES</th>
52 <td>
53 <ul>
54 <li><tt>DMARC_PARSE_OKAY</tt> -- On success.
55 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- The <tt>pctp</tt> pointer was NULL.
56 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>aspf</tt> value that was NULL.
57 </ul>
58 </td>
59 </tr>
60
61 <!----------- Notes ---------->
62 <tr>
63 <th valign="top" align=left>NOTES</th>
64 <td>
65 <ul>
66 Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
67 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
68 or supplied to the library with
69 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
70 </ul>
71 </td>
72 </tr>
73 </table>
74
75 <hr size="1">
76 <font size="-1">
77 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
78
79 <br>
80 By using this file, you agree to the terms and conditions set
81 forth in the license.
82 </font>
83 </body>
84 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_fo()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_fo.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_fo()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_fo(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 int *fo
17 );
18 </pre>
19 Query the library to find the <tt>fo=</tt> value from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_fo()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>fo</td>
41 <td>The address of an integer to receive the value following the <tt>fo=</tt>, a value (a bitmap) of:
42 <br><tt>DMARC_RECORD_FO_UNSPECIFIED</tt> if the <tt>fo=</tt> was absent or if no ruf= was specified.
43 <br><tt>DMARC_RECORD_FO_0</tt> if <tt>fo=0</tt>.
44 <br><tt>DMARC_RECORD_FO_1</tt> if <tt>fo=1</tt>.
45 <br><tt>DMARC_RECORD_FO_D</tt> if <tt>fo=d</tt>.
46 <br><tt>DMARC_RECORD_FO_S</tt> if <tt>fo=s</tt>.
47 </td></tr>
48 </table>
49 </td></tr>
50
51 <!----------- Return Values ---------->
52 <tr>
53 <th valign="top" align=left>RETURN VALUES</th>
54 <td>
55 <ul>
56 <li><tt>DMARC_PARSE_OKAY</tt> -- On success.
57 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- The <tt>pctp</tt> pointer was NULL.
58 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>fo</tt> pointer value that was NULL.
59 </ul>
60 </td>
61 </tr>
62
63 <!----------- Notes ---------->
64 <tr>
65 <th valign="top" align=left>NOTES</th>
66 <td>
67 <ul>
68 Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
69 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
70 or supplied to the library with
71 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
72 </ul>
73 </td>
74 </tr>
75 </table>
76
77 <hr size="1">
78 <font size="-1">
79 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
80
81 <br>
82 By using this file, you agree to the terms and conditions set
83 forth in the license.
84 </font>
85 </body>
86 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_p()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_p.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_p()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_p(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 int *p
17 );
18 </pre>
19 Query the library to find the <tt>p=</tt> value from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_p()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>p</td>
41 <td>The address of an integer to receive the value following the <tt>p=</tt>, a value of:
42 <br><tt>DMARC_RECORD_P_UNSPECIFIED</tt> if the <tt>p=</tt> was absent or
43 <br><tt>DMARC_RECORD_P_NONE</tt> if <tt>p=none</tt> or
44 <br><tt>DMARC_RECORD_P_QUARANTINE</tt> if <tt>p=quarantine</tt> or
45 <br><tt>DMARC_RECORD_P_REJECT</tt> if <tt>p=reject</tt>.
46 </td></tr>
47 </table>
48 </td></tr>
49
50 <!----------- Return Values ---------->
51 <tr>
52 <th valign="top" align=left>RETURN VALUES</th>
53 <td>
54 <ul>
55 <li><tt>DMARC_PARSE_OKAY</tt> -- On success.
56 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- The <tt>pctp</tt> pointer was NULL.
57 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>p</tt> value that was NULL.
58 </ul>
59 </td>
60 </tr>
61
62 <!----------- Notes ---------->
63 <tr>
64 <th valign="top" align=left>NOTES</th>
65 <td>
66 <ul>
67 Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
68 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
69 or supplied to the library with
70 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
71 </ul>
72 </td>
73 </tr>
74 </table>
75
76 <hr size="1">
77 <font size="-1">
78 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
79
80 <br>
81 By using this file, you agree to the terms and conditions set
82 forth in the license.
83 </font>
84 </body>
85 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_pct()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_pct.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_pct()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_pct(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 int *pctp
17 );
18 </pre>
19 Query the library to find the <tt>pct=</tt> value from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_pct()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>pctp</td>
41 <td>The address of an integer to receive the value following the <tt>pct=</tt>, a value 0-100.
42 </td></tr>
43 </table>
44 </td></tr>
45
46 <!----------- Return Values ---------->
47 <tr>
48 <th valign="top" align=left>RETURN VALUES</th>
49 <td>
50 <ul>
51 <li><tt>DMARC_PARSE_OKAY</tt> -- On success.
52 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>pctx</tt> value that was NULL.
53 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- The <tt>pctp</tt> pointer was NULL.
54 </ul>
55 </td>
56 </tr>
57
58 <!----------- Notes ---------->
59 <tr>
60 <th valign="top" align=left>NOTES</th>
61 <td>
62 <ul>
63 Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
64 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
65 or supplied to the library with
66 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
67 </ul>
68 </td>
69 </tr>
70 </table>
71
72 <hr size="1">
73 <font size="-1">
74 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
75
76 <br>
77 By using this file, you agree to the terms and conditions set
78 forth in the license.
79 </font>
80 </body>
81 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_rf()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_rf.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_rf()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_rf(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 int *rf
17 );
18 </pre>
19 Query the library to find the <tt>rf=</tt> value from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_rf()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>rf</td>
41 <td>The address of an integer to receive the value following the <tt>rf=</tt>, a value (a bitmap) of:
42 <br><tt>DMARC_RECORD_RF_UNSPECIFIED</tt> if the <tt>rf=</tt> was absent or if no ruf= was specified.
43 <br><tt>DMARC_RECORD_RF_AFRF</tt> if <tt>rf=afrf</tt>.
44 <br><tt>DMARC_RECORD_RF_IODEF</tt> if <tt>rf=iodef</tt>.
45 </td></tr>
46 </table>
47 </td></tr>
48
49 <!----------- Return Values ---------->
50 <tr>
51 <th valign="top" align=left>RETURN VALUES</th>
52 <td>
53 <ul>
54 <li><tt>DMARC_PARSE_OKAY</tt> -- On success.
55 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- The <tt>pctp</tt> pointer was NULL.
56 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>rf</tt> pointer value that was NULL.
57 </ul>
58 </td>
59 </tr>
60
61 <!----------- Notes ---------->
62 <tr>
63 <th valign="top" align=left>NOTES</th>
64 <td>
65 <ul>
66 Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
67 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
68 or supplied to the library with
69 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
70 </ul>
71 </td>
72 </tr>
73 </table>
74
75 <hr size="1">
76 <font size="-1">
77 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
78
79 <br>
80 By using this file, you agree to the terms and conditions set
81 forth in the license.
82 </font>
83 </body>
84 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_rua()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_rua.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_rua()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 u_char ** opendmarc_policy_fetch_rua(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 u_char *list_buf, size_t size_of_buf, int constant
17 );
18 </pre>
19 Query the library to find the list of <tt>rua=</tt> values from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_rua()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>list_buf</td>
41 <td>If not NULL, the address of a buffer to receive a comma delimited list as a single string.
42 </td></tr>
43 <tr valign="top"><td>size_of_buf</td>
44 <td>If <tt>list_buf</tt> was not NULL, the the length of that buffer in bytes.
45 </td></tr>
46 <tr valign="top"><td>constant</td>
47 <td>This function returns an argv-style array of stings. Set this to 0 if you will free that array
48 when you are finished with it. Set this to 1 if you want to treat that array as const and have
49 the library magically free it for you.
50 </td></tr>
51 </table>
52 </td></tr>
53
54 <!----------- Return Values ---------->
55 <tr>
56 <th valign="top" align=left>RETURN VALUES</th>
57 <td>
58 <ul>
59 <li><tt>!= NULL</tt> -- On success.
60 <li><tt>NULL</tt> -- The <tt>pctp</tt> pointer was NULL.
61 <li><tt>NULL</tt> -- If the <tt>DMARC</tt> record contained no <tt>rua=</tt>
62 </ul>
63 </td>
64 </tr>
65
66 <!----------- Notes ---------->
67 <tr>
68 <th valign="top" align=left>NOTES</th>
69 <td>
70 <ul>
71 <li>If you set <tt>constant</tt> to 1, you must not free the array returned. To do so will have unpredictable results.
72 <li>Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
73 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
74 or supplied to the library with
75 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
76 <li>Note that each returned record is looked up using DNS to find if it is accepting reports for the from_domain. If not, it is eliminated from the returned list.
77 </ul>
78 </td>
79 </tr>
80 </table>
81
82 <hr size="1">
83 <font size="-1">
84 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
85
86 <br>
87 By using this file, you agree to the terms and conditions set
88 forth in the license.
89 </font>
90 </body>
91 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_ruf()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_ruf.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_ruf()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 u_char ** opendmarc_policy_fetch_ruf(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 u_char *list_buf, size_t size_of_buf, int constant
17 );
18 </pre>
19 Query the library to find the list of <tt>ruf=</tt> values from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_ruf()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>list_buf</td>
41 <td>If not NULL, the address of a buffer to receive a comma delimited list as a single string.
42 </td></tr>
43 <tr valign="top"><td>size_of_buf</td>
44 <td>If <tt>list_buf</tt> was not NULL, the the length of that buffer in bytes.
45 </td></tr>
46 <tr valign="top"><td>constant</td>
47 <td>This function returns an argv-style array of stings. Set this to 0 if you will free that array
48 when you are finished with it. Set this to 1 if you want to treat that array as const and have
49 the library magically free it for you.
50 </td></tr>
51 </table>
52 </td></tr>
53
54 <!----------- Return Values ---------->
55 <tr>
56 <th valign="top" align=left>RETURN VALUES</th>
57 <td>
58 <ul>
59 <li><tt>!= NULL</tt> -- On success.
60 <li><tt>NULL</tt> -- The <tt>pctp</tt> pointer was NULL.
61 <li><tt>NULL</tt> -- If the <tt>DMARC</tt> record contained no <tt>ruf=</tt>
62 </ul>
63 </td>
64 </tr>
65
66 <!----------- Notes ---------->
67 <tr>
68 <th valign="top" align=left>NOTES</th>
69 <td>
70 <ul>
71 <li>If you set <tt>constant</tt> to 1, you must not free the array returned. To do so will have unpredictable results.
72 <li>Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
73 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
74 or supplied to the library with
75 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
76 <li>Note that each returned record is looked up using DNS to find if it is accepting reports for the from_domain. If not, it is eliminated from the returned list.
77 </ul>
78 </td>
79 </tr>
80 </table>
81
82 <hr size="1">
83 <font size="-1">
84 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
85
86 <br>
87 By using this file, you agree to the terms and conditions set
88 forth in the license.
89 </font>
90 </body>
91 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_sp()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_sp.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_sp()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_sp(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 int *p
17 );
18 </pre>
19 Query the library to find the <tt>sp=</tt> value from the <tt>DMARC</tt> record.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_sp()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>sp</td>
41 <td>The address of an integer to receive the value following the <tt>sp=</tt>, a value of:
42 <br><tt>DMARC_RECORD_P_UNSPECIFIED</tt> if the <tt>sp=</tt> was absent or
43 <br><tt>DMARC_RECORD_P_NONE</tt> if <tt>sp=none</tt> or
44 <br><tt>DMARC_RECORD_P_QUARANTINE</tt> if <tt>sp=quarantine</tt> or
45 <br><tt>DMARC_RECORD_P_REJECT</tt> if <tt>sp=reject</tt>.
46 </td></tr>
47 </table>
48 </td></tr>
49
50 <!----------- Return Values ---------->
51 <tr>
52 <th valign="top" align=left>RETURN VALUES</th>
53 <td>
54 <ul>
55 <li><tt>DMARC_PARSE_OKAY</tt> -- On success.
56 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- The <tt>pctp</tt> pointer was NULL.
57 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>sp</tt> value that was NULL.
58 </ul>
59 </td>
60 </tr>
61
62 <!----------- Notes ---------->
63 <tr>
64 <th valign="top" align=left>NOTES</th>
65 <td>
66 <ul>
67 Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
68 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
69 or supplied to the library with
70 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
71 </ul>
72 </td>
73 </tr>
74 </table>
75
76 <hr size="1">
77 <font size="-1">
78 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
79
80 <br>
81 By using this file, you agree to the terms and conditions set
82 forth in the license.
83 </font>
84 </body>
85 </html>
0 <html>
1 <head><title>opendmarc_policy_fetch_utilized_domain()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_fetch_utilized_domain.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_fetch_utilized_domain()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_fetch_utilized_domain(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 u_char* buf, size_t buflen
17 );
18 </pre>
19 Query the library to find the domain that was actually used to find the <tt>DMARC</tt> record. Either the <tt>From:</tt> domain or the organizational domain.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_fetch_utilized_domain()</tt>
28 is called after the DMARC record has been fetched and parsed.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>buf</td>
41 <td>The address of a buffer to receive the domain.
42 </td></tr>
43 <tr valign="top"><td>buflen</td>
44 <td>The size of the buffer in bytes.
45 </td></tr>
46 </table>
47 </td></tr>
48
49 <!----------- Return Values ---------->
50 <tr>
51 <th valign="top" align=left>RETURN VALUES</th>
52 <td>
53 <ul>
54 <li><tt>DMARC_PARSE_OKAY</tt> -- On success.
55 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>pctx</tt> value that was NULL.
56 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- The <tt>buf</tt> was NULL or <tt>buflen</tt> was 0.
57 </ul>
58 </td>
59 </tr>
60
61 <!----------- Notes ---------->
62 <tr>
63 <th valign="top" align=left>NOTES</th>
64 <td>
65 <ul>
66 Call this function only after a <tt>DMARC</tt> record was fetched and parsed with
67 <a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc()</a>
68 or supplied to the library with
69 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a>.
70 </ul>
71 </td>
72 </tr>
73 </table>
74
75 <hr size="1">
76 <font size="-1">
77 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
78
79 <br>
80 By using this file, you agree to the terms and conditions set
81 forth in the license.
82 </font>
83 </body>
84 </html>
0 <html>
1 <head><title>opendmarc_policy_library_init()</title></head>
2 <body>
3 <!--
4 $Id: dkim_eom.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_library_init()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_library_init(
15 <a href="opendmarc_lib_t.html"><tt>OPENDMARC_LIB_T</tt></a> *lib
16 );
17 </pre>
18 One time initialization of the library for use at program startup.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_policy_library_init()</tt>
27 is called after the program starts and before multi-threading operation begins.
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>lib</td>
36 <td>The address of a structure of type <a href="opendmarc_lib_t.html">
37 <tt>OPENDMARC_LIB_T</tt></a> that your code has filled out with appropriate values.
38 </td></tr>
39 </table>
40 </td></tr>
41
42 <!----------- Return Values ---------->
43 <tr>
44 <th valign="top" align=left>RETURN VALUES</th>
45 <td>
46 <ul>
47 <li><tt>DMARC_PARSE_OKAY</tt> -- Success.
48 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>lib</tt> value that was NULL.
49 <li><tt>DMARC_TLD_ERROR_UNKNOWN</tt> -- If the <tt>tld_type</tt> specified is not one that the library knows about.
50 <li>Other possible return values various <tt>errno</tt> values set by failure to read the TLD file.
51 </ul>
52 </td>
53 </tr>
54
55 <!----------- Notes ---------->
56 <tr>
57 <th valign="top" align=left>NOTES</th>
58 <td>
59 <ul>
60 <li>This function is not thread safe and must only be called once and only once when the
61 program starts and before multi-threading begins.
62 <li>If you fail to use a TLD file, the library will not be able to perform a second lookup
63 for a DMARC record by converting a subdomain into an organizational domain. So will only perform the
64 first lookup of the subdomain, possibly missing a valid DMARC record.
65 </ul>
66 </td>
67 </tr>
68 </table>
69
70 <hr size="1">
71 <font size="-1">
72 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
73
74 <br>
75 By using this file, you agree to the terms and conditions set
76 forth in the license.
77 </font>
78 </body>
79 </html>
0 <html>
1 <head><title>opendmarc_policy_library_shutdown()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_library_shutdown.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_library_shutdown()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_library_shutdown(
15 <a href="opendmarc_lib_t.html"><tt>OPENDMARC_LIB_T</tt></a> *lib
16 );
17 </pre>
18 Final shutdown of the library for use at program conclusion.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_policy_library_shutdown()</tt>
27 is called after multi-threading operation cease and before the program terminates.
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>lib</td>
36 <td>The address of a structure of type <a href="opendmarc_lib_t.html">
37 <tt>OPENDMARC_LIB_T</tt></a> that your code has filled out with appropriate values.
38 </td></tr>
39 </table>
40 </td></tr>
41
42 <!----------- Return Values ---------->
43 <tr>
44 <th valign="top" align=left>RETURN VALUES</th>
45 <td>
46 <ul>
47 <li><tt>DMARC_PARSE_OKAY</tt> -- Always.
48 </ul>
49 </td>
50 </tr>
51
52 <!----------- Notes ---------->
53 <tr>
54 <th valign="top" align=left>NOTES</th>
55 <td>
56 <ul>
57 <li>This function is not thread safe and must only be called once and only once after
58 multi-threading ceases and before the program terminates.
59 <li>If you used a TLD file, the library will free any recourses allocated for that use.
60 </ul>
61 </td>
62 </tr>
63 </table>
64
65 <hr size="1">
66 <font size="-1">
67 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
68
69 <br>
70 By using this file, you agree to the terms and conditions set
71 forth in the license.
72 </font>
73 </body>
74 </html>
0 <html>
1 <head><title>opendmarc_policy_parse_dmarc()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_parse_dmarc.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_parse_dmarc()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_parse_dmarc(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 u_char *domain, u_char *record
17 );
18 </pre>
19 Provide the library with a DMARC record to parse.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_parse_dmarc()</tt>
28 must be called before you call <a href="opendmarc_get_policy_to_enforce.html">opendmarc_get_policy_to_enforce()</a>.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>domain</td>
41 <td>A string containing the domain for which you looked up the <tt>DMARC</tt> record.
42 </td></tr>
43 <tr valign="top"><td>record</td>
44 <td>A string containing the <tt>DMARC</tt> record that the library should parse.
45 </td></tr>
46 </table>
47 </td></tr>
48
49 <!----------- Return Values ---------->
50 <tr>
51 <th valign="top" align=left>RETURN VALUES</th>
52 <td>
53 <ul>
54 <li><tt>DMARC_PARSE_OKAY</tt> -- Success.
55 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>pctx</tt> value that was NULL.
56 <li><tt>DMARC_PARSE_ERROR_BAD_VERSION</tt> -- If the <tt>DMARC</tt> record's <tt>v=</tt> was bad.
57 <li><tt>DMARC_PARSE_ERROR_BAD_VALUE</tt> -- If a value following an <tt>=</tt> was bad or illegal.
58 <li><tt>DMARC_PARSE_ERROR_NO_REQUIRED_P</tt> -- The required <tt>p=</tt> was absent.
59 </ul>
60 </td>
61 </tr>
62
63 <!----------- Notes ---------->
64 <tr>
65 <th valign="top" align=left>NOTES</th>
66 <td>
67 <ul>
68 <li>In general, avoid calling this function directly. Instead call
69 <a href="opendmarc_policy_store_dmarc.html">opendmarc_policy_store_dmarc()</a> instead.
70 <li>This function expects the <tt>DMARC</tt> record to be supplied as a single line of text. If the record appeared
71 in <tt>DNS</tt> as a collection of quoted parts, you must assemble those parts into a single string before calling this
72 function.
73 </ul>
74 </td>
75 </tr>
76 </table>
77
78 <hr size="1">
79 <font size="-1">
80 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
81
82 <br>
83 By using this file, you agree to the terms and conditions set
84 forth in the license.
85 </font>
86 </body>
87 </html>
0 <html>
1 <head><title>opendmarc_policy_query_dmarc()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_query_dmarc.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_query_dmarc()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_query_dmarc(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 u_char *domain
17 );
18 </pre>
19 Cause the DMARC record to be looked up using DNS.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_query_dmarc()</tt>
28 may be called either before you have stored the From: domain, or in place of storing that domain.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>domain</td>
41 <td>A string containing the domain to look up. If not NULL, should be the domain from the From: header. If NULL, you must already
42 have stored the From: domain using <a href="opendmarc_policy_store_from_domain.html">opendmarc_policy_store_from_domain()</a>.
43 </td></tr>
44 </table>
45 </td></tr>
46
47 <!----------- Return Values ---------->
48 <tr>
49 <th valign="top" align=left>RETURN VALUES</th>
50 <td>
51 <ul>
52 <li><tt>DMARC_PARSE_OKAY</tt> -- Success.
53 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>pctx</tt> value that was NULL.
54 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- if domain was NULL and there was no From: domain.
55 <li><tt>DMARC_PARSE_ERROR_NO_DOMAIN</tt> -- if domain wasn't really a domain name.
56 <li><tt>DMARC_DNS_ERROR_NXDOMAIN</tt> -- No such domain found in DNS.
57 <li><tt>DMARC_DNS_ERROR_TMPERR</tt> -- DNS returned a temporary failure.
58 <li><tt>DMARC_DNS_ERROR_NO_RECORD</tt> -- The domain exists but no DMARC record was found, either at that domain or a found organizational domain.
59 </ul>
60 </td>
61 </tr>
62
63 <!----------- Notes ---------->
64 <tr>
65 <th valign="top" align=left>NOTES</th>
66 <td>
67 <ul>
68 <li>If the DMARC record is found it is parsed, so this function can also return the values of <a href="opendmarc_policy_parse_dmarc.html">opendmarc_policy_parse_dmarc()</a>.
69 <li>This function uses the standard resolver library. As of this release there are no hooks for an asynchronous resolver library.
70 </ul>
71 </td>
72 </tr>
73 </table>
74
75 <hr size="1">
76 <font size="-1">
77 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
78
79 <br>
80 By using this file, you agree to the terms and conditions set
81 forth in the license.
82 </font>
83 </body>
84 </html>
0 <html>
1 <head><title>opendmarc_policy_status_to_str()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_status_to_str.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_status_to_str()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 const char * opendmarc_policy_status_to_str(
15 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> status
16 );
17 </pre>
18 Get a human readable string from a returned status value.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_policy_status_to_str()</tt>
27 is called anytime
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>status</td>
36 <td>Value of <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> returned by
37 a call to a library fuction.
38 </td></tr>
39 </table>
40 </td></tr>
41
42 <!----------- Return Values ---------->
43 <tr>
44 <th valign="top" align=left>RETURN VALUES</th>
45 <td>
46 <ul>
47 <li><tt>const char *</tt> -- Success.
48 <li><tt>"Undefine Value"</tt> -- If the <tt>status</tt> is outside the known range of values.
49 </ul>
50 </td>
51 </tr>
52
53 <!----------- Notes ---------->
54 <tr>
55 <th valign="top" align=left>NOTES</th>
56 <td>
57 <ul>
58 <li>The return value is a string constant and should never be free()'d.
59 </ul>
60 </td>
61 </tr>
62 </table>
63
64 <hr size="1">
65 <font size="-1">
66 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
67
68 <br>
69 By using this file, you agree to the terms and conditions set
70 forth in the license.
71 </font>
72 </body>
73 </html>
0 <html>
1 <head><title>opendmarc_policy_store_dkim()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_store_dkim.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_store_dkim()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * opendmarc_policy_store_dkim(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * pctx,
16 u_char *d_equal_domain, int dkim_result, u_char *human_result
17 );
18 </pre>
19 Once you have found the outcome of each DKIM check, no matter how many,
20 you may call this function to prepare it for a DMARC policy
21 decision.
22 </td></tr>
23
24 <!----------- Description ---------->
25 <tr><th valign="top" align=left>DESCRIPTION</th><td>
26 <table border="1" cellspacing=1 cellpadding=4>
27 <tr align="left" valign=top>
28 <th width="80">Called When</th>
29 <td><tt>opendmarc_policy_store_dkim()</tt>
30 may be called after each DKIM signature in the message is verified. That is, this function may
31 be called one, or many times.
32 </tr>
33 </table>
34
35 <!----------- Arguments ---------->
36 <tr><th valign="top" align=left>ARGUMENTS</th><td>
37 <table border="1" cellspacing=0>
38 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
39 <tr valign="top"><td>pctx</td>
40 <td>A pointer to type <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a>.
41 </td></tr>
42 <tr valign="top"><td>d_equal_domain</td>
43 <td>A pointer to an unsigned string containing the domain found in
44 the <tt>d=</tt> record of the <tt>DKIM</tt> signature.
45 </td></tr>
46 <tr valign="top"><td>dkim_result</td>
47 <td>Integer specifying the result of the <tt>DKIM</tt> check. Choose from one of:
48 <tt>DMARC_POLICY_DKIM_OUTCOME_NONE</tt> if there was no <tt>DKIM</tt> signature;
49 <tt>DMARC_POLICY_DKIM_OUTCOME_PASS</tt> if the <tt>DKIM</tt> check passed;
50 <tt>DMARC_POLICY_DKIM_OUTCOME_FAIL</tt> if the <tt>DKIM</tt> check failed; or
51 <tt>DMARC_POLICY_DKIM_OUTCOME_TMPFAIL</tt> if the check returned a temporary failure.
52 </td></tr>
53 <tr valign="top"><td>human_result</td>
54 <td>If not NULL, is a string containing an arbitrary, human readable and friendly <tt>DKIM</tt> result.
55 </td></tr>
56 </table>
57 </td></tr>
58
59 <!----------- Return Values ---------->
60 <tr>
61 <th valign="top" align=left>RETURN VALUES</th>
62 <td>
63 <ul>
64 <li><tt>DMARC_PARSE_OKAY</tt> -- On success
65 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If pctx was NULL
66 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- If domain was NULL or zero length
67 <li><tt>DMARC_PARSE_ERROR_NO_DOMAIN</tt> -- If domain did not contain a domain, e.g. "&lt;&gt;"
68 <li><tt>DMARC_PARSE_ERROR_NO_ALLOC</tt> -- If memory allocation failed
69 </ul>
70 </td>
71 </tr>
72
73 <!----------- Notes ---------->
74 <tr>
75 <th valign="top" align=left>NOTES</th>
76 <td>
77 <ul>
78 <li>You may feed this function results from multiple DKIM signatures. This function
79 will select the most successful check from among those that align with the header From: domain.
80 <li>You should not call this function if there were no DKIM signatures, because the
81 library presumes there will be none unless told otherwise.
82 </ul>
83 </td>
84 </tr>
85 </table>
86
87 <hr size="1">
88 <font size="-1">
89 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
90
91 <br>
92 By using this file, you agree to the terms and conditions set
93 forth in the license.
94 </font>
95 </body>
96 </html>
0 <html>
1 <head><title>opendmarc_policy_store_dmarc()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_store_dmarc.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_store_dmarc()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="opendmarc_status_t.html"><tt>OPENDMARC_STATUS_T</tt></a> opendmarc_policy_store_dmarc(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 u_char *dmarc_record, u_char *domain, u_char *organizationaldomain
17 );
18 </pre>
19 Provide the library with a DMARC record with which to determine policy.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_store_dmarc()</tt>
28 must be called before you call <a href="opendmarc_get_policy_to_enforce.html">opendmarc_get_policy_to_enforce()</a>.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>dmarc_record</td>
41 <td>A string containing the <tt>DMARC</tt> record that the library should parse.
42 </td></tr>
43 <tr valign="top"><td>domain</td>
44 <td>A string containing the domain for which you looked up the <tt>DMARC</tt> record.
45 </td></tr>
46 <tr valign="top"><td>organizationaldomain</td>
47 <td>If you found the record using the Organizational Domain instead of the From: domain, provide that domain here. Else leave as NULL.
48 </td></tr>
49 </table>
50 </td></tr>
51
52 <!----------- Return Values ---------->
53 <tr>
54 <th valign="top" align=left>RETURN VALUES</th>
55 <td>
56 <ul>
57 <li><tt>DMARC_PARSE_OKAY</tt> -- Success.
58 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If you passed in a <tt>pctx</tt> value that was NULL.
59 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- If the <tt>DMARC</tt> record was NULL.
60 <li><tt>DMARC_PARSE_ERROR_NO_DOMAIN</tt> -- If the <tt>domain</tt> was NULL.
61 <li><tt>DMARC_PARSE_ERROR_BAD_VERSION</tt> -- If the <tt>DMARC</tt> record's <tt>v=</tt> was bad.
62 <li><tt>DMARC_PARSE_ERROR_BAD_VALUE</tt> -- If a value following an <tt>=</tt> was bad or illegal.
63 <li><tt>DMARC_PARSE_ERROR_NO_REQUIRED_P</tt> -- The required <tt>p=</tt> was absent.
64 </ul>
65 </td>
66 </tr>
67
68 <!----------- Notes ---------->
69 <tr>
70 <th valign="top" align=left>NOTES</th>
71 <td>
72 <ul>
73 <li>This function expects the <tt>DMARC</tt> record to be supplied as a single line of text. If the record appeared
74 in <tt>DNS</tt> as a collection of quoted parts, you must assemble those parts into a single string before calling this
75 function.
76 </ul>
77 </td>
78 </tr>
79 </table>
80
81 <hr size="1">
82 <font size="-1">
83 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
84
85 <br>
86 By using this file, you agree to the terms and conditions set
87 forth in the license.
88 </font>
89 </body>
90 </html>
0 <html>
1 <head><title>opendmarc_policy_store_from_domain()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_store_from_domain.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_store_from_domain()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * opendmarc_policy_store_from_domain(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * pctx,
16 u_char *from_domain
17 );
18 </pre>
19 As soon as possible after you have located the first From: header, you should pass the value of that header to this
20 function.
21 </td></tr>
22
23 <!----------- Description ---------->
24 <tr><th valign="top" align=left>DESCRIPTION</th><td>
25 <table border="1" cellspacing=1 cellpadding=4>
26 <tr align="left" valign=top>
27 <th width="80">Called When</th>
28 <td><tt>opendmarc_policy_store_from_domain()</tt>
29 may be called while processing headers or after all headers have been processed.
30 </tr>
31 </table>
32
33 <!----------- Arguments ---------->
34 <tr><th valign="top" align=left>ARGUMENTS</th><td>
35 <table border="1" cellspacing=0>
36 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
37 <tr valign="top"><td>pctx</td>
38 <td>A pointer to type <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a>.
39 </td></tr>
40 <tr valign="top"><td>from_domain</td>
41 <td>A pointer to a string containing unsigned characters.
42 </td></tr>
43 </table>
44 </td></tr>
45
46 <!----------- Return Values ---------->
47 <tr>
48 <th valign="top" align=left>RETURN VALUES</th>
49 <td>
50 <ul>
51 <li><tt>DMARC_PARSE_OKAY</tt> -- On success
52 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If pctx was NULL
53 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- If from_domain was NULL or zero length
54 <li><tt>DMARC_PARSE_ERROR_NO_DOMAIN</tt> -- If from_domain did not contain a domain, e.g. "&lt;&gt;"
55 </ul>
56 </td>
57 </tr>
58
59 <!----------- Notes ---------->
60 <tr>
61 <th valign="top" align=left>NOTES</th>
62 <td>
63 <ul>
64 <li>You may pass the whole From: header to this function, or the value of the From: header or just the domain
65 you parsed from that address. This function will correctly handle whatever you feed it.
66 </ul>
67 </td>
68 </tr>
69 </table>
70
71 <hr size="1">
72 <font size="-1">
73 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
74
75 <br>
76 By using this file, you agree to the terms and conditions set
77 forth in the license.
78 </font>
79 </body>
80 </html>
0 <html>
1 <head><title>opendmarc_policy_store_spf()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_store_spf.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_store_spf()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * opendmarc_policy_store_spf(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> * pctx,
16 u_char *domain, int result, int origin, u_char *human_readable
17 );
18 </pre>
19 One you have found the outcome of the SPF check you may call this function to prepare it for a DMARC policy decision.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_store_spf()</tt>
28 may be called as soon as you have made an SPF decision.
29 If you have no way of validating SPF, you may ignore this function.
30 </tr>
31 </table>
32
33 <!----------- Arguments ---------->
34 <tr><th valign="top" align=left>ARGUMENTS</th><td>
35 <table border="1" cellspacing=0>
36 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
37 <tr valign="top"><td>pctx</td>
38 <td>A pointer to type <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a>.
39 </td></tr>
40 <tr valign="top"><td>domain</td>
41 <td>A pointer to an unsigned string containing the domain used to check <tt>SPF</tt>.
42 This may be the domain from
43 the <tt>SMTP MAIL From:</tt> command or, if that contained no domain,
44 the domain from the <tt>SMTP HELO/EHLO</tt> command.
45 </td></tr>
46 <tr valign="top"><td>result</td>
47 <td>Integer specifying the result of the <tt>SPF</tt> check. Choose from one of:
48 <tt>DMARC_POLICY_SPF_OUTCOME_NONE</tt> if there was no <tt>SPF</tt> record;
49 <tt>DMARC_POLICY_SPF_OUTCOME_PASS</tt> if the <tt>SPF</tt> check passed;
50 <tt>DMARC_POLICY_SPF_OUTCOME_FAIL</tt> if the <tt>SPF</tt> check failed; or
51 <tt>DMARC_POLICY_SPF_OUTCOME_TMPFAIL</tt> if the check returned a temporary failure.
52 </td></tr>
53 <tr valign="top"><td>origin</td>
54 <td>Integer specifying the which part of the <tt>SMTP</tt> session contained the domain to check.
55 Select from one of:
56 <tt>DMARC_POLICY_SPF_ORIGIN_MAILFROM</tt> if the domain came from the <tt>SMTP MAIL From:</tt> command; or
57 <tt>DMARC_POLICY_SPF_ORIGIN_HELO</tt> if the domain came from the <tt>SMTP HELO/EHLO</tt> command.
58 </td></tr>
59 <tr valign="top"><td>human_readable</td>
60 <td>If not NULL, is a string containing an arbitrary, human readable and friendly SPF result.
61 </td></tr>
62 </table>
63 </td></tr>
64
65 <!----------- Return Values ---------->
66 <tr>
67 <th valign="top" align=left>RETURN VALUES</th>
68 <td>
69 <ul>
70 <li><tt>DMARC_PARSE_OKAY</tt> -- On success
71 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- If pctx was NULL
72 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- If domain was NULL or zero length
73 <li><tt>DMARC_PARSE_ERROR_NO_DOMAIN</tt> -- If domain did not contain a domain, e.g. "&lt;&gt;"
74 </ul>
75 </td>
76 </tr>
77
78 <!----------- Notes ---------->
79 <tr>
80 <th valign="top" align=left>NOTES</th>
81 <td>
82 <ul>
83 <li>You may pass the whole <tt>SMTP MAIL From:</tt> command to this function,
84 or the value of the <tt>SMTP MAIL From:</tt> command inside angle braces or just the domain
85 you parsed from that address. This function will correctly handle whatever you feed it.
86 <li>If you lack access to an SPF outcome, you may safely omit calling this function, because
87 the library presumes there will be no SPF outcome unless told otherwise.
88 </ul>
89 </td>
90 </tr>
91 </table>
92
93 <hr size="1">
94 <font size="-1">
95 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
96
97 <br>
98 By using this file, you agree to the terms and conditions set
99 forth in the license.
100 </font>
101 </body>
102 </html>
0 <html>
1 <head><title>opendmarc_policy_to_buf()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_policy_to_buf.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_policy_to_buf()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 <tt>int</tt>opendmarc_policy_to_buf(
15 <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx,
16 char *buf, size_t buflen
17 );
18 </pre>
19 Fills out buf with the contents of <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_policy_to_buf()</tt>
28 may be called anytime <a href="dmarc_policy_t.html"><tt>DMARC_POLICY_T</tt></a> *pctx has data to examine.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>pctx</td>
37 <td>The address of a structure of type <a href="dmarc_policy_t.html">
38 <tt>DMARC_POLICY_T</tt></a> as returned from <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init()</a>.
39 </td></tr>
40 <tr valign="top"><td>buf</td>
41 <td>A buffer big enough.
42 </td></tr>
43 <tr valign="top"><td>buflen</td>
44 <td>The size in bytes of the buffer.
45 </td></tr>
46 </table>
47 </td></tr>
48
49 <!----------- Return Values ---------->
50 <tr>
51 <th valign="top" align=left>RETURN VALUES</th>
52 <td>
53 <ul>
54 <li><tt>0</tt> -- Success.
55 <li><tt>EINVAL</tt> -- If you passed in a <tt>pctx</tt>, <tt>buf</tt> that was NULL, or a <tt>buflen</tt> of zero.
56 <li><tt>E2BIG</tt> -- The <tt>buf</tt> was too small.
57 </ul>
58 </td>
59 </tr>
60
61 <!----------- Notes ---------->
62 <tr>
63 <th valign="top" align=left>NOTES</th>
64 <td>
65 A successfully filled out <tt>buf</tt> will contain mutilple LF delimited lines of text like the following:
66 <blockquote>
67 IP_ADDR=1.2.3.4
68 <br>IP_TYPE=IPv4
69 <br>SPF_DOMAIN=
70 <br>SPF_ORIGIN=
71 <br>SPF_OUTCOME=NONE
72 <br>SPF_HUMAN_OUTCOME=
73 <br>DKIM_FINAL=FALSE
74 <br>DKIM_DOMAIN=
75 <br>DKIM_OUTOME=NONE
76 <br>DKIM_HUMAN_OUTCOME=
77 <br>DKIM_ALIGNMENT=FAIL
78 <br>SPF_ALIGNMENT=FAIL
79 <br>H_ERRNO=
80 <br>ADKIM=RELAXED
81 <br>ASPF=RELAXED
82 <br>P=NONE
83 <br>SP=UNSPECIFIED
84 <br>PCT=100
85 <br>RF=AFRF,IODEF
86 <br>RI=86400
87 <br>RUA=mailto:dmarc-a@abuse.net
88 <br>RUF=mailto:dmarc-f@abuse.net
89 <br>FO=1:d:s:
90 </blockquote>
91 </td>
92 </tr>
93 </table>
94
95 <hr size="1">
96 <font size="-1">
97 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
98
99 <br>
100 By using this file, you agree to the terms and conditions set
101 forth in the license.
102 </font>
103 </body>
104 </html>
0 <html>
1 <head><title>opendmarc_spf_test()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_spf_test.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_spf_test()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 int opendmarc_spf_test(
15 char *ip_address, char *mail_from_domain, char *helo_domain,
16 char *spf_record, int softfail_okay_flag, char *human_readable,
17 size_t human_readable_len, int *used_mfrom
18 );
19 </pre>
20 Validate a passed in SPF record or look up one and validate it.
21 </td></tr>
22
23 <!----------- Description ---------->
24 <tr><th valign="top" align=left>DESCRIPTION</th><td>
25 <table border="1" cellspacing=1 cellpadding=4>
26 <tr align="left" valign=top>
27 <th width="80">Called When</th>
28 <td><tt>opendmarc_spf_test()</tt>
29 May be called anytime all its needed information is gathered. The envelope sender (MAIL From: or mlfi_envfrom)
30 is the earliest it can be called. The mlfi_eom() is the optimum time because that is the only
31 routine that can add a header.
32 </tr>
33 </table>
34
35 <!----------- Arguments ---------->
36 <tr><th valign="top" align=left>ARGUMENTS</th><td>
37 <table border="1" cellspacing=0>
38 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
39 <tr valign="top"><td>ip_address</td>
40 <td>A pointer to a string representation of an IPv4 or IPv6 address.
41 </td></tr>
42 <tr valign="top"><td>mail_from_domain</td>
43 <td>This can be the domain itself, or the full sender address or even the
44 angle brace enclosed address. Any of of those will work, including the
45 empty address &lt;&gt; and the literal MAILER_DAEMON.
46 </td></tr>
47 <tr valign="top"><td>helo_domain</td>
48 <td>This is the domain specified with the HELO command. This domain is ignored
49 if the mail_from_domain contains an actual domain.
50 </td></tr>
51 <tr valign="top"><td>spf_record</td>
52 <td>If not NULL, is a string containing the SPF record to validate.
53 If NULL, the record will be looked up based on either the <tt>mail_from_domain</tt> or <tt>helo_domain</tt>/.
54 </td></tr>
55 <tr valign="top"><td>softfail_okay_flag</td>
56 <td>If zero softfails (~all and ?all) are treated the same as if the are hard fails.
57 If non-zero, softfails are threated as a pass.
58 </td></tr>
59 <tr valign="top"><td>human_readable</td>
60 <td>If not NULL, is the address of a string buffer into which to scribble a human readble reason for
61 any result.
62 </td></tr>
63 <tr valign="top"><td>human_readable_len</td>
64 <td>The sizeof() or number of characters available in <tt>human_readable</tt>.
65 </td></tr>
66 <tr valign="top"><td>used_mfrom</td>
67 <td>Address of an integer into which either TRUE or FALSE will be written. If TRUE,
68 the <tt>mail_from_domain</tt> was used to validate the SPF record. If FALSE,
69 the <tt>helo_domain</tt> was used to validate the SPF record.
70 </td></tr>
71 </table>
72 </td></tr>
73
74 <!----------- Return Values ---------->
75 <tr>
76 <th valign="top" align=left>RETURN VALUES</th>
77 <td>
78 <ul>
79 <li><tt>DMARC_POLICY_SPF_OUTCOME_PASS</tt> -- On success
80 <li><tt>DMARC_POLICY_SPF_OUTCOME_FAIL</tt> -- If the SPF record check failed.
81 <li><tt>DMARC_POLICY_SPF_OUTCOME_TMPFAIL</tt> -- If there was as recoverable failure.
82 <li><tt>DMARC_POLICY_SPF_OUTCOME_NONE</tt> -- If domain did not have an spf record.
83 </ul>
84 </td>
85 </tr>
86
87 <!----------- Notes ---------->
88 <tr>
89 <th valign="top" align=left>NOTES</th>
90 <td>
91 <ul>
92 <li>This spf record check performs it own DNS lookups. There are no hooks provided
93 to subsitute your own DNS lookup routines at this time.
94 </ul>
95 </td>
96 </tr>
97 </table>
98
99 <hr size="1">
100 <font size="-1">
101 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
102
103 <br>
104 By using this file, you agree to the terms and conditions set
105 forth in the license.
106 </font>
107 </body>
108 </html>
0 <html>
1 <head><title>OPENDMARC_STATUS_T</title></head>
2 <body>
3 <!--
4 $Id: dkim_alg_t.html,v 1.2 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>OPENDMARC_STATUS_T</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!----------- Description ---------->
11 <tr><th valign="top" align=left>DESCRIPTION</th><td>
12 <table border="1" cellspacing=1 cellpadding=4>
13 <tr align="left" valign=top>
14 <th width="80">Purpose</th>
15 <td>The <tt>OPENDMARC_STATUS_T</tt> is the type returned by many of the functions in this library.
16 </tr>
17
18 <tr align="left" valign=top>
19 <th width="80">Synopsis</th>
20 <td>
21 <blockquote>
22 #include &lt;dmarc.h&gt;
23 <p>
24 OPENDMARC_STATUS_T return_value;
25 </blockquote>
26 </td>
27 </tr>
28
29 <tr align="left" valign=top>
30 <th width="80">OPENDMARC_STATUS_T</th>
31 <td>
32 The values that can be returned from functions that return <tt>OPENDMARC_STATUS_T</tt> include:
33 <ul>
34 <li><tt>DMARC_PARSE_OKAY</tt> -- Success.
35 </li>
36 <li><tt>DMARC_PARSE_ERROR_EMPTY</tt> -- An argument was empty or NULL or zero length.
37 </li>
38 <li><tt>DMARC_PARSE_ERROR_NULL_CTX</tt> -- Received a NULL pointer as the context or library initializer.
39 </li>
40 <li><tt>DMARC_PARSE_ERROR_BAD_VERSION</tt> -- DMARC record contained a bad v=.
41 </li>
42 <li><tt>DMARC_PARSE_ERROR_BAD_VALUE</tt> -- DMARC record a bad value, e.g. p=bob.
43 </li>
44 <li><tt>DMARC_PARSE_ERROR_NO_REQUIRED_P</tt> -- DMARC record lacked a required p=.
45 </li>
46 <li><tt>DMARC_PARSE_ERROR_NO_DOMAIN</tt> -- Parsing required a domain but got <>.
47 </li>
48 <li><tt>DMARC_PARSE_ERROR_NO_ALLOC</tt> -- Memory allocation error. Also sets errno to ENOMEM.
49 </li>
50 <li><tt>DMARC_PARSE_ERROR_BAD_SPF_MACRO</tt> -- Bad value given to <a href="opendmarc_policy_store_spf.html>opendmarc_policy_store_spf()</a>.
51 </li>
52 <li><tt>DMARC_PARSE_ERROR_BAD_DKIM_MACRO</tt> -- Bad value given to <a href="opendmarc_policy_store_dkim.html>opendmarc_policy_store_dkim()</a>.
53 </li>
54 <li><tt>DMARC_DNS_ERROR_NO_RECORD</tt> -- No DMARC record was found.
55 </li>
56 <li><tt>DMARC_DNS_ERROR_NXDOMAIN</tt> -- No such domain exists.
57 </li>
58 <li><tt>DMARC_DNS_ERROR_TMPERR</tt> -- Lookup of DMARC record got a recoverable error. Try again later.
59 </li>
60 <li><tt>DMARC_TLD_ERROR_UNKNOWN</tt> -- Type of TLD file was not a known type.
61 </li>
62 <li><tt>DMARC_FROM_DOMAIN_ABSENT</tt> -- Expected a From: domain but it was absent.
63 </li>
64 </ul>
65
66 </td>
67 </tr>
68
69 <tr align="left" valign=top>
70 <th width="80">Usage</th>
71 <td>
72 <ul>
73 <li>Individual functions return specific values. Only check for those documented per function.
74 </li>
75 <li>You may used these macros anywhere an integer expression may be used.
76 </li>
77 </td>
78 </tr>
79
80
81 <tr>
82 <th valign="top" align=left>NOTES</th>
83 <td>
84 <ul>
85 <li>You should use these macros rather than looking for particular integers, such as zero.
86 </li>
87 <li>These underlying values
88 currently conflict with some <tt>errno</tt> values and may be changed in the future.
89 </li>
90 </ul>
91 </td>
92 </tr>
93
94 </table>
95
96 <hr size="1">
97 <font size="-1">
98 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
99
100 <br>
101 By using this file, you agree to the terms and conditions set
102 forth in the license.
103 </font>
104 </body>
105 </html>
0 <html>
1 <head><title>opendmarc_tld_read_file()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_tld_read_file.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_tld_read_file()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 int opendmarc_tld_read_file(
15 char* path_fname, char *commentstring, char *drop, char *except
16 );
17 </pre>
18 Load in a TLD (Top Level Domain) file for use by the library.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_tld_read_file()</tt>
27 is called once before the program begins to run multi-threaded.
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>path_fname</td>
36 <td>The full or relative pathname to the file containing the <tt>TLD</tt> information.
37 </td></tr>
38 <tr valign="top"><td>commentstring</td>
39 <td>If not NULL, a string that is used to define commentary lines in the file. If NULL, defaults to "//".
40 </td></tr>
41 <tr valign="top"><td>drop</td>
42 <td>If not NULL, a string prefix that is used to define an absolute top level, such as ".com".
43 </td></tr>
44 <tr valign="top"><td>except</td>
45 <td>If not NULL, a string prefix that is used to define an exceptional top level, such as ".reseller.example.com".
46 </td></tr>
47 </table>
48 </td></tr>
49
50 <!----------- Return Values ---------->
51 <tr>
52 <th valign="top" align=left>RETURN VALUES</th>
53 <td>
54 <ul>
55 <li><tt>0</tt> -- On success.
56 <li><tt>!=0</tt> -- And sets <tt>errno</tt> on failure.
57 </ul>
58 </td>
59 </tr>
60
61 <!----------- Notes ---------->
62 <tr>
63 <th valign="top" align=left>NOTES</th>
64 <td>
65 <ul>
66 This function should probably not be called directly, instead consider using
67 <a href="opendmarc_policy_library_init.html">opendmarc_policy_library_init()</a>.
68 </ul>
69 </td>
70 </tr>
71 </table>
72
73 <hr size="1">
74 <font size="-1">
75 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
76
77 <br>
78 By using this file, you agree to the terms and conditions set
79 forth in the license.
80 </font>
81 </body>
82 </html>
0 <html>
1 <head><title>opendmarc_tld_shutdown()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_tld_shutdown.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_tld_shutdown()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 void opendmarc_tld_shutdown();
15 </pre>
16 De-allocate resources used to store the <tt>TLD</tt> list internally.
17 </td></tr>
18
19 <!----------- Description ---------->
20 <tr><th valign="top" align=left>DESCRIPTION</th><td>
21 <table border="1" cellspacing=1 cellpadding=4>
22 <tr align="left" valign=top>
23 <th width="80">Called When</th>
24 <td><tt>opendmarc_tld_shutdown()</tt>
25 is called once after the program concludes running multi-threaded.
26 </tr>
27 </table>
28
29 <!----------- Arguments ---------->
30 <tr><th valign="top" align=left>ARGUMENTS</th><td>
31 <table border="0" cellspacing=0>
32 <tr><td>none</td></tr>
33 </table>
34 </td></tr>
35
36 <!----------- Return Values ---------->
37 <tr>
38 <th valign="top" align=left>RETURN VALUES</th>
39 <td>
40 <ul>
41 <li><tt>none</tt> -- Returns nothing
42 </ul>
43 </td>
44 </tr>
45
46 <!----------- Notes ---------->
47 <tr>
48 <th valign="top" align=left>NOTES</th>
49 <td>
50 <ul>
51 This function should probably not be called directly, instead consider using
52 <a href="opendmarc_policy_library_shutdown.html">opendmarc_policy_library_shutdown()</a>.
53 </ul>
54 </td>
55 </tr>
56 </table>
57
58 <hr size="1">
59 <font size="-1">
60 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
61
62 <br>
63 By using this file, you agree to the terms and conditions set
64 forth in the license.
65 </font>
66 </body>
67 </html>
0 <html>
1 <head><title>opendmarc_util_clearargv()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_util_clearargv.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_util_clearargv()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 u_char ** opendmarc_util_clearargv(
15 u_char **ary
16 );
17 </pre>
18 Clears an already allocated NULL-terminated array of strings.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_util_clearargv()</tt>
27 may be called anytime.
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>ary</td>
36 <td>The NULL-terminated array of strings to deallocate.
37 </td></tr>
38 </table>
39 </td></tr>
40
41 <!----------- Return Values ---------->
42 <tr>
43 <th valign="top" align=left>RETURN VALUES</th>
44 <td>
45 <ul>
46 <li>NULL -- Always.
47 </ul>
48 </td>
49 </tr>
50
51 <!----------- Notes ---------->
52 <tr>
53 <th valign="top" align=left>NOTES</th>
54 <td>
55 <ul>
56 <li>This frees each of the strings first, then frees the array.
57 </ul>
58 </td>
59 </tr>
60 </table>
61
62 <hr size="1">
63 <font size="-1">
64 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
65
66 <br>
67 By using this file, you agree to the terms and conditions set
68 forth in the license.
69 </font>
70 </body>
71 </html>
0 <html>
1 <head><title>opendmarc_xml()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_xml.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_xml()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 u_char ** opendmarc_xml(
15 char *b, size_t blen, char *e, size_t elen)
16 );
17 </pre>
18 Parse and XML Report that was stored in a memory buffer. Returns a NULL termiated array of strings as lines of CSV
19 data.
20 </td></tr>
21
22 <!----------- Description ---------->
23 <tr><th valign="top" align=left>DESCRIPTION</th><td>
24 <table border="1" cellspacing=1 cellpadding=4>
25 <tr align="left" valign=top>
26 <th width="80">Called When</th>
27 <td><tt>opendmarc_xml()</tt>
28 Any time you have received a <tt>DMARC</tt> report, and have already extracted it from its zip file.
29 </tr>
30 </table>
31
32 <!----------- Arguments ---------->
33 <tr><th valign="top" align=left>ARGUMENTS</th><td>
34 <table border="1" cellspacing=0>
35 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36 <tr valign="top"><td>b</td>
37 <td>The address of the memory buffer containing the XML report.
38 </td></tr>
39 <tr valign="blen"><td>blen</td>
40 <td>The size of the buffer <tt>b</tt> in bytes.
41 </td></tr>
42 <tr valign="top"><td>e</td>
43 <td>A buffer to contain any returned human-readable error message.
44 </td></tr>
45 <tr valign="top"><td>elen</td>
46 <td>The size of the buffer <tt>e</tt> in bytes.
47 </td></tr>
48 </table>
49 </td></tr>
50
51 <!----------- Return Values ---------->
52 <tr>
53 <th valign="top" align=left>RETURN VALUES</th>
54 <td>
55 <ul>
56 <li><tt>u_char **</tt> -- On success, a NULL terminated array of CSV data lines.
57 <li><tt>NULL</tt> -- Failure, with the reason in the <tt>e</tt> buffer.
58 </ul>
59 </td>
60 </tr>
61
62 <!----------- Notes ---------->
63 <tr>
64 <th valign="top" align=left>NOTES</th>
65 <td>
66 <ul>
67 <li>The return value can be free'd using
68 <a href="opendmarc_util_clearargv.html">opendmarc_util_clearargv()</a>.
69 <li>The first line of the CSV data contains column names.
70 </ul>
71 </td>
72 </tr>
73 </table>
74
75 <hr size="1">
76 <font size="-1">
77 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
78
79 <br>
80 By using this file, you agree to the terms and conditions set
81 forth in the license.
82 </font>
83 </body>
84 </html>
0 <html>
1 <head><title>opendmarc_xml_parse()</title></head>
2 <body>
3 <!--
4 $Id: opendmarc_xml_parse.html,v 1.5 2010/07/24 04:52:15 cm-msk Exp $
5 -->
6 <h1>opendmarc_xml_parse()</h1>
7 <p align="right"><a href="index.html">[back to index]</a></p>
8
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12 <pre>
13 #include &lt;dmarc.h&gt;
14 u_char ** opendmarc_xml_parse(
15 char *fname, char *err_buf, size_t err_len
16 );
17 </pre>
18 Parse and XML Report by reading it from a file.
19 </td></tr>
20
21 <!----------- Description ---------->
22 <tr><th valign="top" align=left>DESCRIPTION</th><td>
23 <table border="1" cellspacing=1 cellpadding=4>
24 <tr align="left" valign=top>
25 <th width="80">Called When</th>
26 <td><tt>opendmarc_xml_parse()</tt>
27 Any time you have received a <tt>DMARC</tt> report, and have already extracted it from its zip file.
28 </tr>
29 </table>
30
31 <!----------- Arguments ---------->
32 <tr><th valign="top" align=left>ARGUMENTS</th><td>
33 <table border="1" cellspacing=0>
34 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
35 <tr valign="top"><td>fname</td>
36 <td>The full or relative path name of the file to read.
37 </td></tr>
38 <tr valign="blen"><td>err_buf</td>
39 <td>The size of a buffer in bytes to recieve error messages.
40 </td></tr>
41 <tr valign="top"><td>err_len</td>
42 <td>The size of the buffer <tt>err_buf</tt> in bytes.
43 </td></tr>
44 </table>
45 </td></tr>
46
47 <!----------- Return Values ---------->
48 <tr>
49 <th valign="top" align=left>RETURN VALUES</th>
50 <td>
51 <ul>
52 <li><tt>u_char **</tt> -- On success, a NULL terminated array of CSV data lines.
53 <li><tt>NULL</tt> -- Failure, with the reason in the <tt>err_buf</tt> buffer.
54 </ul>
55 </td>
56 </tr>
57
58 <!----------- Notes ---------->
59 <tr>
60 <th valign="top" align=left>NOTES</th>
61 <td>
62 <ul>
63 <li>The return value can be free'd using
64 <a href="opendmarc_util_clearargv.html">opendmarc_util_clearargv()</a>.
65 <li>The first line of the CSV data contains column names.
66 </ul>
67 </td>
68 </tr>
69 </table>
70
71 <hr size="1">
72 <font size="-1">
73 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
74
75 <br>
76 By using this file, you agree to the terms and conditions set
77 forth in the license.
78 </font>
79 </body>
80 </html>
0 <html>
1 <head>
2 <title>Overview</title>
3 </head>
4 <body>
5 <!--
6 -->
7
8 <h1>Overview</h1>
9 <p align="right"><a href="index.html">[back to index]</a></p>
10
11 For basic processig of an arriving message under
12 <b>Domain-Based Message Authentication, Reporting and Conformance</b>
13 ("DMARC"), make the following calls:
14
15 <ol>
16 <li> <tt><a href="opendmarc_policy_library_init.html">opendmarc_policy_library_init(&amp;lib)</a>;</tt>
17 <ul>
18 <li> initialize an instance of the library
19 <li> this must be done once before any of the other calls are made
20 <li> this needs to be called once when the application is started,
21 but its result can be reused at the start of processing of each
22 message
23 </ul>
24 <li> <tt>dmarc = <a href="opendmarc_policy_connect_init.html">opendmarc_policy_connect_init(ip-address, ip-version)</a>;</tt>
25 <ul>
26 <li> initialize a handle set up for signing all messages from a new
27 connection
28 <li> establishes the context needed for evaluating SPF
29 <li> the handle returned here can be used for all messages that arrive
30 from the given IP address; simply call
31 <a href="opendmarc_policy_connect_rset.html">opendmarc_policy_connect_rset()</a>
32 between each message
33 <li> each thread must request its own handle for processing messages
34 </ul>
35 <li> <tt><a href="opendmarc_policy_store_from_domain.html">opendmarc_policy_store_from_domain(dmarc, domain)</a>;</tt>
36 <ul>
37 <li> store the domain name found in the From: field of an arriving
38 message
39 </ul>
40 <li> <tt><a href="opendmarc_policy_store_spf.html">opendmarc_policy_store_spf(dmarc, ...)</a>;</tt>
41 <ul>
42 <li> stores the SPF result details for the current message once they
43 are available from some other API
44 </ul>
45 <li> <tt><a href="opendmarc_policy_store_dkim.html">opendmarc_policy_store_dkim(dmarc, ...)</a>;</tt>
46 <ul>
47 <li> stores a set of DKIM result details for the current message once
48 they are available from some other API
49 <li> this can be called multiple times per message since a single
50 message can have multiple DKIM signatures attached to it
51 </ul>
52 <li> <tt><a href="opendmarc_policy_query_dmarc.html">opendmarc_policy_query_dmarc(dmarc)</a>;</tt>
53 <ul>
54 <li> performs DMARC policy query and evaluation on the message based
55 on details provided above
56 </ul>
57 <li> <tt><a href="opendmarc_get_policy_to_enforce.html">opendmarc_get_policy_to_enforce(dmarc)</a>;</tt>
58 <ul>
59 <li> report the policy in effect over the From: domain found in the
60 message; indicates what the final disposition of the current
61 message should be
62 </ul>
63 <li> <tt><a href="opendmarc_policy_connect_shutdown.html">opendmarc_policy_connect_shutdown(dmarc)</a>;</tt>
64 <ul>
65 <li> shuts down the previously allocated handle
66 </ul>
67 <li> <tt><a href="opendmarc_policy_library_shutdown.html">opendmarc_policy_library_shutdown(lib)</a>;</tt>
68 <ul>
69 <li> free resources related to the library
70 </ul>
71 </ol> <br>
72
73 <hr size="1">
74 <font size="-1">
75 <br>
76 Copyright (c) 2013, The Trusted Domain Project. All rights reserved.
77
78 <br>
79 By using this file, you agree to the terms and conditions set
80 forth in the respective licenses.
81 </font>
82 </body>
83 </html>
0 /***********************************************************************
1 ** OPENDMARC_DNS.C
2 ** DMARC_DNS_GET_RECORD -- looks up and returns the txt record
3 ** DMARC_DNS_TEST_RECORD -- hook to test
4 **
5 ** Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved.
6 ************************************************************************/
7
8 #ifndef BIND_8_COMPAT
9 # define BIND_8_COMPAT
10 #endif /* ! BIND_8_COMPAT */
11
12 #include <netdb.h>
13
14 #include "opendmarc_internal.h"
15
16 #ifndef MAXPACKET
17 # define MAXPACKET (8192)
18 #endif
19
20 struct fake_dns_data
21 {
22 const char * fdns_name;
23 const char * fdns_answer;
24 struct fake_dns_data * fdns_next;
25 };
26
27 static struct fake_dns_data * fake_dns = NULL;
28 static struct fake_dns_data * fake_dns_tail = NULL;
29
30 /*************************************************************************
31 ** OPENDMARC_DNS_FAKE_RECORD -- store a fake DNS reply
32 **
33 ** Arguments:
34 ** name -- name of fake record to add
35 ** answer -- answer to fake record
36 **
37 ** Return Values:
38 ** None.
39 **
40 ** Side Effects:
41 ** Calls to dmarc_dns_get_record() will check this list for an answer
42 ** rather than using live DNS. This is intended to be used by test
43 ** harnesses that have no DNS access.
44 *************************************************************************/
45 void
46 opendmarc_dns_fake_record(const char *name, const char *answer)
47 {
48 struct fake_dns_data *new;
49
50 if (name == NULL)
51 return;
52
53 new = malloc(sizeof *new);
54 if (new != NULL)
55 {
56 new->fdns_name = strdup(name);
57 if (new->fdns_name == NULL)
58 {
59 free(new);
60 return;
61 }
62
63 new->fdns_answer = strdup(answer);
64 if (new->fdns_answer == NULL)
65 {
66 free((void *) new->fdns_name);
67 free(new);
68 return;
69 }
70
71 new->fdns_next = NULL;
72
73 if (fake_dns == NULL)
74 {
75 fake_dns = new;
76 fake_dns_tail = new;
77 }
78 else
79 {
80 fake_dns_tail->fdns_next = new;
81 fake_dns_tail = new;
82 }
83 }
84 }
85
86 /*************************************************************************
87 ** DMARC_DNS_GET_RECORD -- looks up and returns the txt record
88 **
89 ** Arguments:
90 ** domain -- the domain name to look up.
91 ** reply -- pointer to an integer to get query status
92 ** got_txtbuf -- where to scribble the found txt record
93 ** got_txtlen -- size of txt record buffer
94 **
95 ** Return Values:
96 ** got_txtbuf -- pointer to got_txtbuf on success
97 ** NULL -- otherise, and place the h_errno error into reply
98 **
99 ** Side Effects:
100 ** Makes a connection to the local (or specified)
101 ** name server and and may block waiting for a reply.
102 **
103 *************************************************************************/
104 char *
105 dmarc_dns_get_record(char *domain, int *reply, char *got_txtbuf, size_t got_txtlen)
106 {
107 u_char * end_ptr = NULL;
108 u_char * cur_ptr = NULL;
109 u_char * got_ptr = NULL;
110 u_char * gote_ptr = NULL;
111 int ch = 0;
112 short cur_len = 0;
113 HEADER header;
114 int class = -1;
115 int acnt = -1;
116 int qdcnt = -1;
117 u_short type = 0;
118 u_long ttl = 0;
119 char * bp = NULL;
120 int fake_reply = 0;
121 int * reply_ptr = NULL;
122 u_char answer_buf[MAXPACKET];
123 int answer_len;
124 char hbuf[MAXDNSHOSTNAME];
125 char namebuf[MAXDNSHOSTNAME + 1];
126 #if HAVE_RES_NINIT
127 struct __res_state resp;
128 #endif /* HAVE_RES_NINIT */
129
130 /*
131 * Short circuit the return "reply" if no variable provided.
132 */
133 if (reply == NULL)
134 reply_ptr = &fake_reply;
135 else
136 reply_ptr = reply;
137
138 /*
139 * If a null or empy domain was given to us, just say that it
140 * was not found.
141 */
142 *reply_ptr = 0;
143 if (domain == NULL || *domain == '\0')
144 {
145 *reply_ptr = HOST_NOT_FOUND;
146 return NULL;
147 }
148 /*
149 * If no buffer was supplied to return the txt record,
150 * pretend nothing was found.
151 */
152 if (got_txtbuf == NULL || got_txtlen == 0)
153 {
154 *reply_ptr = HOST_NOT_FOUND;
155 return NULL;
156 }
157
158 /*
159 * Pull the answer from the fake DNS table if there is one.
160 */
161 if (fake_dns != NULL)
162 {
163 struct fake_dns_data *cur;
164
165 for (cur = fake_dns; cur != NULL; cur = cur->fdns_next)
166 {
167 if (strcasecmp(cur->fdns_name, domain) == 0)
168 {
169 strncpy(got_txtbuf, cur->fdns_answer,
170 got_txtlen - 1);
171 *reply_ptr = NETDB_SUCCESS;
172 return got_txtbuf;
173 }
174 }
175
176 *reply_ptr = NO_DATA;
177 return NULL;
178 }
179
180 /*
181 * Copy the domain so we can scribble on it. The orginal
182 * may point to a static string.
183 * We should use strlcpy(), but not all systems have it.
184 */
185 (void) memset(hbuf, '\0', sizeof hbuf);
186 (void) strncpy(hbuf, domain, sizeof hbuf - 1);
187 bp = hbuf;
188
189 /*
190 * Make sure host ends in a dot to short circuit lookups
191 */
192 bp = hbuf + strlen(hbuf) - 1;
193 if (*bp != '.')
194 *++bp = '.';
195 *++bp = '\0';
196 /*
197 * Make user host does not begin with a dot.
198 */
199 bp = hbuf;
200 while (*bp == '.')
201 ++bp;
202
203 #ifdef HAVE_RES_NINIT
204 memset(&resp, '\0', sizeof resp);
205 resp.options |= RES_DEFAULT;
206 #if defined RES_USE_DNSSEC
207 resp.options |= RES_USE_DNSSEC;
208 #endif
209 res_ninit(&resp);
210 (void) opendmarc_policy_library_dns_hook(&resp.nscount,
211 &resp.nsaddr_list);
212 answer_len = res_nquery(&resp, bp, C_IN, T_TXT, answer_buf, sizeof answer_buf);
213 res_nclose(&resp);
214 #else /* HAVE_RES_NINIT */
215 #if defined RES_USE_DNSSEC
216 _res.options |= RES_USE_DNSSEC;
217 #endif
218 (void) opendmarc_policy_library_dns_hook(&_res.nscount,
219 _res.nsaddr_list);
220 answer_len = res_query(bp, C_IN, T_TXT, answer_buf, sizeof answer_buf);
221 #endif /* HAVE_RES_NINIT */
222 if (answer_len < 0)
223 {
224 if (h_errno == NETDB_SUCCESS)
225 h_errno = NO_DATA;
226 *reply_ptr = h_errno;
227 return NULL;
228 }
229 /*
230 * Truncate answer if it is too big.
231 */
232 if (answer_len > sizeof answer_buf)
233 answer_len = sizeof answer_buf;
234
235 (void) memcpy(&header, answer_buf, sizeof header);
236 cur_ptr = (u_char *)&answer_buf + HFIXEDSZ;
237 end_ptr = (u_char *)&answer_buf + answer_len;
238
239 (void) memset(namebuf, '\0', sizeof namebuf);
240 /* skip question part of response -- we know what we asked */
241 for (qdcnt = ntohs(header.qdcount); qdcnt > 0; qdcnt--)
242 {
243 (void) dn_expand((unsigned char *) &answer_buf, end_ptr,
244 cur_ptr, namebuf, sizeof namebuf);
245 if ((answer_len = dn_skipname(cur_ptr, end_ptr)) < 0)
246 {
247 *reply_ptr = NO_DATA;
248 return NULL;
249 }
250 cur_ptr += answer_len;
251 if (cur_ptr + INT16SZ + INT16SZ > end_ptr)
252 {
253 *reply_ptr = NO_DATA;
254 return NULL;
255 }
256 GETSHORT(type, cur_ptr);
257 GETSHORT(class, cur_ptr);
258 }
259 if (header.rcode != NOERROR)
260 {
261 *reply_ptr = NO_DATA;
262 return NULL;
263 }
264 acnt = ntohs((unsigned short) header.ancount);
265 if (acnt == 0)
266 {
267 *reply_ptr = NO_DATA;
268 return NULL;
269 }
270 while (--acnt >= 0 && cur_ptr < end_ptr)
271 {
272 if ((answer_len = dn_expand((unsigned char *) &answer_buf,
273 end_ptr, cur_ptr, namebuf,
274 sizeof namebuf)) < 0)
275 {
276 *reply_ptr = NO_DATA;
277 return NULL;
278 }
279 cur_ptr += answer_len;
280
281 if (cur_ptr + INT16SZ + INT16SZ > end_ptr)
282 {
283 /* currupt answer */
284 *reply_ptr = NO_DATA;
285 return NULL;
286 }
287 GETSHORT(type, cur_ptr);
288 GETSHORT(class, cur_ptr);
289 /* we may want to use the ttl later */
290 GETLONG(ttl, cur_ptr);
291
292 if (type == T_CNAME)
293 {
294 /*
295 * Copy the cname just incase the resolver
296 * didn't also follow it an give us the text
297 * record.
298 */
299
300 if (got_txtbuf[0] == '\0')
301 {
302 (void) memset(got_txtbuf, '\0', got_txtlen);
303 answer_len = dn_expand((unsigned char *)&answer_buf,
304 end_ptr, cur_ptr,
305 got_txtbuf, got_txtlen);
306 cur_ptr += answer_len;
307 }
308 else
309 {
310 cur_ptr += dn_skipname(end_ptr, cur_ptr);
311 }
312
313 continue;
314 }
315 #ifdef T_RRSIG
316 else if (type == T_RRSIG)
317 {
318 GETSHORT(answer_len, cur_ptr);
319 cur_ptr += answer_len;
320 }
321 #endif /* T_RRSIG */
322 else if (type != T_TXT)
323 {
324 /*
325 * TODO: Fail or should we ignore it?
326 */
327 *reply_ptr = NO_DATA;
328 return NULL;
329 }
330
331 if (cur_ptr + INT16SZ > end_ptr)
332 {
333 /*
334 * Yikes. No payload length
335 */
336 *reply_ptr = NO_DATA;
337 return NULL;
338 }
339 GETSHORT(cur_len, cur_ptr);
340
341 if (cur_ptr + cur_len > end_ptr)
342 {
343 /*
344 * If the payload length greater than remaining buffer
345 */
346 *reply_ptr = NO_DATA;
347 return NULL;
348 }
349 (void) memset(got_txtbuf, '\0', got_txtlen);
350 /* copy the returned record into got_txtbuf */
351 got_ptr = (u_char *)got_txtbuf;
352 gote_ptr = (u_char *)got_txtbuf + got_txtlen -1;
353 while (cur_len > 0 && got_ptr < gote_ptr)
354 {
355 ch = *cur_ptr++;
356 cur_len--;
357 while (ch > 0 && got_ptr < gote_ptr)
358 {
359 *got_ptr++ = *cur_ptr++;
360 ch--;
361 cur_len--;
362 }
363 }
364 if (strstr(got_txtbuf, "v=DMARC") != NULL)
365 {
366 *reply_ptr = NETDB_SUCCESS;
367 return got_txtbuf;
368 }
369 *got_txtbuf = '\0';
370 cur_ptr += cur_len;
371 cur_ptr += answer_len;
372 continue;
373 }
374 *reply_ptr = NO_DATA;
375 return NULL;
376 }
0 /***************************************************
1 ** $Id: opendmarc_hash.c,v 1.2 2010/12/03 23:06:48 bcx Exp $
2 ** Code contributed by Bryan Costales
3 ****************************************************/
4
5 #include "opendmarc_internal.h"
6
7 /********************************************************************
8 ** OPENDMARC_HASH_SET_CALLBACK -- Set the callback for freeing the data
9 **
10 ** Parameters:
11 ** ctx -- Hash table context
12 ** callback -- address of freeing function
13 ** Returns:
14 ** void -- nothing
15 ** Side Effects:
16 ** None.
17 ** Notes:
18 ** The free function must be declared as:
19 ** void *funct(void *arg);
20 */
21 void
22 opendmarc_hash_set_callback(OPENDMARC_HASH_CTX *hctx, void (*callback)(void *))
23 {
24 if (hctx == NULL)
25 return;
26 hctx->freefunct = callback;
27 return;
28 }
29
30 /********************************************************************
31 ** OPENDMARC_HASH_STRING -- Convert a string into its hash value.
32 **
33 ** Parameters:
34 ** string -- string to hash
35 ** limit -- size of the hash table
36 ** Returns:
37 ** unsigned integer of hash value
38 ** if str == NULL hashes ""
39 ** Side Effects:
40 ** None.
41 ** Notes:
42 ** Generally for internal use only.
43 */
44 static size_t
45 opendmarc_hash_string(char *str, size_t limit)
46 {
47 size_t hash;
48 size_t highorder;
49 int c;
50 char * s;
51
52 if (str == NULL)
53 s = "";
54 else
55 s = str;
56
57 /*
58 * Changed to a more modern CRC hash.
59 */
60 hash = 5381;
61 highorder = hash & 0xf8000000;
62 do
63 {
64 c = (int)(*s);
65 if (c == 0)
66 break;
67 hash = hash << 5;
68 hash = hash ^ (highorder >> 27);
69 hash = hash ^ c;
70 highorder = hash & 0xf8000000;
71 ++s;
72 } while (c != 0);
73 return hash % limit;
74 }
75
76 /********************************************************************
77 ** OPENDMARC_HASH_INIT -- Allocate and receive a context pointer
78 **
79 ** Parameters:
80 ** tablesize -- size of the internal hash table
81 ** Returns:
82 ** Address of type OPENDMARC_HASH_CTX *
83 ** NULL on error and sets errno.
84 ** Side Effects:
85 ** Allocates memory.
86 ** Initializes tablesize number of mutexes
87 ** Notes:
88 ** If tablesize is zero, defaults to (2048)
89 ** Tablesize should be a power of two, if not, it
90 ** is silently adjusted to a power of two.
91 ** If you want a callback to free your data, call
92 ** opendmarc_hash_set_callback() immediately after this call.
93 */
94 OPENDMARC_HASH_CTX *
95 opendmarc_hash_init(size_t tablesize)
96 {
97 size_t i;
98 unsigned int p2;
99 OPENDMARC_HASH_CTX *hctx;
100
101 hctx = malloc(sizeof(OPENDMARC_HASH_CTX));
102 if (hctx == NULL)
103 {
104 if (errno == 0)
105 errno = ENOMEM;
106 return NULL;
107 }
108
109 if (tablesize == 0)
110 hctx->tablesize = OPENDMARC_DEFAULT_HASH_TABLESIZE;
111 else
112 hctx->tablesize = tablesize;
113
114 hctx->freefunct = NULL;
115
116 /*
117 * If buckets is too small, make it min sized.
118 */
119 if (hctx->tablesize < OPENDMARC_MIN_SHELVES)
120 hctx->tablesize = OPENDMARC_MIN_SHELVES;
121
122 /*
123 * If it's too large, cap it.
124 */
125 if (hctx->tablesize > OPENDMARC_MAX_SHELVES)
126 hctx->tablesize = OPENDMARC_MAX_SHELVES;
127
128 /*
129 * If it's is not a power of two in size, round up.
130 */
131 if ((hctx->tablesize & (hctx->tablesize - 1)) != 0)
132 {
133 for (p2 = 0; hctx->tablesize != 0; p2++)
134 hctx->tablesize >>= 1;
135
136 if (p2 <= OPENDMARC_MAX_SHELVES_LG2)
137 hctx->tablesize = OPENDMARC_DEFAULT_HASH_TABLESIZE;
138 else
139 hctx->tablesize = 1 << p2;
140 }
141
142 hctx->table = calloc(hctx->tablesize, sizeof(OPENDMARC_HASH_SHELF));
143 if (hctx->table == NULL)
144 {
145 if (errno == 0)
146 errno = ENOMEM;
147 (void) free(hctx);
148 return NULL;
149 }
150 for (i = 0; i < hctx->tablesize; i++)
151 {
152 # if HAVE_PTHREAD_H || HAVE_PTHREAD
153 (void) pthread_mutex_init(&(hctx->table[i].mutex), NULL);
154 # endif
155 hctx->table[i].bucket = NULL;
156 }
157
158 return hctx;
159 }
160
161 /********************************************************************
162 ** OPENDMARC_HASH_FREEBUCKET -- Free a bucket.
163 **
164 ** Parameters:
165 ** b -- pointer to a bucket
166 ** Returns:
167 ** NULL always.
168 ** errno is non-zero on error
169 ** Side Effects:
170 ** Frees memory.
171 ** Notes:
172 ** Intended for internal use only.
173 ** Does not unlink b from linked list.
174 ** NO NOT mutex lock here.
175 */
176 static OPENDMARC_HASH_BUCKET *
177 ghash_freebucket(OPENDMARC_HASH_CTX *hctx, OPENDMARC_HASH_BUCKET *b)
178 {
179 if (b == NULL)
180 return NULL;
181 if (b->key != NULL)
182 {
183 (void) free(b->key);
184 b->key = NULL;
185 }
186 if (b->data != NULL)
187 {
188 if (hctx != NULL && hctx->freefunct != NULL)
189 {
190 (hctx->freefunct)(b->data);
191 b->data = NULL;
192 }
193 else
194 {
195 (void) free(b->data);
196 b->data = NULL;
197 }
198 }
199 (void) free(b);
200 b = NULL;
201 return NULL;
202 }
203
204 /********************************************************************
205 ** OPENDMARC_HASH_SHUTDOWN -- Give up and free a hash table.
206 **
207 ** Parameters:
208 ** hctx -- A hash context from ghash_init()
209 ** Returns:
210 ** NULL always.
211 ** errno is non-zero on error
212 ** Side Effects:
213 ** Frees memory.
214 ** Notes:
215 ** None
216 */
217 OPENDMARC_HASH_CTX *
218 opendmarc_hash_shutdown(OPENDMARC_HASH_CTX *hctx)
219 {
220 int i;
221 OPENDMARC_HASH_BUCKET *t, *b;
222
223 if (hctx == NULL)
224 {
225 errno = EINVAL;
226 return NULL;
227 }
228
229 if (hctx->table == NULL || hctx->tablesize == 0)
230 {
231 errno = EINVAL;
232 return NULL;
233 }
234
235 for (i = 0; i < hctx->tablesize; i++)
236 {
237 # if HAVE_PTHREAD_H || HAVE_PTHREAD
238 (void) pthread_mutex_destroy(&(hctx->table[i].mutex));
239 # endif
240 if ((hctx->table[i].bucket) == NULL)
241 continue;
242
243 b = hctx->table[i].bucket;
244 do
245 {
246 t = b->next;
247 b = ghash_freebucket(hctx, b);
248 b = t;
249
250 } while (b != NULL);
251 }
252 (void) free(hctx->table);
253 hctx->table = NULL;
254 (void) free(hctx);
255 hctx = NULL;
256 errno = 0;
257 return NULL;
258 }
259
260 /********************************************************************
261 ** OPENDMARC_HASH_LOOKUP -- Look up a key and get its data
262 **
263 ** Parameters:
264 ** hctx -- A hash context from ghash_init()
265 ** string -- The string to lookup
266 ** data -- Data for update only (NULL for plain lookup)
267 ** datalen -- Size in bytes of the data blob
268 ** Returns:
269 ** Address of data on success (search or update)
270 ** NULL and sets non-zero errno on error
271 ** Side Effects:
272 ** Allocates memory on update.
273 ** Notes:
274 ** If data is NULL, just lookup string and return data if found.
275 ** If data not NULL, insert if string not found, but if found,
276 ** replace the old data with the new.
277 */
278 void *
279 opendmarc_hash_lookup(OPENDMARC_HASH_CTX *hctx, char *string, void *data, size_t datalen)
280 {
281 uint32_t hashval;
282 OPENDMARC_HASH_BUCKET *b, *n;
283
284 if (data != NULL && datalen == 0)
285 {
286 errno = EINVAL;
287 return NULL;
288 }
289
290 if (string == NULL)
291 {
292 errno = EINVAL;
293 return NULL;
294 }
295
296 if (hctx == NULL || hctx->table == NULL || hctx->tablesize == 0)
297 {
298 errno = EINVAL;
299 return NULL;
300 }
301
302
303 hashval = opendmarc_hash_string(string, hctx->tablesize);
304
305 # if HAVE_PTHREAD_H || HAVE_PTHREAD
306 (void) pthread_mutex_lock(&(hctx->table[hashval].mutex));
307 # endif
308 b = hctx->table[hashval].bucket;
309 if (b != NULL)
310 {
311 do
312 {
313 if (b->key != NULL && strcasecmp(string, b->key) == 0)
314 {
315 if (data != NULL)
316 {
317 if (hctx->freefunct != NULL)
318 (hctx->freefunct)(b->data);
319 else
320 (void) free(b->data);
321
322 b->data = calloc(1, datalen);
323 if (b->data == NULL)
324 {
325 # if HAVE_PTHREAD_H || HAVE_PTHREAD
326 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
327 # endif
328 errno = ENOMEM;
329 return NULL;
330 }
331 memcpy(b->data, data, datalen);
332 (void) time(&(b->timestamp));
333 }
334 # if HAVE_PTHREAD_H || HAVE_PTHREAD
335 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
336 # endif
337 errno = 0;
338 return b->data;
339 }
340 b = b->next;
341 } while (b != NULL);
342 }
343 if (data == NULL)
344 {
345 # if HAVE_PTHREAD_H || HAVE_PTHREAD
346 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
347 # endif
348 errno = 0;
349 return NULL;
350 }
351
352 /*
353 * Not found, so we inert it.
354 */
355 n = calloc(1, sizeof(OPENDMARC_HASH_BUCKET));
356 if (n == NULL)
357 {
358 # if HAVE_PTHREAD_H || HAVE_PTHREAD
359 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
360 # endif
361 errno = ENOMEM;
362 return NULL;
363 }
364 n->next = n->previous = NULL;
365 n->key = strdup(string);
366 if (n->key == NULL)
367 {
368 (void) free(n);
369 n = NULL;
370 # if HAVE_PTHREAD_H || HAVE_PTHREAD
371 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
372 # endif
373 errno = ENOMEM;
374 return NULL;
375 }
376 n->data = calloc(1, datalen);
377 if (n->data == NULL)
378 {
379 (void) free(n->key);
380 n->key = NULL;
381 (void) free(n);
382 n = NULL;
383 # if HAVE_PTHREAD_H || HAVE_PTHREAD
384 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
385 # endif
386 errno = ENOMEM;
387 return NULL;
388 }
389 memcpy(n->data, data, datalen);
390 (void) time(&(n->timestamp));
391
392 b = hctx->table[hashval].bucket;
393 if (b == NULL)
394 {
395 hctx->table[hashval].bucket = n;
396 # if HAVE_PTHREAD_H || HAVE_PTHREAD
397 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
398 # endif
399 errno = 0;
400 return n->data;
401 }
402 while (b->next != NULL)
403 b = b->next;
404 b->next = n;
405 n->previous = b;
406 # if HAVE_PTHREAD_H || HAVE_PTHREAD
407 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
408 # endif
409
410 errno = 0;
411 return n->data;
412 }
413
414 /********************************************************************
415 ** OPENDMARC_HASH_DROP -- Remove a key/data from the hash table
416 **
417 ** Parameters:
418 ** hctx -- A hash context from ghash_init()
419 ** string -- The string to remove
420 ** Returns:
421 ** Zero on success
422 ** Returns non-zero errno on error
423 ** Side Effects:
424 ** Frees memory
425 ** Notes:
426 ** If string not in the table, returns zero anyway.
427 */
428 int
429 opendmarc_hash_drop(OPENDMARC_HASH_CTX *hctx, char *string)
430 {
431 uint32_t hashval;
432 OPENDMARC_HASH_BUCKET *b;
433
434 if (string == NULL)
435 {
436 return errno = EINVAL;
437 }
438
439 if (hctx == NULL || hctx->table == NULL || hctx->tablesize == 0)
440 {
441 return errno = EINVAL;
442 }
443
444 hashval = opendmarc_hash_string(string, hctx->tablesize);
445
446 # if HAVE_PTHREAD_H || HAVE_PTHREAD
447 (void) pthread_mutex_lock(&(hctx->table[hashval].mutex));
448 # endif
449 b = hctx->table[hashval].bucket;
450 if (b != NULL)
451 {
452 do
453 {
454 if (b->key != NULL && strcmp(string, b->key) == 0)
455 {
456 if (b->previous != NULL)
457 b->previous->next = b->next;
458 if (b->next != NULL)
459 b->next->previous = b->previous;
460 b = ghash_freebucket(hctx, b);
461 # if HAVE_PTHREAD_H || HAVE_PTHREAD
462 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
463 # endif
464 return errno = 0;
465 }
466 b = b->next;
467 } while (b != NULL);
468 }
469 # if HAVE_PTHREAD_H || HAVE_PTHREAD
470 (void) pthread_mutex_unlock(&(hctx->table[hashval].mutex));
471 # endif
472 return errno = 0;
473 }
474
475 /********************************************************************
476 ** OPENDMARC_HASH_EXPIRE -- Remove old data from the hash table
477 **
478 ** Parameters:
479 ** hctx -- A hash context from ghash_init()
480 ** age -- Maximum age to retain
481 ** Returns:
482 ** Zero on success
483 ** Returns non-zero errno on error
484 ** Side Effects:
485 ** Frees memory
486 ** Notes:
487 ** The age is in seconds. All entries older than
488 ** age are removed from the table.
489 */
490 int
491 opendmarc_hash_expire(OPENDMARC_HASH_CTX *hctx, time_t age)
492 {
493 OPENDMARC_HASH_BUCKET *b, *t;
494 time_t now;
495 int i;
496
497 if (age == 0)
498 {
499 return errno = EINVAL;
500 }
501
502 if (hctx == NULL || hctx->table == NULL || hctx->tablesize == 0)
503 {
504 return errno = EINVAL;
505 }
506
507 (void) time(&now);
508 for (i = 0; i < hctx->tablesize; i++)
509 {
510
511 # if HAVE_PTHREAD_H || HAVE_PTHREAD
512 (void) pthread_mutex_lock(&(hctx->table[i].mutex));
513 # endif
514 b = hctx->table[i].bucket;
515 if (b != NULL)
516 {
517 do
518 {
519 t = b->next;
520 if ((now - b->timestamp) > age)
521 {
522 if (b->previous != NULL)
523 b->previous->next = b->next;
524 if (b->next != NULL)
525 b->next->previous = b->previous;
526 if (b == hctx->table[i].bucket)
527 hctx->table[i].bucket = t;
528 b = ghash_freebucket(hctx, b);
529 }
530 b = t;
531 } while (b != NULL);
532 }
533 # if HAVE_PTHREAD_H || HAVE_PTHREAD
534 (void) pthread_mutex_unlock(&(hctx->table[i].mutex));
535 # endif
536 }
537 return errno = 0;
538 }
539
0 /* Copyright (c) 2012-2015, The Trusted Domain Project. All rights reserved. */
1
2 #ifndef OPENDMARC_INTERNAL_H
3 #define OPENDMARC_INTERNAL_H
4
5 #if HAVE_CONFIG_H
6 # include "build-config.h"
7 #endif
8
9 # if HAVE_CTYPE_H
10 # include <ctype.h>
11 # endif
12 # if HAVE_ERRNO_H
13 # include <errno.h>
14 # endif
15 # if HAVE_POLL_H
16 # include <poll.h>
17 # endif
18 # if HAVE_FCNTL_H
19 # include <fcntl.h>
20 # endif
21 # ifdef sun
22 # include <libgen.h>
23 # endif
24 # if HAVE_MEMORY_H
25 # include <memory.h>
26 # endif
27 # if HAVE_STDIO_H
28 # include <stdio.h>
29 # endif
30 # if HAVE_STDLIB_H
31 # include <stdlib.h>
32 # endif
33 # if HAVE_STRING_H
34 # include <string.h>
35 # endif
36 # if HAVE_SYS_SOCKET_H
37 # include <sys/socket.h>
38 # endif
39 # if HAVE_SYS_STAT_H
40 # include <sys/stat.h>
41 # endif
42 # if HAVE_SYS_TYPES_H
43 # include <sys/types.h>
44 # endif
45 # if HAVE_SYSEXITS_H
46 # include <sysexits.h>
47 # endif
48 # if HAVE_SYSLOG_H
49 # include <syslog.h>
50 # endif
51 # if TM_IN_SYS_TIME
52 # include <sys/time.h>
53 # else
54 # include <time.h>
55 # endif
56 # if TIME_WITH_SYS_TIME && TM_IN_SYS_TIME
57 # include <time.h>
58 # endif
59 # if HAVE_UNISTD_H
60 # include <unistd.h>
61 # endif
62 # if HAVE_NETDB_H
63 # include <netdb.h>
64 # endif
65 # if HAVE_NETINET_IN_H
66 # include <netinet/in.h>
67 # endif
68 # if HAVE_SYS_PARAM_H
69 # include <sys/param.h>
70 # endif
71 # if HAVE_ARPA_INET_H
72 # include <arpa/inet.h>
73 # endif
74 # if HAVE_ARPA_NAMESER_H
75 # include <arpa/nameser.h>
76 # endif
77 # if HAVE_ARPA_NAMESER_COMPAT_H
78 # include <arpa/nameser_compat.h>
79 # endif
80 # if HAVE_RESOLV_H
81 # include <resolv.h>
82 # endif
83 # if HAVE_SIGNAL_H
84 # include <signal.h>
85 # endif
86 # if HAVE_PTHREAD_H || HAVE_PTHREAD
87 # include <pthread.h>
88 # endif
89
90 # ifndef UNDEFINED
91 # define UNDEFINED (-1)
92 # endif
93 # ifndef TRUE
94 # define TRUE (1)
95 # endif
96 # ifndef FALSE
97 # define FALSE (0)
98 # endif
99 # ifndef MAYBE
100 # define MAYBE (2)
101 # endif
102 # define bool int
103 /*
104 ** Beware that some Linux versions incorrectly define
105 ** MAXHOSTNAMELEN as 64, but DNS lookups require a length
106 ** of 255. So we don't use MAXHOSTNAMELEN here. Instead
107 ** we use our own MAXDNSHOSTNAME.
108 */
109 #define MAXDNSHOSTNAME 256
110
111 /*
112 ** Maximum number of DNS retries when resolving CNAMES, etc.
113 */
114
115 #define DNS_MAX_RETRIES 6
116
117 /*****************************************************************************
118 ** DMARC_POLICY_T -- The opaque context for the library.
119 ** Memory needs to be allocated and freed.
120 *****************************************************************************/
121
122 typedef struct dmarc_policy_t {
123 /*
124 * Supplied information
125 */
126 u_char * ip_addr; /* Input: connected IPV4 or IPV6 address */
127 int ip_type; /* Input: IPv4 or IPv6 */
128 u_char * spf_domain; /* Input: Domain used to verify SPF */
129 int spf_origin; /* Input: was domain MAIL From: or HELO for SPF check */
130 int spf_outcome; /* Input: What was the outcome of the SPF check */
131 u_char * spf_human_outcome; /* Input: What was the outcome of the SPF check in human readable form */
132 int dkim_final; /* This is the best record found */
133 u_char * dkim_domain; /* Input: The d= domain */
134 int dkim_outcome; /* Input: What was the outcome of the DKIM check */
135 u_char * dkim_human_outcome; /* Input: What was the outcome of the DKIM check in human readable form */
136
137 /*
138 * Computed outcomes
139 */
140 int dkim_alignment;
141 int spf_alignment;
142
143 /*
144 * Computed Organizational domain, if subdomain lacked a record.
145 */
146 u_char * from_domain; /* Input: From: header domain */
147 u_char * organizational_domain;
148
149 /*
150 * Found in the _dmarc record or supplied to us.
151 */
152 int h_error; /* Zero if found, else DNS error */
153 int adkim;
154 int aspf;
155 int p;
156 int sp;
157 int pct;
158 int rf;
159 uint32_t ri;
160 int rua_cnt;
161 u_char ** rua_list;
162 int ruf_cnt;
163 u_char ** ruf_list;
164 int fo;
165 } DMARC_POLICY_T;
166 #ifndef OPENDMARC_POLICY_C
167 # define OPENDMARC_POLICY_C 1
168 #endif /* ! OPENDMARC_POLICY_C */
169
170
171 /* dmarc_dns.c */
172 char * dmarc_dns_get_record(char *domain, int *reply, char *got_txtbuf, size_t got_txtlen);
173
174 /* opendmarc_hash.c */
175 typedef struct entry_bucket {
176 struct entry_bucket *previous;
177 struct entry_bucket *next;
178 char *key;
179 void *data;
180 time_t timestamp;
181 } OPENDMARC_HASH_BUCKET;
182
183 typedef struct {
184 OPENDMARC_HASH_BUCKET *bucket;
185 # if HAVE_PTHREAD_H || HAVE_PTHREAD
186 pthread_mutex_t mutex;
187 # endif
188 } OPENDMARC_HASH_SHELF;
189
190 #define OPENDMARC_MIN_SHELVES_LG2 4
191 #define OPENDMARC_MIN_SHELVES (1 << OPENDMARC_MIN_SHELVES_LG2)
192
193 /*
194 * max * sizeof internal_entry must fit into size_t.
195 * assumes internal_entry is <= 32 (2^5) bytes.
196 */
197 #define OPENDMARC_MAX_SHELVES_LG2 (sizeof (size_t) * 8 - 1 - 5)
198 #define OPENDMARC_MAX_SHELVES ((size_t)1 << OPENDMARC_MAX_SHELVES_LG2)
199
200 typedef struct {
201 OPENDMARC_HASH_SHELF *table;
202 size_t tablesize;
203 void (*freefunct)(void *);
204 } OPENDMARC_HASH_CTX;
205
206 #define OPENDMARC_DEFAULT_HASH_TABLESIZE (2048)
207
208 OPENDMARC_HASH_CTX * opendmarc_hash_init(size_t tablesize);
209 OPENDMARC_HASH_CTX * opendmarc_hash_shutdown(OPENDMARC_HASH_CTX *hctx);
210 void opendmarc_hash_set_callback(OPENDMARC_HASH_CTX *hctx, void (*callback)(void *));
211 void * opendmarc_hash_lookup(OPENDMARC_HASH_CTX *hctx, char *string, void *data, size_t datalen);
212 int opendmarc_hash_drop(OPENDMARC_HASH_CTX *hctx, char *string);
213 int opendmarc_hash_expire(OPENDMARC_HASH_CTX *hctx, time_t age);
214
215 /* opendmarc_tld.c */
216 int opendmarc_tld_read_file(char *path_fname, char *commentstring, char *drop, char *except);
217 int opendmarc_get_tld(u_char *domain, u_char *tld, size_t tld_len);
218 int opendmarc_reverse_domain(u_char *domain, u_char *buf, size_t buflen);
219 void opendmarc_tld_shutdown();
220
221 /* opendmarc_util.c */
222 u_char ** opendmarc_util_pushargv(u_char *str, u_char **ary, int *cnt);
223 u_char ** opendmarc_util_clearargv(u_char **ary);
224 u_char ** opendmarc_util_dupe_argv(u_char **ary);
225 u_char * opendmarc_util_cleanup(u_char *str, u_char *buf, size_t buflen);
226 u_char * opendmarc_util_finddomain(u_char *raw, u_char *buf, size_t buflen);
227 char ** opendmarc_util_freenargv(char **ary, int *num);
228 char ** opendmarc_util_pushnargv(char *str, char **ary, int *num);
229 char * opendmarc_util_ultoa(unsigned long val, char *buffer, size_t bufferlen);
230
231 /* opendmarc_policy.c */
232 void opendmarc_policy_library_dns_hook(int *nscountp, struct sockaddr_in *nsaddr_list);
233
234 #if WITH_SPF
235
236 #if HAVE_SPF2_H
237 #define HAVE_NS_TYPE
238 #include "spf.h"
239 typedef struct spf_context_struct {
240 SPF_server_t * spf_server;
241 SPF_request_t * spf_request;
242 SPF_response_t * spf_response;
243 SPF_result_t spf_result;
244 char mailfrom_addr[512];
245 char mailfrom_domain[256];
246 char helo_domain[256];
247 } SPF_CTX_T;
248 int opendmarc_spf2_test(char *ip_address, char *mail_from_domain, char *helo_domain, char *spf_record, int softfail_okay_flag, char *human_readable, size_t human_readable_len, int *used_mfrom);
249
250 #else /* not HAVE_SPF2_H */
251
252 /* opendmarc_spf.c and opendmarc_spf_dns.c */
253 #define MAX_SPF_RECURSION (10)
254 typedef struct spf_context_struct {
255 int nlines;
256 char * lines[MAX_SPF_RECURSION+2];
257 int status;
258 int in_token;
259 char mailfrom_addr[512];
260 char helo_domain[256];
261 char mailfrom_domain[256];
262 char validated_domain[256];
263 char ip_address[32];
264 char spf_record[BUFSIZ *2];
265 char ** iplist;
266 int ipcount;
267 char exp_buf[512];
268 int did_get_exp;
269 } SPF_CTX_T;
270 int opendmarc_spf_test(char *ip_address, char *mail_from_domain, char *helo_domain, char *spf_record, int softfail_okay_flag, char *human_readable, size_t human_readable_len, int *used_mfrom);
271 char ** opendmarc_spf_dns_lookup_a(char *domain, char **ary, int *cnt);
272 char ** opendmarc_spf_dns_lookup_mx(char *domain, char **ary, int *cnt);
273 char ** opendmarc_spf_dns_lookup_mx_domain(char *domain, char **ary, int *cnt);
274 char ** opendmarc_spf_dns_lookup_ptr(char *ip, char **ary, int *cnt);
275 int opendmarc_spf_dns_cidr_address(char *addr, u_long *hi, u_long *lo);
276 int opendmarc_spf_dns_does_domain_exist(char *domain, int *reply);
277 char * opendmarc_spf_dns_get_record(char *domain, int *reply, char *txt, size_t txtlen, char *cname, size_t cnamelen, int spfcheck);
278 int opendmarc_spf_dns_does_domain_exist(char *domain, int *reply);
279 char * opendmarc_spf_dns_get_record(char *domain, int *reply, char *txt, size_t txtlen, char *cname, size_t cnamelen, int spfcheck);
280 int opendmarc_spf_ipv6_cidr_check(char *ipv6_str, char *cidr_string);
281 int opendmarc_spf_cidr_address(u_long ip, char *cidr_addr);
282 SPF_CTX_T * opendmarc_spf_alloc_ctx();
283 SPF_CTX_T * opendmarc_spf_free_ctx(SPF_CTX_T *spfctx);
284 int opendmarc_spf_status_to_pass(int status, int none_pass);
285 int opendmarc_spf_specify_mailfrom(SPF_CTX_T *spfctx, char *mailfrom, size_t mailfrom_len, int *use_domain);
286 int opendmarc_spf_specify_helo_domain(SPF_CTX_T *spfctx, char *helo_domain, size_t helo_domain_len);
287 int opendmarc_spf_specify_ip_address(SPF_CTX_T *spfctx, char *ip_address, size_t ip_address_len);
288 int opendmarc_spf_specify_record(SPF_CTX_T *spfctx, char *spf_record, size_t spf_record_length);
289 int opendmarc_spf_parse(SPF_CTX_T *spfctx, int dns_count, char *xbuf, size_t xbuf_len);
290 const char * opendmarc_spf_status_to_msg(SPF_CTX_T *spfctx, int status);
291 #endif /* HAVE_SPF2_H */
292
293 #endif /* WITH_SPF */
294
295 #endif /* OPENDMARC_INTERNAL_H */
0 /*************************************************************************
1 ** The user interface to the rest of this library.
2 **
3 ** Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved.
4 **************************************************************************/
5
6 #include "opendmarc_internal.h"
7 #include "dmarc.h"
8
9 /* libbsd if found */
10 #ifdef USE_BSD_H
11 # include <bsd/string.h>
12 #endif /* USE_BSD_H */
13
14 /* libstrl if needed */
15 #ifdef USE_STRL_H
16 # include <strl.h>
17 #endif /* USE_STRL_H */
18
19 /* opendmarc_strl if needed */
20 #ifdef USE_DMARCSTRL_H
21 # include <opendmarc_strl.h>
22 #endif /* USE_DMARCSTRL_H */
23
24 /**************************************************************************
25 ** OPENDMARC_POLICY_LIBRARY_INIT -- Initialize The Library
26 ** Parameters:
27 ** lib_init -- Address of a filled in DMARC_LIB_T structure
28 ** Returns:
29 ** DMARC_PARSE_OKAY -- on success
30 ** DMARC_PARSE_ERROR_NULL_CTX -- if lib_init is null
31 ** DMARC_TLD_ERROR_UNKNOWN -- If lip_init->tld_type is undefined
32 ** Side Effects:
33 ** Sets a global pointer
34 ** Warning:
35 ** This function is not thread safe so only call once on
36 ** startup.
37 ***************************************************************************/
38 static OPENDMARC_LIB_T *Opendmarc_Libp = NULL;
39 static OPENDMARC_LIB_T Opendmarc_Lib;
40
41 OPENDMARC_STATUS_T
42 opendmarc_policy_library_init(OPENDMARC_LIB_T *lib_init)
43 {
44 int ret = DMARC_PARSE_OKAY;
45
46 if (lib_init == NULL)
47 return DMARC_PARSE_ERROR_NULL_CTX;
48 (void) memcpy(&Opendmarc_Lib, lib_init, sizeof(OPENDMARC_LIB_T));
49 Opendmarc_Libp = &Opendmarc_Lib;
50 errno = 0;
51 if ((Opendmarc_Libp->tld_source_file)[0] != '\0')
52 {
53 switch (Opendmarc_Libp->tld_type)
54 {
55 case OPENDMARC_TLD_TYPE_MOZILLA:
56 ret = opendmarc_tld_read_file(Opendmarc_Libp->tld_source_file,
57 "//", "*.", "!");
58 if (ret != 0)
59 ret = errno;
60 break;
61 default:
62 return DMARC_TLD_ERROR_UNKNOWN;
63 }
64 }
65 return ret;
66 }
67
68 /**************************************************************************
69 ** OPENDMARC_POLICY_LIBRARY_SHUTDOWN -- Shutdown The Libarary
70 ** Parameters:
71 ** lib_init -- The prior DMARC_LIB_T strucgture
72 ** Returns:
73 ** DMARC_PARSE_OKAY -- always
74 ** Side Effects:
75 ** May free memory
76 ** Warning:
77 ***************************************************************************/
78 OPENDMARC_STATUS_T
79 opendmarc_policy_library_shutdown(OPENDMARC_LIB_T *lib_init)
80 {
81 (void) opendmarc_tld_shutdown();
82 return DMARC_PARSE_OKAY;
83 }
84
85 /**************************************************************************
86 ** OPENDMARC_POLICY_CONNECT_INIT -- Get policy context for connection
87 ** Parameters:
88 ** ip_addr -- An IP addresss in string form.
89 ** is_ipv6 -- Zero for IPv4, non-zero for IPv6
90 ** Returns:
91 ** pctx -- An allocated and initialized context pointer.
92 ** NULL -- On failure and sets errno
93 ** Side Effects:
94 ** Allocates memory.
95 ***************************************************************************/
96 DMARC_POLICY_T *
97 opendmarc_policy_connect_init(u_char *ip_addr, int is_ipv6)
98 {
99 DMARC_POLICY_T *pctx;
100 int xerrno;
101
102 if (ip_addr == NULL)
103 {
104 errno = EINVAL;
105 return NULL;
106 }
107 pctx = malloc(sizeof(DMARC_POLICY_T));
108 if (pctx == NULL)
109 {
110 return NULL;
111 }
112 (void) memset(pctx, '\0', sizeof(DMARC_POLICY_T));
113 pctx->p = DMARC_RECORD_P_UNSPECIFIED;
114 pctx->sp = DMARC_RECORD_P_UNSPECIFIED;
115 pctx->ip_addr = (u_char *)strdup((char *)ip_addr);
116 if (pctx->ip_addr == NULL)
117 {
118 xerrno = errno;
119 (void) free(pctx);
120 errno = xerrno;
121 return NULL;
122 }
123 if (is_ipv6 == 0)
124 pctx->ip_type = DMARC_POLICY_IP_TYPE_IPV4;
125 else
126 pctx->ip_type = DMARC_POLICY_IP_TYPE_IPV6;
127 return pctx;
128 }
129
130 /**************************************************************************
131 ** OPENDMARC_POLICY_CONNECT_CLEAR -- Zero the policy context but doesn't
132 ** free it
133 **
134 ** Parameters:
135 ** pctx -- The context to zero.
136 ** Returns:
137 ** pctx -- Zeroed but still allocated context
138 ** NULL -- On failure and sets errno
139 ** Side Effects:
140 ** Frees memory.
141 ***************************************************************************/
142 DMARC_POLICY_T *
143 opendmarc_policy_connect_clear(DMARC_POLICY_T *pctx)
144 {
145 if (pctx == NULL)
146 {
147 errno = EINVAL;
148 return NULL;
149 }
150
151 if (pctx->ip_addr != NULL)
152 (void) free(pctx->ip_addr);
153 if (pctx->from_domain != NULL)
154 (void) free(pctx->from_domain);
155 if (pctx->spf_domain != NULL)
156 (void) free(pctx->spf_domain);
157 if (pctx->dkim_domain != NULL)
158 (void) free(pctx->dkim_domain);
159 if (pctx->spf_human_outcome != NULL)
160 (void) free(pctx->spf_human_outcome);
161 if (pctx->dkim_human_outcome != NULL)
162 (void) free(pctx->dkim_human_outcome);
163 if (pctx->organizational_domain != NULL)
164 (void) free(pctx->organizational_domain);
165 pctx->rua_list = opendmarc_util_clearargv(pctx->rua_list);
166 pctx->rua_cnt = 0;
167 pctx->ruf_list = opendmarc_util_clearargv(pctx->ruf_list);
168 pctx->ruf_cnt = 0;
169 pctx->fo = 0;
170
171 (void) memset(pctx, '\0', sizeof(DMARC_POLICY_T));
172 pctx->p = DMARC_RECORD_P_UNSPECIFIED;
173 return pctx;
174 }
175
176 /**************************************************************************
177 ** OPENDMARC_POLICY_CONNECT_RSET -- Rset for another message
178 ** Usefull if there is more than a single envelope per connection.
179 ** Usefull during an SMTP RSET
180 **
181 ** Parameters:
182 ** pctx -- The context to rset.
183 ** Returns:
184 ** pctx -- RSET context
185 ** NULL -- On failure and sets errno
186 ** Side Effects:
187 ** Frees memory.
188 ** Preserves the IP address and type
189 ***************************************************************************/
190 DMARC_POLICY_T *
191 opendmarc_policy_connect_rset(DMARC_POLICY_T *pctx)
192 {
193 u_char *ip_save;
194 int ip_type;
195
196 if (pctx == NULL)
197 {
198 errno = EINVAL;
199 return NULL;
200 }
201
202 ip_save = pctx->ip_addr;
203 pctx->ip_addr = NULL;
204 ip_type = pctx->ip_type;
205 pctx->ip_type = -1;
206
207 pctx = opendmarc_policy_connect_clear(pctx);
208
209 if (pctx == NULL)
210 return NULL;
211 pctx->ip_addr = ip_save;
212 pctx->ip_type = ip_type;
213 return pctx;
214 }
215
216 /**************************************************************************
217 ** OPENDMARC_POLICY_CONNECT_SHUTDOWN -- Free the policy context
218 ** Frees and deallocates the context
219 **
220 ** Parameters:
221 ** pctx -- The context to free and deallocate.
222 ** Returns:
223 ** NULL -- Always
224 ** Side Effects:
225 ** Frees memory.
226 ***************************************************************************/
227 DMARC_POLICY_T *
228 opendmarc_policy_connect_shutdown(DMARC_POLICY_T *pctx)
229 {
230 if (pctx != NULL)
231 {
232 pctx = opendmarc_policy_connect_clear(pctx);
233 (void) free(pctx);
234 pctx = NULL;
235 }
236 return pctx;
237 }
238
239 int
240 opendmarc_policy_check_alignment(u_char *subdomain, u_char *tld, int mode)
241 {
242 u_char rev_sub[512];
243 u_char rev_tld[512];
244 u_char tld_buf[512];
245 u_char *ep;
246 int ret;
247
248 if (subdomain == NULL)
249 return EINVAL;
250 if (tld == NULL)
251 return EINVAL;
252
253 if (mode== DMARC_RECORD_A_UNSPECIFIED)
254 mode= DMARC_RECORD_A_RELAXED;
255
256 (void) memset(tld_buf, '\0', sizeof tld_buf);
257 (void) strlcpy(tld_buf, tld, sizeof tld_buf);
258
259 (void) memset(rev_sub, '\0', sizeof rev_sub);
260 (void) opendmarc_reverse_domain(subdomain, rev_sub, sizeof rev_sub);
261 ep = rev_sub + strlen(rev_sub) -1;
262 if (*ep != '.')
263 (void) strlcat((char *)rev_sub, ".", sizeof rev_sub);
264
265 (void) memset(rev_tld, '\0', sizeof rev_tld);
266 (void) opendmarc_reverse_domain(tld_buf, rev_tld, sizeof rev_tld);
267 ep = rev_tld + strlen(rev_tld) -1;
268 if (*ep != '.')
269 (void) strlcat((char *)rev_tld, ".", sizeof rev_tld);
270
271 /*
272 * Perfect match is aligned irrespective of relaxed or strict.
273 */
274 if (strcasecmp(rev_tld, rev_sub) == 0)
275 return 0;
276
277 ret = strncasecmp(rev_tld, rev_sub, strlen(rev_tld));
278 if (ret == 0 && mode == DMARC_RECORD_A_RELAXED)
279 return 0;
280
281 ret = strncasecmp(rev_sub, rev_tld, strlen(rev_sub));
282 if (ret == 0 && mode == DMARC_RECORD_A_RELAXED)
283 return 0;
284
285 ret = opendmarc_get_tld(tld, tld_buf, sizeof tld_buf);
286 if (ret != 0)
287 return -1;
288 (void) memset(rev_tld, '\0', sizeof rev_tld);
289 (void) opendmarc_reverse_domain(tld_buf, rev_tld, sizeof rev_tld);
290 ep = rev_tld + strlen(rev_tld) -1;
291 if (*ep != '.')
292 (void) strlcat((char *)rev_tld, ".", sizeof rev_tld);
293
294 /*
295 * Perfect match is aligned irrespective of relaxed or strict.
296 */
297 if (strcasecmp(rev_tld, rev_sub) == 0)
298 return 0;
299
300 ret = strncasecmp(rev_tld, rev_sub, strlen(rev_tld));
301 if (ret == 0 && mode == DMARC_RECORD_A_RELAXED)
302 return 0;
303
304 ret = strncasecmp(rev_sub, rev_tld, strlen(rev_sub));
305 if (ret == 0 && mode == DMARC_RECORD_A_RELAXED)
306 return 0;
307 return -1;
308 }
309
310 /**************************************************************************
311 ** OPENDMARC_POLICY_STORE_FROM_DOMAIN -- Store domain from the From: header.
312 ** If the domain is an address parse the domain from it.
313 ** The domain is needed to perform alignment checks.
314
315 ** Parameters:
316 ** pctx -- The context to uptdate
317 ** from_domain -- A string
318 ** Returns:
319 ** DMARC_PARSE_OKAY -- On success
320 ** DMARC_PARSE_ERROR_NULL_CTX -- If pctx was NULL
321 ** DMARC_PARSE_ERROR_EMPTY -- if from_domain NULL or zero
322 ** DMARC_PARSE_ERROR_NO_DOMAIN -- No domain in from_domain
323 ** Side Effects:
324 ** Allocates memory.
325 ** Note:
326 ** Does not check to insure that the found domain is a
327 ** syntactically valid domain. It is okay for domain to
328 ** puney decoded into 8-bit data.
329 ***************************************************************************/
330 OPENDMARC_STATUS_T
331 opendmarc_policy_store_from_domain(DMARC_POLICY_T *pctx, u_char *from_domain)
332 {
333 char domain_buf[256];
334 char *dp;
335
336 if (pctx == NULL)
337 return DMARC_PARSE_ERROR_NULL_CTX;
338 if (from_domain == NULL || strlen((char *)from_domain) == 0)
339 return DMARC_PARSE_ERROR_EMPTY;
340 dp = opendmarc_util_finddomain(from_domain, domain_buf, sizeof domain_buf);
341 if (dp == NULL)
342 return DMARC_PARSE_ERROR_NO_DOMAIN;
343 pctx->from_domain = strdup((char *)dp);
344 if (pctx->from_domain == NULL)
345 return DMARC_PARSE_ERROR_NO_ALLOC;
346 return DMARC_PARSE_OKAY;
347 }
348
349 /**************************************************************************
350 ** OPENDMARC_POLICY_STORE_SPF -- Store spf results
351 ** Okay to supply the raw MAIL From: data
352 **
353 ** Parameters:
354 ** pctx -- The context to uptdate
355 ** domain -- The domain used to verify SPF
356 ** result -- DMARC_POLICY_SPF_OUTCOME_NONE
357 ** or DMARC_POLICY_SPF_OUTCOME_PASS
358 ** or DMARC_POLICY_SPF_OUTCOME_FAIL
359 ** or DMARC_POLICY_SPF_OUTCOME_TMPFAIL
360 ** origin -- DMARC_POLICY_SPF_ORIGIN_MAILFROM
361 ** or DMARC_POLICY_SPF_ORIGIN_HELO
362 ** human_readable -- A human readable reason for failure
363 ** Returns:
364 ** DMARC_PARSE_OKAY -- On success
365 ** DMARC_PARSE_ERROR_NULL_CTX -- If pctx was NULL
366 ** DMARC_PARSE_ERROR_EMPTY -- if domain NULL or zero
367 ** DMARC_PARSE_ERROR_NO_DOMAIN -- No domain in domain
368 ** Side Effects:
369 ** Allocates memory.
370 ** Note:
371 ** Does not check to insure that the domain is a
372 ** syntactically valid domain. It is okay for domain to
373 ** puney decoded into 8-bit data.
374 ***************************************************************************/
375 OPENDMARC_STATUS_T
376 opendmarc_policy_store_spf(DMARC_POLICY_T *pctx, u_char *domain, int result, int origin, u_char *human_readable)
377 {
378 char domain_buf[256];
379 char *dp;
380
381 if (pctx == NULL)
382 return DMARC_PARSE_ERROR_NULL_CTX;
383 if (domain == NULL || strlen((char *)domain) == 0)
384 return DMARC_PARSE_ERROR_EMPTY;
385 dp = opendmarc_util_finddomain(domain, domain_buf, sizeof domain_buf);
386 if (dp == NULL)
387 return DMARC_PARSE_ERROR_NO_DOMAIN;
388 if (human_readable != NULL)
389 pctx->spf_human_outcome = strdup((char *)human_readable);
390 pctx->spf_domain = strdup((char *)dp);
391 if (pctx->spf_domain == NULL)
392 return DMARC_PARSE_ERROR_NO_ALLOC;
393 switch (result)
394 {
395 case DMARC_POLICY_SPF_OUTCOME_NONE:
396 case DMARC_POLICY_SPF_OUTCOME_PASS:
397 case DMARC_POLICY_SPF_OUTCOME_FAIL:
398 case DMARC_POLICY_SPF_OUTCOME_TMPFAIL:
399 pctx->spf_outcome = result;
400 break;
401 default:
402 return DMARC_PARSE_ERROR_BAD_SPF_MACRO;
403 }
404 switch (origin)
405 {
406 case DMARC_POLICY_SPF_ORIGIN_MAILFROM:
407 case DMARC_POLICY_SPF_ORIGIN_HELO:
408 pctx->spf_origin = origin;
409 break;
410 default:
411 return DMARC_PARSE_ERROR_BAD_SPF_MACRO;
412 }
413 return DMARC_PARSE_OKAY;
414 }
415
416
417 /**************************************************************************
418 ** OPENDMARC_POLICY_STORE_DKIM -- Store dkim results
419 **
420 ** Parameters:
421 ** pctx -- The context to uptdate
422 ** d_equal_domain -- The the domain from the p=
423 ** dkim_result -- DMARC_POLICY_DKIM_OUTCOME_NONE
424 ** or DMARC_POLICY_DKIM_OUTCOME_PASS
425 ** or DMARC_POLICY_DKIM_OUTCOME_FAIL
426 ** or DMARC_POLICY_DKIM_OUTCOME_TMPFAIL
427 ** human_result -- A human readable reason for failure
428 ** Returns:
429 ** DMARC_PARSE_OKAY -- On success
430 ** DMARC_PARSE_ERROR_NULL_CTX -- If pctx was NULL
431 ** DMARC_PARSE_ERROR_EMPTY -- if domain NULL or zero
432 ** DMARC_PARSE_ERROR_NO_DOMAIN -- No domain in domain
433 ** DMARC_PARSE_ERROR_NO_ALLOC -- Memory allocation failed
434 ** Side Effects:
435 ** Allocates memory.
436 ** Note:
437 ** Does not check to insure that the domain is a
438 ** syntactically valid domain. It is okay for domain to
439 ** puney decoded into 8-bit data.
440 ***************************************************************************/
441 OPENDMARC_STATUS_T
442 opendmarc_policy_store_dkim(DMARC_POLICY_T *pctx, u_char *d_equal_domain, int dkim_result, u_char *human_result)
443 {
444 char domain_buf[256];
445 u_char *dp;
446 int result = DMARC_POLICY_DKIM_OUTCOME_NONE;
447
448 if (pctx == NULL)
449 return DMARC_PARSE_ERROR_NULL_CTX;
450 if (d_equal_domain == NULL || strlen((char *)d_equal_domain) == 0)
451 return DMARC_PARSE_ERROR_EMPTY;
452
453 switch (dkim_result)
454 {
455 case DMARC_POLICY_DKIM_OUTCOME_NONE:
456 case DMARC_POLICY_DKIM_OUTCOME_PASS:
457 case DMARC_POLICY_DKIM_OUTCOME_FAIL:
458 case DMARC_POLICY_DKIM_OUTCOME_TMPFAIL:
459 result = dkim_result;
460 break;
461 default:
462 return DMARC_PARSE_ERROR_BAD_DKIM_MACRO;
463 }
464 if (pctx->dkim_final == TRUE)
465 return DMARC_PARSE_OKAY;
466
467 dp = opendmarc_util_finddomain(d_equal_domain, domain_buf, sizeof domain_buf);
468 if (dp == NULL || strlen(dp) == 0)
469 return DMARC_PARSE_ERROR_NO_DOMAIN;
470
471 /*
472 * If the d= domain is an exact match to the from_domain
473 * select this one as the domain of choice.
474 * If the outcome is pass, the is the final choice.
475 */
476 if (strcasecmp((char *)dp, pctx->from_domain) == 0)
477 {
478 if (pctx->dkim_domain != NULL)
479 {
480 (void) free(pctx->dkim_domain);
481 pctx->dkim_domain = NULL;
482 }
483 if (result == DMARC_POLICY_DKIM_OUTCOME_PASS)
484 {
485 pctx->dkim_final = TRUE;
486 goto set_final;
487 }
488 if (pctx->dkim_outcome == DMARC_POLICY_DKIM_OUTCOME_PASS)
489 return DMARC_PARSE_OKAY;
490 goto set_final;
491 }
492
493 /*
494 * See if the d= is a superset of the from domain.
495 * If so and if we have not already found
496 * a best match, make this the temporary best match.
497 */
498 if (opendmarc_policy_check_alignment(dp, pctx->from_domain,
499 pctx->adkim) == 0)
500 {
501 if (pctx->dkim_domain != NULL)
502 {
503 (void) free(pctx->dkim_domain);
504 pctx->dkim_domain = NULL;
505 }
506 if (result == DMARC_POLICY_DKIM_OUTCOME_PASS)
507 goto set_final;
508 }
509 /*
510 * If we found any record so far that passed.
511 * preserve it.
512 */
513 if (pctx->dkim_outcome == DMARC_POLICY_DKIM_OUTCOME_PASS)
514 return DMARC_PARSE_OKAY;
515
516 set_final:
517 if (pctx->dkim_domain == NULL)
518 pctx->dkim_domain = strdup((char *)dp);
519 if (pctx->dkim_domain == NULL)
520 return DMARC_PARSE_ERROR_NO_ALLOC;
521 if (human_result != NULL)
522 {
523 if (pctx->dkim_human_outcome != NULL)
524 (void) free(pctx->dkim_human_outcome);
525 pctx->dkim_human_outcome = strdup((char *)human_result);
526 }
527 pctx->dkim_outcome = result;
528 return DMARC_PARSE_OKAY;
529 }
530
531 /**************************************************************************
532 ** OPENDMARC_POLICY_QUERY_DMARC_XDOMAIN -- Verify that we have permission
533 ** to send to domain
534 ** Parameters:
535 ** pctx -- The context to uptdate
536 ** uri -- URI listed in DMARC record
537 ** Returns:
538 ** DMARC_PARSE_OKAY -- On success, and fills pctx
539 ** DMARC_PARSE_ERROR_NULL_CTX -- If pctx was NULL
540 ** DMARC_PARSE_ERROR_EMPTY -- if domain NULL or zero
541 ** DMARC_PARSE_ERROR_NO_DOMAIN -- No domain in domain
542 ** DMARC_DNS_ERROR_TMPERR -- No domain, try again later
543 ** DMARC_DNS_ERROR_NO_RECORD -- No DMARC record found.
544 ** Side Effects:
545 ** Performs one or more DNS lookups
546 **
547 ***************************************************************************/
548 OPENDMARC_STATUS_T
549 opendmarc_policy_query_dmarc_xdomain(DMARC_POLICY_T *pctx, u_char *uri)
550 {
551 u_char buf[BUFSIZ];
552 u_char copy[256];
553 u_char domain[256];
554 u_char domain_tld[256];
555 u_char uri_tld[256];
556 u_char *ret = NULL;
557 int dns_reply = 0;
558 int i = 0;
559 int err = 0;
560
561 if (pctx == NULL || pctx->from_domain == NULL)
562 return DMARC_PARSE_ERROR_NULL_CTX;
563
564 if (uri == NULL)
565 return DMARC_PARSE_ERROR_EMPTY;
566
567 memset(buf, '\0', sizeof buf);
568 memset(copy, '\0', sizeof copy);
569 memset(domain, '\0', sizeof domain);
570 memset(domain_tld, '\0', sizeof domain_tld);
571 memset(uri_tld, '\0', sizeof uri_tld);
572
573 /* Get out domain from our URI */
574 if (strncasecmp(uri, "mailto:", 7) == 0)
575 uri += 7;
576
577 if (opendmarc_util_finddomain(uri, domain, sizeof domain) == NULL)
578 return DMARC_PARSE_ERROR_NO_DOMAIN;
579
580 /* Ensure that we're not doing a cross-domain check */
581 err = 0;
582 err = opendmarc_get_tld(domain, uri_tld, sizeof uri_tld);
583 err += opendmarc_get_tld(pctx->from_domain, domain_tld, sizeof domain_tld);
584 if (err != 0)
585 return DMARC_DNS_ERROR_NO_RECORD;
586
587 if (strncasecmp((char *) uri_tld, (char *) domain_tld,
588 sizeof uri_tld) == 0)
589 return DMARC_PARSE_OKAY;
590
591 strlcpy((char *) copy, (char *) pctx->from_domain, sizeof copy);
592 strlcat((char *) copy, "._report._dmarc.", sizeof copy);
593 strlcat((char *) copy, (char *) domain, sizeof copy);
594
595 /* Query DNS */
596 for (i = 0; i < DNS_MAX_RETRIES && ret == NULL; i++)
597 {
598 ret = (u_char *) dmarc_dns_get_record((char *) copy, &dns_reply,
599 (char *) buf, sizeof buf);
600 if (ret != 0 || dns_reply == HOST_NOT_FOUND)
601 break;
602
603 /* requery if didn't resolve CNAME */
604 if (ret == NULL && *buf != '\0')
605 {
606 strlcpy((char *) copy, (char *) buf, sizeof copy);
607 continue;
608 }
609 }
610 if (dns_reply == NETDB_SUCCESS && buf != NULL)
611 {
612 /* Must include DMARC version */
613 if (strncasecmp((char *)buf, "v=DMARC1", sizeof buf) == 0)
614 {
615 return DMARC_PARSE_OKAY;
616 }
617 }
618
619 /*
620 ** Retry with a * literal.
621 */
622 strlcpy((char *) copy, (char *) "*", sizeof copy);
623 strlcat((char *) copy, "._report._dmarc.", sizeof copy);
624 strlcat((char *) copy, (char *) domain, sizeof copy);
625 for (i = 0; i < DNS_MAX_RETRIES && ret == NULL; i++)
626 {
627 ret = (u_char *) dmarc_dns_get_record((char *) copy, &dns_reply,
628 (char *) buf, sizeof buf);
629 if (ret != 0 || dns_reply == HOST_NOT_FOUND)
630 break;
631
632 /* requery if didn't resolve CNAME */
633 if (ret == NULL && *buf != '\0')
634 {
635 strlcpy((char *) copy, (char *) buf, sizeof copy);
636 continue;
637 }
638 }
639 if (dns_reply == NETDB_SUCCESS && buf != NULL)
640 {
641 /* Must include DMARC version */
642 if (strncasecmp((char *)buf, "v=DMARC1", sizeof buf) == 0)
643 {
644 return DMARC_PARSE_OKAY;
645 }
646 else
647 {
648 return DMARC_DNS_ERROR_NO_RECORD;
649 }
650 }
651
652 switch (dns_reply)
653 {
654 case HOST_NOT_FOUND:
655 case NO_DATA:
656 case NO_RECOVERY:
657 return DMARC_DNS_ERROR_NO_RECORD;
658 case TRY_AGAIN:
659 case NETDB_INTERNAL:
660 return DMARC_DNS_ERROR_TMPERR;
661 default:
662 return DMARC_DNS_ERROR_NO_RECORD;
663 }
664 }
665
666 /**************************************************************************
667 ** OPENDMARC_POLICY_QUERY_DMARC -- Look up the _dmarc record for the
668 ** specified domain. If not found
669 ** try the organizational domain.
670 ** Parameters:
671 ** pctx -- The context to uptdate
672 ** domain -- The domain for which to lookup the DMARC record
673 ** Returns:
674 ** DMARC_PARSE_OKAY -- On success, and fills pctx
675 ** DMARC_PARSE_ERROR_NULL_CTX -- If pctx was NULL
676 ** DMARC_PARSE_ERROR_EMPTY -- if domain NULL or zero
677 ** DMARC_PARSE_ERROR_NO_DOMAIN -- No domain in domain
678 ** DMARC_DNS_ERROR_NXDOMAIN -- No domain found in DNS
679 ** DMARC_DNS_ERROR_TMPERR -- No domain, try again later
680 ** DMARC_DNS_ERROR_NO_RECORD -- No DMARC record found.
681 ** Side Effects:
682 ** Performs one or more DNS lookups
683 ** Allocates memory.
684 ** Note:
685 ** Does not check to insure that the domain is a
686 ** syntactically valid domain.
687 ** Looks up domain first. If that fails, finds the tld and
688 ** looks up topmost domain under tld. If this later is found
689 ** updates pctx->organizational_domain with the result.
690 ** Warning:
691 ** If no TLD file has been loaded, will silenty not do that
692 ** fallback lookup.
693 **
694 ***************************************************************************/
695 OPENDMARC_STATUS_T
696 opendmarc_policy_query_dmarc(DMARC_POLICY_T *pctx, u_char *domain)
697 {
698 u_char buf[BUFSIZ];
699 u_char copy[256];
700 u_char tld[256];
701 u_char * bp = NULL;
702 int dns_reply = 0;
703 int tld_reply = 0;
704 int loop_count = DNS_MAX_RETRIES;
705
706 if (pctx == NULL)
707 return DMARC_PARSE_ERROR_NULL_CTX;
708 if (domain == NULL || strlen(domain) == 0)
709 {
710 if (pctx->from_domain != NULL)
711 domain = pctx->from_domain;
712 else
713 return DMARC_PARSE_ERROR_EMPTY;
714 }
715
716 (void) strlcpy(copy, "_dmarc.", sizeof copy);
717 (void) strlcat(copy, domain, sizeof copy);
718
719 query_again:
720 (void) memset(buf, '\0', sizeof buf);
721 bp = dmarc_dns_get_record(copy, &dns_reply, buf, sizeof buf);
722 if (bp != NULL)
723 {
724 if (dns_reply != HOST_NOT_FOUND)
725 goto got_record;
726 }
727 /*
728 * Was a CNAME was found that the resolver did
729 * not follow on its own?
730 */
731 if (bp == NULL && *buf != '\0')
732 {
733 (void) strlcpy(copy, buf, sizeof copy);
734 if (--loop_count != 0)
735 goto query_again;
736 }
737
738 (void) memset(tld, '\0', sizeof tld);
739 tld_reply = opendmarc_get_tld(domain, tld, sizeof tld);
740 if (tld_reply != 0)
741 goto dns_failed;
742 if (strlen(tld) > 0)
743 {
744 pctx->organizational_domain = strdup(tld);
745
746 loop_count = DNS_MAX_RETRIES;
747 (void) strlcpy(copy, "_dmarc.", sizeof copy);
748 (void) strlcat(copy, tld, sizeof copy);
749 query_again2:
750 (void) memset(buf, '\0', sizeof buf);
751 bp = dmarc_dns_get_record(copy, &dns_reply, buf, sizeof buf);
752 if (bp != NULL)
753 goto got_record;
754 /*
755 * Was a CNAME was found that the resolver did
756 * not follow on its own?
757 */
758 if (bp == NULL && *buf != '\0')
759 {
760 (void) strlcpy(copy, buf, sizeof copy);
761 if (--loop_count != 0)
762 goto query_again2;
763 }
764 }
765 dns_failed:
766 switch (dns_reply)
767 {
768 case HOST_NOT_FOUND:
769 case NO_DATA:
770 case NO_RECOVERY:
771 return DMARC_DNS_ERROR_NO_RECORD;
772 case TRY_AGAIN:
773 case NETDB_INTERNAL:
774 return DMARC_DNS_ERROR_TMPERR;
775 default:
776 return DMARC_DNS_ERROR_NO_RECORD;
777
778 }
779 got_record:
780 return opendmarc_policy_parse_dmarc(pctx, domain, buf);
781 }
782
783 /**************************************************************************
784 ** OPENDMARC_GET_POLICY_TO_ENFORCE -- What to do with this message. i.e. allow
785 ** possible delivery, quarantine, or reject.
786 ** Parameters:
787 ** pctx -- A Policy context
788 ** Returns:
789 ** DMARC_PARSE_ERROR_NULL_CTX -- pctx == NULL
790 ** DMARC_POLICY_ABSENT -- No DMARC record found
791 ** DMARC_FROM_DOMAIN_ABSENT -- No From: domain
792 ** DMARC_POLICY_NONE -- Accept if other policy allows
793 ** DMARC_POLICY_REJECT -- Policy advises to reject the message
794 ** DMARC_POLICY_QUARANTINE -- Policy advises to quarantine the message
795 ** DMARC_POLICY_PASS -- Policy advises to accept the message
796 ** Side Effects:
797 ** Checks for domain alignment.
798 ***************************************************************************/
799 OPENDMARC_STATUS_T
800 opendmarc_get_policy_to_enforce(DMARC_POLICY_T *pctx)
801 {
802
803 if (pctx == NULL)
804 return DMARC_PARSE_ERROR_NULL_CTX;
805
806 if (pctx->p == DMARC_RECORD_P_UNSPECIFIED)
807 return DMARC_POLICY_ABSENT;
808
809 if (pctx->from_domain == NULL)
810 return DMARC_FROM_DOMAIN_ABSENT;
811
812 pctx->dkim_alignment = DMARC_POLICY_DKIM_ALIGNMENT_FAIL;
813 pctx->spf_alignment = DMARC_POLICY_SPF_ALIGNMENT_FAIL;
814
815 /* check for DKIM alignment */
816 if (pctx->dkim_domain != NULL && pctx->dkim_outcome == DMARC_POLICY_DKIM_OUTCOME_PASS)
817 {
818 if (opendmarc_policy_check_alignment(pctx->from_domain, pctx->dkim_domain, pctx->adkim) == 0)
819 pctx->dkim_alignment = DMARC_POLICY_DKIM_ALIGNMENT_PASS;
820 }
821
822 /* check for SPF alignment */
823 if (pctx->spf_domain != NULL && pctx->spf_outcome == DMARC_POLICY_SPF_OUTCOME_PASS)
824 {
825 if (opendmarc_policy_check_alignment(pctx->from_domain, pctx->spf_domain, pctx->aspf) == 0)
826 pctx->spf_alignment = DMARC_POLICY_SPF_ALIGNMENT_PASS;
827 }
828
829 /*
830 * If dkim passes and dkim aligns OR spf passes and spf aligns
831 * Accept the message.
832 */
833 if (pctx->spf_alignment == DMARC_POLICY_SPF_ALIGNMENT_PASS ||
834 pctx->dkim_alignment == DMARC_POLICY_DKIM_ALIGNMENT_PASS)
835 return DMARC_POLICY_PASS;
836
837 if (pctx->organizational_domain != NULL)
838 {
839 switch (pctx->sp)
840 {
841 case DMARC_RECORD_P_REJECT:
842 return DMARC_POLICY_REJECT;
843
844 case DMARC_RECORD_P_QUARANTINE:
845 return DMARC_POLICY_QUARANTINE;
846
847 case DMARC_RECORD_P_NONE:
848 return DMARC_POLICY_NONE;
849 }
850 }
851
852 switch (pctx->p)
853 {
854 case DMARC_RECORD_P_REJECT:
855 return DMARC_POLICY_REJECT;
856 case DMARC_RECORD_P_QUARANTINE:
857 return DMARC_POLICY_QUARANTINE;
858 case DMARC_RECORD_P_NONE:
859 return DMARC_POLICY_NONE;
860 default:
861 /* XXX -- shouldn't be possible */
862 return DMARC_POLICY_PASS;
863 }
864 }
865
866 /*******************************************************************************
867 ** OPENDMARC_PARSE_DMARC -- Parse a DMARC record
868 **
869 ** Parameters:
870 ** pctx -- A Policy context
871 ** domain -- The domain looked up to get this DMARC record
872 ** record -- The DMARC record to parse
873 ** Returns:
874 ** DMARC_PARSE_ERROR_EMPTY -- if any argument is NULL
875 ** DMARC_PARSE_ERROR_BAD_VERSION -- if v= was bad
876 ** DMARC_PARSE_ERROR_BAD_VALUE -- if value following = was bad
877 ** DMARC_PARSE_ERROR_NO_REQUIRED_P -- if p= was absent
878 ** DMARC_PARSE_OKAY -- On Success
879 ** Side Effects:
880 ** Allocates memory.
881 *********************************************************************************/
882 OPENDMARC_STATUS_T
883 opendmarc_policy_parse_dmarc(DMARC_POLICY_T *pctx, u_char *domain, u_char *record)
884 {
885 u_char *cp, *eqp, *ep, *sp, *vp;
886 u_char copy[BUFSIZ];
887 u_char cbuf[512];
888 u_char vbuf[512];
889
890 if (pctx == NULL || domain == NULL || record == NULL || strlen((char *)record) == 0)
891 {
892 return DMARC_PARSE_ERROR_EMPTY;
893 }
894 /*
895 * Set the defaults to detect missing required items.
896 */
897 pctx->pct = -1;
898 pctx->ri = -1;
899
900 (void) memset((char *)copy, '\0', sizeof copy);
901 (void) strlcpy((char *)copy, (char *)record, sizeof copy);
902 ep = copy + strlen((char *)copy);
903
904
905 for (cp = copy; cp != NULL && cp <= ep; )
906 {
907 sp = (u_char *)strchr(cp, ';');
908 if (sp != NULL)
909 *sp++ = '\0';
910 eqp = (u_char *)strchr((char *)cp, '=');
911 if (eqp == NULL)
912 {
913 cp = sp;
914 continue;
915 }
916 *eqp = '\0';
917 vp = eqp + 1;
918
919 cp = opendmarc_util_cleanup(cp, cbuf, sizeof cbuf);
920 if (cp == NULL || strlen((char *)cp) == 0)
921 {
922 cp = sp;
923 continue;
924 }
925 vp = opendmarc_util_cleanup(vp, vbuf, sizeof vbuf);
926 if (vp == NULL || strlen((char *)vp) == 0)
927 {
928 cp = sp;
929 continue;
930 }
931 /*
932 * cp nwo points to the token, and
933 * vp now points to the token's value
934 * both with all surronding whitepace removed.
935 */
936 if (strcasecmp((char *)cp, "v") == 0)
937 {
938 /*
939 * Yes, this is required to be first, but why
940 * reject it if it is not first?
941 */
942 if (strcasecmp((char *)vp, "DMARC1") != 0)
943 {
944 return DMARC_PARSE_ERROR_BAD_VERSION;
945 }
946 }
947 else if (strcasecmp((char *)cp, "p") == 0)
948 {
949 /*
950 * Be generous. Accept, for example, "p=r, p=rej, or any
951 * left match of "reject".
952 */
953 if (strncasecmp((char *)vp, "reject", strlen((char *)vp)) == 0)
954 pctx->p = DMARC_RECORD_P_REJECT;
955 else if (strncasecmp((char *)vp, "none", strlen((char *)vp)) == 0)
956 pctx->p = DMARC_RECORD_P_NONE;
957 else if (strncasecmp((char *)vp, "quarantine", strlen((char *)vp)) == 0)
958 pctx->p = DMARC_RECORD_P_QUARANTINE;
959 else
960 {
961 /* A totaly unknown value */
962 return DMARC_PARSE_ERROR_BAD_VALUE;
963 }
964 }
965 else if (strcasecmp((char *)cp, "sp") == 0)
966 {
967 /*
968 * Be generous. Accept, for example, "sp=r, p=rej, or any
969 * left match of "reject".
970 */
971 if (strncasecmp((char *)vp, "reject", strlen((char *)vp)) == 0)
972 pctx->sp = DMARC_RECORD_P_REJECT;
973 else if (strncasecmp((char *)vp, "none", strlen((char *)vp)) == 0)
974 pctx->sp = DMARC_RECORD_P_NONE;
975 else if (strncasecmp((char *)vp, "quarantine", strlen((char *)vp)) == 0)
976 pctx->sp = DMARC_RECORD_P_QUARANTINE;
977 else
978 {
979 /* A totaly unknown value */
980 return DMARC_PARSE_ERROR_BAD_VALUE;
981 }
982 }
983 else if (strcasecmp((char *)cp, "adkim") == 0)
984 {
985 /*
986 * Be generous. Accept, for example, "adkim=s, adkim=strict or any
987 * left match of "strict".
988 */
989 if (strncasecmp((char *)vp, "strict", strlen((char *)vp)) == 0)
990 pctx->adkim = DMARC_RECORD_A_STRICT;
991 else if (strncasecmp((char *)vp, "relaxed", strlen((char *)vp)) == 0)
992 pctx->adkim = DMARC_RECORD_A_RELAXED;
993 else
994 {
995 /* A totaly unknown value */
996 return DMARC_PARSE_ERROR_BAD_VALUE;
997 }
998 }
999 else if (strcasecmp((char *)cp, "aspf") == 0)
1000 {
1001 /*
1002 * Be generous. Accept, for example, "aspf=s, aspf=strict or any
1003 * left match of "strict".
1004 */
1005 if (strncasecmp((char *)vp, "strict", strlen((char *)vp)) == 0)
1006 pctx->aspf = DMARC_RECORD_A_STRICT;
1007 else if (strncasecmp((char *)vp, "relaxed", strlen((char *)vp)) == 0)
1008 pctx->aspf = DMARC_RECORD_A_RELAXED;
1009 else
1010 {
1011 /* A totaly unknown value */
1012 return DMARC_PARSE_ERROR_BAD_VALUE;
1013 }
1014 }
1015 else if (strcasecmp((char *)cp, "pct") == 0)
1016 {
1017 errno = 0;
1018 pctx->pct = strtoul(vp, NULL, 10);
1019 if (pctx->pct < 0 || pctx->pct > 100)
1020 {
1021 return DMARC_PARSE_ERROR_BAD_VALUE;
1022 }
1023 if (errno == EINVAL || errno == ERANGE)
1024 {
1025 return DMARC_PARSE_ERROR_BAD_VALUE;
1026 }
1027 }
1028 else if (strcasecmp((char *)cp, "ri") == 0)
1029 {
1030 char *xp;
1031
1032 for (xp = vp; *xp != '\0'; ++xp)
1033 {
1034 if (! isdigit((int)*xp))
1035 return DMARC_PARSE_ERROR_BAD_VALUE;
1036 }
1037 errno = 0;
1038 pctx->ri = strtoul(vp, NULL, 10);
1039 if (errno == EINVAL || errno == ERANGE)
1040 {
1041 return DMARC_PARSE_ERROR_BAD_VALUE;
1042 }
1043 }
1044 else if (strcasecmp((char *)cp, "rf") == 0)
1045 {
1046 char *xp, *yp;
1047
1048 /*
1049 * The list may be a comma delimilted list of choices.
1050 */
1051 for (xp = vp; *xp != '\0'; )
1052 {
1053 u_char xbuf[32];
1054
1055 yp = strchr(xp, ',');
1056 if (yp != NULL)
1057 *yp = '\0';
1058
1059 xp = opendmarc_util_cleanup(xp, xbuf, sizeof xbuf);
1060 if (xp != NULL || strlen((char *)xp) > 0)
1061 {
1062 /*
1063 * Be generous. Accept, for example, "rf=a, aspf=afrf or any
1064 * left match of "afrf".
1065 */
1066 if (strncasecmp((char *)xp, "afrf", strlen((char *)xp)) == 0)
1067 pctx->rf |= DMARC_RECORD_RF_AFRF;
1068 else if (strncasecmp((char *)xp, "iodef", strlen((char *)xp)) == 0)
1069 pctx->aspf |= DMARC_RECORD_RF_IODEF;
1070 else
1071 {
1072 /* A totaly unknown value */
1073 return DMARC_PARSE_ERROR_BAD_VALUE;
1074 }
1075 }
1076 if (yp != NULL)
1077 xp = yp+1;
1078 else
1079 break;
1080 }
1081 }
1082 else if (strcasecmp((char *)cp, "rua") == 0)
1083 {
1084 char *xp, *yp;
1085
1086 /*
1087 * A possibly comma delimited list of URI of where to send reports.
1088 */
1089 for (xp = vp; *xp != '\0'; )
1090 {
1091 u_char xbuf[256];
1092
1093 yp = strchr(xp, ',');
1094 if (yp != NULL)
1095 *yp = '\0';
1096
1097 xp = opendmarc_util_cleanup(xp, xbuf, sizeof xbuf);
1098 if (xp != NULL || strlen((char *)xp) > 0)
1099 {
1100 pctx->rua_list = opendmarc_util_pushargv(xp, pctx->rua_list,
1101 &(pctx->rua_cnt));
1102 }
1103 if (yp != NULL)
1104 xp = yp+1;
1105 else
1106 break;
1107 }
1108 }
1109 else if (strcasecmp((char *)cp, "ruf") == 0)
1110 {
1111 char *xp, *yp;
1112
1113 /*
1114 * A possibly comma delimited list of URI of where to send
1115 * MARF reports.
1116 */
1117 for (xp = vp; *xp != '\0'; )
1118 {
1119 u_char xbuf[256];
1120
1121 yp = strchr(xp, ',');
1122 if (yp != NULL)
1123 *yp = '\0';
1124
1125 xp = opendmarc_util_cleanup(xp, xbuf, sizeof xbuf);
1126 if (xp != NULL || strlen((char *)xp) > 0)
1127 {
1128 pctx->ruf_list = opendmarc_util_pushargv(xp, pctx->ruf_list,
1129 &(pctx->ruf_cnt));
1130 }
1131 if (yp != NULL)
1132 xp = yp+1;
1133 else
1134 break;
1135 }
1136 }
1137 else if (strcasecmp((char *)cp, "fo") == 0)
1138 {
1139 char *xp, *yp;
1140
1141 /*
1142 * A possibly colon delimited list of on character settings.
1143 */
1144 for (xp = vp; *xp != '\0'; )
1145 {
1146 u_char xbuf[256];
1147
1148 yp = strchr(xp, ':');
1149 if (yp != NULL)
1150 *yp = '\0';
1151
1152 xp = opendmarc_util_cleanup(xp, xbuf, sizeof xbuf);
1153 if (xp != NULL || strlen((char *)xp) > 0)
1154 {
1155 switch ((int)*xp)
1156 {
1157 case '0':
1158 pctx->fo |= DMARC_RECORD_FO_0;
1159 break;
1160 case '1':
1161 pctx->fo |= DMARC_RECORD_FO_1;
1162 break;
1163 case 'd':
1164 case 'D':
1165 pctx->fo |= DMARC_RECORD_FO_D;
1166 break;
1167 case 's':
1168 case 'S':
1169 pctx->fo |= DMARC_RECORD_FO_S;
1170 break;
1171 default:
1172 return DMARC_PARSE_ERROR_BAD_VALUE;
1173 }
1174 }
1175 if (yp != NULL)
1176 xp = yp+1;
1177 else
1178 break;
1179 }
1180 }
1181
1182 cp = sp;
1183 }
1184
1185 if (pctx->p == DMARC_RECORD_P_UNSPECIFIED)
1186 {
1187 return DMARC_PARSE_ERROR_NO_REQUIRED_P;
1188 }
1189 /*
1190 * Set defaults for unspecifed tokens.
1191 */
1192 if (pctx->adkim == DMARC_RECORD_A_UNSPECIFIED)
1193 pctx->adkim = DMARC_RECORD_A_RELAXED;
1194 if (pctx->aspf == DMARC_RECORD_A_UNSPECIFIED)
1195 pctx->aspf = DMARC_RECORD_A_RELAXED;
1196 if (pctx->pct < 0)
1197 pctx->pct = 100;
1198 if (pctx->rf == DMARC_RECORD_RF_UNSPECIFIED)
1199 pctx->rf = DMARC_RECORD_RF_AFRF;
1200 if (pctx->ri == -1)
1201 pctx->ri = 86400;
1202 if (pctx->fo == DMARC_RECORD_FO_UNSPECIFIED)
1203 pctx->fo = DMARC_RECORD_FO_0;
1204
1205 if (pctx->from_domain == NULL)
1206 pctx->from_domain = strdup(domain);
1207 return DMARC_PARSE_OKAY;
1208 }
1209
1210 /**************************************************************************
1211 ** OPENDMARC_POLICY_STORE_DMARC -- The application looked up the dmarc record
1212 ** and hands it to us here.
1213 ***************************************************************************/
1214 OPENDMARC_STATUS_T
1215 opendmarc_policy_store_dmarc(DMARC_POLICY_T *pctx, u_char *dmarc_record, u_char *domain, u_char *organizationaldomain)
1216 {
1217 OPENDMARC_STATUS_T status;
1218
1219 if (pctx == NULL)
1220 return DMARC_PARSE_ERROR_NULL_CTX;
1221 if (dmarc_record == NULL)
1222 return DMARC_PARSE_ERROR_EMPTY;
1223 if (domain == NULL)
1224 return DMARC_PARSE_ERROR_NO_DOMAIN;
1225
1226 status = opendmarc_policy_parse_dmarc(pctx, domain , dmarc_record);
1227 if (status != DMARC_PARSE_OKAY)
1228 return status;
1229
1230 if (pctx->from_domain != NULL)
1231 (void) free(pctx->from_domain);
1232 pctx->from_domain = strdup(domain);
1233 if (organizationaldomain != NULL)
1234 {
1235 if (pctx->organizational_domain != NULL)
1236 (void) free(pctx->organizational_domain);
1237 pctx->organizational_domain = (u_char *)strdup(organizationaldomain);
1238 }
1239 return DMARC_PARSE_OKAY;
1240 }
1241
1242
1243 /**************************************************************************
1244 ** DMARC LOOKUP HOOKS
1245 ***************************************************************************/
1246
1247 OPENDMARC_STATUS_T
1248 opendmarc_policy_fetch_pct(DMARC_POLICY_T *pctx, int *pctp)
1249 {
1250 if (pctx == NULL)
1251 {
1252 return DMARC_PARSE_ERROR_NULL_CTX;
1253 }
1254 if (pctp == NULL)
1255 {
1256 return DMARC_PARSE_ERROR_EMPTY;
1257 }
1258 *pctp = pctx->pct;
1259 return DMARC_PARSE_OKAY;
1260 }
1261
1262 OPENDMARC_STATUS_T
1263 opendmarc_policy_fetch_adkim(DMARC_POLICY_T *pctx, int *adkim)
1264 {
1265 if (pctx == NULL)
1266 {
1267 return DMARC_PARSE_ERROR_NULL_CTX;
1268 }
1269 if (adkim == NULL)
1270 {
1271 return DMARC_PARSE_ERROR_EMPTY;
1272 }
1273 *adkim = pctx->adkim;
1274 return DMARC_PARSE_OKAY;
1275 }
1276
1277 OPENDMARC_STATUS_T
1278 opendmarc_policy_fetch_aspf(DMARC_POLICY_T *pctx, int *aspf)
1279 {
1280 if (pctx == NULL)
1281 {
1282 return DMARC_PARSE_ERROR_NULL_CTX;
1283 }
1284 if (aspf == NULL)
1285 {
1286 return DMARC_PARSE_ERROR_EMPTY;
1287 }
1288 *aspf = pctx->aspf;
1289 return DMARC_PARSE_OKAY;
1290 }
1291
1292 OPENDMARC_STATUS_T
1293 opendmarc_policy_fetch_p(DMARC_POLICY_T *pctx, int *p)
1294 {
1295 if (pctx == NULL)
1296 {
1297 return DMARC_PARSE_ERROR_NULL_CTX;
1298 }
1299 if (p == NULL)
1300 {
1301 return DMARC_PARSE_ERROR_EMPTY;
1302 }
1303 *p = pctx->p;
1304 return DMARC_PARSE_OKAY;
1305 }
1306
1307 OPENDMARC_STATUS_T
1308 opendmarc_policy_fetch_sp(DMARC_POLICY_T *pctx, int *sp)
1309 {
1310 if (pctx == NULL)
1311 {
1312 return DMARC_PARSE_ERROR_NULL_CTX;
1313 }
1314 if (sp == NULL)
1315 {
1316 return DMARC_PARSE_ERROR_EMPTY;
1317 }
1318 *sp = pctx->sp;
1319 return DMARC_PARSE_OKAY;
1320 }
1321
1322 u_char **
1323 opendmarc_policy_fetch_rua(DMARC_POLICY_T *pctx, u_char *list_buf, size_t size_of_buf, int constant)
1324 {
1325 u_char *sp, *ep, *rp;
1326 int i;
1327 int ret;
1328
1329 if (pctx == NULL)
1330 {
1331 return NULL;
1332 }
1333 if (list_buf != NULL && size_of_buf > 0)
1334 {
1335 (void) memset(list_buf, '\0', size_of_buf);
1336 sp = list_buf;
1337 ep = list_buf + size_of_buf;
1338 for (i = 0; i < pctx->rua_cnt; i++)
1339 {
1340 ret = opendmarc_policy_query_dmarc_xdomain(pctx, pctx->rua_list[i]);
1341 if (ret != DMARC_PARSE_OKAY)
1342 continue;
1343 for (rp = (pctx->rua_list)[i]; *rp != '\0'; ++rp)
1344 {
1345 *sp++ = *rp;
1346 if (sp >= (ep - 2))
1347 break;
1348 }
1349 if (sp >= (ep - 2))
1350 break;
1351 if (i != (pctx->rua_cnt -1))
1352 *sp++ = ',';
1353 if (sp >= (ep - 2))
1354 break;
1355 }
1356 }
1357 if (constant != 0)
1358 return pctx->rua_list;
1359 return opendmarc_util_dupe_argv(pctx->rua_list);
1360 }
1361
1362 OPENDMARC_STATUS_T
1363 opendmarc_policy_fetch_alignment(DMARC_POLICY_T *pctx, int *dkim_alignment, int *spf_alignment)
1364 {
1365 if (pctx == NULL)
1366 {
1367 return DMARC_PARSE_ERROR_NULL_CTX;
1368 }
1369 if (dkim_alignment != NULL)
1370 {
1371 *dkim_alignment = pctx->dkim_alignment;
1372 }
1373 if (spf_alignment != NULL)
1374 {
1375 *spf_alignment = pctx->spf_alignment;
1376 }
1377 return DMARC_PARSE_OKAY;
1378 }
1379
1380 u_char **
1381 opendmarc_policy_fetch_ruf(DMARC_POLICY_T *pctx, u_char *list_buf, size_t size_of_buf, int constant)
1382 {
1383 u_char *sp, *ep, *rp;
1384 int i;
1385 int ret;
1386
1387 if (pctx == NULL)
1388 {
1389 return NULL;
1390 }
1391 if (list_buf != NULL || size_of_buf > 0)
1392 {
1393 (void) memset(list_buf, '\0', size_of_buf);
1394 sp = list_buf;
1395 ep = list_buf + size_of_buf;
1396 for (i = 0; i < pctx->ruf_cnt; i++)
1397 {
1398 ret = opendmarc_policy_query_dmarc_xdomain(pctx, pctx->ruf_list[i]);
1399 if (ret != DMARC_PARSE_OKAY)
1400 continue;
1401 for (rp = (pctx->ruf_list)[i]; *rp != '\0'; ++rp)
1402 {
1403 *sp++ = *rp;
1404 if (sp >= (ep - 2))
1405 break;
1406 }
1407 if (sp >= (ep - 2))
1408 break;
1409 if (i != (pctx->ruf_cnt -1))
1410 *sp++ = ',';
1411 if (sp >= (ep - 2))
1412 break;
1413 }
1414 }
1415 if (constant != 0)
1416 return pctx->ruf_list;
1417 return opendmarc_util_dupe_argv(pctx->ruf_list);
1418 }
1419
1420 OPENDMARC_STATUS_T
1421 opendmarc_policy_fetch_fo(DMARC_POLICY_T *pctx, int *fo)
1422 {
1423 if (pctx == NULL)
1424 return DMARC_PARSE_ERROR_NULL_CTX;
1425 if (fo == NULL)
1426 return DMARC_PARSE_ERROR_EMPTY;
1427 if (pctx->ruf_list == NULL)
1428 *fo = DMARC_RECORD_FO_UNSPECIFIED;
1429 else
1430 *fo = pctx->fo;
1431 return DMARC_PARSE_OKAY;
1432 }
1433
1434 OPENDMARC_STATUS_T
1435 opendmarc_policy_fetch_rf(DMARC_POLICY_T *pctx, int *rf)
1436 {
1437 if (pctx == NULL)
1438 return DMARC_PARSE_ERROR_NULL_CTX;
1439 if (rf == NULL)
1440 return DMARC_PARSE_ERROR_EMPTY;
1441 if (pctx->ruf_list == NULL)
1442 *rf = DMARC_RECORD_RF_UNSPECIFIED;
1443 else
1444 *rf = pctx->rf;
1445 return DMARC_PARSE_OKAY;
1446 }
1447
1448 /**************************************************************************************************
1449 ** OPENDMARC_POLICY_FETCH_UTILIZED_DOMAIN -- Return domain used to get the dmarc record
1450 ** Either the From: domain or the organizational domain
1451 ** Arguments
1452 ** pctx -- Address of a policy context
1453 ** buf -- Where to scribble result
1454 ** buflen -- Size of buffer
1455 ** Returns
1456 ** DMARC_PARSE_OKAY -- On success
1457 ** DMARC_PARSE_ERROR_NULL_CTX -- If context NULL
1458 ** DMARC_PARSE_ERROR_EMPTY -- If buf null or buflen 0 sized
1459 ** DMARC_PARSE_ERROR_NO_DOMAIN -- If neigher address is available
1460 **/
1461 OPENDMARC_STATUS_T
1462 opendmarc_policy_fetch_utilized_domain(DMARC_POLICY_T *pctx, u_char *buf, size_t buflen)
1463 {
1464 u_char *which = NULL;
1465
1466 if (pctx == NULL)
1467 return DMARC_PARSE_ERROR_NULL_CTX;
1468 if (buf == NULL || buflen == 0)
1469 return DMARC_PARSE_ERROR_EMPTY;
1470
1471 if (pctx->organizational_domain != NULL)
1472 which = pctx->organizational_domain;
1473 else if (pctx->from_domain != NULL)
1474 which = pctx->from_domain;
1475 if (which == NULL)
1476 return DMARC_PARSE_ERROR_NO_DOMAIN;
1477 # if HAVE_STRLCPY
1478 (void) strlcpy((char *)buf, (char *)which, buflen);
1479 # else
1480 (void) strncpy((char *)buf, (char *)which, buflen);
1481 # endif
1482 return DMARC_PARSE_OKAY;
1483 }
1484
1485 /**************************************************************************
1486 ** OPENDMARC_GET_POLICY_TOKEN_USED -- Which policy was actually used
1487 **
1488 ** Parameters:
1489 ** pctx -- A Policy context
1490 ** Returns:
1491 ** DMARC_PARSE_ERROR_NULL_CTX -- pctx == NULL
1492 ** DMARC_USED_POLICY_IS_P -- Domain policy is used
1493 ** DMARC_USED_POLICY_IS_SP -- Sub-domain policy is used
1494 ***************************************************************************/
1495 OPENDMARC_STATUS_T
1496 opendmarc_get_policy_token_used(DMARC_POLICY_T *pctx)
1497 {
1498
1499 if (pctx == NULL)
1500 return DMARC_PARSE_ERROR_NULL_CTX;
1501 if (pctx->organizational_domain != NULL &&
1502 pctx->sp != DMARC_RECORD_P_UNSPECIFIED)
1503 return DMARC_USED_POLICY_IS_SP;
1504 else
1505 return DMARC_USED_POLICY_IS_P;
1506 }
1507
1508 /******************************************************************************
1509 ** OPENDMARC_POLICY_LIBRARY_DNS_HOOK -- Internal hook for dmarc_dns_get_record
1510 *******************************************************************************/
1511 void
1512 opendmarc_policy_library_dns_hook(int *nscountp,
1513 struct sockaddr_in *nsaddr_list)
1514 {
1515 int i;
1516
1517 if (nscountp == NULL || nsaddr_list == NULL)
1518 return;
1519 if (Opendmarc_Libp == NULL)
1520 return;
1521 if (Opendmarc_Libp->nscount == 0 || Opendmarc_Libp->nscount >= MAXNS)
1522 return;
1523 for (i = 0; i < Opendmarc_Libp->nscount; i++)
1524 {
1525 nsaddr_list[i] = Opendmarc_Libp->nsaddr_list[i];
1526 }
1527 *nscountp = i;
1528 return;
1529 }
1530
1531 /**************************************************************************
1532 ** OPENDMARC_POLICY_STATUS_TO_STR -- Convert the integer return
1533 ** of type OPENDMARC_STATUS_T into
1534 ** a human readable string.
1535 ** Parameters:
1536 ** status -- The status for which to return a string
1537 ** Returns:
1538 ** NULL -- On error
1539 ** const char * -- On success
1540 ***************************************************************************/
1541 const char *
1542 opendmarc_policy_status_to_str(OPENDMARC_STATUS_T status)
1543 {
1544 char *msg = "Undefine Value";
1545
1546 switch (status)
1547 {
1548 case DMARC_PARSE_OKAY:
1549 msg = "Success. No Errors";
1550 break;
1551 case DMARC_PARSE_ERROR_EMPTY:
1552 msg = "Function called with nothing to parse";
1553 break;
1554 case DMARC_PARSE_ERROR_NULL_CTX:
1555 msg ="Function called with NULL Context";
1556 break;
1557 case DMARC_PARSE_ERROR_BAD_VERSION:
1558 msg = "Found DMARC record containd a bad v= value";
1559 break;
1560 case DMARC_PARSE_ERROR_BAD_VALUE:
1561 msg = "Found DMARC record containd a bad token value";
1562 break;
1563 case DMARC_PARSE_ERROR_NO_REQUIRED_P:
1564 msg = "Found DMARC record lacked a required p= entry";
1565 break;
1566 case DMARC_PARSE_ERROR_NO_DOMAIN:
1567 msg = "Function found the domain empty, e.g. \"<>\"";
1568 break;
1569 case DMARC_PARSE_ERROR_NO_ALLOC:
1570 msg = "Memory allocation error";
1571 break;
1572 case DMARC_PARSE_ERROR_BAD_SPF_MACRO:
1573 msg = "Attempt to store an illegal value";
1574 break;
1575 case DMARC_DNS_ERROR_NO_RECORD:
1576 msg = "Looked up domain lacked a DMARC record";
1577 break;
1578 case DMARC_DNS_ERROR_NXDOMAIN:
1579 msg = "Looked up domain did not exist";
1580 break;
1581 case DMARC_DNS_ERROR_TMPERR:
1582 msg = "DNS lookup of domain tempfailed";
1583 break;
1584 case DMARC_TLD_ERROR_UNKNOWN:
1585 msg = "Attempt to load an unknown TLD file type";
1586 break;
1587 case DMARC_FROM_DOMAIN_ABSENT:
1588 msg = "No From: domain was supplied";
1589 break;
1590 case DMARC_POLICY_ABSENT:
1591 msg = "Policy up to you. No DMARC record found";
1592 break;
1593 case DMARC_POLICY_PASS:
1594 msg = "Policy OK so accept message";
1595 break;
1596 case DMARC_POLICY_REJECT:
1597 msg = "Policy says to reject message";
1598 break;
1599 case DMARC_POLICY_QUARANTINE:
1600 msg = "Policy says to quarantine message";
1601 break;
1602 case DMARC_POLICY_NONE:
1603 msg = "Policy says to monitor and report";
1604 break;
1605 }
1606 return msg;
1607 }
1608
1609 /*******************************************************************************
1610 ** OPENDMARC_POLICY_TO_BUF -- Dump the DMARC_POLICY_T to a user supplied buffer
1611 ** Arguments:
1612 ** pctx A pointer to a filled in DMARC_POLICY_T sttucture
1613 ** buf A char * buffer
1614 ** buflen The size of the char * buffer
1615 ** Returns:
1616 ** 0 On success
1617 ** >0 On failure, and fills errno with the error
1618 ** Side Effects:
1619 ** Blindly overwrites buffer.
1620 *******************************************************************************/
1621 int
1622 opendmarc_policy_to_buf(DMARC_POLICY_T *pctx, char *buf, size_t buflen)
1623 {
1624 char nbuf[32];
1625 int i;
1626
1627 if (pctx == NULL || buf == NULL || buflen == 0)
1628 return errno = EINVAL;
1629
1630 (void) memset(buf, '\0', buflen);
1631
1632 if (strlcat(buf, "IP_ADDR=", buflen) >= buflen) return E2BIG;
1633 if (pctx->ip_addr != NULL)
1634 if (strlcat(buf, pctx->ip_addr, buflen) >= buflen) return E2BIG;
1635 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1636
1637 if (strlcat(buf, "IP_TYPE=", buflen) >= buflen) return E2BIG;
1638 if (pctx->ip_addr != NULL)
1639 {
1640 if (pctx->ip_type == DMARC_POLICY_IP_TYPE_IPV4)
1641 {
1642 if (strlcat(buf, "IPv4", buflen) >= buflen) return E2BIG;
1643 }
1644 else if (pctx->ip_type == DMARC_POLICY_IP_TYPE_IPV6)
1645 {
1646 if (strlcat(buf, "IPv6", buflen) >= buflen) return E2BIG;
1647 }
1648 }
1649 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1650
1651 if (strlcat(buf, "SPF_DOMAIN=", buflen) >= buflen) return E2BIG;
1652 if (pctx->spf_domain != NULL)
1653 if (strlcat(buf, pctx->spf_domain, buflen) >= buflen) return E2BIG;
1654 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1655
1656 if (strlcat(buf, "SPF_ORIGIN=", buflen) >= buflen) return E2BIG;
1657 if (pctx->spf_origin != 0)
1658 {
1659 if (pctx->spf_origin == DMARC_POLICY_SPF_ORIGIN_MAILFROM)
1660 {
1661 if (strlcat(buf, "MAILFROM", buflen) >= buflen) return E2BIG;
1662 }
1663 else if (pctx->spf_origin == DMARC_POLICY_SPF_ORIGIN_HELO)
1664 {
1665 if (strlcat(buf, "HELO", buflen) >= buflen) return E2BIG;
1666 }
1667 }
1668 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1669
1670 if (strlcat(buf, "SPF_OUTCOME=", buflen) >= buflen) return E2BIG;
1671 switch (pctx->spf_outcome)
1672 {
1673 default:
1674 case DMARC_POLICY_DKIM_OUTCOME_NONE:
1675 if (strlcat(buf, "NONE", buflen) >= buflen) return E2BIG;
1676 break;
1677 case DMARC_POLICY_DKIM_OUTCOME_PASS:
1678 if (strlcat(buf, "PASS", buflen) >= buflen) return E2BIG;
1679 break;
1680 case DMARC_POLICY_DKIM_OUTCOME_FAIL:
1681 if (strlcat(buf, "FAIL", buflen) >= buflen) return E2BIG;
1682 break;
1683 case DMARC_POLICY_DKIM_OUTCOME_TMPFAIL:
1684 if (strlcat(buf, "TMPFAIL", buflen) >= buflen) return E2BIG;
1685 break;
1686 }
1687 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1688
1689 if (strlcat(buf, "SPF_HUMAN_OUTCOME=", buflen) >= buflen) return E2BIG;
1690 if (pctx->spf_human_outcome != NULL)
1691 if (strlcat(buf, pctx->spf_human_outcome, buflen) >= buflen) return E2BIG;
1692 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1693
1694 if (strlcat(buf, "DKIM_FINAL=", buflen) >= buflen) return E2BIG;
1695 switch (pctx->dkim_final)
1696 {
1697 case TRUE:
1698 if (strlcat(buf, "TRUE", buflen) >= buflen) return E2BIG;
1699 break;
1700 default:
1701 case FALSE:
1702 if (strlcat(buf, "FALSE", buflen) >= buflen) return E2BIG;
1703 break;
1704 }
1705 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1706
1707 if (strlcat(buf, "DKIM_DOMAIN=", buflen) >= buflen) return E2BIG;
1708 if (pctx->dkim_domain != NULL)
1709 if (strlcat(buf, pctx->dkim_domain, buflen) >= buflen) return E2BIG;
1710 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1711
1712 if (strlcat(buf, "DKIM_OUTOME=", buflen) >= buflen) return E2BIG;
1713 switch (pctx->dkim_outcome)
1714 {
1715 default:
1716 case DMARC_POLICY_DKIM_OUTCOME_NONE:
1717 if (strlcat(buf, "NONE", buflen) >= buflen) return E2BIG;
1718 break;
1719 case DMARC_POLICY_DKIM_OUTCOME_PASS:
1720 if (strlcat(buf, "PASS", buflen) >= buflen) return E2BIG;
1721 break;
1722 case DMARC_POLICY_DKIM_OUTCOME_FAIL:
1723 if (strlcat(buf, "FAIL", buflen) >= buflen) return E2BIG;
1724 break;
1725 case DMARC_POLICY_DKIM_OUTCOME_TMPFAIL:
1726 if (strlcat(buf, "TMPFAIL", buflen) >= buflen) return E2BIG;
1727 break;
1728 }
1729 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1730
1731 if (strlcat(buf, "DKIM_HUMAN_OUTCOME=", buflen) >= buflen) return E2BIG;
1732 if (pctx->dkim_human_outcome != NULL)
1733 if (strlcat(buf, pctx->dkim_human_outcome, buflen) >= buflen) return E2BIG;
1734 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1735
1736 if (strlcat(buf, "DKIM_ALIGNMENT=", buflen) >= buflen) return E2BIG;
1737 switch (pctx->dkim_alignment)
1738 {
1739 case DMARC_POLICY_DKIM_ALIGNMENT_PASS:
1740 if (strlcat(buf, "PASS", buflen) >= buflen) return E2BIG;
1741 break;
1742 default:
1743 case DMARC_POLICY_DKIM_ALIGNMENT_FAIL:
1744 if (strlcat(buf, "FAIL", buflen) >= buflen) return E2BIG;
1745 break;
1746 }
1747 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1748
1749 if (strlcat(buf, "SPF_ALIGNMENT=", buflen) >= buflen) return E2BIG;
1750 switch (pctx->spf_alignment)
1751 {
1752 case DMARC_POLICY_SPF_ALIGNMENT_PASS:
1753 if (strlcat(buf, "PASS", buflen) >= buflen) return E2BIG;
1754 break;
1755 default:
1756 case DMARC_POLICY_SPF_ALIGNMENT_FAIL:
1757 if (strlcat(buf, "FAIL", buflen) >= buflen) return E2BIG;
1758 break;
1759 }
1760 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1761
1762 if (strlcat(buf, "H_ERRNO=", buflen) >= buflen) return E2BIG;
1763 switch (pctx->h_error)
1764 {
1765 case HOST_NOT_FOUND:
1766 if (strlcat(buf, "HOST_NOT_FOUND", buflen) >= buflen) return E2BIG;
1767 break;
1768 case TRY_AGAIN:
1769 if (strlcat(buf, "TRY_AGAIN", buflen) >= buflen) return E2BIG;
1770 break;
1771 case NO_RECOVERY:
1772 if (strlcat(buf, "NO_RECOVERY", buflen) >= buflen) return E2BIG;
1773 break;
1774 case NO_DATA:
1775 if (strlcat(buf, "NO_DATA", buflen) >= buflen) return E2BIG;
1776 break;
1777 case NETDB_INTERNAL:
1778 if (strlcat(buf, "NETDB_INTERNAL", buflen) >= buflen) return E2BIG;
1779 break;
1780 }
1781 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1782
1783 if (strlcat(buf, "ADKIM=", buflen) >= buflen) return E2BIG;
1784 switch (pctx->adkim)
1785 {
1786 case DMARC_RECORD_A_UNSPECIFIED:
1787 if (strlcat(buf, "UNSPECIFIED", buflen) >= buflen) return E2BIG;
1788 break;
1789 case DMARC_RECORD_A_STRICT:
1790 if (strlcat(buf, "STRICT", buflen) >= buflen) return E2BIG;
1791 break;
1792 case DMARC_RECORD_A_RELAXED:
1793 if (strlcat(buf, "RELAXED", buflen) >= buflen) return E2BIG;
1794 break;
1795 }
1796 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1797
1798 if (strlcat(buf, "ASPF=", buflen) >= buflen) return E2BIG;
1799 switch (pctx->aspf)
1800 {
1801 case DMARC_RECORD_A_UNSPECIFIED:
1802 if (strlcat(buf, "UNSPECIFIED", buflen) >= buflen) return E2BIG;
1803 break;
1804 case DMARC_RECORD_A_STRICT:
1805 if (strlcat(buf, "STRICT", buflen) >= buflen) return E2BIG;
1806 break;
1807 case DMARC_RECORD_A_RELAXED:
1808 if (strlcat(buf, "RELAXED", buflen) >= buflen) return E2BIG;
1809 break;
1810 }
1811 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1812
1813 if (strlcat(buf, "P=", buflen) >= buflen) return E2BIG;
1814 switch (pctx->p)
1815 {
1816 case DMARC_RECORD_A_UNSPECIFIED:
1817 if (strlcat(buf, "UNSPECIFIED", buflen) >= buflen) return E2BIG;
1818 break;
1819 case DMARC_RECORD_P_NONE:
1820 if (strlcat(buf, "NONE", buflen) >= buflen) return E2BIG;
1821 break;
1822 case DMARC_RECORD_P_QUARANTINE:
1823 if (strlcat(buf, "QUARANTINE", buflen) >= buflen) return E2BIG;
1824 break;
1825 case DMARC_RECORD_P_REJECT:
1826 if (strlcat(buf, "REJECT", buflen) >= buflen) return E2BIG;
1827 break;
1828 }
1829 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1830
1831 if (strlcat(buf, "SP=", buflen) >= buflen) return E2BIG;
1832 switch (pctx->sp)
1833 {
1834 case DMARC_RECORD_A_UNSPECIFIED:
1835 if (strlcat(buf, "UNSPECIFIED", buflen) >= buflen) return E2BIG;
1836 break;
1837 case DMARC_RECORD_P_NONE:
1838 if (strlcat(buf, "NONE", buflen) >= buflen) return E2BIG;
1839 break;
1840 case DMARC_RECORD_P_QUARANTINE:
1841 if (strlcat(buf, "QUARANTINE", buflen) >= buflen) return E2BIG;
1842 break;
1843 case DMARC_RECORD_P_REJECT:
1844 if (strlcat(buf, "REJECT", buflen) >= buflen) return E2BIG;
1845 break;
1846 }
1847 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1848
1849 if (strlcat(buf, "PCT=", buflen) >= buflen) return E2BIG;
1850 (void) snprintf(nbuf, sizeof nbuf, "%d", pctx->pct);
1851 if (strlcat(buf, nbuf, buflen) >= buflen) return E2BIG;
1852 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1853
1854 if (strlcat(buf, "RF=", buflen) >= buflen) return E2BIG;
1855 if (pctx->rf == 0)
1856 {
1857 if (strlcat(buf, "UNSPECIFIED", buflen) >= buflen) return E2BIG;
1858 }
1859 if ((pctx->rf&DMARC_RECORD_RF_AFRF) != 0)
1860 {
1861 if (strlcat(buf, "AFRF", buflen) >= buflen) return E2BIG;
1862 }
1863 if ((pctx->rf&DMARC_RECORD_RF_IODEF) != 0 &&
1864 (pctx->rf&DMARC_RECORD_RF_AFRF) != 0)
1865 {
1866 if (strlcat(buf, ",", buflen) >= buflen) return E2BIG;
1867 }
1868 if ((pctx->rf&DMARC_RECORD_RF_IODEF) != 0)
1869 {
1870 if (strlcat(buf, "IODEF", buflen) >= buflen) return E2BIG;
1871 }
1872 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1873
1874 if (strlcat(buf, "RI=", buflen) >= buflen) return E2BIG;
1875 (void) snprintf(nbuf, sizeof nbuf, "%d", pctx->ri);
1876 if (strlcat(buf, nbuf, buflen) >= buflen) return E2BIG;
1877 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1878
1879 if (strlcat(buf, "RUA=", buflen) >= buflen) return E2BIG;
1880 for (i = 0; i < pctx->rua_cnt; ++i)
1881 {
1882 if (i > 0)
1883 {
1884 if (strlcat(buf, ",", buflen) >= buflen) return E2BIG;
1885 }
1886 if (strlcat(buf, (pctx->rua_list)[i], buflen) >= buflen) return E2BIG;
1887 }
1888 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1889
1890 if (strlcat(buf, "RUF=", buflen) >= buflen) return E2BIG;
1891 for (i = 0; i < pctx->ruf_cnt; ++i)
1892 {
1893 if (i > 0)
1894 {
1895 if (strlcat(buf, ",", buflen) >= buflen) return E2BIG;
1896 }
1897 if (strlcat(buf, (pctx->ruf_list)[i], buflen) >= buflen) return E2BIG;
1898 }
1899 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1900
1901 if (strlcat(buf, "FO=", buflen) >= buflen) return E2BIG;
1902 if (pctx->ruf_list == NULL || pctx->fo == DMARC_RECORD_FO_UNSPECIFIED)
1903 {
1904 if (strlcat(buf, "UNSPECIFIED", buflen) >= buflen) return E2BIG;
1905 }
1906 if ((pctx->fo&DMARC_RECORD_FO_0) != 0)
1907 {
1908 if (strlcat(buf, "0:", buflen) >= buflen) return E2BIG;
1909 }
1910 if ((pctx->fo&DMARC_RECORD_FO_1) != 0)
1911 {
1912 if (strlcat(buf, "1:", buflen) >= buflen) return E2BIG;
1913 }
1914 if ((pctx->fo&DMARC_RECORD_FO_D) != 0)
1915 {
1916 if (strlcat(buf, "d:", buflen) >= buflen) return E2BIG;
1917 }
1918 if ((pctx->fo&DMARC_RECORD_FO_S) != 0)
1919 {
1920 if (strlcat(buf, "s:", buflen) >= buflen) return E2BIG;
1921 }
1922 if (strlcat(buf, "\n", buflen) >= buflen) return E2BIG;
1923
1924 return 0;
1925 }
0 /********************************************************************
1 ** OPENDMARC_SPF.C -- Process the spf record of the inbound message
2 **********************************************************************/
3 # include "opendmarc_internal.h"
4
5 /* libbsd if found */
6 #ifdef USE_BSD_H
7 # include <bsd/string.h>
8 #endif /* USE_BSD_H */
9
10 /* libstrl if needed */
11 #ifdef USE_STRL_H
12 # include <strl.h>
13 #endif /* USE_STRL_H */
14
15 /* opendmarc_strl if needed */
16 #ifdef USE_DMARCSTRL_H
17 # include <opendmarc_strl.h>
18 #endif /* USE_DMARCSTRL_H */
19
20 # include "dmarc.h"
21
22 #if WITH_SPF
23
24 #if HAVE_SPF2_H
25 // Here we have spf.h, so libspf2 is available.
26
27 SPF_CTX_T *
28 opendmarc_spf2_alloc_ctx()
29 {
30 SPF_CTX_T *spfctx = NULL;
31
32 spfctx = malloc(sizeof(SPF_CTX_T));
33 if (spfctx == NULL)
34 return NULL;
35 (void) memset(spfctx, '\0', sizeof(SPF_CTX_T));
36 spfctx->spf_server = SPF_server_new(SPF_DNS_CACHE, 0);
37 spfctx->spf_request = SPF_request_new(spfctx->spf_server);
38 return spfctx;
39 }
40
41 SPF_CTX_T *
42 opendmarc_spf2_free_ctx(SPF_CTX_T *spfctx)
43 {
44 if (spfctx == NULL)
45 return spfctx;
46
47 if (spfctx->spf_response != NULL)
48 SPF_response_free(spfctx->spf_response);
49 if (spfctx->spf_request != NULL)
50 SPF_request_free(spfctx->spf_request);
51 if (spfctx->spf_server != NULL)
52 SPF_server_free(spfctx->spf_server);
53 (void) free(spfctx);
54 spfctx = NULL;
55 return spfctx;
56 }
57
58 int
59 opendmarc_spf2_find_mailfrom_domain(SPF_CTX_T *spfctx, char *raw_address, char *mailfrom, size_t mailfrom_len, int *use_flag)
60 {
61 char copy[sizeof spfctx->mailfrom_addr];
62 char *cp;
63 char *ep;
64
65 if (use_flag != NULL)
66 *use_flag = FALSE;
67
68 if (spfctx == NULL)
69 return EINVAL;
70
71 if (mailfrom == NULL || raw_address == NULL)
72 return EINVAL;
73
74 (void) memset(copy, '\0', sizeof copy);
75 (void) strlcpy(copy, raw_address, sizeof copy);
76
77 cp = strrchr(copy, '<');
78 if (cp == NULL)
79 cp = copy;
80 else
81 ++cp;
82 ep = strchr(cp, '>');
83 if (ep != NULL)
84 *ep = '\0';
85
86 ep = strchr(cp, '@');
87 if (ep != NULL)
88 {
89 cp = ep+1;
90 if (use_flag != NULL)
91 *use_flag = TRUE;
92 }
93
94 if (strcasecmp(cp, "MAILER_DAEMON") == 0)
95 cp = "";
96
97 (void) memset(mailfrom, '\0', mailfrom_len);
98 (void) strlcpy(mailfrom, cp, mailfrom_len);
99 return 0;
100 }
101
102 int
103 opendmarc_spf2_specify_ip_address(SPF_CTX_T *spfctx, char *ip_address, size_t ip_address_len)
104 {
105 if (spfctx == NULL)
106 return EINVAL;
107
108 if (ip_address == NULL)
109 return EINVAL;
110
111 /*
112 * we don't care at this point if it is ipv6 or ipv4
113 */
114 SPF_request_set_ipv4_str(spfctx->spf_request, ip_address);
115 SPF_request_set_ipv6_str(spfctx->spf_request, ip_address);
116 return 0;
117 }
118
119 int
120 opendmarc_spf2_test(char *ip_address, char *mail_from_domain, char *helo_domain, char *spf_record, int softfail_okay_flag, char *human_readable, size_t human_readable_len, int *used_mfrom)
121 {
122 SPF_CTX_T * ctx;
123 int ret;
124 char xbuf[BUFSIZ];
125 char helo[512];
126 char mfrom[512];
127
128 if (used_mfrom != NULL)
129 *used_mfrom = FALSE;
130
131 (void) memset(xbuf, '\0', sizeof xbuf);
132 ctx = opendmarc_spf2_alloc_ctx();
133 if (ctx == NULL)
134 {
135 if (human_readable != NULL)
136 (void) strlcpy(human_readable, strerror(errno), human_readable_len);
137 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
138 }
139
140 if (ip_address == NULL)
141 {
142 if (human_readable != NULL)
143 (void) strlcpy(human_readable, "No IP address available", human_readable_len);
144 ctx = opendmarc_spf2_free_ctx(ctx);
145 return DMARC_POLICY_SPF_OUTCOME_FAIL;
146 }
147
148 if (mail_from_domain == NULL && helo_domain == NULL)
149 {
150 if (human_readable != NULL)
151 (void) strlcpy(human_readable, "No Domain name available to check", human_readable_len);
152 ctx = opendmarc_spf2_free_ctx(ctx);
153 return DMARC_POLICY_SPF_OUTCOME_FAIL;
154 }
155
156 ret = opendmarc_spf2_specify_ip_address(ctx, ip_address, strlen(ip_address));
157 if (ret != 0)
158 {
159 if (human_readable != NULL)
160 (void) strlcpy(human_readable, strerror(errno), human_readable_len);
161 ctx = opendmarc_spf2_free_ctx(ctx);
162 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
163 }
164
165 ret = opendmarc_spf2_find_mailfrom_domain(ctx, mail_from_domain, mfrom, sizeof mfrom, used_mfrom);
166 if (ret != 0 || *used_mfrom == FALSE)
167 {
168 (void) strlcpy(helo, helo_domain, sizeof helo);
169 SPF_request_set_helo_dom(ctx->spf_request, helo);
170 }
171 else
172 {
173 SPF_request_set_env_from(ctx->spf_request, mfrom);
174 }
175 ctx->spf_response = NULL;
176 SPF_request_query_mailfrom(ctx->spf_request, &(ctx->spf_response));
177
178 if (human_readable != NULL)
179 (void) strlcpy(human_readable, SPF_strresult(SPF_response_result(ctx->spf_response)), human_readable_len);
180 ctx->spf_result = SPF_response_result(ctx->spf_response);
181 ret = (int) ctx->spf_result;
182 ctx = opendmarc_spf2_free_ctx(ctx);
183
184 if (ret != SPF_RESULT_PASS)
185 {
186 switch (ret)
187 {
188 case SPF_RESULT_NONE:
189 return DMARC_POLICY_SPF_OUTCOME_NONE;
190
191 case SPF_RESULT_NEUTRAL:
192 case SPF_RESULT_SOFTFAIL:
193 if (softfail_okay_flag == TRUE)
194 return DMARC_POLICY_SPF_OUTCOME_PASS;
195 else
196 return DMARC_POLICY_SPF_OUTCOME_FAIL;
197 break;
198 case SPF_RESULT_TEMPERROR:
199 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
200 }
201 return DMARC_POLICY_SPF_OUTCOME_FAIL;
202 }
203 return DMARC_POLICY_SPF_OUTCOME_PASS;
204 }
205
206 #else /* HAVE_SPF2_H */
207
208 // No spf.h so no libspf2 to use so we use the internal spf check.
209 #ifndef TRUE
210 # define TRUE (1)
211 #endif
212
213 #ifndef FALSE
214 # define FALSE (0)
215 #endif
216
217 #ifndef MAXDNSHOSTNAME
218 # define MAXDNSHOSTNAME (256)
219 #endif
220 #define SPF_MAX_SPF_RECORD_LEN (4096)
221
222 #define SPF_IN_TOKEN_NONE (0)
223 #define SPF_IN_TOKEN_VERSION (1)
224 #define SPF_IN_TOKEN_A (2)
225 #define SPF_IN_TOKEN_MX (3)
226 #define SPF_IN_TOKEN_IP4 (4)
227 #define SPF_IN_TOKEN_IP6 (5)
228 #define SPF_IN_TOKEN_PTR (6)
229 #define SPF_IN_TOKEN_INCLUDE (7)
230 #define SPF_IN_TOKEN_REDIRECT (8)
231 #define SPF_IN_TOKEN_EXISTS (9)
232 #define SPF_IN_TOKEN_EXP (10)
233
234 const char *
235 opendmarc_spf_status_to_msg(SPF_CTX_T *spfctx, int status)
236 {
237 const char *r;
238
239 if (status != 0 && spfctx != NULL && spfctx->did_get_exp)
240 return spfctx->exp_buf;
241
242 switch (status)
243 {
244 #define SPF_RETURN_UNDECIDED (-1)
245 case SPF_RETURN_UNDECIDED:
246 r = "Undecided";
247 break;
248
249 #define SPF_RETURN_OK_PASSED (0)
250 case SPF_RETURN_OK_PASSED:
251 r = "Passed";
252 break;
253
254 #define SPF_RETURN_INTERNAL (5)
255 case SPF_RETURN_INTERNAL:
256 r = "No Domain To Check";
257 break;
258
259 #define SPF_RETURN_RECORD_TOOLONG (6)
260 case SPF_RETURN_RECORD_TOOLONG:
261 r = "Record Too Big";
262 break;
263 #define SPF_RETURN_BAD_SYNTAX_VERSION (7)
264 case SPF_RETURN_BAD_SYNTAX_VERSION:
265 r = "Bad Version";
266 break;
267 #define SPF_RETURN_A_BUT_NO_A_RECORD (8)
268 case SPF_RETURN_A_BUT_NO_A_RECORD:
269 r = "Required 'A' lookup failed to find 'A' records";
270 break;
271 #define SPF_RETURN_DASH_FORCED_HARD_FAIL (9)
272 case SPF_RETURN_DASH_FORCED_HARD_FAIL:
273 r = "Required 'A' bu no 'A' records with -a specified";
274 break;
275 #define SPF_RETURN_A_BUT_BAD_SYNTAX (10)
276 case SPF_RETURN_A_BUT_BAD_SYNTAX:
277 r = "IP Address Badly Formed";
278 break;
279 #define SPF_RETURN_BAD_SYNTAX_INCLUDE (11)
280 case SPF_RETURN_BAD_SYNTAX_INCLUDE:
281 r = "'INCLUDE' Syntax Error";
282 break;
283 #define SPF_RETURN_INCLUDE_NO_DOMAIN (12)
284 case SPF_RETURN_INCLUDE_NO_DOMAIN:
285 r = "'INCLUDE' Domain Lookup Failed";
286 break;
287 #define SPF_RETURN_BAD_SYNTAX_REDIRECT (13)
288 case SPF_RETURN_BAD_SYNTAX_REDIRECT:
289 r = "'REDIRECT' Syntax Error";
290 break;
291 #define SPF_RETURN_REDIRECT_NO_DOMAIN (14)
292 case SPF_RETURN_REDIRECT_NO_DOMAIN:
293 r = "'REDIRECT' Domain Lookup Failed";
294 break;
295 #define SPF_RETURN_DASH_ALL_HARD_FAIL (15)
296 case SPF_RETURN_DASH_ALL_HARD_FAIL:
297 r = "Hard Fail: Reject";
298 break;
299 #define SPF_RETURN_TILDE_ALL_SOFT_FAIL (16)
300 case SPF_RETURN_TILDE_ALL_SOFT_FAIL:
301 r = "Soft Fail: Subject to Policy";
302 break;
303 #define SPF_RETURN_QMARK_ALL_NEUTRAL (17)
304 case SPF_RETURN_QMARK_ALL_NEUTRAL:
305 r = "Neutral Fail: Subject to Policy";
306 break;
307 #define SPF_RETURN_UNKNOWN_KEYWORD (18)
308 case SPF_RETURN_UNKNOWN_KEYWORD:
309 r = "Unrecognized Keyword";
310 break;
311 #define SPF_RETURN_BAD_MACRO_SYNTAX (19)
312 case SPF_RETURN_BAD_MACRO_SYNTAX:
313 r = "Macros Used But Syntax Bad";
314 break;
315 #define SPF_RETURN_NOT_EXISTS_HARDFAIL (20)
316 case SPF_RETURN_NOT_EXISTS_HARDFAIL:
317 r = "'A' Record lookup, No Such Host";
318 break;
319 #define SPF_RETURN_BAD_SYNTAX_EXISTS (21)
320 case SPF_RETURN_BAD_SYNTAX_EXISTS:
321 r = "'EXISTS' Omitted A domain";
322 break;
323 #define SPF_RETURN_BAD_SYNTAX_EXP (22)
324 case SPF_RETURN_BAD_SYNTAX_EXP:
325 r = "'EXP' Bad Syntax";
326 break;
327 #define SPF_RETURN_NOT_EXP_HARDFAIL (23)
328 case SPF_RETURN_NOT_EXP_HARDFAIL:
329 r = "'-EXP' Hard Failure";
330 break;
331 #define SPF_RETURN_TOO_MANY_DNS_QUERIES (24)
332 case SPF_RETURN_TOO_MANY_DNS_QUERIES:
333 r = "Too Many DNS Lookups Without Success.";
334 break;
335 default:
336 #define SPF_RETURN_INTERNAL_ERROR (25)
337 r = "Undefined Internal Error";
338 break;
339 }
340 return r;
341 }
342
343 /****************************************************************
344 ** SPF_STATUS_TO_PASS -- convert ctx->status into a decision
345 ** Returns 1 for pass
346 ** Returns 0 for fail
347 ** Returns -1 for maybe fail (~all means you decide)
348 ****************************************************************/
349 int
350 opendmarc_spf_status_to_pass(int status, int none_pass)
351 {
352 int r;
353
354 switch (status)
355 {
356 case SPF_RETURN_UNDECIDED:
357 if (none_pass == 1)
358 r = 1;
359 else
360 r = 0;
361 break;
362 case SPF_RETURN_OK_PASSED:
363 r = 1;
364 break;
365 case SPF_RETURN_INTERNAL:
366 r = 0;
367 break;
368 case SPF_RETURN_RECORD_TOOLONG:
369 r = 0;
370 break;
371 case SPF_RETURN_BAD_SYNTAX_VERSION:
372 r = 0;
373 break;
374 case SPF_RETURN_A_BUT_NO_A_RECORD:
375 r = 0;
376 break;
377 case SPF_RETURN_DASH_FORCED_HARD_FAIL:
378 r = 0;
379 break;
380 case SPF_RETURN_A_BUT_BAD_SYNTAX:
381 r = 0;
382 break;
383 case SPF_RETURN_BAD_SYNTAX_INCLUDE:
384 r = 0;
385 break;
386 case SPF_RETURN_INCLUDE_NO_DOMAIN:
387 r = 0;
388 break;
389 case SPF_RETURN_BAD_SYNTAX_REDIRECT:
390 r = 0;
391 break;
392 case SPF_RETURN_REDIRECT_NO_DOMAIN:
393 r = 0;
394 break;
395 case SPF_RETURN_DASH_ALL_HARD_FAIL:
396 r = 0;
397 break;
398 case SPF_RETURN_TILDE_ALL_SOFT_FAIL:
399 r = -1;
400 break;
401 case SPF_RETURN_QMARK_ALL_NEUTRAL:
402 r = 1;
403 break;
404 case SPF_RETURN_UNKNOWN_KEYWORD:
405 r = 0;
406 break;
407 case SPF_RETURN_BAD_MACRO_SYNTAX:
408 r = 0;
409 break;
410 case SPF_RETURN_NOT_EXISTS_HARDFAIL:
411 r = 0;
412 break;
413 case SPF_RETURN_BAD_SYNTAX_EXISTS:
414 r = 0;
415 break;
416 case SPF_RETURN_BAD_SYNTAX_EXP:
417 r = 0;
418 break;
419 case SPF_RETURN_TOO_MANY_DNS_QUERIES:
420 r = 0;
421 break;
422 case SPF_RETURN_INTERNAL_ERROR:
423 r = 0;
424 break;
425 default:
426 r = 0;
427 break;
428 }
429 return r;
430 }
431
432 int
433 opendmarc_spf_cidr_address(u_long ip, char *cidr_addr)
434 {
435 char *cidr;
436 char *cp, *ep;
437 char buf[BUFSIZ];
438 u_long i;
439 u_long bits;
440 u_long mask;
441 u_long high, low;
442 struct sockaddr_in sin;
443
444 if (cidr_addr == NULL)
445 return FALSE;
446
447 (void) memset(buf, '\0', sizeof buf);
448 (void) strlcpy(buf, cidr_addr, sizeof buf);
449
450 cidr = strchr(buf, '/');
451 if (cidr == NULL)
452 {
453 if (inet_aton(cidr_addr, &sin.sin_addr) != 0)
454 {
455 (void)memcpy(&low, &sin.sin_addr, sizeof(sin.sin_addr));
456 (void)memcpy(&high, &sin.sin_addr, sizeof(sin.sin_addr));
457 if (ip >= low && ip <= high)
458 return TRUE;
459 }
460 return FALSE;
461 }
462 *cidr++ = '\0';
463 bits = strtoul(cidr, NULL, 10);
464
465 cp = buf;
466 ep = strchr(buf, '.');
467 if (ep == NULL)
468 return FALSE;
469 *ep++ = '\0';
470 i = strtoul(cp, NULL, 10) << 24;
471
472 cp = ep;
473 ep = strchr(cp, '.');
474 if (ep == NULL)
475 return FALSE;
476 *ep++ = '\0';
477 i += strtoul(cp, NULL, 10) << 16;
478
479 cp = ep;
480 ep = strchr(cp, '.');
481 if (ep == NULL)
482 return FALSE;
483 *ep++ = '\0';
484 i += strtoul(cp, NULL, 10) << 8;
485
486 cp = ep;
487 i += strtoul(cp, NULL, 10);
488
489 mask = (bits == 0) ? 0 : ~(u_long)0 << (32 - bits);
490
491 low = i & mask;
492 high = i | (~mask & 0xFFFFFFFF);
493
494 if (ip >= low && ip <= high)
495 return TRUE;
496 return FALSE;
497 }
498
499 /**************************************************************
500 ** opendmarc_spf_reverse -- Reverse doman name on dot or ip address
501 ** on dot or colon boundaries
502 ** e.g. a.b.c becomes c.b.a
503 ** and FFFF::EEEE becomes EEEE::FFFF
504 ** and 12.34.56.78 becomes 78.56.34.12
505 ** Input:
506 ** str -- the string to reverse
507 ** buf -- buffer to hold the reversed string
508 ** buflen -- size in bytes of the buffer
509 ** Returns:
510 ** NULL On error
511 ** buf On success
512 ** Side Effects:
513 ** Overwrites previous contents of buf
514 ****************************************************************/
515 static char *
516 opendmarc_spf_reverse(char *str, char *buf, size_t buflen)
517 {
518 char * sp;
519 char * ep;
520 char * dotp;
521 int dotorcolon = 0;
522 char dotorcolon_str[2];
523 char dupe[BUFSIZ];
524
525 if (str == NULL || buf == NULL || buflen == 0)
526 return NULL;
527 if (buflen > BUFSIZ)
528 buflen = BUFSIZ;
529
530 (void) memset(buf, '\0', buflen);
531 (void) memset(dupe, '\0', buflen + 1);
532 (void) strlcpy(dupe, str, buflen + 1);
533
534 dotp = strchr(dupe, '.');
535 if (dotp != NULL)
536 dotorcolon = ',';
537 else
538 {
539 dotp = strchr(dupe, ':');
540 if (dotp != NULL)
541 dotorcolon = ':';
542 }
543 if (dotorcolon == 0)
544 return NULL;
545
546 dotorcolon_str[0] = dotorcolon;
547 dotorcolon_str[1] = '\0';
548
549 ep = dupe + strlen(dupe);
550 /*
551 * strip tailing dotorcolons.
552 */
553 do
554 {
555 for (sp = ep; sp >= dupe; --sp)
556 if (*sp == dotorcolon)
557 break;
558 if (sp < dupe)
559 {
560 strlcat(buf, sp+1, buflen);
561 break;
562 }
563 ep = sp;
564 if (*sp == dotorcolon)
565 ++sp;
566 if (*sp != '\0')
567 strlcat(buf, sp, buflen);
568 if (*ep == dotorcolon)
569 {
570 strlcat(buf, dotorcolon_str, buflen);
571 *ep = '\0';
572 --ep;
573 }
574 } while (sp >= dupe);
575 return buf;
576 }
577
578 typedef struct {
579 u_int values[8];
580 int nvalues;
581 } INT_ARY_T;
582
583 typedef struct {
584 char strs[8][32];
585 int nstrs;
586 } TXT_ARY_T;
587
588
589 static int
590 opendmarc_spf_ipv6_cidr_populate(TXT_ARY_T *lp, INT_ARY_T *ap)
591 {
592 int i, f;
593 int dots;
594
595 /*
596 * Populate the base, expected variations are:
597 * ::ipv4
598 * :FFFF:ipv4
599 * :hex::hex: ...
600 */
601
602 /* Clear to zero in case we got an auto array */
603 for (i = 0; i < 8; ++i)
604 ap->values[i] = 0;
605
606 f = 0; /* index into the output array of values. */
607 for (i = 0; i < lp->nstrs; ++i)
608 {
609 int value;
610 int value2;
611 char *cp = NULL;
612
613 dots = 0;
614 if (i == 0)
615 {
616 char *dp;
617
618 /*
619 * The rightmost address might be IPv4
620 */
621 for (dp = lp->strs[0]; *dp != '\0'; ++dp)
622 if (*dp == '.')
623 ++dots;
624 }
625
626 if (i >= 0 || dots == 0)
627 {
628 /*
629 * No dots or not the rightmost value, then
630 * a hexedecimal value.
631 */
632 if (lp->strs[i] != NULL)
633 {
634 ap->values[f] = strtoul(lp->strs[i], NULL, 16);
635 f = f + 1;
636 }
637 continue;
638 }
639
640 /*
641 * From here down deals with the special case of
642 * an ipv4 address at the righthand side.
643 */
644 if (dots > 3)
645 {
646 return errno = EINVAL;
647 }
648 if (dots)
649 {
650 cp = strrchr(lp->strs[0], '.');
651 value2 = strtoul(cp+1, NULL, 10);
652
653 for (cp = cp-1; cp > lp->strs[0]; --cp)
654 if (*cp == '.')
655 break;
656 if (*cp == '.')
657 value = strtoul(cp+1, NULL, 10);
658 else
659 value = strtoul(cp, NULL, 10);
660 value <<= 8;
661 value &= 0xFFFF;
662 value += value2;
663 ap->values[0] = value;
664 ap->values[1] = 0;
665 }
666 if (dots > 1)
667 {
668 for (cp = cp-1; cp > lp->strs[0]; --cp)
669 if (*cp == '.')
670 break;
671 if (*cp == '.')
672 value = strtoul(cp+1, NULL, 10);
673 else
674 value = strtoul(cp+1, NULL, 10);
675 ap->values[1] = value;
676 }
677 if (dots > 2)
678 {
679 cp = lp->strs[0];
680 value = strtoul(cp, NULL, 10);
681 value <<= 8;
682 ap->values[1] += value;
683 }
684 f += 2;
685 continue;
686 }
687 ap->nvalues = f;
688 return 0;
689 }
690
691 static int
692 opendmarc_spf_ipv6_explode(char *str, TXT_ARY_T *ap)
693 {
694 char *cp, *ep;
695 int i;
696 int ncolons;
697 char copy[128];
698
699 if (str == NULL || ap == NULL)
700 return errno = EINVAL;
701
702 (void) memset(ap, '\0', sizeof(TXT_ARY_T));
703 (void) memset(copy, '\0', sizeof copy);
704 (void) strlcpy(copy, str, sizeof copy);
705
706 ncolons = 0;
707 for (cp = copy; *cp != '\0'; ++cp)
708 if (*cp == ':')
709 ++ncolons;
710 ncolons = 7 - ncolons;
711
712 cp = copy;
713 for (i = 7; i >= 0; i--)
714 {
715 ep = strchr(cp, ':');
716 if (ep != NULL)
717 *ep = '\0';
718 if (strlen(cp) == 0)
719 {
720 (void) strlcpy((char *)ap->strs[i], "0", sizeof ap->strs[i]);
721 }
722 else
723 {
724 (void) strlcpy((char *)ap->strs[i], cp, sizeof ap->strs[i]);
725 }
726 if (ep && *(ep + 1) == ':' && ncolons > 0)
727 {
728 for (i--; i >= 0 && ncolons != 0; --ncolons, --i)
729 {
730 (void) strlcpy((char *)ap->strs[i], "0", sizeof ap->strs[i]);
731 }
732 i+= 1;
733 }
734 cp = ep+1;
735 }
736 ap->nstrs = 8 - i;
737 return 0;
738 }
739
740 int
741 opendmarc_spf_ipv6_cidr_check(char *ipv6_str, char *cidr_string)
742 {
743 int cidr_bits;
744 TXT_ARY_T ipv6_ary;
745 TXT_ARY_T cidr_ary;
746 INT_ARY_T base_iary;
747 INT_ARY_T low_iary;
748 INT_ARY_T hi_iary;
749 INT_ARY_T ip_iary;
750 char * cp;
751 int ret;
752 int i;
753 int taghi, taglo;
754 char cidr_str[256];
755
756 if (ipv6_str == NULL || cidr_string == NULL)
757 {
758 return FALSE;
759 }
760
761 if (strchr(ipv6_str, ':') == NULL)
762 return FALSE;
763 if (strchr(cidr_string, ':') == NULL)
764 return FALSE;
765
766 (void) strlcpy(cidr_str, cidr_string, sizeof cidr_str);
767
768 cp = strchr(cidr_str, '/');
769 if (cp == NULL)
770 {
771 cidr_bits = 0;
772 }
773 else
774 {
775 cidr_bits = strtoul(cp+1, NULL, 10);
776 *cp = '\0';
777 cp = strchr(cidr_str, ':');
778 if (cp == NULL)
779 cidr_bits = 32 - cidr_bits;
780 else
781 cidr_bits = 128 - cidr_bits;
782 }
783
784 ret = opendmarc_spf_ipv6_explode(ipv6_str, &ipv6_ary);
785 if (ret != 0)
786 {
787 return FALSE;
788 }
789
790 ret = opendmarc_spf_ipv6_explode(cidr_str, &cidr_ary);
791 if (ret != 0)
792 {
793 return FALSE;
794 }
795
796 ret = opendmarc_spf_ipv6_cidr_populate(&cidr_ary, &base_iary);
797 if (ret != 0)
798 {
799 return FALSE;
800 }
801 ret = opendmarc_spf_ipv6_cidr_populate(&ipv6_ary, &ip_iary);
802 if (ret != 0)
803 {
804 return FALSE;
805 }
806
807 if (cidr_bits == 0)
808 {
809 /*
810 * Requre an exact match.
811 */
812 for (i = 0; i < base_iary.nvalues; i++)
813 {
814 if (base_iary.values[i] != ip_iary.values[i])
815 {
816 return FALSE;
817 }
818 }
819 return TRUE;
820 }
821
822 (void) memcpy(&low_iary, &base_iary, sizeof(INT_ARY_T));
823 (void) memcpy(&hi_iary, &base_iary, sizeof(INT_ARY_T));
824
825 for (i = 0; i < 8; i++)
826 {
827 int twobyte_mask, tmp_mask;
828
829 if (cidr_bits >= 16)
830 {
831 low_iary.values[i] = 0;
832 hi_iary.values[i] = 0xFFFF;
833 cidr_bits = cidr_bits - 16;
834 continue;
835 }
836 twobyte_mask = cidr_bits % 16;
837 tmp_mask = (0xFFFF << twobyte_mask);
838 low_iary.values[i] = low_iary.values[i] & tmp_mask;
839
840 tmp_mask = ((~tmp_mask) & 0xFFFF);
841 hi_iary.values[i] = hi_iary.values[i] | tmp_mask;
842 if (cidr_bits < 16)
843 break;
844 cidr_bits = cidr_bits - 16;
845 }
846
847 taghi = FALSE;
848 taglo = FALSE;
849
850 for (i = 7; i >= 0; --i)
851 {
852 if (ip_iary.values[i] == low_iary.values[i] && ip_iary.values[i] == hi_iary.values[i])
853 {
854 continue;
855 }
856 if (ip_iary.values[i] == hi_iary.values[i])
857 {
858 taghi = TRUE;
859 continue;
860 }
861 if (ip_iary.values[i] == low_iary.values[i])
862 {
863 taglo = TRUE;
864 continue;
865 }
866 if (taghi == TRUE)
867 {
868 if (ip_iary.values[i] > hi_iary.values[i])
869 {
870 return FALSE;
871 }
872 continue;
873 }
874 if (taglo == TRUE)
875 {
876 if (ip_iary.values[i] < low_iary.values[i])
877 {
878 return FALSE;
879 }
880 continue;
881 }
882 if (ip_iary.values[i] < low_iary.values[i] || ip_iary.values[i] > hi_iary.values[i])
883 {
884 return FALSE;
885 }
886 }
887 return TRUE;
888 }
889
890
891 /******************************************************************
892 ** SPF_STRIP_DOTS -- Remove trailing and leading dots from
893 ** a domain name.
894 ******************************************************************/
895 static char *
896 opendmarc_spf_strip_dots(char *str, char *dot, char *buf, size_t buflen)
897 {
898 char *cp;
899 char dupe[BUFSIZ];
900
901 if (buflen > BUFSIZ)
902 buflen = BUFSIZ;
903 if (str == NULL || buf == NULL || buflen == 0)
904 return NULL;
905 (void) memset(buf, '\0', buflen);
906 (void) memset(dupe, '\0', buflen);
907 (void) strlcpy(dupe, str, buflen);
908
909 for (cp = dupe + strlen(dupe) - 1; cp > dupe; --cp)
910 {
911 if (*cp == '.')
912 *cp = '\0';
913 else
914 break;
915 }
916 for (cp = dupe; *cp != '\0'; ++cp)
917 {
918 if (*cp != '.')
919 break;
920 }
921 (void) strlcpy(buf, cp, buflen);
922 return buf;
923 }
924
925
926
927 int
928 opendmarc_spf_subdomain(char *dom, char *sub)
929 {
930 char dcopy[MAXDNSHOSTNAME];
931 char scopy[MAXDNSHOSTNAME];
932 char scratch[MAXDNSHOSTNAME];
933 char *cp;
934 int dlen;
935 int slen;
936
937 if (dom == NULL || sub == NULL)
938 return FALSE;
939 (void) memset(dcopy, '\0', sizeof dcopy);
940 (void) memset(scopy, '\0', sizeof scopy);
941 (void) memset(scratch, '\0', sizeof scratch);
942
943 cp = opendmarc_spf_strip_dots(dom, ".", scratch, sizeof scratch);
944 if (cp == NULL)
945 return FALSE;
946 cp = opendmarc_spf_reverse(scratch, dcopy, sizeof dcopy);
947 if (cp == NULL)
948 return FALSE;
949
950 cp = opendmarc_spf_strip_dots(sub, ".", scratch, sizeof scratch);
951 if (cp == NULL)
952 return FALSE;
953 cp = opendmarc_spf_reverse(scratch, scopy, sizeof scopy);
954 if (cp == NULL)
955 return FALSE;
956
957 (void) strlcat(dcopy, ".", sizeof dcopy);
958 (void) strlcat(scopy, ".", sizeof scopy);
959
960 dlen = strlen(dcopy);
961 slen = strlen(scopy);
962
963 if (dlen == slen)
964 {
965 if (strcasecmp(dcopy, scopy) == 0)
966 return TRUE;
967 return FALSE;
968 }
969 if (strncasecmp(dcopy, scopy, dlen) == 0)
970 return TRUE;
971 return FALSE;
972 }
973 static int
974 opendmarc_spf_ptr_domain(SPF_CTX_T *spfctx, char *domain)
975 {
976 char ** dry = NULL;
977 int dry_len = 0;
978 char ** dpp;
979 char ** ary = NULL;
980 int ary_len = 0;
981 char ** app;
982 char ** nary = NULL;
983 int nary_len = 0;
984 char ** npp;
985 int good = FALSE;;
986
987 if (spfctx->validated_domain[0] != '\0')
988 return TRUE;
989 dry = opendmarc_spf_dns_lookup_ptr(spfctx->ip_address, dry, &dry_len);
990
991 /*
992 * There can be muiltple host names returned.
993 */
994 for (dpp = dry; dpp != NULL && *dpp != NULL; ++dpp)
995 {
996 ary = opendmarc_spf_dns_lookup_a(*dpp, ary, &ary_len);
997 if (ary == NULL)
998 continue;
999
1000 /*
1001 * Compare the addresses returned for that host name
1002 * to the specified IP address and if it compares
1003 * save the host name for later.
1004 */
1005 for (app = ary; app != NULL && *app != NULL; ++app)
1006 {
1007 if (strcasecmp(*app, spfctx->ip_address) == 0)
1008 {
1009 nary = opendmarc_util_pushnargv(*dpp, nary, &nary_len);
1010 break;
1011 }
1012 }
1013 if (nary == NULL)
1014 break;
1015 for (npp = nary; *npp != NULL; ++npp)
1016 {
1017 char *dp;
1018
1019 if (domain == NULL)
1020 dp = spfctx->mailfrom_domain;
1021 else
1022 dp = domain;
1023 if (opendmarc_spf_subdomain(dp, *dpp) == TRUE)
1024 {
1025 (void) strlcpy(spfctx->validated_domain, *dpp, sizeof spfctx->validated_domain);
1026 good = TRUE;
1027 break;
1028 }
1029 }
1030 nary = opendmarc_util_freenargv(nary, &nary_len);
1031 if (good == TRUE)
1032 break;
1033 }
1034 dry = opendmarc_util_freenargv(dry, &dry_len);
1035 return good;
1036 }
1037
1038 static char *
1039 opendmarc_spf_macro_expand(SPF_CTX_T *spfctx, char *str, char *buf, size_t buflen, int is_exp)
1040 {
1041 char *sp;
1042 char *xp;
1043 char *ep;
1044 char *bp;
1045 char scratch[MAXDNSHOSTNAME];
1046 time_t t;
1047 int num;
1048 int rev;
1049
1050 if (spfctx == NULL || str == NULL || buf == NULL || strlen(str) > buflen)
1051 {
1052 return NULL;
1053 }
1054 sp = str;
1055 ep = str + strlen(str);
1056 (void) memset(buf, '\0', buflen);
1057 bp = buf;
1058
1059 for (sp = str; sp < ep; )
1060 {
1061 if (*sp != '%')
1062 {
1063 *bp++ = *sp++;
1064 continue;
1065 }
1066 ++sp;
1067 switch ((int)*sp)
1068 {
1069 case '%':
1070 *bp++ = *sp++;
1071 continue;
1072 case '_':
1073 *bp++ = ' ';
1074 ++sp;
1075 continue;
1076 case '-':
1077 *bp++ = '%';
1078 *bp++ = '2';
1079 *bp++ = '0';
1080 ++sp;
1081 continue;
1082 case '{':
1083 break;
1084 default:
1085 return NULL;
1086 }
1087 ++sp;
1088 num = 0;
1089 rev = FALSE;
1090 xp = sp+1;
1091 if (*xp == 'r')
1092 {
1093 rev = TRUE;
1094 ++xp;
1095 }
1096 if (isdigit((int)*xp))
1097 {
1098 num = strtoul(xp, &xp, 10);
1099 }
1100 switch ((int)*sp)
1101 {
1102 char * cp;
1103
1104 case 's':
1105 if (rev == TRUE)
1106 (void) opendmarc_spf_reverse(spfctx->mailfrom_domain, scratch, MAXDNSHOSTNAME);
1107 else
1108 (void) strlcpy(scratch, spfctx->mailfrom_domain, MAXDNSHOSTNAME);
1109 if (num > 0 && num < MAXDNSHOSTNAME)
1110 scratch[num] = '\0';
1111 for (cp = scratch; *cp != '\0'; )
1112 *bp++ = *cp++;
1113 break;
1114 case 'l':
1115 (void) strlcpy(scratch, spfctx->mailfrom_addr, MAXDNSHOSTNAME);
1116 cp = strchr(scratch, '@');
1117 if (cp != NULL)
1118 *cp = '\0';
1119 if (num > 0 && num < MAXDNSHOSTNAME)
1120 scratch[num] = '\0';
1121 for (cp = scratch; *cp != '\0'; )
1122 *bp++ = *cp++;
1123 break;
1124 case 'o':
1125 (void) strlcpy(scratch, spfctx->mailfrom_addr, MAXDNSHOSTNAME);
1126 cp = strchr(scratch, '@');
1127 if (cp != NULL)
1128 ++cp;
1129 else
1130 cp = scratch;
1131 if (num > 0 && num < (MAXDNSHOSTNAME - (cp - scratch)))
1132 cp[num] = '\0';
1133 for (; *cp != '\0'; )
1134 *bp++ = *cp++;
1135 break;
1136 case 'd':
1137 if (rev == TRUE)
1138 (void) opendmarc_spf_reverse(spfctx->mailfrom_domain, scratch, MAXDNSHOSTNAME);
1139 else
1140 (void) strlcpy(scratch, spfctx->mailfrom_domain, MAXDNSHOSTNAME);
1141 if (num > 0 && num < MAXDNSHOSTNAME)
1142 scratch[num] = '\0';
1143 for (cp = scratch; *cp != '\0'; )
1144 *bp++ = *cp++;
1145 break;
1146 case 'i':
1147 if (rev == TRUE)
1148 (void) opendmarc_spf_reverse(spfctx->ip_address, scratch, MAXDNSHOSTNAME);
1149 else
1150 if (num > 0 && num < MAXDNSHOSTNAME)
1151 scratch[num] = '\0';
1152 for (cp = scratch; *cp != '\0'; )
1153 *bp++ = *cp++;
1154 break;
1155 case 'h':
1156 if (rev == TRUE)
1157 (void) opendmarc_spf_reverse(spfctx->helo_domain, scratch, MAXDNSHOSTNAME);
1158 else
1159 (void) strlcpy(scratch, spfctx->helo_domain, MAXDNSHOSTNAME);
1160 if (num > 0 && num < MAXDNSHOSTNAME)
1161 scratch[num] = '\0';
1162 for (cp = scratch; *cp != '\0'; )
1163 *bp++ = *cp++;
1164 break;
1165 case 'v':
1166 /* if ip is ipv6 use "ip6" instead */
1167 for (cp = "in-addr"; *cp != '\0'; )
1168 *bp++ = *cp++;
1169 break;
1170 case 'p':
1171 if (spfctx->validated_domain[0] == '\0')
1172 (void) opendmarc_spf_ptr_domain(spfctx, NULL);
1173 if (rev == TRUE)
1174 (void) opendmarc_spf_reverse(spfctx->validated_domain, scratch, MAXDNSHOSTNAME);
1175 else
1176 (void) strlcpy(scratch, spfctx->validated_domain, MAXDNSHOSTNAME);
1177 if (num > 0 && num < MAXDNSHOSTNAME)
1178 scratch[num] = '\0';
1179 for (cp = scratch; *cp != '\0'; )
1180 *bp++ = *cp++;
1181 break;
1182 case 'c':
1183 if (is_exp == FALSE)
1184 return NULL;
1185 if (rev == TRUE)
1186 (void) opendmarc_spf_reverse(spfctx->ip_address, scratch, MAXDNSHOSTNAME);
1187 else
1188 (void) strlcpy(scratch, spfctx->ip_address, MAXDNSHOSTNAME);
1189 if (num > 0 && num < MAXDNSHOSTNAME)
1190 scratch[num] = '\0';
1191 for (cp = scratch; *cp != '\0'; )
1192 *bp++ = *cp++;
1193 break;
1194 case 'r':
1195 /* do rev and num apply to this one? */
1196 if (is_exp == FALSE)
1197 return NULL;
1198 if (gethostname(scratch, sizeof scratch) == 0)
1199 {
1200 for (cp = scratch; *cp != '\0'; )
1201 *bp++ = *cp++;
1202 }
1203 break;
1204 case 't':
1205 /* do rev and num apply to this one? */
1206 if (is_exp == FALSE)
1207 return NULL;
1208 t = time(NULL);
1209 (void) opendmarc_util_ultoa(t, scratch, sizeof scratch);
1210 for (cp = scratch; *cp != '\0'; )
1211 *bp++ = *cp++;
1212 break;
1213 }
1214 if (*xp != '}')
1215 return NULL;
1216 sp = xp+1;
1217 continue;
1218 }
1219 *bp++ = '\0';
1220 return buf;
1221 }
1222
1223
1224 /***************************************************************
1225 ** libspf_parse -- parse the record
1226 **
1227 ** Arguments:
1228 ** ctx -- SPF_CTX_T
1229 ** xbuf -- buffer into which errors are written.
1230 ** xbuf_len -- size of buffer
1231 **
1232 ** Returns:
1233 ** spfctx->status
1234 **
1235 ** Side Effects:
1236 ** Makes a connections to the local name server and blocks
1237 ** on each waiting for a reply.
1238 **
1239 ***************************************************************/
1240 #define MAX_SPF_STACK_DEPTH (10)
1241 #define MAX_SPF_DNS_LOOKUPS (10)
1242 typedef struct {
1243 char domain[MAXDNSHOSTNAME];
1244 char spf[SPF_MAX_SPF_RECORD_LEN];
1245 char *sp;
1246 char *ep;
1247 char *esp;
1248 } SPF_STACK_T;
1249
1250 #define SPF_SP (stack[s].sp)
1251 #define SPF_EP (stack[s].ep)
1252 #define SPF_ESP (stack[s].esp)
1253 #define PUSHLINE i = spfctx->nlines; if (i < MAX_SPF_STACK_DEPTH) { spfctx->lines[i] = strdup(xbuf); spfctx->nlines = ++i; }
1254 int
1255 opendmarc_spf_parse(SPF_CTX_T *spfctx, int dns_count, char *xbuf, size_t xbuf_len)
1256 {
1257 char ipnum[64];
1258 char *vp = NULL;
1259 int i;
1260 size_t len;
1261 int prefix;
1262 u_long ip = 0;
1263 int split = 0;
1264 #define SPLIT_COLON (1)
1265 #define SPLIT_EQUAL (2)
1266 #define SPLIT_SLASH (3)
1267 SPF_STACK_T stack[MAX_SPF_STACK_DEPTH];
1268 int s = 0;
1269 int up = FALSE;
1270 int ret;
1271
1272 spfctx->in_token = SPF_IN_TOKEN_NONE;
1273 if (spfctx == NULL)
1274 {
1275 (void) strlcat(xbuf, "Oddly the context was NULL: FAILED", xbuf_len);
1276 PUSHLINE
1277 return spfctx->status = SPF_RETURN_INTERNAL;
1278 }
1279 if (spfctx->mailfrom_domain[0] == '\0')
1280 {
1281 if (spfctx->helo_domain[0] == '\0')
1282 {
1283 (void) strlcat(xbuf, "Spf present but oddly no domain specified: FAILED", xbuf_len);
1284 PUSHLINE
1285 return spfctx->status = SPF_RETURN_INTERNAL;
1286 }
1287 (void) strlcpy(spfctx->mailfrom_domain, spfctx->helo_domain, sizeof spfctx->mailfrom_domain);
1288 }
1289 if (spfctx->spf_record[0] == '\0')
1290 {
1291 (void) strlcat(xbuf, "Spf TXT record existed, but was empty: FAILED", xbuf_len);
1292 PUSHLINE
1293 return spfctx->status = SPF_RETURN_INTERNAL;
1294 }
1295 if (spfctx->ip_address[0] == '\0')
1296 {
1297 (void) strlcat(xbuf, "Spf present but no IP address to check: FAILED", xbuf_len);
1298 PUSHLINE
1299 return spfctx->status = SPF_RETURN_INTERNAL;
1300 }
1301 len = strlen(spfctx->spf_record);
1302 if (len >= SPF_MAX_SPF_RECORD_LEN -1)
1303 {
1304 (void) strlcat(xbuf, "Spf TXT record existed, but was absurdly large: FAILED", xbuf_len);
1305 PUSHLINE
1306 return spfctx->status = SPF_RETURN_RECORD_TOOLONG;
1307 }
1308
1309 (void) memset(stack[s].domain, '\0', MAXDNSHOSTNAME);
1310 (void) strlcpy(stack[s].domain, spfctx->mailfrom_domain, MAXDNSHOSTNAME);
1311
1312 (void) memset(ipnum, '\0', sizeof ipnum);
1313 (void) strlcpy(ipnum, spfctx->ip_address, sizeof ipnum);
1314 ip = inet_addr(ipnum);
1315 ip = htonl(ip);
1316
1317 (void) strlcpy(stack[s].spf, spfctx->spf_record, SPF_MAX_SPF_RECORD_LEN);
1318 SPF_SP = stack[s].spf;
1319 SPF_EP = stack[s].spf + strlen(stack[s].spf);
1320 SPF_ESP = stack[s].spf - 1;
1321 up = TRUE;
1322
1323 while (s >= 0)
1324 {
1325 if (up == TRUE)
1326 {
1327 (void) memset(xbuf, '\0', xbuf_len);
1328 (void) strlcpy(xbuf, stack[s].domain, xbuf_len);
1329 (void) strlcat(xbuf, ": ", xbuf_len);
1330 (void) strlcat(xbuf, stack[s].spf, xbuf_len);
1331 PUSHLINE
1332 }
1333
1334 for (;;)
1335 {
1336 if (dns_count > MAX_SPF_DNS_LOOKUPS)
1337 {
1338 (void) strlcat(xbuf, " Too Many DNS queries (10 max): FAILED", xbuf_len);
1339 PUSHLINE
1340 return spfctx->status = SPF_RETURN_TOO_MANY_DNS_QUERIES;
1341 }
1342 if (SPF_ESP >= SPF_EP-1)
1343 {
1344 --s;
1345 up = FALSE;
1346 break;
1347 }
1348 SPF_SP = SPF_ESP + 1;
1349
1350 while (isspace((int)*SPF_SP) && *SPF_SP != '\0' && SPF_SP < SPF_EP)
1351 ++SPF_SP;
1352 if (*SPF_SP == '\0' || SPF_SP >= SPF_EP)
1353 {
1354 --s;
1355 up = FALSE;
1356 break;
1357 }
1358
1359 /* find the next space delimit point */
1360 SPF_ESP = SPF_SP;
1361 while(! isspace((int)*SPF_ESP) && *SPF_ESP != '\0' && SPF_ESP < SPF_EP)
1362 ++SPF_ESP;
1363 if (SPF_ESP > SPF_EP)
1364 {
1365 --s;
1366 up = FALSE;
1367 break;
1368 }
1369 *SPF_ESP = '\0';
1370
1371 /* show each step */
1372 (void) memset(xbuf, '\0', xbuf_len);
1373 (void) strlcpy(xbuf, stack[s].domain, xbuf_len);
1374 (void) strlcat(xbuf, ": ", xbuf_len);
1375
1376 /* ignore the qualifiers for now */
1377 prefix = '\0';
1378 if (*SPF_SP == '+' || *SPF_SP == '?' || *SPF_SP == '~' || *SPF_SP == '-')
1379 {
1380 prefix = *SPF_SP;
1381 ++SPF_SP;
1382 }
1383
1384 /* split at any =, /, or : into name=sp, value=vp */
1385 vp = strchr(SPF_SP, '=');
1386 if (vp != NULL)
1387 {
1388 split = SPLIT_EQUAL;
1389 *vp++ = '\0';
1390 }
1391 else
1392 {
1393 vp = strchr(SPF_SP, ':');
1394 if (vp != NULL)
1395 {
1396 split = SPLIT_COLON;
1397 *vp++ = '\0';
1398 }
1399 else
1400 {
1401 vp = strchr(SPF_SP, '/');
1402 if (vp != NULL)
1403 {
1404 split = SPLIT_SLASH;
1405 *vp++ = '\0';
1406 }
1407 else
1408 {
1409 vp = NULL;
1410 }
1411 }
1412 }
1413
1414 if (strcasecmp(SPF_SP, "v") == 0)
1415 {
1416 spfctx->in_token = SPF_IN_TOKEN_VERSION;
1417 if (vp == NULL || strcasecmp(vp, "spf1") != 0)
1418 {
1419 (void) strlcat(xbuf, " Expected \"v=spf1\": FAILED", xbuf_len);
1420 PUSHLINE
1421 return spfctx->status = SPF_RETURN_BAD_SYNTAX_VERSION;
1422 }
1423 /* version was okay */
1424 continue;
1425 }
1426 if (strncasecmp(SPF_SP, "spf2.0", 6) == 0)
1427 continue;
1428
1429 if (strcasecmp("a", SPF_SP) == 0 || strcasecmp("ip4", SPF_SP) == 0)
1430 {
1431 char ** ary = NULL;
1432 int ary_len = 0;
1433 char ** app;
1434 char abuf[BUFSIZ];
1435
1436 if (vp == NULL || split == SPLIT_SLASH)
1437 {
1438
1439 /*
1440 * Don't know what to do with a/24.
1441 * look up the a, and do each address/24?
1442 */
1443 if (ary != NULL)
1444 ary = opendmarc_util_freenargv(ary, &ary_len);
1445 ++dns_count;
1446 ary = opendmarc_spf_dns_lookup_a(stack[s].domain, ary, &ary_len);
1447 if (ary != NULL)
1448 {
1449 for (app = ary; *app != NULL; ++app)
1450 {
1451 (void) memset(abuf, '\0', sizeof abuf);
1452 (void) strlcpy(abuf, *app, sizeof abuf);
1453 if (vp != NULL)
1454 {
1455 (void) strlcat(abuf, "/", sizeof abuf);
1456 (void) strlcat(abuf, vp, sizeof abuf);
1457 }
1458 spfctx->iplist = opendmarc_util_pushnargv(abuf, spfctx->iplist, &(spfctx->ipcount));
1459 if (opendmarc_spf_cidr_address(ip, abuf) == TRUE)
1460 {
1461 (void) strlcat(xbuf, " ", xbuf_len);
1462 (void) strlcat(xbuf, ipnum, xbuf_len);
1463 (void) strlcat(xbuf, " was found in ", xbuf_len);
1464 (void) strlcat(xbuf, abuf, xbuf_len);
1465 (void) strlcat(xbuf, ": PASSED", xbuf_len);
1466 PUSHLINE
1467 ary = opendmarc_util_freenargv(ary, &ary_len);
1468 return spfctx->status = SPF_RETURN_OK_PASSED;
1469 }
1470 }
1471 ary = opendmarc_util_freenargv(ary, &ary_len);
1472 continue;
1473 }
1474 (void) strlcat(xbuf, " ", xbuf_len);
1475 (void) strlcat(xbuf, stack[s].domain, xbuf_len);
1476 (void) strlcat(xbuf, " had no A records: FAILED", xbuf_len);
1477 if (s == 0 && prefix == '-')
1478 {
1479 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1480 }
1481 PUSHLINE
1482 return spfctx->status = SPF_RETURN_A_BUT_NO_A_RECORD;
1483 }
1484 if (strcasecmp("a", SPF_SP) == 0 && vp != NULL)
1485 {
1486 char * slashp = NULL;
1487 char ** a_ary = NULL;
1488 int a_ary_len = 0;
1489 char ** a_app = NULL;
1490 char a_abuf[BUFSIZ];
1491 (void) opendmarc_spf_macro_expand(spfctx, vp, a_abuf, sizeof a_abuf, FALSE);
1492 ++dns_count;
1493 a_ary = (char **)opendmarc_spf_dns_lookup_a(a_abuf, a_ary, &a_ary_len);
1494 if (a_ary == NULL)
1495 {
1496 (void) strlcat(xbuf, " ", xbuf_len);
1497 (void) strlcat(xbuf, vp, xbuf_len);
1498 (void) strlcat(xbuf, " had no A records: FAILED", xbuf_len);
1499 if (s == 0 && prefix == '-')
1500 {
1501 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1502 }
1503 PUSHLINE
1504 return spfctx->status = SPF_RETURN_A_BUT_NO_A_RECORD;
1505 }
1506
1507 for (a_app = a_ary; *a_app != NULL; ++a_app)
1508 {
1509 (void) memset(a_abuf, '\0', sizeof a_abuf);
1510 (void) strlcpy(a_abuf, *a_app, sizeof a_abuf);
1511 if (slashp != NULL)
1512 {
1513 (void) strlcat(a_abuf, "/", sizeof a_abuf);
1514 (void) strlcat(a_abuf, slashp+1, sizeof a_abuf);
1515 }
1516 spfctx->iplist = opendmarc_util_pushnargv(a_abuf, spfctx->iplist, &(spfctx->ipcount));
1517 if (opendmarc_spf_cidr_address(ip, a_abuf) == TRUE)
1518 {
1519 (void) strlcat(xbuf, " ", xbuf_len);
1520 (void) strlcat(xbuf, ipnum, xbuf_len);
1521 (void) strlcat(xbuf, " was found: PASSED", xbuf_len);
1522 PUSHLINE
1523 a_ary = opendmarc_util_freenargv(a_ary, &ary_len);
1524 return spfctx->status = SPF_RETURN_OK_PASSED;
1525 }
1526 if (s == 0 && prefix == '-')
1527 {
1528 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1529 }
1530 }
1531 a_ary = opendmarc_util_freenargv(a_ary, &ary_len);
1532 continue;
1533 }
1534 if (strcasecmp("ip4", SPF_SP) == 0 && vp != NULL)
1535 {
1536 spfctx->iplist = opendmarc_util_pushnargv(vp, spfctx->iplist, &(spfctx->ipcount));
1537 ret = opendmarc_spf_cidr_address(ip, vp);
1538 if (ret == TRUE)
1539 {
1540 (void) strlcat(xbuf, " ", xbuf_len);
1541 (void) strlcat(xbuf, ipnum, xbuf_len);
1542 (void) strlcat(xbuf, " was found: PASSED", xbuf_len);
1543 PUSHLINE
1544 return spfctx->status = SPF_RETURN_OK_PASSED;
1545 }
1546 if (s == 0 && prefix == '-')
1547 {
1548 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1549 }
1550 continue;
1551 }
1552 if (vp == NULL)
1553 vp = "<nil>";
1554 (void) strlcat(xbuf, " ", xbuf_len);
1555 (void) strlcat(xbuf, vp, xbuf_len);
1556 (void) strlcat(xbuf, " Badly formed: FAILED", xbuf_len);
1557 PUSHLINE
1558 return spfctx->status = SPF_RETURN_A_BUT_BAD_SYNTAX;
1559 }
1560 if (strcasecmp("mx", SPF_SP) == 0)
1561 {
1562 char ** ary = NULL;
1563 int ary_len = 0;
1564 char ** app = NULL;
1565 char mxbuf[BUFSIZ];
1566
1567 if (vp != NULL && split != SPLIT_SLASH)
1568 (void) opendmarc_spf_macro_expand(spfctx, vp, mxbuf, sizeof mxbuf, FALSE);
1569 else
1570 (void) opendmarc_spf_macro_expand(spfctx, stack[s].domain, mxbuf, sizeof mxbuf, FALSE);
1571 ++dns_count;
1572 ary = opendmarc_spf_dns_lookup_mx(mxbuf, ary, &ary_len);
1573 if (ary == NULL)
1574 {
1575 (void) strlcat(xbuf, mxbuf, xbuf_len);
1576 (void) strlcat(xbuf, ": MX listed but no MX records", xbuf_len);
1577 if (s == 0 && prefix == '-')
1578 {
1579 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1580 }
1581 PUSHLINE
1582 continue;
1583 }
1584 for (app = ary; *app != NULL; ++app)
1585 {
1586 spfctx->iplist = opendmarc_util_pushnargv(*app, spfctx->iplist, &(spfctx->ipcount));
1587 if (opendmarc_spf_cidr_address(ip, *app) == TRUE)
1588 {
1589 (void) strlcat(xbuf, " ", xbuf_len);
1590 (void) strlcat(xbuf, ipnum, xbuf_len);
1591 (void) strlcat(xbuf, " was found: PASSED", xbuf_len);
1592 PUSHLINE
1593 ary = opendmarc_util_freenargv(ary, &ary_len);
1594 return spfctx->status = SPF_RETURN_OK_PASSED;
1595 }
1596 }
1597 ary = opendmarc_util_freenargv(ary, &ary_len);
1598 if (s == 0 && prefix == '-')
1599 {
1600 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1601 }
1602 continue;
1603 }
1604 if (strcasecmp("include", SPF_SP) == 0)
1605 {
1606 char *spf_ret;
1607 char spfbuf[SPF_MAX_SPF_RECORD_LEN];
1608 char cname[MAXDNSHOSTNAME];
1609 char query[MAXDNSHOSTNAME];
1610 int reply;
1611
1612 if (vp == NULL || strlen(vp) == 0)
1613 {
1614 (void) strlcat(xbuf, "\"include:\" Lacked a domain specification.", xbuf_len);
1615 if (s == 0 && prefix == '-')
1616 {
1617 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1618 }
1619 PUSHLINE
1620 return spfctx->status = SPF_RETURN_BAD_SYNTAX_INCLUDE;
1621 }
1622 (void) memset(query, '\0', sizeof query);
1623 (void) strlcpy(query, vp, sizeof query);
1624 (void) memset(cname, '\0', sizeof cname);
1625 (void) memset(spfbuf, '\0', sizeof spfbuf);
1626 ++dns_count;
1627 spf_ret = opendmarc_spf_dns_get_record(query, &reply, spfbuf, sizeof spfbuf, cname, sizeof cname, TRUE);
1628 if (spf_ret == NULL)
1629 {
1630 (void) strlcat(xbuf, vp, xbuf_len);
1631 (void) strlcat(xbuf, " Lacked lacked an SPF record: FAILED", xbuf_len);
1632 if (s == 0 && prefix == '-')
1633 {
1634 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1635 }
1636 PUSHLINE
1637 return spfctx->status = SPF_RETURN_INCLUDE_NO_DOMAIN;
1638 }
1639 if (s+1 >= MAX_SPF_STACK_DEPTH)
1640 {
1641 char nbuf[16];
1642
1643 (void) strlcat(xbuf, stack[s].domain, xbuf_len);
1644 (void) strlcat(xbuf, " Too many levels of includes, ", xbuf_len);
1645 (void) opendmarc_util_ultoa(MAX_SPF_STACK_DEPTH, nbuf, sizeof nbuf);
1646 (void) strlcat(xbuf, nbuf, xbuf_len);
1647 (void) strlcat(xbuf, " Max", xbuf_len);
1648 if (s == 0 && prefix == '-')
1649 {
1650 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1651 }
1652 PUSHLINE
1653 continue;
1654 }
1655 if (s > 0)
1656 {
1657 for (i = 0; i < s; i++)
1658 {
1659 if (strcasecmp(vp, stack[i].domain) == 0)
1660 break;
1661 }
1662 if (i < s)
1663 {
1664 (void) strlcat(xbuf, query, xbuf_len);
1665 (void) strlcat(xbuf, " Include LOOP detected and supressed", xbuf_len);
1666 PUSHLINE
1667 continue;
1668 }
1669 }
1670 s += 1;
1671 up = TRUE;
1672 (void) memset(stack[s].domain, '\0', MAXDNSHOSTNAME);
1673 (void) strlcpy(stack[s].domain, vp, MAXDNSHOSTNAME);
1674 (void) memset(stack[s].spf, '\0', SPF_MAX_SPF_RECORD_LEN);
1675 (void) strlcpy(stack[s].spf, spfbuf, SPF_MAX_SPF_RECORD_LEN);
1676 SPF_SP = stack[s].spf;
1677 SPF_EP = stack[s].spf + strlen(stack[s].spf);
1678 SPF_ESP = stack[s].spf - 1;
1679 if (s == 0 && prefix == '-')
1680 {
1681 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1682 }
1683 break;
1684 }
1685 if (strcasecmp("all", SPF_SP) == 0)
1686 {
1687 char p[2];
1688
1689 p[0] = prefix;
1690 p[1] = '\0';
1691 (void) memset(xbuf, '\0', xbuf_len);
1692 (void) strlcpy(xbuf, stack[s].domain, xbuf_len);
1693 (void) strlcat(xbuf, ": ", xbuf_len);
1694 (void) strlcat(xbuf, p, xbuf_len);
1695 (void) strlcat(xbuf, "all, status=", xbuf_len);
1696
1697 if (s == 0)
1698 {
1699 if (prefix == '-')
1700 {
1701 (void) strlcat(xbuf, " ", xbuf_len);
1702 (void) strlcat(xbuf, ipnum, xbuf_len);
1703 (void) strlcat(xbuf, " Not found, so: FAILED", xbuf_len);
1704 PUSHLINE
1705 return spfctx->status = SPF_RETURN_DASH_ALL_HARD_FAIL;
1706 }
1707 if (prefix == '~')
1708 {
1709 (void) strlcat(xbuf, " ", xbuf_len);
1710 (void) strlcat(xbuf, ipnum, xbuf_len);
1711 (void) strlcat(xbuf, " Not found, so: SOFT-FAILED", xbuf_len);
1712 PUSHLINE
1713 return spfctx->status = SPF_RETURN_TILDE_ALL_SOFT_FAIL;
1714 }
1715 if (prefix == '?')
1716 {
1717 (void) strlcat(xbuf, " ", xbuf_len);
1718 (void) strlcat(xbuf, ipnum, xbuf_len);
1719 (void) strlcat(xbuf, " Not found, but: NEUTRAL", xbuf_len);
1720 PUSHLINE
1721 return spfctx->status = SPF_RETURN_QMARK_ALL_NEUTRAL;
1722 }
1723 else
1724 {
1725 (void) strlcat(xbuf, " ", xbuf_len);
1726 (void) strlcat(xbuf, ipnum, xbuf_len);
1727 (void) strlcat(xbuf, " Not found, but: PASS", xbuf_len);
1728 PUSHLINE
1729 return spfctx->status = SPF_RETURN_OK_PASSED;
1730 }
1731 }
1732 continue;
1733 }
1734 if (strcasecmp("ip6", SPF_SP) == 0)
1735 {
1736 int ret;
1737 /*
1738 * Open issue: Should we convert an ipv4 address in spfctx->ip_address
1739 * into ipv6 for this check? e.g. 1.2.3.4 -> :FFFF:1.2.3.4
1740 */
1741 spfctx->iplist = opendmarc_util_pushnargv(vp, spfctx->iplist, &(spfctx->ipcount));
1742 ret = opendmarc_spf_ipv6_cidr_check(spfctx->ip_address, vp);
1743 if (ret == TRUE)
1744 {
1745 return spfctx->status = SPF_RETURN_OK_PASSED;
1746 }
1747 if (s == 0 && prefix == '-')
1748 {
1749 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1750 }
1751 continue;
1752 }
1753 if (strcasecmp("ptr", SPF_SP) == 0)
1754 {
1755 int good;
1756
1757 good = opendmarc_spf_ptr_domain(spfctx, vp);
1758 if (good == TRUE)
1759 {
1760 return spfctx->status = SPF_RETURN_OK_PASSED;
1761 }
1762 if (s == 0 && prefix == '-')
1763 {
1764 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1765 }
1766 continue;
1767 }
1768 if (strcasecmp("exists", SPF_SP) == 0)
1769 {
1770 char * xp;
1771 char ** ary = NULL;
1772 int ary_len = 0;
1773 char ** app;
1774
1775 if (vp == NULL || strlen(vp) == 0)
1776 {
1777 (void) strlcpy(xbuf, "\"exists:\" Lacked a domain specification.", xbuf_len);
1778 PUSHLINE
1779 return spfctx->status = SPF_RETURN_BAD_SYNTAX_EXISTS;
1780 }
1781 /* see http://old.openspf.org/macros.html for macros */
1782 /* altavista.net uses +exists:CL.%{i}.FR.%{s}.HE.%{h}.null.spf.altavista.com */
1783 xp = opendmarc_spf_macro_expand(spfctx, vp, xbuf, xbuf_len, TRUE);
1784 if (xp == NULL)
1785 {
1786 (void) strlcpy(xbuf, "\"exists:\" record had syntactially bad macros:" , xbuf_len);
1787 (void) strlcat(xbuf, vp, xbuf_len);
1788 (void) strlcat(xbuf, ": FAILED", xbuf_len);
1789 PUSHLINE
1790 return spfctx->status = SPF_RETURN_BAD_MACRO_SYNTAX;
1791 }
1792 ++dns_count;
1793 if (ary != NULL)
1794 ary = opendmarc_util_freenargv(ary, &ary_len);
1795 ary = opendmarc_spf_dns_lookup_a(xbuf, ary, &ary_len);
1796 if (ary == NULL)
1797 {
1798 /* lookup failed */
1799 if (prefix != '-')
1800 continue;
1801 (void) strlcpy(xbuf, "\"exists:\" record lookup: ", xbuf_len);
1802 (void) strlcat(xbuf, vp, xbuf_len);
1803 (void) strlcat(xbuf, ": FAILED", xbuf_len);
1804 PUSHLINE
1805 return spfctx->status = SPF_RETURN_NOT_EXISTS_HARDFAIL;
1806 }
1807 for (app = ary; *app != NULL; ++app)
1808 {
1809 if (strcmp(spfctx->ip_address, *app) == 0)
1810 return spfctx->status = SPF_RETURN_OK_PASSED;
1811 }
1812 ary = opendmarc_util_freenargv(ary, &ary_len);
1813 continue;
1814 }
1815 if (strcasecmp("exp", SPF_SP) == 0)
1816 {
1817 char * xp;
1818
1819 if (vp == NULL || strlen(vp) == 0)
1820 {
1821 (void) strlcpy(xbuf, "\"exp:\" Lacked a domain specification.", xbuf_len);
1822 PUSHLINE
1823 return spfctx->status = SPF_RETURN_BAD_SYNTAX_EXP;
1824 }
1825 xp = opendmarc_spf_macro_expand(spfctx, vp, xbuf, xbuf_len, FALSE);
1826 if (xp == NULL)
1827 {
1828 (void) strlcpy(xbuf, "\"exists:\" record had syntactially bad macros:" , xbuf_len);
1829 (void) strlcat(xbuf, vp, xbuf_len);
1830 (void) strlcat(xbuf, ": FAILED", xbuf_len);
1831 PUSHLINE
1832 return spfctx->status = SPF_RETURN_BAD_MACRO_SYNTAX;
1833 }
1834 (void) memset(spfctx->exp_buf, '\0', sizeof spfctx->exp_buf);
1835 (void) strlcpy(spfctx->exp_buf, xp, sizeof spfctx->exp_buf);
1836 spfctx->did_get_exp = TRUE;
1837 continue;
1838 }
1839 if (strcasecmp("redirect", SPF_SP) == 0)
1840 {
1841 /*
1842 * Some people think that redirect and include are the same.
1843 * Rather than fail due to that belief, there is really no harm
1844 * in treating them the same.
1845 */
1846 int reply;
1847 char * xp;
1848 char query[MAXDNSHOSTNAME];
1849 char * spf_ret;
1850 char cname[128];
1851 char spfbuf[BUFSIZ];
1852
1853 if (vp == NULL)
1854 {
1855 (void) strlcat(xbuf, " Lacked a domain specification: FAILED", xbuf_len);
1856 PUSHLINE
1857 return spfctx->status = SPF_RETURN_REDIRECT_NO_DOMAIN;
1858 }
1859 (void) memset(query, '\0', sizeof query);
1860 xp = opendmarc_spf_macro_expand(spfctx, vp, query, sizeof query, TRUE);
1861 if (xp == NULL)
1862 {
1863 (void) strlcpy(xbuf, "\"redirect:\" record had syntactially bad macros:" , xbuf_len);
1864 (void) strlcat(xbuf, vp, xbuf_len);
1865 (void) strlcat(xbuf, ": FAILED", xbuf_len);
1866 PUSHLINE
1867 return spfctx->status = SPF_RETURN_BAD_MACRO_SYNTAX;
1868 }
1869 ++dns_count;
1870 spf_ret = opendmarc_spf_dns_get_record(query, &reply, spfbuf, sizeof spfbuf, cname, sizeof cname, TRUE);
1871 if (spf_ret == NULL)
1872 {
1873 (void) strlcat(xbuf, vp, xbuf_len);
1874 (void) strlcat(xbuf, " Lacked lacked an SPF record: FAILED", xbuf_len);
1875 if (s == 0 && prefix == '-')
1876 {
1877 return spfctx->status = SPF_RETURN_DASH_FORCED_HARD_FAIL;
1878 }
1879 PUSHLINE
1880 return spfctx->status = SPF_RETURN_BAD_SYNTAX_REDIRECT;
1881 }
1882 (void) memset(stack[s].domain, '\0', MAXDNSHOSTNAME);
1883 (void) strlcpy(stack[s].domain, vp, MAXDNSHOSTNAME);
1884 (void) memset(stack[s].spf, '\0', SPF_MAX_SPF_RECORD_LEN);
1885 (void) strlcpy(stack[s].spf, spfbuf, SPF_MAX_SPF_RECORD_LEN);
1886 SPF_SP = stack[s].spf;
1887 SPF_EP = stack[s].spf + strlen(stack[s].spf);
1888 SPF_ESP = stack[s].spf - 1;
1889 up = TRUE;
1890 break;
1891 }
1892 if (strlen(SPF_SP) > 0)
1893 {
1894 (void) strlcat(xbuf, "\"", xbuf_len);
1895 (void) strlcat(xbuf, SPF_SP, xbuf_len);
1896 (void) strlcat(xbuf, "\": Unrecognized SPF keyword, WARNING", xbuf_len);
1897 PUSHLINE
1898 /* return spfctx->status = SPF_RETURN_UNKNOWN_KEYWORD; */
1899 continue;
1900 }
1901 }
1902 }
1903 return spfctx->status;
1904 }
1905
1906 SPF_CTX_T *
1907 opendmarc_spf_alloc_ctx()
1908 {
1909 SPF_CTX_T *spfctx = NULL;
1910
1911 spfctx = malloc(sizeof(SPF_CTX_T));
1912 if (spfctx == NULL)
1913 return NULL;
1914
1915 (void) memset(spfctx, '\0', sizeof(SPF_CTX_T));
1916 spfctx->status = SPF_RETURN_UNDECIDED;
1917 return spfctx;
1918 }
1919
1920 SPF_CTX_T *
1921 opendmarc_spf_free_ctx(SPF_CTX_T *spfctx)
1922 {
1923 int i;
1924
1925 if (spfctx == NULL)
1926 return spfctx;
1927
1928 for (i = 0; i < spfctx->nlines; i++)
1929 {
1930 if (spfctx->lines[i] != NULL)
1931 (void) free(spfctx->lines[i]);
1932 }
1933 spfctx->iplist = opendmarc_util_freenargv(spfctx->iplist, &(spfctx->ipcount));
1934 (void) free(spfctx);
1935 spfctx = NULL;
1936 return spfctx;
1937 }
1938
1939 int
1940 opendmarc_spf_specify_ip_address(SPF_CTX_T *spfctx, char *ip_address, size_t ip_address_len)
1941 {
1942 if (spfctx == NULL)
1943 return EINVAL;
1944
1945 if (ip_address == NULL)
1946 return EINVAL;
1947
1948 /*
1949 * we don't care at this point if it is ipv6 or ipv4
1950 */
1951 (void) memset(spfctx->ip_address, '\0', sizeof spfctx->ip_address);
1952 (void) strlcpy(spfctx->ip_address, ip_address, sizeof spfctx->ip_address);
1953 return 0;
1954 }
1955
1956 int
1957 opendmarc_spf_specify_helo_domain(SPF_CTX_T *spfctx, char *helo_domain, size_t helo_domain_len)
1958 {
1959 char copy[sizeof spfctx->mailfrom_addr];
1960 char *cp;
1961 char *ep;
1962
1963 if (spfctx == NULL)
1964 return EINVAL;
1965
1966 if (helo_domain == NULL)
1967 return 0;
1968
1969 (void) memset(copy, '\0', sizeof copy);
1970 (void) strlcpy(copy, helo_domain, sizeof copy);
1971 cp = strrchr(copy, '<');
1972 if (cp == NULL)
1973 cp = copy;
1974 ep = strchr(cp, '>');
1975 if (ep != NULL)
1976 *ep = '\0';
1977 ep = strchr(cp, '@');
1978 if (ep != NULL)
1979 cp = ep+1;
1980
1981 (void) memset(spfctx->helo_domain, '\0', sizeof spfctx->helo_domain);
1982 (void) strlcpy(spfctx->helo_domain, cp, sizeof spfctx->helo_domain);
1983 return 0;
1984 }
1985
1986 int
1987 opendmarc_spf_specify_mailfrom(SPF_CTX_T *spfctx, char *mailfrom, size_t mailfrom_len, int *use_flag)
1988 {
1989 char copy[sizeof spfctx->mailfrom_addr];
1990 char *cp;
1991 char *ep;
1992
1993 if (use_flag != NULL)
1994 *use_flag = FALSE;
1995
1996 if (spfctx == NULL)
1997 return EINVAL;
1998
1999 if (mailfrom == NULL)
2000 return EINVAL;
2001
2002 (void) memset(copy, '\0', sizeof copy);
2003 (void) strlcpy(copy, mailfrom, sizeof copy);
2004
2005 cp = strrchr(copy, '<');
2006 if (cp == NULL)
2007 cp = copy;
2008 else
2009 ++cp;
2010 ep = strchr(cp, '>');
2011 if (ep != NULL)
2012 *ep = '\0';
2013
2014 (void) memset(spfctx->mailfrom_addr, '\0', sizeof spfctx->mailfrom_addr);
2015 (void) strlcpy(spfctx->mailfrom_addr, cp, sizeof spfctx->mailfrom_addr);
2016
2017 ep = strchr(cp, '@');
2018 if (ep != NULL)
2019 {
2020 cp = ep+1;
2021 if (use_flag != NULL)
2022 *use_flag = TRUE;
2023 }
2024
2025 if (strcasecmp(cp, "MAILER_DAEMON") == 0)
2026 cp = "";
2027
2028 (void) memset(spfctx->mailfrom_domain, '\0', sizeof spfctx->mailfrom_domain);
2029 (void) strlcpy(spfctx->mailfrom_domain, cp, sizeof spfctx->mailfrom_domain);
2030 return 0;
2031 }
2032
2033 int
2034 opendmarc_spf_specify_record(SPF_CTX_T *spfctx, char *spf_record, size_t spf_record_length)
2035 {
2036 if (spfctx == NULL)
2037 {
2038 return EINVAL;
2039 }
2040 (void) memset(spfctx->spf_record, '\0', sizeof spfctx->spf_record);
2041 if (spf_record == NULL)
2042 {
2043 char * spf_ret;
2044 int reply;
2045 char cname[256];
2046 char spfbuf[BUFSIZ];
2047
2048 /* look it up */
2049 spf_ret = opendmarc_spf_dns_get_record(spfctx->mailfrom_domain, &reply, spfbuf, sizeof spfbuf, cname, sizeof cname, TRUE);
2050 if (spf_ret == NULL)
2051 {
2052 switch(reply)
2053 {
2054 case HOST_NOT_FOUND:
2055 case NO_DATA:
2056 return DMARC_POLICY_SPF_OUTCOME_NONE;
2057 break;
2058 case NO_RECOVERY:
2059 case TRY_AGAIN:
2060 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
2061 break;
2062 }
2063 return DMARC_POLICY_SPF_OUTCOME_NONE;
2064 }
2065 (void) strlcpy(spfctx->spf_record, spfbuf, sizeof spfctx->spf_record);
2066 return 0;
2067 }
2068 (void) strlcpy(spfctx->spf_record, spf_record, sizeof spfctx->spf_record);
2069 return 0;
2070 }
2071
2072 int
2073 opendmarc_spf_test(char *ip_address, char *mail_from_domain, char *helo_domain, char *spf_record, int softfail_okay_flag, char *human_readable, size_t human_readable_len, int *used_mfrom)
2074 {
2075 SPF_CTX_T * ctx;
2076 int ret;
2077 int len;
2078 char xbuf[BUFSIZ];
2079
2080 if (used_mfrom != NULL)
2081 *used_mfrom = FALSE;
2082
2083 (void) memset(xbuf, '\0', sizeof xbuf);
2084 ctx = opendmarc_spf_alloc_ctx();
2085 if (ctx == NULL)
2086 {
2087 if (human_readable != NULL)
2088 (void) strlcpy(human_readable, strerror(errno), human_readable_len);
2089 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
2090 }
2091
2092 if (ip_address == NULL)
2093 {
2094 if (human_readable != NULL)
2095 (void) strlcpy(human_readable, "No IP address available", human_readable_len);
2096 ctx = opendmarc_spf_free_ctx(ctx);
2097 return DMARC_POLICY_SPF_OUTCOME_FAIL;
2098 }
2099
2100 if (mail_from_domain == NULL && helo_domain == NULL)
2101 {
2102 if (human_readable != NULL)
2103 (void) strlcpy(human_readable, "No Domain name available to check", human_readable_len);
2104 ctx = opendmarc_spf_free_ctx(ctx);
2105 return DMARC_POLICY_SPF_OUTCOME_FAIL;
2106 }
2107
2108 ret = opendmarc_spf_specify_mailfrom(ctx, mail_from_domain, strlen(mail_from_domain), used_mfrom);
2109 if (ret != 0)
2110 {
2111 if (human_readable != NULL)
2112 (void) strlcpy(human_readable, strerror(errno), human_readable_len);
2113 ctx = opendmarc_spf_free_ctx(ctx);
2114 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
2115 }
2116
2117 ret = opendmarc_spf_specify_helo_domain(ctx, helo_domain, strlen(helo_domain));
2118 if (ret != 0)
2119 {
2120 if (human_readable != NULL)
2121 (void) strlcpy(human_readable, strerror(errno), human_readable_len);
2122 ctx = opendmarc_spf_free_ctx(ctx);
2123 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
2124 }
2125
2126 ret = opendmarc_spf_specify_ip_address(ctx, ip_address, strlen(ip_address));
2127 if (ret != 0)
2128 {
2129 if (human_readable != NULL)
2130 (void) strlcpy(human_readable, strerror(errno), human_readable_len);
2131 ctx = opendmarc_spf_free_ctx(ctx);
2132 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
2133 }
2134
2135 if (spf_record == NULL)
2136 len = 0;
2137 else
2138 len = strlen(spf_record);
2139 ret = opendmarc_spf_specify_record(ctx, spf_record, len);
2140 if (ret != 0)
2141 {
2142 if (human_readable != NULL)
2143 (void) strlcpy(human_readable, hstrerror(h_errno), human_readable_len);
2144 ctx = opendmarc_spf_free_ctx(ctx);
2145 return ret;
2146 }
2147
2148 ret = opendmarc_spf_parse(ctx, 0, xbuf, sizeof xbuf);
2149 if (human_readable != NULL)
2150 (void) strlcpy(human_readable, opendmarc_spf_status_to_msg(ctx, ret), human_readable_len);
2151 ctx = opendmarc_spf_free_ctx(ctx);
2152
2153 if (ret != SPF_RETURN_OK_PASSED)
2154 {
2155 switch (ret)
2156 {
2157 case SPF_RETURN_UNDECIDED:
2158 case SPF_RETURN_QMARK_ALL_NEUTRAL:
2159 case SPF_RETURN_TILDE_ALL_SOFT_FAIL:
2160 if (softfail_okay_flag == TRUE)
2161 return DMARC_POLICY_SPF_OUTCOME_PASS;
2162 else
2163 return DMARC_POLICY_SPF_OUTCOME_FAIL;
2164 break;
2165 case SPF_RETURN_INTERNAL:
2166 return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
2167 }
2168 return DMARC_POLICY_SPF_OUTCOME_FAIL;
2169 }
2170 return DMARC_POLICY_SPF_OUTCOME_PASS;
2171 }
2172
2173 #endif /* HAVE_SPF2_H */
2174
2175 #endif /* WITH_SPF */
0 #include "opendmarc_internal.h"
1
2 /* libbsd if found */
3 #ifdef USE_BSD_H
4 # include <bsd/string.h>
5 #endif /* USE_BSD_H */
6
7 /* libstrl if needed */
8 #ifdef USE_STRL_H
9 # include <strl.h>
10 #endif /* USE_STRL_H */
11
12 /* opendmarc_strl if needed */
13 #ifdef USE_DMARCSTRL_H
14 # include <opendmarc_strl.h>
15 #endif /* USE_DMARCSTRL_H */
16
17 #include <netdb.h>
18
19 #include "dmarc.h"
20
21 #if WITH_SPF && ! HAVE_SPF2_H
22 /*
23 ** Beware that some Linux versions incorrectly define
24 ** MAXHOSTNAMELEN as 64, but DNS lookups require a length
25 ** of 255. So we don't use MAXHOSTNAMELEN here.
26 */
27 #define MAXDNSHOSTNAME 256
28 #ifndef MAXPACKET
29 # define MAXPACKET (8192)
30 #endif
31 #ifndef T_SPF
32 # define T_SPF (99)
33 #endif
34
35 /***************************************************************************************************
36 ** opendmarc_spf_dns_lookup_a_actual -- Looks type of address that is sought
37 **
38 ** Arguments:
39 ** domain -- the domain name to look up.
40 ** sought -- type of lookup A or AAAA
41 ** ary -- array of strings containing list of IP addresses
42 ** cnt -- Pointer to count of lines in array
43 ** Returns:
44 ** ary -- on success
45 ** NULL -- otherise, and place the h_errno error into reply
46 ** Side Effects:
47 ** Makes a connection to the local name server and blocks
48 ** waiting for a reply.
49 ***************************************************************************************************/
50
51 char **
52 opendmarc_spf_dns_lookup_a_actual(char *domain, int sought, char **ary, int *cnt)
53 {
54 char * bp;
55 u_char * cp;
56 u_char * eom = NULL;
57 char hbuf[MAXDNSHOSTNAME];
58 char namebuf[MAXDNSHOSTNAME + 1];
59 u_char a_buf[MAXPACKET];
60 struct in_addr in;
61 uint32_t a;
62 HEADER hdr;
63 int k;
64 short l = 0;
65 int class = -1;
66 int acnt = -1;
67 int qdcnt = -1;
68 u_short type = 0;
69 u_long ttl = 0;
70 #if HAVE_RES_NINIT
71 struct __res_state resp;
72 #endif /* HAVE_RES_NINIT */
73
74 /*
75 * If a null or empy domain was given to us, just say it
76 * was not found.
77 */
78 if (domain == NULL || *domain == '\0')
79 {
80 return NULL;
81 }
82
83 #ifdef HAVE_RES_NINIT
84 memset(&resp, '\0', sizeof resp);
85 res_ninit(&resp);
86 #endif /* HAVE_RES_NINIT */
87 /*
88 * Copy the domain so we can scribble on it. The orginal
89 * may point to a static string.
90 */
91 (void) memcpy(hbuf, domain, sizeof hbuf);
92 bp = hbuf;
93
94 /*
95 * Make sure host ends in a dot to short circuit lookups
96 */
97 bp = hbuf + strlen(hbuf) - 1;
98 if (*bp != '.')
99 *++bp = '.';
100 *++bp = '\0';
101 /*
102 * Make user host does not begin with a dot.
103 */
104 bp = hbuf;
105 if (*bp == '.')
106 ++bp;
107
108 #ifdef HAVE_RES_NINIT
109 k = res_nquery(&resp, bp, C_IN, sought, a_buf, sizeof a_buf);
110 res_nclose(&resp);
111 #else /* HAVE_RES_NINIT */
112 k = res_query(bp, C_IN, sought, a_buf, sizeof a_buf);
113 #endif /* HAVE_RES_NINIT */
114 if (k < 0)
115 {
116 return NULL;
117 }
118 if (k > (int)(sizeof a_buf))
119 {
120 k = sizeof a_buf;
121 }
122 (void) memcpy(&hdr, a_buf, sizeof hdr);
123 cp = (u_char *)&a_buf + HFIXEDSZ;
124 eom = (u_char *)&a_buf + k;
125
126 (void) memset(namebuf, '\0', sizeof namebuf);
127 /* skip question part of response -- we know what we asked */
128 for (qdcnt = ntohs(hdr.qdcount); qdcnt > 0; qdcnt--)
129 {
130 k = dn_expand((unsigned char *) &a_buf, eom, cp, namebuf, sizeof namebuf);
131 cp += k;
132 if (cp + INT16SZ + INT16SZ > eom)
133 {
134 return NULL;
135 }
136 GETSHORT(type, cp);
137 GETSHORT(class, cp);
138 }
139 if (hdr.rcode != NOERROR)
140 {
141 return NULL;
142 }
143 acnt = ntohs((unsigned short) hdr.ancount);
144 if (acnt == 0)
145 {
146 return NULL;
147 }
148 while (--acnt >= 0 && cp < eom)
149 {
150 if ((k = dn_expand((unsigned char *) &a_buf, eom, cp,
151 namebuf, sizeof namebuf)) < 0)
152 {
153 break;
154 }
155 cp += k;
156
157 GETSHORT(type, cp);
158 GETSHORT(class, cp);
159 GETLONG(ttl, cp);
160 GETSHORT(l, cp);
161 if (type == T_CNAME)
162 {
163 char cname[MAXDNSHOSTNAME + 1];
164
165 k = dn_expand((u_char *) &a_buf, eom, cp,
166 cname, MAXDNSHOSTNAME);
167 cp += k;
168 continue;
169 }
170 if (type != type)
171 {
172 cp += l;
173 continue;
174 }
175
176 GETLONG(a, cp);
177 (void) memcpy(&in.s_addr, &a, sizeof(uint32_t));
178 in.s_addr = ntohl(in.s_addr);
179 (void) memset(hbuf, '\0', sizeof hbuf);
180 (void) strncpy(hbuf, inet_ntoa(in), sizeof hbuf);
181 ary = opendmarc_util_pushnargv(hbuf, ary, cnt);
182 }
183 return ary;
184 }
185
186 /***************************************************************************************************
187 ** opendmarc_spf_dns_lookup_a -- Looks up the IPv4 and IPv6 addresses of the domain
188 **
189 ** Arguments:
190 ** domain -- the domain name to look up.
191 ** ary -- array of strings containing list of IP addresses
192 ** cnt -- Pointer to count of lines in array
193 ** Returns:
194 ** ary -- on success
195 ** NULL -- otherise, and place the h_errno error into reply
196 ** Side Effects:
197 ** Makes a connection to the local name server and blocks
198 ** waiting for a reply.
199 ***************************************************************************************************/
200 char **
201 opendmarc_spf_dns_lookup_a(char *domain, char **ary, int *cnt)
202 {
203 char **retp;
204
205 retp = opendmarc_spf_dns_lookup_a_actual(domain, T_A, ary, cnt);
206 #ifdef T_AAAA
207 retp = opendmarc_spf_dns_lookup_a_actual(domain, T_AAAA, ary, cnt);
208 #endif /* T_AAAA */
209 return retp;
210 }
211
212 /***************************************************************************************************
213 ** opendmarc_spf_dns_lookup_mx -- Looks up the MX records for a domain
214 **
215 ** Arguments:
216 ** domain -- The domain name to look up.
217 ** ary -- Array of strings containing list MX hosts
218 ## Note that spf only cares if they exist.
219 ** cnt -- Pointer to count of lines in array
220 ** Returns:
221 ** ary -- on success
222 ** NULL -- otherise, and place the h_errno error into reply
223 ** Side Effects:
224 ** Makes a connection to the local name server and blocks
225 ** waiting for a reply.
226 ***************************************************************************************************/
227 char **
228 opendmarc_spf_dns_lookup_mx(char *domain, char **ary, int *cnt)
229 {
230 register u_char *eob, *cp;
231 register int k;
232 u_char buf[BUFSIZ];
233 HEADER *hp;
234 union {
235 HEADER h;
236 u_char u[PACKETSZ];
237 } q;
238 int acnt, qdcnt;
239 u_short pref;
240 u_short type;
241 u_long ttl;
242 #if HAVE_RES_NINIT
243 struct __res_state resp;
244 #endif /* HAVE_RES_NINIT */
245
246 if (domain == NULL)
247 {
248 return NULL;
249 }
250
251 #ifdef HAVE_RES_NINIT
252 memset(&resp, '\0', sizeof resp);
253 res_ninit(&resp);
254 k = res_nquery(&resp, domain, C_IN, T_MX, (u_char *) &q, sizeof(q));
255 res_nclose(&resp);
256 #else /* HAVE_RES_NINIT */
257 k = res_query(domain, C_IN, T_MX, (u_char *) &q, sizeof(q));
258 #endif /* HAVE_RES_NINIT */
259
260 if (k < 0)
261 {
262 return NULL;
263 }
264 hp = &(q.h);
265 cp = q.u + HFIXEDSZ;
266 eob = q.u + k;
267
268 for (qdcnt = ntohs(hp->qdcount); qdcnt--; cp += k + QFIXEDSZ)
269 if ((k = dn_skipname(cp, eob)) < 0)
270 {
271 return NULL;
272 }
273
274 acnt = ntohs(hp->ancount);
275 while (--acnt >= 0 && cp < eob)
276 {
277 if ((k = dn_expand(q.u, eob, cp, (char *)buf, BUFSIZ-1)) < 0)
278 break;
279 cp += k;
280 if (cp > eob)
281 break;
282 GETSHORT(type, cp);
283 cp += INT16SZ;
284 GETLONG(ttl, cp);
285 GETSHORT(k, cp);
286 if (type != T_MX)
287 {
288 cp += k;
289 continue;
290 }
291 GETSHORT(pref, cp);
292 if ((k = dn_expand(q.u, eob, cp, (char *)buf, BUFSIZ-1)) < 0)
293 break;
294 cp += k;
295 ary = opendmarc_spf_dns_lookup_a((char *)buf, ary, cnt);
296 }
297 return ary;
298 }
299
300 /***************************************************************************************************
301 ** opendmarc_spf_dns_lookup_ptr -- Looks up IP address to get domain
302 **
303 ** Arguments:
304 ** domain -- The domain name to look up.
305 ** ary -- Array of strings containing list MX hosts
306 ## Note that spf only cares if they exist.
307 ** cnt -- Pointer to count of lines in array
308 ** Returns:
309 ** ary -- on success
310 ** NULL -- otherise, and place the h_errno error into reply
311 ** Side Effects:
312 ** Makes a connection to the local name server and blocks
313 ** waiting for a reply.
314 ***************************************************************************************************/
315 char **
316 opendmarc_spf_dns_lookup_ptr(char *ip, char **ary, int *cnt)
317 {
318 register u_char *eob, *cp;
319 register int k;
320 u_char buf[BUFSIZ];
321 char ip_buf[512];
322 HEADER *hp;
323 union {
324 HEADER h;
325 u_char u[PACKETSZ];
326 } q;
327 int acnt, qdcnt;
328 u_short type;
329 u_long ttl;
330 char *icp;
331 #if HAVE_RES_NINIT
332 struct __res_state resp;
333 #endif /* HAVE_RES_NINIT */
334
335 if (ip == NULL)
336 {
337 return NULL;
338 }
339 (void) memset(buf, '\0', sizeof buf);
340 (void) memset(ip_buf, '\0', sizeof ip_buf);
341 (void) strlcpy(ip_buf, ip, sizeof ip_buf);
342 icp = strrchr(ip_buf, '.');
343 if (icp == NULL)
344 return NULL;
345 strlcpy((char *)buf, icp+1, sizeof buf);
346 *icp = '\0';
347 icp = strrchr(ip_buf, '.');
348 if (icp == NULL)
349 return NULL;
350 strlcat((char *)buf, ".", sizeof buf);
351 strlcat((char *)buf, icp+1, sizeof buf);
352 *icp = '\0';
353 icp = strrchr(ip_buf, '.');
354 if (icp == NULL)
355 return NULL;
356 strlcat((char *)buf, ".", sizeof buf);
357 strlcat((char *)buf, icp+1, sizeof buf);
358 *icp = '\0';
359 icp = ip_buf;
360 strlcat((char *)buf, ".", sizeof buf);
361 strlcat((char *)buf, icp, sizeof buf);
362 strlcat((char *)buf, ".in-addr.arpa.", sizeof buf);
363
364 #ifdef HAVE_RES_NINIT
365 memset(&resp, '\0', sizeof resp);
366 res_ninit(&resp);
367 k = res_nquery(&resp, (char *)buf, C_IN, T_PTR, (u_char *) &q, sizeof(q));
368 res_nclose(&resp);
369 #else /* HAVE_RES_NINIT */
370 k = res_query((char *)buf, C_IN, T_PTR, (u_char *) &q, sizeof(q));
371 #endif /* HAVE_RES_NINIT */
372
373 if (k < 0)
374 {
375 return NULL;
376 }
377 hp = &(q.h);
378 cp = q.u + HFIXEDSZ;
379 eob = q.u + k;
380
381 for (qdcnt = ntohs(hp->qdcount); qdcnt--; cp += k + QFIXEDSZ)
382 {
383 if ((k = dn_skipname(cp, eob)) < 0)
384 {
385 return NULL;
386 }
387 }
388
389 acnt = ntohs(hp->ancount);
390 while (--acnt >= 0 && cp < eob)
391 {
392 char ptr[MAXDNSHOSTNAME + 1];
393
394 if ((k = dn_expand(q.u, eob, cp, (char *)buf, BUFSIZ-1)) < 0)
395 break;
396 cp += k;
397 if (cp > eob)
398 break;
399 GETSHORT(type, cp);
400 cp += INT16SZ;
401 GETLONG(ttl, cp);
402 GETSHORT(k, cp);
403
404 k = dn_expand(q.u, eob, cp, ptr, MAXDNSHOSTNAME);
405 ary = opendmarc_util_pushnargv(ptr, ary, cnt);
406 cp += k;
407 continue;
408 }
409 return ary;
410 }
411
412 /***************************************************************
413 ** opendmarc_spf_dns_does_domain_exist -- does an a, aaaa, or mx record exist?
414 **
415 ** Arguments:
416 ** domain -- the domain name to look up.
417 ** reply -- pointer to an integer
418 **
419 ** Returns:
420 ** TRUE -- if any of those records existed.
421 ** FALSE -- otherise, and place the h_errno error
422 ** into reply
423 **
424 ** Side Effects:
425 ** Makes a connection to the local name server and bloks
426 ** waiting for a reply.
427 ***************************************************************/
428 int
429 opendmarc_spf_dns_does_domain_exist(char *domain, int *reply)
430 {
431 HEADER hdr;
432 u_char a_q[MAXPACKET];
433 u_char aaaa_q[MAXPACKET];
434 u_char mx_q[MAXPACKET];
435 int r;
436 int * rp;
437 #if HAVE_RES_NINIT
438 struct __res_state resp;
439 #endif /* HAVE_RES_NINIT */
440
441 if (reply == NULL)
442 rp = &r;
443 else
444 rp = reply;
445
446 if (domain == NULL || *domain == '\0')
447 {
448 *rp = HOST_NOT_FOUND;
449 return FALSE;
450 }
451
452 /*
453 * Make sure the domain exists.
454 */
455 #ifdef HAVE_RES_NINIT
456 memset(&resp, '\0', sizeof resp);
457 res_ninit(&resp);
458 (void) res_nquery(&resp, domain, C_IN, T_A, a_q, sizeof a_q);
459 #ifdef T_AAAA
460 (void) res_nquery(&resp, domain, C_IN, T_AAAA, aaaa_q, sizeof aaaa_q);
461 #endif /* T_AAAA */
462 (void) res_nquery(&resp, domain, C_IN, T_MX, mx_q, sizeof mx_q);
463 res_nclose(&resp);
464 #else /* HAVE_RES_NINIT */
465 (void) res_query(domain, C_IN, T_A, a_q, sizeof a_q);
466 #ifdef T_AAAA
467 (void) res_query(domain, C_IN, T_AAAA, aaaa_q, sizeof aaaa_q);
468 #endif /* T_AAAA */
469 (void) res_query(domain, C_IN, T_MX, mx_q, sizeof mx_q);
470 #endif /* HAVE_RES_NINIT */
471
472 memcpy(&hdr, a_q, sizeof hdr);
473 *rp = hdr.rcode;
474 if (hdr.rcode == NOERROR)
475 return TRUE;
476
477 memcpy(&hdr, aaaa_q, sizeof hdr);
478 *rp = hdr.rcode;
479 if (hdr.rcode == NOERROR)
480 return TRUE;
481
482 memcpy(&hdr, aaaa_q, sizeof hdr);
483 *rp = hdr.rcode;
484 if (hdr.rcode == NOERROR)
485 return TRUE;
486
487 return FALSE;
488 }
489
490 /***************************************************************************************************
491 ** opendmarc_dns_get_record -- looks up and returns the txt record
492 **
493 ** Arguments:
494 ** domain -- the domain name to look up.
495 ** reply -- pointer to an integer
496 ** txt -- where to scribble the found txt record
497 ** txtlen -- size of txt record buffer
498 ** cname -- buffer to hold CNAME if one found
499 ** cnamelen -- size of cname buffer
500 ** spfcheck -- restrict text records returned to just those beginning with v= or spf2.0
501 **
502 ** Returns:
503 ** txt -- on success
504 ** NULL -- otherise, and place the h_errno error
505 ** into reply
506 ** NULL -- if no data, but cname may still contain a hostname
507 **
508 ** Side Effects:
509 ** Makes a connection to the local name server and blocks
510 ** waiting for a reply.
511 ***************************************************************************************************/
512 char *
513 opendmarc_spf_dns_get_record(char *domain, int *reply, char *txt, size_t txtlen, char *cname, size_t cnamelen, int spfcheck)
514 {
515 u_char * eom = NULL;
516 u_char * eop = NULL;
517 u_char * cp = NULL;
518 int k;
519 u_char * p = NULL;
520 int ch = 0;
521 short l = 0;
522 HEADER hdr;
523 int class = -1;
524 int acnt = -1;
525 int qdcnt = -1;
526 u_short type = 0;
527 u_long ttl = 0;
528 char * bp = NULL;
529 int r = 0;
530 int * rp = NULL;
531 u_char txt_buf[MAXPACKET];
532 char hbuf[MAXDNSHOSTNAME];
533 char namebuf[MAXDNSHOSTNAME + 1];
534 #if HAVE_RES_NINIT
535 struct __res_state resp;
536 #endif /* HAVE_RES_NINIT */
537
538 if (reply == NULL)
539 rp = &r;
540 else
541 rp = reply;
542
543 /*
544 * If a null or empy domain was given to us, just say it
545 * was not found.
546 */
547 *rp = 0;
548 if (domain == NULL || *domain == '\0')
549 {
550 *rp = HOST_NOT_FOUND;
551 return NULL;
552 }
553
554 if (cname != NULL && cnamelen > 0)
555 (void) memset(cname, '\0', cnamelen);
556
557 /*
558 * Copy the domain so we can scribble on it. The orginal
559 * may point to a static string.
560 */
561 (void) memcpy(hbuf, domain, sizeof hbuf);
562 bp = hbuf;
563 if (txt != NULL)
564 (void) memset(txt, '\0', txtlen);
565
566 /*
567 * Make sure host ends in a dot to short circuit lookups
568 */
569 bp = hbuf + strlen(hbuf) - 1;
570 if (*bp != '.')
571 *++bp = '.';
572 *++bp = '\0';
573 /*
574 * Make user host does not begin with a dot.
575 */
576 bp = hbuf;
577 if (*bp == '.')
578 ++bp;
579
580 #ifdef HAVE_RES_NINIT
581 memset(&resp, '\0', sizeof resp);
582 res_ninit(&resp);
583 k = res_nquery(&resp, bp, C_IN, T_TXT, txt_buf, sizeof txt_buf);
584 #else /* HAVE_RES_NINIT */
585 k = res_query(bp, C_IN, T_TXT, txt_buf, sizeof txt_buf);
586 #endif /* HAVE_RES_NINIT */
587 if (k < 0)
588 {
589 /*
590 * TXT records apppear more common than SPF records, so
591 * we fall back to SPF instead of looking up SPF first.
592 */
593 if (h_errno == NO_DATA || h_errno == NXDOMAIN)
594 {
595 #ifdef HAVE_RES_NINIT
596 k = res_nquery(&resp, bp, C_IN, T_SPF, txt_buf, sizeof txt_buf);
597 #else /* HAVE_RES_NINIT */
598 k = res_query(bp, C_IN, T_SPF, txt_buf, sizeof txt_buf);
599 #endif /* HAVE_RES_NINIT */
600 if (k >= 0)
601 goto got_spf_record;
602 }
603 *rp = h_errno;
604 #ifdef HAVE_RES_NINIT
605 res_nclose(&resp);
606 #endif /* HAVE_RES_NINIT */
607 return NULL;
608 }
609 got_spf_record:
610 #ifdef HAVE_RES_NINIT
611 res_nclose(&resp);
612 #endif /* HAVE_RES_NINIT */
613
614 if (k > (int)(sizeof txt_buf))
615 k = sizeof txt_buf;
616 (void) memcpy(&hdr, txt_buf, sizeof hdr);
617 cp = (u_char *)&txt_buf + HFIXEDSZ;
618 eom = (u_char *)&txt_buf + k;
619
620 (void) memset(namebuf, '\0', sizeof namebuf);
621 /* skip question part of response -- we know what we asked */
622 for (qdcnt = ntohs(hdr.qdcount); qdcnt > 0; qdcnt--)
623 {
624 (void) dn_expand((unsigned char *) &txt_buf, eom, cp, namebuf, sizeof namebuf);
625 if ((k = dn_skipname(cp, eom)) < 0)
626 {
627 *rp = NO_DATA;
628 return NULL;
629 }
630 cp += k;
631 if (cp + INT16SZ + INT16SZ > eom)
632 {
633 *rp = NO_DATA;
634 return NULL;
635 }
636 GETSHORT(type, cp);
637 GETSHORT(class, cp);
638 }
639 if (hdr.rcode != NOERROR)
640 {
641 *rp = NO_DATA;
642 return NULL;
643 }
644 acnt = ntohs((unsigned short) hdr.ancount);
645 if (acnt == 0)
646 {
647 *rp = NO_DATA;
648 return NULL;
649 }
650 while (--acnt >= 0 && cp < eom)
651 {
652 if ((k = dn_expand((unsigned char *) &txt_buf, eom, cp,
653 namebuf, sizeof namebuf)) < 0)
654 {
655 *rp = NO_DATA;
656 return NULL;
657 }
658 cp += k;
659
660 if (cp + INT16SZ + INT16SZ > eom)
661 {
662 /* currupt answer */
663 *rp = NO_DATA;
664 return NULL;
665 }
666 GETSHORT(type, cp);
667 GETSHORT(class, cp);
668 if (type == T_CNAME)
669 {
670 /*
671 * CNAMEs are supposed to be invisible, but somtimes
672 * a CNAME points to a TXT record that times out, so
673 * all we get on the initial query is the CNAME.
674 */
675 char xname[MAXDNSHOSTNAME + 1];
676 char * xp;
677 size_t xlen;
678
679 if (cname == NULL || cnamelen == 0)
680 {
681 xp = xname;
682 xlen = sizeof xname;
683 }
684 else
685 {
686 xp = cname;
687 xlen = cnamelen;
688 }
689 k = dn_expand((u_char *) &txt_buf, eom, (u_char *)cname, xp, xlen);
690 cp += k;
691 continue;
692 }
693 else if (type != T_TXT)
694 {
695
696 *rp = NO_DATA;
697 return NULL;
698 }
699 /* we may want to cache the ttl later */
700 GETLONG(ttl, cp);
701
702 if (cp + INT16SZ > eom)
703 {
704 /* no payload length */
705 *rp = NO_DATA;
706 return NULL;
707 }
708 GETSHORT(l, cp);
709
710 if (cp + l > eom)
711 {
712 /* payload length greater than remaining buffer */
713 *rp = NO_DATA;
714 return NULL;
715 }
716 if (txt != NULL)
717 {
718 (void) memset(txt, '\0', txtlen);
719 /*
720 * copy the returned record into txt
721 */
722 p = (u_char *)txt;
723 eop = (u_char *)txt + txtlen -1;
724 while (l > 0 && p < eop)
725 {
726 ch = *cp++;
727 l--;
728 while (ch > 0 && p < eop)
729 {
730 *p++ = *cp++;
731 ch--;
732 l--;
733 }
734 }
735 }
736 if (spfcheck == TRUE)
737 {
738 /*
739 * Honor both SPF and Sender Identity type records
740 * But ignore mfrom/pra, because DMARC uses only SPF records.
741 */
742 if (strstr(txt, "v=spf") != NULL || strncasecmp(txt, "spf2.0", 6) == 0)
743 {
744 *rp = 0;
745 return txt;
746 }
747 }
748 cp += l;
749 continue;
750 }
751 *rp = NO_DATA;
752 return NULL;
753 }
754
755 #endif /* WITH_SPF && ! HAVE_SPF2_H */
0 /*
1 ** Copyright (c) 1999-2002, Sendmail Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** By using this file, you agree to the terms and conditions set
5 ** forth in the LICENSE file which can be found at the top level of
6 ** the sendmail distribution.
7 **
8 ** Copyright (c) 2009, 2012, The Trusted Domain Project. All rights reserved.
9 */
10
11 /* system includes */
12 #include <sys/types.h>
13 #include <string.h>
14
15 /*
16 ** XXX the type of the length parameter has been changed
17 ** from size_t to ssize_t to avoid theoretical problems with negative
18 ** numbers passed into these functions.
19 ** The real solution to this problem is to make sure that this doesn't
20 ** happen, but for now we'll use this workaround.
21 */
22
23 /*
24 ** DMARC_STRLCPY -- size bounded string copy
25 **
26 ** This is a bounds-checking variant of strcpy.
27 ** If size > 0, copy up to size-1 characters from the nul terminated
28 ** string src to dst, nul terminating the result. If size == 0,
29 ** the dst buffer is not modified.
30 ** Additional note: this function has been "tuned" to run fast and tested
31 ** as such (versus versions in some OS's libc).
32 **
33 ** The result is strlen(src). You can detect truncation (not all
34 ** of the characters in the source string were copied) using the
35 ** following idiom:
36 **
37 ** char *s, buf[BUFSIZ];
38 ** ...
39 ** if (dmarc_strlcpy(buf, s, sizeof(buf)) >= sizeof(buf))
40 ** goto overflow;
41 **
42 ** Parameters:
43 ** dst -- destination buffer
44 ** src -- source string
45 ** size -- size of destination buffer
46 **
47 ** Returns:
48 ** strlen(src)
49 */
50
51 size_t
52 dmarc_strlcpy(dst, src, size)
53 register char *dst;
54 register const char *src;
55 ssize_t size;
56 {
57 register ssize_t i;
58
59 if (size-- <= 0)
60 return strlen(src);
61 for (i = 0; i < size && (dst[i] = src[i]) != 0; i++)
62 continue;
63 dst[i] = '\0';
64 if (src[i] == '\0')
65 return i;
66 else
67 return i + strlen(src + i);
68 }
69
70 /*
71 ** DMARC_STRLCAT -- size bounded string concatenation
72 **
73 ** This is a bounds-checking variant of strcat.
74 ** If strlen(dst) < size, then append at most size - strlen(dst) - 1
75 ** characters from the source string to the destination string,
76 ** nul terminating the result. Otherwise, dst is not modified.
77 **
78 ** The result is the initial length of dst + the length of src.
79 ** You can detect overflow (not all of the characters in the
80 ** source string were copied) using the following idiom:
81 **
82 ** char *s, buf[BUFSIZ];
83 ** ...
84 ** if (dmarc_strlcat(buf, s, sizeof(buf)) >= sizeof(buf))
85 ** goto overflow;
86 **
87 ** Parameters:
88 ** dst -- nul-terminated destination string buffer
89 ** src -- nul-terminated source string
90 ** size -- size of destination buffer
91 **
92 ** Returns:
93 ** total length of the string tried to create
94 ** (= initial length of dst + length of src)
95 */
96
97 size_t
98 dmarc_strlcat(dst, src, size)
99 register char *dst;
100 register const char *src;
101 ssize_t size;
102 {
103 register ssize_t i, j, o;
104
105 o = strlen(dst);
106 if (size < o + 1)
107 return o + strlen(src);
108 size -= o + 1;
109 for (i = 0, j = o; i < size && (dst[j] = src[i]) != 0; i++, j++)
110 continue;
111 dst[j] = '\0';
112 if (src[i] == '\0')
113 return j;
114 else
115 return j + strlen(src + i);
116 }
0 /*
1 ** Copyright (c) 2009, 2012, The Trusted Domain Project. All rights reserved.
2 */
3
4 #ifndef _DMARC_STRL_H_
5 #define _DMARC_STRL_H_
6
7 /* system includes */
8 #include <sys/types.h>
9
10 /* OpenDMARC includes */
11 #include "build-config.h"
12
13 #ifdef __STDC__
14 # ifndef __P
15 # define __P(x) x
16 # endif /* ! __P */
17 #else /* __STDC__ */
18 # ifndef __P
19 # define __P(x) ()
20 # endif /* ! __P */
21 #endif /* __STDC__ */
22
23 /* prototypes */
24 extern size_t dmarc_strlcat __P((char *, const char *, ssize_t));
25 extern size_t dmarc_strlcpy __P((char *, const char *, ssize_t));
26
27 /* mappings */
28 #if HAVE_STRLCAT == 0
29 # define strlcat(x,y,z) dmarc_strlcat((x), (y), (z))
30 #endif /* HAVE_STRLCAT == 0 */
31
32 #if HAVE_STRLCPY == 0
33 # define strlcpy(x,y,z) dmarc_strlcpy((x), (y), (z))
34 #endif /* HAVE_STRLCPY == 0 */
35
36 #endif /* _DMARC_STRL_H_ */
0 /*************************************************************************
1 ** Copyright (c) 2012, 2014, The Trusted Domain Project. All rights reserved.
2 **************************************************************************/
3 #include "opendmarc_internal.h"
4
5 /* libbsd if found */
6 #ifdef USE_BSD_H
7 # include <bsd/string.h>
8 #endif /* USE_BSD_H */
9
10 /* libstrl if needed */
11 #ifdef USE_STRL_H
12 # include <strl.h>
13 #endif /* USE_STRL_H */
14
15 /* opendmarc_strl if needed */
16 #ifdef USE_DMARCSTRL_H
17 # include <opendmarc_strl.h>
18 #endif /* USE_DMARCSTRL_H */
19
20 static OPENDMARC_HASH_CTX *TLD_hctx = NULL;
21 static OPENDMARC_HASH_CTX *TLDbak_hctx = NULL;
22 # if HAVE_PTHREAD_H || HAVE_PTHREAD
23 static pthread_mutex_t TLD_hctx_mutex = PTHREAD_MUTEX_INITIALIZER;
24 #endif
25 static char TLDfile[MAXPATHLEN];
26
27 int
28 opendmarc_reverse_domain(u_char *domain, u_char *buf, size_t buflen)
29 {
30 u_char *dp, *ep, *cp;
31 u_char copy[MAXDNSHOSTNAME];
32
33 if (buf == NULL || buflen == 0 || domain == NULL)
34 {
35 return EINVAL;
36 }
37
38
39 (void) memset((char *)buf, '\0', buflen);
40 /*
41 * Strip all but one leading dot.
42 */
43 for (cp = domain; *cp != '\0'; ++cp)
44 {
45 if (*cp != '.')
46 break;
47 }
48 if (strlen(cp) == 0)
49 {
50 return EINVAL;
51 }
52 if (cp > domain)
53 --cp;
54 (void) memset((char *)copy, '\0', sizeof copy);
55 (void) strlcpy((char *)copy, cp, sizeof copy);
56 ep = copy + strlen((char *)copy);
57
58 /*
59 * Strip all trailing dots.
60 */
61 for (cp = ep-1; cp > copy; --cp)
62 {
63 if (*cp == '.')
64 *cp = '\0';
65 else
66 break;
67 }
68 ep = cp+1;
69 do
70 {
71 for (dp = ep; dp > copy; --dp)
72 if (*dp == '.')
73 break;
74 ep = dp;
75 if (*dp == '.')
76 ++dp;
77
78 strlcat((char *)buf, (char *)dp, buflen);
79 if (*ep == '.')
80 {
81 (void) strlcat((char *)buf, ".", buflen);
82 *ep = '\0';
83 --ep;
84 }
85 } while (dp > copy && ep > copy);
86 return 0;
87 }
88
89 /**************************************************************************************
90 ** OPENDMARC_TLD_READ_FILE -- Read in the file of TLDs and prepare to select against it.
91 ** Arguments:
92 ** path_fname -- The path and file name to read and process
93 ** commentstring -- The leading characters that comment out a line
94 ** drop -- Drop these leading characters but bind a dot to this TLD
95 ** except -- Prefix that marks at TLD as a stand-alone TLD with domain.
96 **
97 ** Returns:
98 ** 0 -- On success
99 ** != 0 -- On error and set's errno
100 ** Side Effect:
101 ** Opens and read a file (read-only)
102 ** Allocates memory to store the result.
103 ** Be certain to call opendmarc_tld_shutdown() to free allocated memory.
104 **************************************************************************************/
105 int
106 opendmarc_tld_read_file(char *path_fname, char *commentstring, char *drop, char *except)
107 {
108 FILE * fp;
109 u_char buf[BUFSIZ];
110 char * cp;
111 void * vp;
112 int nlines;
113 int ret;
114 u_char revbuf[MAXDNSHOSTNAME];
115 int adddot;
116 int preflen;
117 OPENDMARC_HASH_CTX *hashp;
118
119 if (path_fname == NULL)
120 {
121 if (*TLDfile == '\0')
122 return errno = EINVAL;
123 path_fname = TLDfile;
124 }
125 else
126 (void) strlcpy(TLDfile, path_fname, sizeof TLDfile);
127
128 if (commentstring == NULL)
129 commentstring = "//";
130
131 hashp = opendmarc_hash_init(4096 * 2);
132 if (hashp == NULL)
133 return (errno == 0) ? ENOMEM : errno;
134
135 fp = fopen(path_fname, "r");
136 if (fp == NULL)
137 return errno;
138
139 errno = 0;
140 while (fgets((char *)buf, sizeof buf, fp) != NULL)
141 {
142
143 cp = strchr((char *)buf, '\n');
144 if (cp != NULL)
145 *cp = '\0';
146 cp = strchr((char *)buf, '\r');
147 if (cp != NULL)
148 *cp = '\0';
149
150 if (strncmp(commentstring, (char *)buf, strlen(commentstring)) == 0 || *buf == '\0')
151 {
152 if ((cp = strstr((char *)buf, "xn-")) != NULL)
153 {
154 char *ep;
155
156 for (ep = cp; *ep != '\0'; ++ep)
157 {
158 if (isspace((int)*ep))
159 break;
160 }
161 *ep = '\0';
162 ret = opendmarc_reverse_domain((u_char *)cp, revbuf, sizeof revbuf);
163 adddot = TRUE;
164 goto got_xn;
165 }
166 continue;
167 }
168 adddot = TRUE;
169 preflen = 0;
170 if (drop != NULL && strncasecmp(drop, (char *)buf, strlen(drop)) == 0)
171 {
172 preflen = strlen(drop);
173 adddot = TRUE;
174 }
175 if (except != NULL && strncasecmp(except, (char *)buf, strlen(except)) == 0)
176 {
177 preflen = strlen(except);
178 adddot = FALSE;
179 }
180 ret = opendmarc_reverse_domain(buf+preflen, revbuf, sizeof revbuf);
181 got_xn:
182 if (ret != 0)
183 continue;
184 if (adddot == TRUE)
185 (void) strlcat((char *)revbuf, ".", sizeof revbuf);
186
187 vp = opendmarc_hash_lookup(hashp, revbuf, (void *)revbuf, strlen(revbuf));
188 nlines++;
189 }
190 (void) fclose(fp);
191
192 # if HAVE_PTHREAD_H || HAVE_PTHREAD
193 (void) pthread_mutex_lock(&TLD_hctx_mutex);
194 # endif
195 if (TLDbak_hctx != NULL)
196 TLDbak_hctx = opendmarc_hash_shutdown(TLDbak_hctx);
197 TLDbak_hctx = TLD_hctx;
198 TLD_hctx = hashp;
199 # if HAVE_PTHREAD_H || HAVE_PTHREAD
200 (void) pthread_mutex_unlock(&TLD_hctx_mutex);
201 # endif
202
203 return 0;
204 }
205
206 /**************************************************************************************
207 ** OPENDMARC_TLD_SHUTDOWN -- Free the tld hash and return
208 ** Arguments:
209 ** none --- void agrguments
210 ** Returns:
211 ** 0 -- Always
212 ** Side Effect:
213 ** Frees memory
214 ** Locks and sets the hash to NULL
215 **************************************************************************************/
216 void
217 opendmarc_tld_shutdown()
218 {
219 # if HAVE_PTHREAD_H || HAVE_PTHREAD
220 (void) pthread_mutex_lock(&TLD_hctx_mutex);
221 # endif
222 if (TLDbak_hctx != NULL)
223 TLDbak_hctx = opendmarc_hash_shutdown(TLDbak_hctx);
224 if (TLD_hctx != NULL)
225 TLD_hctx = opendmarc_hash_shutdown(TLD_hctx);
226 # if HAVE_PTHREAD_H || HAVE_PTHREAD
227 (void) pthread_mutex_unlock(&TLD_hctx_mutex);
228 # endif
229 return;
230 }
231
232 int
233 opendmarc_get_tld(u_char *domain, u_char *tld, size_t tld_len)
234 {
235 int ret;
236 u_char revbuf[MAXDNSHOSTNAME];
237 u_char *rp;
238 u_char save;
239 void * vp;
240
241 if (domain == NULL || tld == NULL || tld_len == 0)
242 return errno = EINVAL;
243 ret = opendmarc_reverse_domain(domain, revbuf, sizeof revbuf);
244 if (ret != 0)
245 return (errno == 0) ? EINVAL : errno;
246
247 # if HAVE_PTHREAD_H || HAVE_PTHREAD
248 (void) pthread_mutex_lock(&TLD_hctx_mutex);
249 # endif
250 vp = TLD_hctx;
251 # if HAVE_PTHREAD_H || HAVE_PTHREAD
252 (void) pthread_mutex_unlock(&TLD_hctx_mutex);
253 # endif
254 if (vp == NULL)
255 {
256 /*
257 ** No tld list was supplied so copy the domain and return.
258 */
259 (void) strlcpy(tld, domain, tld_len);
260 return 0;
261 }
262
263 for (rp = revbuf + strlen(revbuf) -1; rp > revbuf; --rp)
264 {
265 if (rp == revbuf)
266 {
267 /* no match found in the hash table. */
268 (void) strlcpy(tld, domain, tld_len);
269 break;
270 }
271 if (*rp == '.')
272 {
273 save = *(rp+1);
274 *(rp+1) = '\0';
275 # if HAVE_PTHREAD_H || HAVE_PTHREAD
276 (void) pthread_mutex_lock(&TLD_hctx_mutex);
277 # endif
278 vp = opendmarc_hash_lookup(TLD_hctx, revbuf, NULL, 0);
279 # if HAVE_PTHREAD_H || HAVE_PTHREAD
280 (void) pthread_mutex_unlock(&TLD_hctx_mutex);
281 # endif
282 if (vp != NULL)
283 {
284 *(rp+1) = save;
285 (void) opendmarc_reverse_domain(revbuf, tld, tld_len);
286 return 0;
287 }
288 *(rp+1) = save;
289 *rp = '\0';
290 # if HAVE_PTHREAD_H || HAVE_PTHREAD
291 (void) pthread_mutex_lock(&TLD_hctx_mutex);
292 # endif
293 vp = opendmarc_hash_lookup(TLD_hctx, revbuf, NULL, 0);
294 # if HAVE_PTHREAD_H || HAVE_PTHREAD
295 (void) pthread_mutex_unlock(&TLD_hctx_mutex);
296 # endif
297 if (vp != NULL)
298 {
299 char * cp = strchr(revbuf, '.');
300
301 if (cp == NULL)
302 *rp = '.';
303 (void) opendmarc_reverse_domain(revbuf, tld, tld_len);
304 return 0;
305 }
306
307 }
308 }
309 return 0;
310 }
0 /*************************************************************************
1 ** Copyright (c) 2012, 2014, 2016, The Trusted Domain Project.
2 ** All rights reserved.
3 **************************************************************************/
4 #include "opendmarc_internal.h"
5
6 /* libbsd if found */
7 #ifdef USE_BSD_H
8 # include <bsd/string.h>
9 #endif /* USE_BSD_H */
10
11 /* libstrl if needed */
12 #ifdef USE_STRL_H
13 # include <strl.h>
14 #endif /* USE_STRL_H */
15
16 /* opendmarc_strl if needed */
17 #ifdef USE_DMARCSTRL_H
18 # include <opendmarc_strl.h>
19 #endif /* USE_DMARCSTRL_H */
20
21 /*****************************************************
22 ** OPENDMARC_UTIL_CLEARARGV -- Free the argv array
23 **
24 ** Parameters:
25 ** ary -- Pointer to array to free
26 ** Returns:
27 ** NULL always
28 ** Side Effects:
29 ** Allocates and reallocates memory.
30 */
31 u_char **
32 opendmarc_util_clearargv(u_char **ary)
33 {
34 if (ary != NULL)
35 {
36 u_char **arp;
37
38 for (arp = ary; *arp != NULL; ++arp)
39 {
40 (void) free(*arp);
41 *arp = NULL;
42 }
43 (void) free(ary);
44 ary = NULL;
45 }
46 return ary;
47 }
48
49 /*****************************************************
50 ** OPENDMARC_UTIL_PUSHARGV -- Add to and array of strings.
51 **
52 ** Parameters:
53 ** str -- The string to add.
54 ** ary -- The array to extend.
55 ** cnt -- Points to number of elements.
56 ** Returns:
57 ** ary on success.
58 ** NULL on error and sets errno.
59 ** Side Effects:
60 ** Allocates and reallocates memory.
61 */
62 u_char **
63 opendmarc_util_pushargv(u_char *str, u_char **ary, int *cnt)
64 {
65 int i;
66 u_char **tmp;
67
68 if (str == NULL)
69 return ary;
70
71 if (ary == NULL)
72 {
73 ary = malloc(sizeof(char **) * 2);
74 if (ary == NULL)
75 {
76 return NULL;
77 }
78 ary[0] = strdup(str);
79 ary[1] = NULL;
80 if (ary[0] == NULL)
81 {
82 (void) free(ary);
83 return NULL;
84 }
85 if (cnt != NULL)
86 *cnt = 1;
87 return ary;
88 }
89 if (cnt == NULL)
90 {
91 for (i = 0; ;i++)
92 {
93 if (ary[i] == NULL)
94 break;
95 }
96 }
97 else
98 i = *cnt;
99 tmp = realloc((void *)ary, sizeof(char **) * (i+2));
100 if (tmp == NULL)
101 {
102 ary = opendmarc_util_clearargv(ary);
103 return NULL;
104 }
105 ary = tmp;
106 ary[i] = strdup(str);
107 if (ary[i] == NULL)
108 {
109 ary = opendmarc_util_clearargv(ary);
110 return NULL;
111 }
112 ary[i+1] = NULL;
113 if (cnt != NULL)
114 *cnt = i + 1;
115 return ary;
116 }
117
118 /*****************************************************
119 ** OPENDMARC_UTIL_DUPE_ARGV -- Duplicate an argv
120 **
121 ** Parameters:
122 ** ary -- Pointer to array to dupe
123 ** Returns:
124 ** u_char ** -- On success
125 ** NULL -- on error
126 ** Side Effects:
127 ** Allocates and reallocates memory.
128 */
129 u_char **
130 opendmarc_util_dupe_argv(u_char **ary)
131 {
132 u_char **new = NULL;
133 int new_cnt = 0;
134
135 if (ary != NULL)
136 {
137 u_char **arp;
138
139 for (arp = ary; *arp != NULL; ++arp)
140 new = opendmarc_util_pushargv(*arp, new, &new_cnt);
141 }
142 return new;
143 }
144
145 /*****************************************************
146 ** OPENDMARC_UTIL_CLEANUP -- Remove whitespace
147 **
148 ** Parameters:
149 ** str -- The string cleanup
150 ** buf -- Where to place result
151 ** buflen -- Length of buf
152 ** Returns:
153 ** buf on success.
154 ** NULL on error and sets errno.
155 ** Side Effects:
156 */
157 u_char *
158 opendmarc_util_cleanup(u_char *str, u_char *buf, size_t buflen)
159 {
160 char *sp, *ep;
161
162 if (str == NULL || buf == NULL || strlen((char *)str) > buflen)
163 {
164 errno = EINVAL;
165 return NULL;
166 }
167
168 (void) memset(buf, '\0', buflen);
169
170 for (sp = str, ep = buf; *sp != '\0'; sp++)
171 {
172 if (!isascii(*sp) || !isspace(*sp))
173 *ep++ = *sp;
174 }
175
176 return buf;
177 }
178
179 /************************************************************
180 ** OPENDMARC_UTIL_FINDDOMAIN --Focus on the domain
181 **
182 ** Parameters:
183 ** raw -- The address containing domain
184 ** buf -- Where to place result
185 ** buflen -- Length of buf
186 ** Returns:
187 ** buf on success.
188 ** NULL on error and sets errno.
189 ** Side Effects:
190 ** e.g. (foo) a@a.com (bar) ---> a.com
191 ** "foo" <a@a.com> "foo" --> a.com
192 ** a@a.com, b@b.com, c@c.com --> a.com
193 */
194 u_char *
195 opendmarc_util_finddomain(u_char *raw, u_char *buf, size_t buflen)
196 {
197 u_char *a = NULL;
198 u_char *b = NULL;
199 u_char *ep = NULL;
200 u_char copy[BUFSIZ];
201 u_char *cp = NULL;
202 int inparen = 0;
203 #define OPENDMARC_MAX_QUOTES (256)
204 int quotes[OPENDMARC_MAX_QUOTES + 1];
205 int numquotes = 0;
206 size_t len;
207
208 if (raw == NULL)
209 return NULL;
210
211 (void) memset(copy, '\0', sizeof copy);
212 len = strlen((char *)raw);
213 if (len > BUFSIZ)
214 len = BUFSIZ - 1;
215 (void) strncpy(copy, raw, len);
216
217 /*
218 * Quoted commas do not delimit addresses.
219 * Un-quoted ones do.
220 */
221 for (cp = copy; *cp != '\0'; ++cp)
222 {
223 /*
224 * <> has a higher precedence than quotes.
225 * Prevents "From: Davide D'Marco <user@blah.com>" from breaking.
226 */
227 if (*cp == '<')
228 break;
229
230 if (numquotes == 0 && *cp == ',')
231 {
232 *cp = '\0';
233 break;
234 }
235 if (numquotes > 0 && *cp == ')')
236 {
237 if (quotes[numquotes-1] == ')')
238 {
239 --numquotes;
240 *cp = ' ';
241 continue;
242 }
243 }
244 if (*cp == '"' || *cp == '\'' || *cp == '(')
245 {
246 if (*cp == '(')
247 *cp = ')';
248 if (numquotes == 0)
249 {
250 quotes[numquotes] = *cp;
251 ++numquotes;
252 *cp = ' ';
253 continue;
254 }
255 if (*cp == quotes[numquotes -1])
256 {
257 --numquotes;
258 *cp = ' ';
259 continue;
260 }
261 quotes[numquotes] = *cp;
262 if (numquotes >= OPENDMARC_MAX_QUOTES)
263 break;
264 ++numquotes;
265 *cp = ' ';
266 continue;
267 }
268 if (numquotes > 0)
269 *cp = ' ';
270 }
271 ep = copy + strlen((char *)copy);
272 for (b = ep-1; b > copy; --b)
273 {
274 if (*b == '<')
275 break;
276 }
277 if (*b == '<')
278 {
279 for (a = b; a < ep; ++a)
280 {
281 if (*a == '>')
282 break;
283 }
284 if (*a == '>')
285 {
286 *a = '\0';
287 cp = ++b;
288 goto strip_local_part;
289 }
290 }
291 for (a = copy; a < ep; a++)
292 {
293 if (isspace((int)*a))
294 continue;
295 if (*a == '(')
296 {
297 inparen = 1;
298 continue;
299 }
300 if (inparen == 1 && *a != ')')
301 continue;
302 if (inparen == 1 && *a == ')')
303 {
304 inparen = 0;
305 continue;
306 }
307 break;
308 }
309 for (b = ep -1; b > a; --b)
310 {
311 if (isspace((int)*b))
312 continue;
313 if (*b == ')')
314 {
315 inparen = 1;
316 continue;
317 }
318 if (inparen == 1 && *b != '(')
319 continue;
320 if (inparen == 1 && *b == '(')
321 {
322 inparen = 0;
323 continue;
324 }
325 break;
326 }
327 *(b+1) ='\0';
328 cp = a;
329 strip_local_part:
330 if (cp == NULL)
331 cp = copy;
332 ep = strchr(cp, '@');
333 if (ep != NULL)
334 cp = ep + 1;
335 len = strlen((char *)cp);
336 if (len > buflen)
337 cp[buflen -1] = '\0';
338 len = strlen((char *)cp);
339 if (len > 0)
340 {
341 /*
342 * If the domain name ends in a dot, drop that dot.
343 */
344 ep = cp + len -1;
345 if (*ep == '.')
346 *ep = '\0';
347 }
348 (void) strlcpy(buf, cp, buflen);
349 return buf;
350 }
351
352 char **
353 opendmarc_util_freenargv(char **ary, int *num)
354 {
355 if (ary != NULL)
356 {
357 char **ccp;
358
359 for (ccp = ary; *ccp != NULL; ++ccp)
360 {
361 (void) free(*ccp);
362 *ccp = NULL;
363 }
364 (void) free(ary);
365 ary = NULL;
366 }
367 if (num != NULL)
368 *num = 0;
369 return NULL;
370 }
371
372 char **
373 opendmarc_util_pushnargv(char *str, char **ary, int *num)
374 {
375 int i;
376 char **tmp;
377
378 if (str != NULL)
379 {
380 if (ary == NULL)
381 {
382 ary = calloc(sizeof(char **), 2);
383 if (ary == NULL)
384 {
385 if (num != NULL)
386 *num = 0;
387 return NULL;
388 }
389 *ary = strdup(str);
390 *(ary+1) = NULL;
391 if (*ary == NULL)
392 {
393 (void) free(ary);
394 ary = NULL;
395 if (num != NULL)
396 *num = 0;
397 return NULL;
398 }
399 if (num != NULL)
400 *num = 1;
401 return ary;
402 }
403 i = 0;
404 if (num == NULL)
405 {
406 for (i = 0; ;i++)
407 {
408 if (ary[i] == NULL)
409 break;
410 }
411 }
412 else
413 i = *num;
414 tmp = realloc((void *)ary, sizeof(char **) * (i+2));
415 if (tmp == NULL)
416 {
417 ary = opendmarc_util_freenargv(ary, num);
418 return NULL;
419 }
420 ary = tmp;
421 ary[i] = strdup(str);
422 if (ary[i] == NULL)
423 {
424 ary = opendmarc_util_freenargv(ary, num);
425 return NULL;
426 }
427 ++i;
428 ary[i] = NULL;
429 if (num != NULL)
430 *num = i;
431 }
432 return ary;
433 }
434
435 /*
436 ** Convert a decimal unsigned long interger into a string.
437 ** Returns a pointer to the passed buffer.
438 */
439 char *
440 opendmarc_util_ultoa(unsigned long val, char *buffer, size_t bufferlen)
441 {
442 register char *b = buffer;
443 register size_t l = bufferlen;
444 register unsigned long v = val;
445 register long mod, d, digit;
446 #define MAXDIGITS (32)
447 int digits[MAXDIGITS];
448
449 if (b == NULL || l < 2)
450 return NULL;
451
452 if (v == 0)
453 {
454 *b++ = '0';
455 *b = '\0';
456 return buffer;
457 }
458 digit = 0;
459 do
460 {
461 mod = v % 10;
462 v = v / 10;
463 digits[digit] = mod;
464 ++digit;
465 if (digit >= MAXDIGITS)
466 break;
467 } while(v != 0);
468 for (d = digit-1; d >= 0; --d)
469 {
470 switch (digits[d])
471 {
472 case 0: *b++ = '0'; --l; break;
473 case 1: *b++ = '1'; --l; break;
474 case 2: *b++ = '2'; --l; break;
475 case 3: *b++ = '3'; --l; break;
476 case 4: *b++ = '4'; --l; break;
477 case 5: *b++ = '5'; --l; break;
478 case 6: *b++ = '6'; --l; break;
479 case 7: *b++ = '7'; --l; break;
480 case 8: *b++ = '8'; --l; break;
481 case 9: *b++ = '9'; --l; break;
482 }
483 if (l == 1)
484 break;
485 }
486 *b = '\0';
487 return buffer;
488 }
0 /***********************************************************************
1 ** OPENDMARC_XML.C
2 ** OPENDMARC_XML -- Parse a blob of xml DMARC report data
3 ** OPENDMARC_XML_PARSE -- Read a file into a blob
4 ** Copyright (c) 2012-2014, The Trusted Domain Project. All rights reserved.
5 ************************************************************************/
6 # include "opendmarc_internal.h"
7
8 /* libbsd if found */
9 #ifdef USE_BSD_H
10 # include <bsd/string.h>
11 #endif /* USE_BSD_H */
12
13 /* libstrl if needed */
14 #ifdef USE_STRL_H
15 # include <strl.h>
16 #endif /* USE_STRL_H */
17
18 /* opendmarc_strl if needed */
19 #ifdef USE_DMARCSTRL_H
20 # include <opendmarc_strl.h>
21 #endif /* USE_DMARCSTRL_H */
22
23 static char *Taglist[] = {
24 "adkim",
25 "aspf",
26 "auth_results",
27 "begin",
28 "comment",
29 "count",
30 "date_range",
31 "disposition",
32 "dkim",
33 "domain",
34 "email",
35 "end",
36 "extra_contact_info",
37 "feedback",
38 "header_from",
39 "human_result",
40 "identifiers",
41 "org_name",
42 "p",
43 "pct",
44 "policy_evaluated",
45 "policy_published",
46 "reason",
47 "record",
48 "report_id",
49 "report_metadata",
50 "result",
51 "row",
52 "source_ip",
53 "sp",
54 "spf",
55 "type",
56 NULL,
57 };
58
59 static int
60 tag_lookup(char *tag)
61 {
62 char **cpp;
63
64 for (cpp = Taglist; *cpp != NULL; ++cpp)
65 {
66 if (strcasecmp(*cpp, tag) == 0)
67 return TRUE;
68 }
69 return FALSE;
70 }
71
72 /***********************************************************************
73 ** OPENDMARC_XML -- Parse a blob of xml DMARC report data
74 ** Arguments:
75 ** b -- The blob of xml report data
76 ** blen -- Size of blob
77 ** Returns:
78 ** Nothing yet NEED TO DESIGN OUTPUT
79 ** Side Effects:
80 ** Pushes and pops off local stack, no recursion.
81 ************************************************************************/
82 # define MAX_STACK_DEPTH (10)
83 # define MAX_STACK_LINE_LEN (256)
84 # define MAX_ITEM_NAME_LEN (256)
85 typedef char STACK[MAX_STACK_DEPTH][MAX_STACK_LINE_LEN];
86
87 u_char **
88 opendmarc_xml(char *b, size_t blen, char *e, size_t elen)
89 {
90 STACK stack;
91 int sidx = -1;
92 char *cp, *ep, *sp, *tagp;
93 int i;
94 int inside = FALSE;
95 char org_name[MAX_ITEM_NAME_LEN];
96 u_char ** ary = NULL;
97 int ary_cnt = 0;
98 char begin[MAX_ITEM_NAME_LEN];
99 char end[MAX_ITEM_NAME_LEN];
100 char source_ip[MAX_ITEM_NAME_LEN];
101 char report_id[MAX_ITEM_NAME_LEN];
102 char email[MAX_ITEM_NAME_LEN];
103 char count[MAX_ITEM_NAME_LEN];
104 char disposition[MAX_ITEM_NAME_LEN];
105 char policy_eval_dkim[MAX_ITEM_NAME_LEN];
106 char policy_eval_spf[MAX_ITEM_NAME_LEN];
107 char domain[MAX_ITEM_NAME_LEN];
108 char reason_type[MAX_ITEM_NAME_LEN];
109 char reason_comment[MAX_ITEM_NAME_LEN];
110 char adkim[8];
111 char aspf[8];
112 char p[32];
113 char pct[8];
114 char header_from[MAX_ITEM_NAME_LEN];
115 char auth_dkim_domain[MAX_ITEM_NAME_LEN];
116 char auth_dkim_result[MAX_ITEM_NAME_LEN];
117 char auth_dkim_human[MAX_ITEM_NAME_LEN];
118 char auth_spf_domain[MAX_ITEM_NAME_LEN];
119 char auth_spf_result[MAX_ITEM_NAME_LEN];
120 char auth_spf_human[MAX_ITEM_NAME_LEN];
121 char obuf[BUFSIZ * 2];
122 char e_buf[128];
123
124
125 if (e == NULL)
126 {
127 e = e_buf;
128 elen = sizeof e_buf;
129 }
130 (void) memset(auth_dkim_domain, '\0', sizeof auth_dkim_domain);
131 (void) memset(auth_dkim_human, '\0', sizeof auth_dkim_human);
132 (void) memset(auth_dkim_result, '\0', sizeof auth_dkim_result);
133 (void) memset(auth_spf_domain, '\0', sizeof auth_spf_domain);
134 (void) memset(auth_spf_human, '\0', sizeof auth_spf_human);
135 (void) memset(auth_spf_result, '\0', sizeof auth_spf_result);
136 (void) memset(count, '\0', sizeof count);
137 (void) memset(disposition, '\0', sizeof disposition);
138 (void) memset(email, '\0', sizeof email);
139 (void) memset(header_from, '\0', sizeof header_from);
140 (void) memset(policy_eval_dkim, '\0', sizeof policy_eval_dkim);
141 (void) memset(policy_eval_spf, '\0', sizeof policy_eval_spf);
142 (void) memset(source_ip, '\0', sizeof source_ip);
143 (void) memset(stack, '\0', sizeof(STACK));
144
145 (void) memset(obuf, '\0', sizeof obuf);
146 (void) strlcpy(obuf, "begin,end,org_name,email,domain,adkim,aspf,p,pct,source_ip,count,disposition,policy_eval_dkim,policy_eval_spf,reason_type,reason_comment,header_from,auth_dkim_domain,auth_dkim_result,auth_dkim_human,auth_spf_domain,auth_spf_result,auth_spf_human", sizeof obuf);
147 ary = opendmarc_util_pushargv((u_char *)obuf, ary, &ary_cnt);
148
149 ep = b + blen;
150 for (cp = b; cp < ep; ++cp)
151 {
152 if (isspace((int) *cp))
153 continue;
154
155 if (inside == FALSE)
156 {
157 if (*cp != '<')
158 continue;
159 ++cp;
160 for(sp = cp; *sp != '\0'; ++sp)
161 {
162 if (*sp == '?')
163 break;
164 if (isalpha((int) *sp) || *sp == '_' ||*sp == '/')
165 continue;
166 break;
167 }
168 if (*sp == '?')
169 continue;
170 *sp = '\0';
171 if (*cp == '/')
172 tagp = cp+1;
173 else
174 tagp = cp;
175 if (tag_lookup(tagp) == FALSE)
176 {
177 continue;
178 }
179 if (*cp == '/')
180 {
181 if (sidx == -1)
182 {
183 //(void) fprintf(stderr, "<%s>: %s\n",
184 // cp, "End token with never a start token (ignored)");
185 cp = sp;
186 continue;
187 }
188 if (strcasecmp(cp+1, "record") == 0)
189 {
190 (void) memset(obuf, '\0', sizeof obuf);
191 (void) strlcat(obuf, begin, sizeof obuf);
192 (void) strlcat(obuf, ",", sizeof obuf);
193 (void) strlcat(obuf, end, sizeof obuf);
194 (void) strlcat(obuf, ",", sizeof obuf);
195 (void) strlcat(obuf, org_name, sizeof obuf);
196 (void) strlcat(obuf, ",", sizeof obuf);
197 (void) strlcat(obuf, email, sizeof obuf);
198 (void) strlcat(obuf, ",", sizeof obuf);
199 (void) strlcat(obuf, domain, sizeof obuf);
200 (void) strlcat(obuf, ",", sizeof obuf);
201 (void) strlcat(obuf, adkim, sizeof obuf);
202 (void) strlcat(obuf, ",", sizeof obuf);
203 (void) strlcat(obuf, aspf, sizeof obuf);
204 (void) strlcat(obuf, ",", sizeof obuf);
205 (void) strlcat(obuf, p, sizeof obuf);
206 (void) strlcat(obuf, ",", sizeof obuf);
207 (void) strlcat(obuf, pct, sizeof obuf);
208 (void) strlcat(obuf, ",", sizeof obuf);
209 (void) strlcat(obuf, source_ip, sizeof obuf);
210 (void) strlcat(obuf, ",", sizeof obuf);
211 (void) strlcat(obuf, count, sizeof obuf);
212 (void) strlcat(obuf, ",", sizeof obuf);
213 (void) strlcat(obuf, disposition, sizeof obuf);
214 (void) strlcat(obuf, ",", sizeof obuf);
215 (void) strlcat(obuf, policy_eval_dkim, sizeof obuf);
216 (void) strlcat(obuf, ",", sizeof obuf);
217 (void) strlcat(obuf, policy_eval_spf, sizeof obuf);
218 (void) strlcat(obuf, ",", sizeof obuf);
219 (void) strlcat(obuf, reason_type, sizeof obuf);
220 (void) strlcat(obuf, ",", sizeof obuf);
221 (void) strlcat(obuf, reason_comment, sizeof obuf);
222 (void) strlcat(obuf, ",", sizeof obuf);
223 (void) strlcat(obuf, header_from, sizeof obuf);
224 (void) strlcat(obuf, ",", sizeof obuf);
225 (void) strlcat(obuf, auth_dkim_domain, sizeof obuf);
226 (void) strlcat(obuf, ",", sizeof obuf);
227 (void) strlcat(obuf, auth_dkim_result, sizeof obuf);
228 (void) strlcat(obuf, ",", sizeof obuf);
229 (void) strlcat(obuf, auth_dkim_human, sizeof obuf);
230 (void) strlcat(obuf, ",", sizeof obuf);
231 (void) strlcat(obuf, auth_spf_domain, sizeof obuf);
232 (void) strlcat(obuf, ",", sizeof obuf);
233 (void) strlcat(obuf, auth_spf_result, sizeof obuf);
234 (void) strlcat(obuf, ",", sizeof obuf);
235 (void) strlcat(obuf, auth_spf_human, sizeof obuf);
236 (void) strlcat(obuf, ",", sizeof obuf);
237 ary = opendmarc_util_pushargv((u_char *)obuf, ary, &ary_cnt);
238 if (ary == NULL)
239 {
240 int xerror = errno;
241
242 (void) strlcpy(e, "Allocate memory :", elen);
243 (void) strlcat(e, strerror(xerror), elen);
244 return ary;
245 }
246
247 (void) memset(count, '\0', sizeof count);
248 (void) memset(source_ip, '\0', sizeof source_ip);
249 (void) memset(disposition, '\0', sizeof disposition);
250 (void) memset(policy_eval_dkim, '\0', sizeof policy_eval_dkim);
251 (void) memset(policy_eval_spf, '\0', sizeof policy_eval_spf);
252 (void) memset(reason_type, '\0', sizeof reason_type);
253 (void) memset(reason_comment, '\0', sizeof reason_comment);
254 (void) memset(header_from, '\0', sizeof header_from);
255 (void) memset(auth_dkim_domain, '\0', sizeof auth_dkim_domain);
256 (void) memset(auth_dkim_result, '\0', sizeof auth_dkim_result);
257 (void) memset(auth_dkim_human, '\0', sizeof auth_dkim_human);
258 (void) memset(auth_spf_domain, '\0', sizeof auth_spf_domain);
259 (void) memset(auth_spf_result, '\0', sizeof auth_spf_result);
260 (void) memset(auth_spf_human, '\0', sizeof auth_spf_human);
261 }
262 /*
263 ** If </foo> matches current <foo>, pop off the stack.
264 ** Possiblle bug here, for bad case of <foo>text</boo>
265 ** My understanding is that XML clauses may not overlap. That is,
266 ** the following is illegal:
267 ** <aaa>text<bbb>text</aaa>text</bbb>
268 */
269 if (strcasecmp(cp+1, stack[sidx]) == 0)
270 {
271 --sidx;
272 cp = sp;
273 if (sidx < -1)
274 break;
275 continue;
276 }
277 else
278 {
279 /* recover gracefully how? */
280 }
281 for (i = sidx; i > 0; --i)
282 {
283 if (strcasecmp(cp+1, stack[sidx]) == 0)
284 break;
285 }
286 if (i < 0)
287 {
288 //(void) fprintf(stderr, "<%s>: %s\n",
289 // cp, "End token with no start token (ignored)");
290 cp = sp;
291 continue;
292 }
293 if (sidx >= 0)
294 --sidx;
295 cp = sp;
296 continue;
297
298 }
299 else
300 {
301 ++sidx;
302 if (sidx >= MAX_STACK_DEPTH)
303 {
304 (void) strlcpy(e, "<", elen);
305 (void) strlcat(e, cp, elen);
306 (void) strlcat(e, ">: Too much stack depth", elen);
307 return (ary = opendmarc_util_clearargv(ary));
308 }
309 (void) strlcpy(stack[sidx], cp, MAX_STACK_LINE_LEN);
310 cp = sp;
311 inside = TRUE;
312 continue;
313 }
314 }
315 else
316 {
317 if (*cp == '<')
318 {
319 inside = FALSE;
320 --cp;
321 continue;
322 }
323 for(sp = cp; *sp != '\0'; ++sp)
324 {
325 if (*sp == '<')
326 break;
327 continue;
328 }
329 if (*sp != '<')
330 {
331 cp = sp-1;
332 continue;
333 }
334 *sp = '\0';
335 if (strcasecmp(stack[sidx], "org_name") == 0)
336 {
337 (void) memset(org_name, '\0', sizeof org_name);
338 (void) strlcpy(org_name, cp, sizeof org_name);
339 }
340 else if (strcasecmp(stack[sidx], "report_id") == 0)
341 {
342 (void) memset(report_id, '\0', sizeof report_id);
343 (void) strlcpy(report_id, cp, sizeof report_id);
344 }
345 else if (strcasecmp(stack[sidx], "email") == 0)
346 {
347 (void) memset(email, '\0', sizeof email);
348 (void) strlcpy(email, cp, sizeof email);
349 }
350 else if (strcasecmp(stack[sidx], "begin") == 0)
351 {
352 time_t t;
353 struct tm *tm;
354
355 t = strtoul(cp, NULL, 10);
356 tm = gmtime(&t);
357 (void) memset(begin, '\0', sizeof begin);
358 (void) strftime(begin, sizeof begin, "%F-%H:%M:%S", tm);
359 }
360 else if (strcasecmp(stack[sidx], "end") == 0)
361 {
362 time_t t;
363 struct tm *tm;
364
365 t = strtoul(cp, NULL, 10);
366 tm = gmtime(&t);
367 (void) memset(end, '\0', sizeof end);
368 (void) strftime(end, sizeof end, "%F-%H:%M:%S", tm);
369 }
370 else if (strcasecmp(stack[sidx], "source_ip") == 0)
371 {
372 (void) strlcpy(source_ip, cp, sizeof source_ip);
373 }
374 else if (sidx > 1 && strcasecmp(stack[sidx-2], "auth_results") == 0 &&
375 strcasecmp(stack[sidx-1], "dkim") == 0 &&
376 strcasecmp(stack[sidx], "domain") == 0)
377 {
378 if (*auth_dkim_domain == '\0')
379 (void) strlcpy(auth_dkim_domain, cp, sizeof auth_dkim_domain);
380 else
381 {
382 (void) strlcat(auth_dkim_domain, "|", sizeof auth_dkim_domain);
383 (void) strlcat(auth_dkim_domain, cp, sizeof auth_dkim_domain);
384 }
385 }
386 else if (sidx > 1 && strcasecmp(stack[sidx-2], "auth_results") == 0 &&
387 strcasecmp(stack[sidx-1], "dkim") == 0 &&
388 strcasecmp(stack[sidx], "result") == 0)
389 {
390 if (*auth_dkim_result == '\0')
391 (void) strlcpy(auth_dkim_result, cp, sizeof auth_dkim_result);
392 else
393 {
394 (void) strlcat(auth_dkim_result, "|", sizeof auth_dkim_result);
395 (void) strlcat(auth_dkim_result, cp, sizeof auth_dkim_result);
396 }
397 }
398 else if (sidx > 1 && strcasecmp(stack[sidx-2], "auth_results") == 0 &&
399 strcasecmp(stack[sidx-1], "dkim") == 0 &&
400 strcasecmp(stack[sidx], "human_result") == 0)
401 {
402 if (*auth_dkim_human == '\0')
403 (void) strlcpy(auth_dkim_human, cp, sizeof auth_dkim_human);
404 else
405 {
406 (void) strlcat(auth_dkim_human, "|", sizeof auth_dkim_human);
407 (void) strlcat(auth_dkim_human, cp, sizeof auth_dkim_human);
408 }
409 }
410 else if (sidx > 1 && strcasecmp(stack[sidx-2], "auth_results") == 0 &&
411 strcasecmp(stack[sidx-1], "spf") == 0 &&
412 strcasecmp(stack[sidx], "domain") == 0)
413 {
414 if (*auth_spf_domain == '\0')
415 (void) strlcpy(auth_spf_domain, cp, sizeof auth_spf_domain);
416 else
417 {
418 (void) strlcat(auth_spf_domain, "|", sizeof auth_spf_domain);
419 (void) strlcat(auth_spf_domain, cp, sizeof auth_spf_domain);
420 }
421 }
422 else if (sidx > 1 && strcasecmp(stack[sidx-2], "auth_results") == 0 &&
423 strcasecmp(stack[sidx-1], "spf") == 0 &&
424 strcasecmp(stack[sidx], "result") == 0)
425 {
426 if (*auth_spf_result == '\0')
427 (void) strlcpy(auth_spf_result, cp, sizeof auth_spf_result);
428 else
429 {
430 (void) strlcat(auth_spf_result, "|", sizeof auth_spf_result);
431 (void) strlcat(auth_spf_result, cp, sizeof auth_spf_result);
432 }
433 }
434 else if (sidx > 1 && strcasecmp(stack[sidx-2], "auth_results") == 0 &&
435 strcasecmp(stack[sidx-1], "spf") == 0 &&
436 strcasecmp(stack[sidx], "human_result") == 0)
437 {
438 if (*auth_spf_human == '\0')
439 (void) strlcpy(auth_spf_human, cp, sizeof auth_spf_human);
440 else
441 {
442 (void) strlcat(auth_spf_human, "|", sizeof auth_spf_human);
443 (void) strlcat(auth_spf_human, cp, sizeof auth_spf_human);
444 }
445 }
446 else if (sidx > 0 && strcasecmp(stack[sidx-1], "policy_published") == 0 &&
447 strcasecmp(stack[sidx], "domain") == 0)
448 {
449 (void) memset(domain, '\0', sizeof domain);
450 (void) strlcpy(domain, cp, sizeof domain);
451 }
452 else if (sidx > 0 && strcasecmp(stack[sidx-1], "policy_published") == 0 &&
453 strcasecmp(stack[sidx], "adkim") == 0)
454 {
455 (void) memset(adkim, '\0', sizeof adkim);
456 (void) strlcpy(adkim, cp, sizeof adkim);
457 }
458 else if (sidx > 0 && strcasecmp(stack[sidx-1], "policy_published") == 0 &&
459 strcasecmp(stack[sidx], "aspf") == 0)
460 {
461 (void) memset(aspf, '\0', sizeof aspf);
462 (void) strlcpy(aspf, cp, sizeof aspf);
463 }
464 else if (sidx > 0 && strcasecmp(stack[sidx-1], "policy_published") == 0 &&
465 strcasecmp(stack[sidx], "pct") == 0)
466 {
467 (void) memset(pct, '\0', sizeof pct);
468 (void) strlcpy(pct, cp, sizeof pct);
469 }
470 else if (sidx > 0 && strcasecmp(stack[sidx-1], "policy_published") == 0 &&
471 strcasecmp(stack[sidx], "p") == 0)
472 {
473 (void) memset(p, '\0', sizeof p);
474 (void) strlcpy(p, cp, sizeof p);
475 }
476 else if (sidx > 0 && strcasecmp(stack[sidx-1], "reason") == 0 &&
477 strcasecmp(stack[sidx], "type") == 0)
478 {
479 if (strlen(reason_type) > 0)
480 (void) strlcat(reason_type, " ", sizeof reason_type);
481 (void) strlcat(reason_type, cp, sizeof reason_type);
482 }
483 else if (sidx > 0 && strcasecmp(stack[sidx-1], "reason") == 0 &&
484 strcasecmp(stack[sidx], "comment") == 0)
485 {
486 if (strlen(reason_comment) > 0)
487 (void) strlcat(reason_comment, " ", sizeof reason_comment);
488 (void) strlcat(reason_comment, cp, sizeof reason_comment);
489 }
490 else if (sidx > 0 && strcasecmp(stack[sidx-1], "identifiers") == 0 &&
491 strcasecmp(stack[sidx], "header_from") == 0)
492 {
493 /*
494 * Some sites put a full address in here.
495 * Some others list mutilple address here.
496 */
497 if (*header_from == '\0')
498 (void) strlcpy(header_from, cp, sizeof header_from);
499 else
500 {
501 (void) strlcat(header_from, "|", sizeof header_from);
502 (void) strlcat(header_from, cp, sizeof header_from);
503 }
504 }
505 else if (strcasecmp(stack[sidx], "count") == 0)
506 {
507 (void) strlcpy(count, cp, sizeof count);
508 }
509 else if (sidx > 0 && strcasecmp(stack[sidx-1], "policy_evaluated") == 0 &&
510 strcasecmp(stack[sidx], "disposition") == 0)
511 {
512 (void) strlcpy(disposition, cp, sizeof disposition);
513 }
514 else if (sidx > 0 && strcasecmp(stack[sidx-1], "policy_evaluated") == 0 &&
515 strcasecmp(stack[sidx], "dkim") == 0)
516 {
517 (void) strlcpy(policy_eval_dkim, cp, sizeof policy_eval_dkim);
518 }
519 else if (sidx > 0 && strcasecmp(stack[sidx-1], "policy_evaluated") == 0 &&
520 strcasecmp(stack[sidx], "spf") == 0)
521 {
522 (void) strlcpy(policy_eval_spf, cp, sizeof policy_eval_spf);
523 }
524 *sp = '<';
525 cp = sp-1;
526 inside = FALSE;
527 continue;
528 }
529 }
530 return ary;
531 }
532
533 u_char **
534 opendmarc_xml_parse(char *fname, char *err_buf, size_t err_len)
535 {
536 struct stat statb;
537 FILE * fp;
538 char * bufp;
539 char e_buf[128];
540 int ret;
541 u_char ** ary = NULL;
542 int xerror;
543 size_t rb;
544
545 if (fname == NULL)
546 {
547 xerror = errno;
548 (void) snprintf(err_buf, err_len, "%s: %s", fname, "File name was NULL");
549 errno = EINVAL;
550 return NULL;
551 }
552 if (err_buf == NULL)
553 {
554 err_buf = e_buf;
555 err_len = sizeof e_buf;
556 }
557
558 ret = lstat(fname, &statb);
559 if (ret != 0)
560 {
561 xerror = errno;
562 (void) snprintf(err_buf, err_len, "%s: %s", fname, strerror(errno));
563 errno = xerror;
564 return NULL;
565 }
566 if (statb.st_size == 0)
567 {
568 xerror = errno;
569 (void) snprintf(err_buf, err_len, "%s: %s", fname, "Empty file.");
570 errno = xerror;
571 return NULL;
572 }
573
574 bufp = calloc(statb.st_size, 1);
575 if (bufp == NULL)
576 {
577 xerror = errno;
578 (void) snprintf(err_buf, err_len, "%s: %s", fname, strerror(errno));
579 errno = xerror;
580 return NULL;
581 }
582
583 fp = fopen(fname, "r");
584 if (fp == NULL)
585 {
586 xerror = errno;
587 (void) snprintf(err_buf, err_len, "%s: %s", fname, strerror(errno));
588 (void) free(bufp);
589 errno = xerror;
590 return NULL;
591 }
592
593 rb = fread(bufp, 1, statb.st_size, fp);
594 if (rb != statb.st_size)
595 {
596 xerror = errno;
597 (void) snprintf(err_buf, err_len, "%s: truncated read", fname);
598 (void) free(bufp);
599 (void) fclose(fp);
600 errno = xerror;
601 return NULL;
602 }
603 else if (ferror(fp))
604 {
605 xerror = errno;
606 (void) snprintf(err_buf, err_len, "%s: %s", fname, strerror(errno));
607 (void) free(bufp);
608 (void) fclose(fp);
609 errno = xerror;
610 return NULL;
611 }
612 (void) fclose(fp);
613 ary = opendmarc_xml(bufp, statb.st_size, err_buf, err_len);
614 xerror = errno;
615 (void) free(bufp);
616 errno = xerror;
617 return ary;
618 }
619
0 SUBDIRS=testfiles
1 LDADD = ../libopendmarc.la $(LIBRESOLV)
2 AM_CPPFLAGS = -I.. -I../..
3
4 check_PROGRAMS = test_tld \
5 test_finddomain \
6 test_dmarc_parse \
7 test_dmarc_fetch \
8 test_xml_parse \
9 test_parse_to_buf \
10 test_alignment
11 if LIVE_TESTS
12 #check_PROGRAMS += test_dns_lookup
13 #test_dns_lookup_SOURCES = test_dns_lookup.c
14 if USE_SPF
15 check_PROGRAMS += test_spf
16 test_spf_SOURCES = test_spf.c
17 endif
18 endif
19
20 test_tld_SOURCES = test_tld.c
21
22 test_finddomain_SOURCES = test_finddomain.c
23
24 test_dmarc_parse_SOURCES = test_dmarc_parse.c
25
26 test_parse_to_buf_SOURCES = test_parse_to_buf.c
27
28 test_dmarc_fetch_SOURCES = test_dmarc_fetch.c
29
30 test_xml_parse_SOURCES = test_xml_parse.c
31
32
33 test_alignment_SOURCES = test_alignment.c
34
35 TESTS = $(check_PROGRAMS)
36
37 EXTRA_DIST = testfiles/effective_tld_names.dat \
38 testfiles/good.com!example.com!1337270400!1337356799.xml \
39 testfiles/bad.com!example.com!1337140800!1337227200.xml
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
17 am__make_running_with_option = \
18 case $${target_option-} in \
19 ?) ;; \
20 *) echo "am__make_running_with_option: internal error: invalid" \
21 "target option '$${target_option-}' specified" >&2; \
22 exit 1;; \
23 esac; \
24 has_opt=no; \
25 sane_makeflags=$$MAKEFLAGS; \
26 if $(am__is_gnu_make); then \
27 sane_makeflags=$$MFLAGS; \
28 else \
29 case $$MAKEFLAGS in \
30 *\\[\ \ ]*) \
31 bs=\\; \
32 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
33 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
34 esac; \
35 fi; \
36 skip_next=no; \
37 strip_trailopt () \
38 { \
39 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
40 }; \
41 for flg in $$sane_makeflags; do \
42 test $$skip_next = yes && { skip_next=no; continue; }; \
43 case $$flg in \
44 *=*|--*) continue;; \
45 -*I) strip_trailopt 'I'; skip_next=yes;; \
46 -*I?*) strip_trailopt 'I';; \
47 -*O) strip_trailopt 'O'; skip_next=yes;; \
48 -*O?*) strip_trailopt 'O';; \
49 -*l) strip_trailopt 'l'; skip_next=yes;; \
50 -*l?*) strip_trailopt 'l';; \
51 -[dEDm]) skip_next=yes;; \
52 -[JT]) skip_next=yes;; \
53 esac; \
54 case $$flg in \
55 *$$target_option*) has_opt=yes; break;; \
56 esac; \
57 done; \
58 test $$has_opt = yes
59 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
60 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 check_PROGRAMS = test_tld$(EXEEXT) test_finddomain$(EXEEXT) \
80 test_dmarc_parse$(EXEEXT) test_dmarc_fetch$(EXEEXT) \
81 test_xml_parse$(EXEEXT) test_parse_to_buf$(EXEEXT) \
82 test_alignment$(EXEEXT) $(am__EXEEXT_1)
83 #check_PROGRAMS += test_dns_lookup
84 #test_dns_lookup_SOURCES = test_dns_lookup.c
85 @LIVE_TESTS_TRUE@@USE_SPF_TRUE@am__append_1 = test_spf
86 subdir = libopendmarc/tests
87 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
88 $(top_srcdir)/build-aux/depcomp \
89 $(top_srcdir)/build-aux/test-driver
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
92 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
93 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
94 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
95 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
96 $(ACLOCAL_M4)
97 mkinstalldirs = $(install_sh) -d
98 CONFIG_HEADER = $(top_builddir)/build-config.h
99 CONFIG_CLEAN_FILES =
100 CONFIG_CLEAN_VPATH_FILES =
101 @LIVE_TESTS_TRUE@@USE_SPF_TRUE@am__EXEEXT_1 = test_spf$(EXEEXT)
102 am_test_alignment_OBJECTS = test_alignment.$(OBJEXT)
103 test_alignment_OBJECTS = $(am_test_alignment_OBJECTS)
104 test_alignment_LDADD = $(LDADD)
105 am__DEPENDENCIES_1 =
106 test_alignment_DEPENDENCIES = ../libopendmarc.la $(am__DEPENDENCIES_1)
107 AM_V_lt = $(am__v_lt_@AM_V@)
108 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
109 am__v_lt_0 = --silent
110 am__v_lt_1 =
111 am_test_dmarc_fetch_OBJECTS = test_dmarc_fetch.$(OBJEXT)
112 test_dmarc_fetch_OBJECTS = $(am_test_dmarc_fetch_OBJECTS)
113 test_dmarc_fetch_LDADD = $(LDADD)
114 test_dmarc_fetch_DEPENDENCIES = ../libopendmarc.la \
115 $(am__DEPENDENCIES_1)
116 am_test_dmarc_parse_OBJECTS = test_dmarc_parse.$(OBJEXT)
117 test_dmarc_parse_OBJECTS = $(am_test_dmarc_parse_OBJECTS)
118 test_dmarc_parse_LDADD = $(LDADD)
119 test_dmarc_parse_DEPENDENCIES = ../libopendmarc.la \
120 $(am__DEPENDENCIES_1)
121 am_test_finddomain_OBJECTS = test_finddomain.$(OBJEXT)
122 test_finddomain_OBJECTS = $(am_test_finddomain_OBJECTS)
123 test_finddomain_LDADD = $(LDADD)
124 test_finddomain_DEPENDENCIES = ../libopendmarc.la \
125 $(am__DEPENDENCIES_1)
126 am_test_parse_to_buf_OBJECTS = test_parse_to_buf.$(OBJEXT)
127 test_parse_to_buf_OBJECTS = $(am_test_parse_to_buf_OBJECTS)
128 test_parse_to_buf_LDADD = $(LDADD)
129 test_parse_to_buf_DEPENDENCIES = ../libopendmarc.la \
130 $(am__DEPENDENCIES_1)
131 am__test_spf_SOURCES_DIST = test_spf.c
132 @LIVE_TESTS_TRUE@@USE_SPF_TRUE@am_test_spf_OBJECTS = \
133 @LIVE_TESTS_TRUE@@USE_SPF_TRUE@ test_spf.$(OBJEXT)
134 test_spf_OBJECTS = $(am_test_spf_OBJECTS)
135 test_spf_LDADD = $(LDADD)
136 test_spf_DEPENDENCIES = ../libopendmarc.la $(am__DEPENDENCIES_1)
137 am_test_tld_OBJECTS = test_tld.$(OBJEXT)
138 test_tld_OBJECTS = $(am_test_tld_OBJECTS)
139 test_tld_LDADD = $(LDADD)
140 test_tld_DEPENDENCIES = ../libopendmarc.la $(am__DEPENDENCIES_1)
141 am_test_xml_parse_OBJECTS = test_xml_parse.$(OBJEXT)
142 test_xml_parse_OBJECTS = $(am_test_xml_parse_OBJECTS)
143 test_xml_parse_LDADD = $(LDADD)
144 test_xml_parse_DEPENDENCIES = ../libopendmarc.la $(am__DEPENDENCIES_1)
145 AM_V_P = $(am__v_P_@AM_V@)
146 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
147 am__v_P_0 = false
148 am__v_P_1 = :
149 AM_V_GEN = $(am__v_GEN_@AM_V@)
150 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
151 am__v_GEN_0 = @echo " GEN " $@;
152 am__v_GEN_1 =
153 AM_V_at = $(am__v_at_@AM_V@)
154 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
155 am__v_at_0 = @
156 am__v_at_1 =
157 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
158 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
159 am__depfiles_maybe = depfiles
160 am__mv = mv -f
161 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
162 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
163 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
164 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
165 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
166 $(AM_CFLAGS) $(CFLAGS)
167 AM_V_CC = $(am__v_CC_@AM_V@)
168 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
169 am__v_CC_0 = @echo " CC " $@;
170 am__v_CC_1 =
171 CCLD = $(CC)
172 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
173 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
174 $(AM_LDFLAGS) $(LDFLAGS) -o $@
175 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
176 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
177 am__v_CCLD_0 = @echo " CCLD " $@;
178 am__v_CCLD_1 =
179 SOURCES = $(test_alignment_SOURCES) $(test_dmarc_fetch_SOURCES) \
180 $(test_dmarc_parse_SOURCES) $(test_finddomain_SOURCES) \
181 $(test_parse_to_buf_SOURCES) $(test_spf_SOURCES) \
182 $(test_tld_SOURCES) $(test_xml_parse_SOURCES)
183 DIST_SOURCES = $(test_alignment_SOURCES) $(test_dmarc_fetch_SOURCES) \
184 $(test_dmarc_parse_SOURCES) $(test_finddomain_SOURCES) \
185 $(test_parse_to_buf_SOURCES) $(am__test_spf_SOURCES_DIST) \
186 $(test_tld_SOURCES) $(test_xml_parse_SOURCES)
187 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
188 ctags-recursive dvi-recursive html-recursive info-recursive \
189 install-data-recursive install-dvi-recursive \
190 install-exec-recursive install-html-recursive \
191 install-info-recursive install-pdf-recursive \
192 install-ps-recursive install-recursive installcheck-recursive \
193 installdirs-recursive pdf-recursive ps-recursive \
194 tags-recursive uninstall-recursive
195 am__can_run_installinfo = \
196 case $$AM_UPDATE_INFO_DIR in \
197 n|no|NO) false;; \
198 *) (install-info --version) >/dev/null 2>&1;; \
199 esac
200 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
201 distclean-recursive maintainer-clean-recursive
202 am__recursive_targets = \
203 $(RECURSIVE_TARGETS) \
204 $(RECURSIVE_CLEAN_TARGETS) \
205 $(am__extra_recursive_targets)
206 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
207 check recheck distdir
208 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
209 # Read a list of newline-separated strings from the standard input,
210 # and print each of them once, without duplicates. Input order is
211 # *not* preserved.
212 am__uniquify_input = $(AWK) '\
213 BEGIN { nonempty = 0; } \
214 { items[$$0] = 1; nonempty = 1; } \
215 END { if (nonempty) { for (i in items) print i; }; } \
216 '
217 # Make sure the list of sources is unique. This is necessary because,
218 # e.g., the same source file might be shared among _SOURCES variables
219 # for different programs/libraries.
220 am__define_uniq_tagged_files = \
221 list='$(am__tagged_files)'; \
222 unique=`for i in $$list; do \
223 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
224 done | $(am__uniquify_input)`
225 ETAGS = etags
226 CTAGS = ctags
227 am__tty_colors_dummy = \
228 mgn= red= grn= lgn= blu= brg= std=; \
229 am__color_tests=no
230 am__tty_colors = { \
231 $(am__tty_colors_dummy); \
232 if test "X$(AM_COLOR_TESTS)" = Xno; then \
233 am__color_tests=no; \
234 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
235 am__color_tests=yes; \
236 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
237 am__color_tests=yes; \
238 fi; \
239 if test $$am__color_tests = yes; then \
240 red=''; \
241 grn=''; \
242 lgn=''; \
243 blu=''; \
244 mgn=''; \
245 brg=''; \
246 std=''; \
247 fi; \
248 }
249 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
250 am__vpath_adj = case $$p in \
251 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
252 *) f=$$p;; \
253 esac;
254 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
255 am__install_max = 40
256 am__nobase_strip_setup = \
257 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
258 am__nobase_strip = \
259 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
260 am__nobase_list = $(am__nobase_strip_setup); \
261 for p in $$list; do echo "$$p $$p"; done | \
262 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
263 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
264 if (++n[$$2] == $(am__install_max)) \
265 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
266 END { for (dir in files) print dir, files[dir] }'
267 am__base_list = \
268 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
269 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
270 am__uninstall_files_from_dir = { \
271 test -z "$$files" \
272 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
273 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
274 $(am__cd) "$$dir" && rm -f $$files; }; \
275 }
276 am__recheck_rx = ^[ ]*:recheck:[ ]*
277 am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
278 am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
279 # A command that, given a newline-separated list of test names on the
280 # standard input, print the name of the tests that are to be re-run
281 # upon "make recheck".
282 am__list_recheck_tests = $(AWK) '{ \
283 recheck = 1; \
284 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
285 { \
286 if (rc < 0) \
287 { \
288 if ((getline line2 < ($$0 ".log")) < 0) \
289 recheck = 0; \
290 break; \
291 } \
292 else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
293 { \
294 recheck = 0; \
295 break; \
296 } \
297 else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
298 { \
299 break; \
300 } \
301 }; \
302 if (recheck) \
303 print $$0; \
304 close ($$0 ".trs"); \
305 close ($$0 ".log"); \
306 }'
307 # A command that, given a newline-separated list of test names on the
308 # standard input, create the global log from their .trs and .log files.
309 am__create_global_log = $(AWK) ' \
310 function fatal(msg) \
311 { \
312 print "fatal: making $@: " msg | "cat >&2"; \
313 exit 1; \
314 } \
315 function rst_section(header) \
316 { \
317 print header; \
318 len = length(header); \
319 for (i = 1; i <= len; i = i + 1) \
320 printf "="; \
321 printf "\n\n"; \
322 } \
323 { \
324 copy_in_global_log = 1; \
325 global_test_result = "RUN"; \
326 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
327 { \
328 if (rc < 0) \
329 fatal("failed to read from " $$0 ".trs"); \
330 if (line ~ /$(am__global_test_result_rx)/) \
331 { \
332 sub("$(am__global_test_result_rx)", "", line); \
333 sub("[ ]*$$", "", line); \
334 global_test_result = line; \
335 } \
336 else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
337 copy_in_global_log = 0; \
338 }; \
339 if (copy_in_global_log) \
340 { \
341 rst_section(global_test_result ": " $$0); \
342 while ((rc = (getline line < ($$0 ".log"))) != 0) \
343 { \
344 if (rc < 0) \
345 fatal("failed to read from " $$0 ".log"); \
346 print line; \
347 }; \
348 printf "\n"; \
349 }; \
350 close ($$0 ".trs"); \
351 close ($$0 ".log"); \
352 }'
353 # Restructured Text title.
354 am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
355 # Solaris 10 'make', and several other traditional 'make' implementations,
356 # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
357 # by disabling -e (using the XSI extension "set +e") if it's set.
358 am__sh_e_setup = case $$- in *e*) set +e;; esac
359 # Default flags passed to test drivers.
360 am__common_driver_flags = \
361 --color-tests "$$am__color_tests" \
362 --enable-hard-errors "$$am__enable_hard_errors" \
363 --expect-failure "$$am__expect_failure"
364 # To be inserted before the command running the test. Creates the
365 # directory for the log if needed. Stores in $dir the directory
366 # containing $f, in $tst the test, in $log the log. Executes the
367 # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
368 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that
369 # will run the test scripts (or their associated LOG_COMPILER, if
370 # thy have one).
371 am__check_pre = \
372 $(am__sh_e_setup); \
373 $(am__vpath_adj_setup) $(am__vpath_adj) \
374 $(am__tty_colors); \
375 srcdir=$(srcdir); export srcdir; \
376 case "$@" in \
377 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
378 *) am__odir=.;; \
379 esac; \
380 test "x$$am__odir" = x"." || test -d "$$am__odir" \
381 || $(MKDIR_P) "$$am__odir" || exit $$?; \
382 if test -f "./$$f"; then dir=./; \
383 elif test -f "$$f"; then dir=; \
384 else dir="$(srcdir)/"; fi; \
385 tst=$$dir$$f; log='$@'; \
386 if test -n '$(DISABLE_HARD_ERRORS)'; then \
387 am__enable_hard_errors=no; \
388 else \
389 am__enable_hard_errors=yes; \
390 fi; \
391 case " $(XFAIL_TESTS) " in \
392 *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
393 am__expect_failure=yes;; \
394 *) \
395 am__expect_failure=no;; \
396 esac; \
397 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
398 # A shell command to get the names of the tests scripts with any registered
399 # extension removed (i.e., equivalently, the names of the test logs, with
400 # the '.log' extension removed). The result is saved in the shell variable
401 # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
402 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
403 # since that might cause problem with VPATH rewrites for suffix-less tests.
404 # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
405 am__set_TESTS_bases = \
406 bases='$(TEST_LOGS)'; \
407 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
408 bases=`echo $$bases`
409 RECHECK_LOGS = $(TEST_LOGS)
410 TEST_SUITE_LOG = test-suite.log
411 TEST_EXTENSIONS = @EXEEXT@ .test
412 LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
413 LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
414 am__set_b = \
415 case '$@' in \
416 */*) \
417 case '$*' in \
418 */*) b='$*';; \
419 *) b=`echo '$@' | sed 's/\.log$$//'`; \
420 esac;; \
421 *) \
422 b='$*';; \
423 esac
424 am__test_logs1 = $(TESTS:=.log)
425 am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
426 TEST_LOGS = $(am__test_logs2:.test.log=.log)
427 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
428 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
429 $(TEST_LOG_FLAGS)
430 DIST_SUBDIRS = $(SUBDIRS)
431 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
432 am__relativize = \
433 dir0=`pwd`; \
434 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
435 sed_rest='s,^[^/]*/*,,'; \
436 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
437 sed_butlast='s,/*[^/]*$$,,'; \
438 while test -n "$$dir1"; do \
439 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
440 if test "$$first" != "."; then \
441 if test "$$first" = ".."; then \
442 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
443 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
444 else \
445 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
446 if test "$$first2" = "$$first"; then \
447 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
448 else \
449 dir2="../$$dir2"; \
450 fi; \
451 dir0="$$dir0"/"$$first"; \
452 fi; \
453 fi; \
454 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
455 done; \
456 reldir="$$dir2"
457 ACLOCAL = @ACLOCAL@
458 AMTAR = @AMTAR@
459 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
460 AR = @AR@
461 AUTOCONF = @AUTOCONF@
462 AUTOHEADER = @AUTOHEADER@
463 AUTOMAKE = @AUTOMAKE@
464 AWK = @AWK@
465 CC = @CC@
466 CCDEPMODE = @CCDEPMODE@
467 CFLAGS = @CFLAGS@
468 CPP = @CPP@
469 CPPFLAGS = @CPPFLAGS@
470 CYGPATH_W = @CYGPATH_W@
471 DEFS = @DEFS@
472 DEPDIR = @DEPDIR@
473 DLLTOOL = @DLLTOOL@
474 DSYMUTIL = @DSYMUTIL@
475 DUMPBIN = @DUMPBIN@
476 ECHO_C = @ECHO_C@
477 ECHO_N = @ECHO_N@
478 ECHO_T = @ECHO_T@
479 EGREP = @EGREP@
480 EXEEXT = @EXEEXT@
481 FGREP = @FGREP@
482 GREP = @GREP@
483 HEX_VERSION = @HEX_VERSION@
484 INSTALL = @INSTALL@
485 INSTALL_DATA = @INSTALL_DATA@
486 INSTALL_PROGRAM = @INSTALL_PROGRAM@
487 INSTALL_SCRIPT = @INSTALL_SCRIPT@
488 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
489 LD = @LD@
490 LDFLAGS = @LDFLAGS@
491 LIBDMARC_DIR = @LIBDMARC_DIR@
492 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
493 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
494 LIBMILTER_LIBS = @LIBMILTER_LIBS@
495 LIBOBJS = @LIBOBJS@
496 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
497 LIBRESOLV = @LIBRESOLV@
498 LIBS = @LIBS@
499 LIBTOOL = @LIBTOOL@
500 LIPO = @LIPO@
501 LN_S = @LN_S@
502 LTLIBOBJS = @LTLIBOBJS@
503 MAKEINFO = @MAKEINFO@
504 MANIFEST_TOOL = @MANIFEST_TOOL@
505 MKDIR_P = @MKDIR_P@
506 NM = @NM@
507 NMEDIT = @NMEDIT@
508 OBJDUMP = @OBJDUMP@
509 OBJEXT = @OBJEXT@
510 OTOOL = @OTOOL@
511 OTOOL64 = @OTOOL64@
512 PACKAGE = @PACKAGE@
513 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
514 PACKAGE_NAME = @PACKAGE_NAME@
515 PACKAGE_STRING = @PACKAGE_STRING@
516 PACKAGE_TARNAME = @PACKAGE_TARNAME@
517 PACKAGE_URL = @PACKAGE_URL@
518 PACKAGE_VERSION = @PACKAGE_VERSION@
519 PATH_SEPARATOR = @PATH_SEPARATOR@
520 PKG_CONFIG = @PKG_CONFIG@
521 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
522 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
523 PTHREAD_CC = @PTHREAD_CC@
524 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
525 PTHREAD_LIBS = @PTHREAD_LIBS@
526 RANLIB = @RANLIB@
527 SED = @SED@
528 SET_MAKE = @SET_MAKE@
529 SHELL = @SHELL@
530 SQL_BACKEND = @SQL_BACKEND@
531 STRIP = @STRIP@
532 SYSCONFDIR = @SYSCONFDIR@
533 VERSION = @VERSION@
534 abs_builddir = @abs_builddir@
535 abs_srcdir = @abs_srcdir@
536 abs_top_builddir = @abs_top_builddir@
537 abs_top_srcdir = @abs_top_srcdir@
538 ac_aux_dir = @ac_aux_dir@
539 ac_ct_AR = @ac_ct_AR@
540 ac_ct_CC = @ac_ct_CC@
541 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
542 am__include = @am__include@
543 am__leading_dot = @am__leading_dot@
544 am__quote = @am__quote@
545 am__tar = @am__tar@
546 am__untar = @am__untar@
547 ax_pthread_config = @ax_pthread_config@
548 bindir = @bindir@
549 build = @build@
550 build_alias = @build_alias@
551 build_cpu = @build_cpu@
552 build_os = @build_os@
553 build_vendor = @build_vendor@
554 builddir = @builddir@
555 datadir = @datadir@
556 datarootdir = @datarootdir@
557 docdir = @docdir@
558 dvidir = @dvidir@
559 exec_prefix = @exec_prefix@
560 host = @host@
561 host_alias = @host_alias@
562 host_cpu = @host_cpu@
563 host_os = @host_os@
564 host_vendor = @host_vendor@
565 htmldir = @htmldir@
566 includedir = @includedir@
567 infodir = @infodir@
568 install_sh = @install_sh@
569 libdir = @libdir@
570 libexecdir = @libexecdir@
571 localedir = @localedir@
572 localstatedir = @localstatedir@
573 mandir = @mandir@
574 miltertest = @miltertest@
575 mkdir_p = @mkdir_p@
576 oldincludedir = @oldincludedir@
577 pdfdir = @pdfdir@
578 prefix = @prefix@
579 program_transform_name = @program_transform_name@
580 psdir = @psdir@
581 sbindir = @sbindir@
582 sharedstatedir = @sharedstatedir@
583 srcdir = @srcdir@
584 sysconfdir = @sysconfdir@
585 target_alias = @target_alias@
586 top_build_prefix = @top_build_prefix@
587 top_builddir = @top_builddir@
588 top_srcdir = @top_srcdir@
589 SUBDIRS = testfiles
590 LDADD = ../libopendmarc.la $(LIBRESOLV)
591 AM_CPPFLAGS = -I.. -I../..
592 @LIVE_TESTS_TRUE@@USE_SPF_TRUE@test_spf_SOURCES = test_spf.c
593 test_tld_SOURCES = test_tld.c
594 test_finddomain_SOURCES = test_finddomain.c
595 test_dmarc_parse_SOURCES = test_dmarc_parse.c
596 test_parse_to_buf_SOURCES = test_parse_to_buf.c
597 test_dmarc_fetch_SOURCES = test_dmarc_fetch.c
598 test_xml_parse_SOURCES = test_xml_parse.c
599 test_alignment_SOURCES = test_alignment.c
600 TESTS = $(check_PROGRAMS)
601 EXTRA_DIST = testfiles/effective_tld_names.dat \
602 testfiles/good.com!example.com!1337270400!1337356799.xml \
603 testfiles/bad.com!example.com!1337140800!1337227200.xml
604
605 all: all-recursive
606
607 .SUFFIXES:
608 .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
609 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
610 @for dep in $?; do \
611 case '$(am__configure_deps)' in \
612 *$$dep*) \
613 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
614 && { if test -f $@; then exit 0; else break; fi; }; \
615 exit 1;; \
616 esac; \
617 done; \
618 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/tests/Makefile'; \
619 $(am__cd) $(top_srcdir) && \
620 $(AUTOMAKE) --foreign libopendmarc/tests/Makefile
621 .PRECIOUS: Makefile
622 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
623 @case '$?' in \
624 *config.status*) \
625 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
626 *) \
627 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
628 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
629 esac;
630
631 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
632 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
633
634 $(top_srcdir)/configure: $(am__configure_deps)
635 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
636 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
637 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
638 $(am__aclocal_m4_deps):
639
640 clean-checkPROGRAMS:
641 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
642 echo " rm -f" $$list; \
643 rm -f $$list || exit $$?; \
644 test -n "$(EXEEXT)" || exit 0; \
645 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
646 echo " rm -f" $$list; \
647 rm -f $$list
648
649 test_alignment$(EXEEXT): $(test_alignment_OBJECTS) $(test_alignment_DEPENDENCIES) $(EXTRA_test_alignment_DEPENDENCIES)
650 @rm -f test_alignment$(EXEEXT)
651 $(AM_V_CCLD)$(LINK) $(test_alignment_OBJECTS) $(test_alignment_LDADD) $(LIBS)
652
653 test_dmarc_fetch$(EXEEXT): $(test_dmarc_fetch_OBJECTS) $(test_dmarc_fetch_DEPENDENCIES) $(EXTRA_test_dmarc_fetch_DEPENDENCIES)
654 @rm -f test_dmarc_fetch$(EXEEXT)
655 $(AM_V_CCLD)$(LINK) $(test_dmarc_fetch_OBJECTS) $(test_dmarc_fetch_LDADD) $(LIBS)
656
657 test_dmarc_parse$(EXEEXT): $(test_dmarc_parse_OBJECTS) $(test_dmarc_parse_DEPENDENCIES) $(EXTRA_test_dmarc_parse_DEPENDENCIES)
658 @rm -f test_dmarc_parse$(EXEEXT)
659 $(AM_V_CCLD)$(LINK) $(test_dmarc_parse_OBJECTS) $(test_dmarc_parse_LDADD) $(LIBS)
660
661 test_finddomain$(EXEEXT): $(test_finddomain_OBJECTS) $(test_finddomain_DEPENDENCIES) $(EXTRA_test_finddomain_DEPENDENCIES)
662 @rm -f test_finddomain$(EXEEXT)
663 $(AM_V_CCLD)$(LINK) $(test_finddomain_OBJECTS) $(test_finddomain_LDADD) $(LIBS)
664
665 test_parse_to_buf$(EXEEXT): $(test_parse_to_buf_OBJECTS) $(test_parse_to_buf_DEPENDENCIES) $(EXTRA_test_parse_to_buf_DEPENDENCIES)
666 @rm -f test_parse_to_buf$(EXEEXT)
667 $(AM_V_CCLD)$(LINK) $(test_parse_to_buf_OBJECTS) $(test_parse_to_buf_LDADD) $(LIBS)
668
669 test_spf$(EXEEXT): $(test_spf_OBJECTS) $(test_spf_DEPENDENCIES) $(EXTRA_test_spf_DEPENDENCIES)
670 @rm -f test_spf$(EXEEXT)
671 $(AM_V_CCLD)$(LINK) $(test_spf_OBJECTS) $(test_spf_LDADD) $(LIBS)
672
673 test_tld$(EXEEXT): $(test_tld_OBJECTS) $(test_tld_DEPENDENCIES) $(EXTRA_test_tld_DEPENDENCIES)
674 @rm -f test_tld$(EXEEXT)
675 $(AM_V_CCLD)$(LINK) $(test_tld_OBJECTS) $(test_tld_LDADD) $(LIBS)
676
677 test_xml_parse$(EXEEXT): $(test_xml_parse_OBJECTS) $(test_xml_parse_DEPENDENCIES) $(EXTRA_test_xml_parse_DEPENDENCIES)
678 @rm -f test_xml_parse$(EXEEXT)
679 $(AM_V_CCLD)$(LINK) $(test_xml_parse_OBJECTS) $(test_xml_parse_LDADD) $(LIBS)
680
681 mostlyclean-compile:
682 -rm -f *.$(OBJEXT)
683
684 distclean-compile:
685 -rm -f *.tab.c
686
687 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_alignment.Po@am__quote@
688 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dmarc_fetch.Po@am__quote@
689 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dmarc_parse.Po@am__quote@
690 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_finddomain.Po@am__quote@
691 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_parse_to_buf.Po@am__quote@
692 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spf.Po@am__quote@
693 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tld.Po@am__quote@
694 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_xml_parse.Po@am__quote@
695
696 .c.o:
697 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
698 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
699 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
700 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
701 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
702
703 .c.obj:
704 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
705 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
706 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
707 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
708 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
709
710 .c.lo:
711 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
712 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
713 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
714 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
715 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
716
717 mostlyclean-libtool:
718 -rm -f *.lo
719
720 clean-libtool:
721 -rm -rf .libs _libs
722
723 # This directory's subdirectories are mostly independent; you can cd
724 # into them and run 'make' without going through this Makefile.
725 # To change the values of 'make' variables: instead of editing Makefiles,
726 # (1) if the variable is set in 'config.status', edit 'config.status'
727 # (which will cause the Makefiles to be regenerated when you run 'make');
728 # (2) otherwise, pass the desired values on the 'make' command line.
729 $(am__recursive_targets):
730 @fail=; \
731 if $(am__make_keepgoing); then \
732 failcom='fail=yes'; \
733 else \
734 failcom='exit 1'; \
735 fi; \
736 dot_seen=no; \
737 target=`echo $@ | sed s/-recursive//`; \
738 case "$@" in \
739 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
740 *) list='$(SUBDIRS)' ;; \
741 esac; \
742 for subdir in $$list; do \
743 echo "Making $$target in $$subdir"; \
744 if test "$$subdir" = "."; then \
745 dot_seen=yes; \
746 local_target="$$target-am"; \
747 else \
748 local_target="$$target"; \
749 fi; \
750 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
751 || eval $$failcom; \
752 done; \
753 if test "$$dot_seen" = "no"; then \
754 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
755 fi; test -z "$$fail"
756
757 ID: $(am__tagged_files)
758 $(am__define_uniq_tagged_files); mkid -fID $$unique
759 tags: tags-recursive
760 TAGS: tags
761
762 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
763 set x; \
764 here=`pwd`; \
765 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
766 include_option=--etags-include; \
767 empty_fix=.; \
768 else \
769 include_option=--include; \
770 empty_fix=; \
771 fi; \
772 list='$(SUBDIRS)'; for subdir in $$list; do \
773 if test "$$subdir" = .; then :; else \
774 test ! -f $$subdir/TAGS || \
775 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
776 fi; \
777 done; \
778 $(am__define_uniq_tagged_files); \
779 shift; \
780 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
781 test -n "$$unique" || unique=$$empty_fix; \
782 if test $$# -gt 0; then \
783 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
784 "$$@" $$unique; \
785 else \
786 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
787 $$unique; \
788 fi; \
789 fi
790 ctags: ctags-recursive
791
792 CTAGS: ctags
793 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
794 $(am__define_uniq_tagged_files); \
795 test -z "$(CTAGS_ARGS)$$unique" \
796 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
797 $$unique
798
799 GTAGS:
800 here=`$(am__cd) $(top_builddir) && pwd` \
801 && $(am__cd) $(top_srcdir) \
802 && gtags -i $(GTAGS_ARGS) "$$here"
803 cscopelist: cscopelist-recursive
804
805 cscopelist-am: $(am__tagged_files)
806 list='$(am__tagged_files)'; \
807 case "$(srcdir)" in \
808 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
809 *) sdir=$(subdir)/$(srcdir) ;; \
810 esac; \
811 for i in $$list; do \
812 if test -f "$$i"; then \
813 echo "$(subdir)/$$i"; \
814 else \
815 echo "$$sdir/$$i"; \
816 fi; \
817 done >> $(top_builddir)/cscope.files
818
819 distclean-tags:
820 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
821
822 # Recover from deleted '.trs' file; this should ensure that
823 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
824 # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
825 # to avoid problems with "make -n".
826 .log.trs:
827 rm -f $< $@
828 $(MAKE) $(AM_MAKEFLAGS) $<
829
830 # Leading 'am--fnord' is there to ensure the list of targets does not
831 # expand to empty, as could happen e.g. with make check TESTS=''.
832 am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
833 am--force-recheck:
834 @:
835
836 $(TEST_SUITE_LOG): $(TEST_LOGS)
837 @$(am__set_TESTS_bases); \
838 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
839 redo_bases=`for i in $$bases; do \
840 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
841 done`; \
842 if test -n "$$redo_bases"; then \
843 redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
844 redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
845 if $(am__make_dryrun); then :; else \
846 rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
847 fi; \
848 fi; \
849 if test -n "$$am__remaking_logs"; then \
850 echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
851 "recursion detected" >&2; \
852 else \
853 am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
854 fi; \
855 if $(am__make_dryrun); then :; else \
856 st=0; \
857 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
858 for i in $$redo_bases; do \
859 test -f $$i.trs && test -r $$i.trs \
860 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
861 test -f $$i.log && test -r $$i.log \
862 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
863 done; \
864 test $$st -eq 0 || exit 1; \
865 fi
866 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
867 ws='[ ]'; \
868 results=`for b in $$bases; do echo $$b.trs; done`; \
869 test -n "$$results" || results=/dev/null; \
870 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
871 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
872 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
873 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
874 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
875 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
876 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
877 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
878 success=true; \
879 else \
880 success=false; \
881 fi; \
882 br='==================='; br=$$br$$br$$br$$br; \
883 result_count () \
884 { \
885 if test x"$$1" = x"--maybe-color"; then \
886 maybe_colorize=yes; \
887 elif test x"$$1" = x"--no-color"; then \
888 maybe_colorize=no; \
889 else \
890 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
891 fi; \
892 shift; \
893 desc=$$1 count=$$2; \
894 if test $$maybe_colorize = yes && test $$count -gt 0; then \
895 color_start=$$3 color_end=$$std; \
896 else \
897 color_start= color_end=; \
898 fi; \
899 echo "$${color_start}# $$desc $$count$${color_end}"; \
900 }; \
901 create_testsuite_report () \
902 { \
903 result_count $$1 "TOTAL:" $$all "$$brg"; \
904 result_count $$1 "PASS: " $$pass "$$grn"; \
905 result_count $$1 "SKIP: " $$skip "$$blu"; \
906 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
907 result_count $$1 "FAIL: " $$fail "$$red"; \
908 result_count $$1 "XPASS:" $$xpass "$$red"; \
909 result_count $$1 "ERROR:" $$error "$$mgn"; \
910 }; \
911 { \
912 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
913 $(am__rst_title); \
914 create_testsuite_report --no-color; \
915 echo; \
916 echo ".. contents:: :depth: 2"; \
917 echo; \
918 for b in $$bases; do echo $$b; done \
919 | $(am__create_global_log); \
920 } >$(TEST_SUITE_LOG).tmp || exit 1; \
921 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
922 if $$success; then \
923 col="$$grn"; \
924 else \
925 col="$$red"; \
926 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
927 fi; \
928 echo "$${col}$$br$${std}"; \
929 echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
930 echo "$${col}$$br$${std}"; \
931 create_testsuite_report --maybe-color; \
932 echo "$$col$$br$$std"; \
933 if $$success; then :; else \
934 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
935 if test -n "$(PACKAGE_BUGREPORT)"; then \
936 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
937 fi; \
938 echo "$$col$$br$$std"; \
939 fi; \
940 $$success || exit 1
941
942 check-TESTS:
943 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
944 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
945 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
946 @set +e; $(am__set_TESTS_bases); \
947 log_list=`for i in $$bases; do echo $$i.log; done`; \
948 trs_list=`for i in $$bases; do echo $$i.trs; done`; \
949 log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
950 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
951 exit $$?;
952 recheck: all $(check_PROGRAMS)
953 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
954 @set +e; $(am__set_TESTS_bases); \
955 bases=`for i in $$bases; do echo $$i; done \
956 | $(am__list_recheck_tests)` || exit 1; \
957 log_list=`for i in $$bases; do echo $$i.log; done`; \
958 log_list=`echo $$log_list`; \
959 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
960 am__force_recheck=am--force-recheck \
961 TEST_LOGS="$$log_list"; \
962 exit $$?
963 test_tld.log: test_tld$(EXEEXT)
964 @p='test_tld$(EXEEXT)'; \
965 b='test_tld'; \
966 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
967 --log-file $$b.log --trs-file $$b.trs \
968 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
969 "$$tst" $(AM_TESTS_FD_REDIRECT)
970 test_finddomain.log: test_finddomain$(EXEEXT)
971 @p='test_finddomain$(EXEEXT)'; \
972 b='test_finddomain'; \
973 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
974 --log-file $$b.log --trs-file $$b.trs \
975 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
976 "$$tst" $(AM_TESTS_FD_REDIRECT)
977 test_dmarc_parse.log: test_dmarc_parse$(EXEEXT)
978 @p='test_dmarc_parse$(EXEEXT)'; \
979 b='test_dmarc_parse'; \
980 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
981 --log-file $$b.log --trs-file $$b.trs \
982 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
983 "$$tst" $(AM_TESTS_FD_REDIRECT)
984 test_dmarc_fetch.log: test_dmarc_fetch$(EXEEXT)
985 @p='test_dmarc_fetch$(EXEEXT)'; \
986 b='test_dmarc_fetch'; \
987 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
988 --log-file $$b.log --trs-file $$b.trs \
989 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
990 "$$tst" $(AM_TESTS_FD_REDIRECT)
991 test_xml_parse.log: test_xml_parse$(EXEEXT)
992 @p='test_xml_parse$(EXEEXT)'; \
993 b='test_xml_parse'; \
994 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
995 --log-file $$b.log --trs-file $$b.trs \
996 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
997 "$$tst" $(AM_TESTS_FD_REDIRECT)
998 test_parse_to_buf.log: test_parse_to_buf$(EXEEXT)
999 @p='test_parse_to_buf$(EXEEXT)'; \
1000 b='test_parse_to_buf'; \
1001 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1002 --log-file $$b.log --trs-file $$b.trs \
1003 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1004 "$$tst" $(AM_TESTS_FD_REDIRECT)
1005 test_alignment.log: test_alignment$(EXEEXT)
1006 @p='test_alignment$(EXEEXT)'; \
1007 b='test_alignment'; \
1008 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1009 --log-file $$b.log --trs-file $$b.trs \
1010 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1011 "$$tst" $(AM_TESTS_FD_REDIRECT)
1012 test_spf.log: test_spf$(EXEEXT)
1013 @p='test_spf$(EXEEXT)'; \
1014 b='test_spf'; \
1015 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1016 --log-file $$b.log --trs-file $$b.trs \
1017 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1018 "$$tst" $(AM_TESTS_FD_REDIRECT)
1019 .test.log:
1020 @p='$<'; \
1021 $(am__set_b); \
1022 $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
1023 --log-file $$b.log --trs-file $$b.trs \
1024 $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
1025 "$$tst" $(AM_TESTS_FD_REDIRECT)
1026 @am__EXEEXT_TRUE@.test$(EXEEXT).log:
1027 @am__EXEEXT_TRUE@ @p='$<'; \
1028 @am__EXEEXT_TRUE@ $(am__set_b); \
1029 @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
1030 @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
1031 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
1032 @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
1033
1034 distdir: $(DISTFILES)
1035 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1036 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1037 list='$(DISTFILES)'; \
1038 dist_files=`for file in $$list; do echo $$file; done | \
1039 sed -e "s|^$$srcdirstrip/||;t" \
1040 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
1041 case $$dist_files in \
1042 */*) $(MKDIR_P) `echo "$$dist_files" | \
1043 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
1044 sort -u` ;; \
1045 esac; \
1046 for file in $$dist_files; do \
1047 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
1048 if test -d $$d/$$file; then \
1049 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
1050 if test -d "$(distdir)/$$file"; then \
1051 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1052 fi; \
1053 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
1054 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
1055 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1056 fi; \
1057 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
1058 else \
1059 test -f "$(distdir)/$$file" \
1060 || cp -p $$d/$$file "$(distdir)/$$file" \
1061 || exit 1; \
1062 fi; \
1063 done
1064 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
1065 if test "$$subdir" = .; then :; else \
1066 $(am__make_dryrun) \
1067 || test -d "$(distdir)/$$subdir" \
1068 || $(MKDIR_P) "$(distdir)/$$subdir" \
1069 || exit 1; \
1070 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
1071 $(am__relativize); \
1072 new_distdir=$$reldir; \
1073 dir1=$$subdir; dir2="$(top_distdir)"; \
1074 $(am__relativize); \
1075 new_top_distdir=$$reldir; \
1076 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
1077 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
1078 ($(am__cd) $$subdir && \
1079 $(MAKE) $(AM_MAKEFLAGS) \
1080 top_distdir="$$new_top_distdir" \
1081 distdir="$$new_distdir" \
1082 am__remove_distdir=: \
1083 am__skip_length_check=: \
1084 am__skip_mode_fix=: \
1085 distdir) \
1086 || exit 1; \
1087 fi; \
1088 done
1089 check-am: all-am
1090 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
1091 $(MAKE) $(AM_MAKEFLAGS) check-TESTS
1092 check: check-recursive
1093 all-am: Makefile
1094 installdirs: installdirs-recursive
1095 installdirs-am:
1096 install: install-recursive
1097 install-exec: install-exec-recursive
1098 install-data: install-data-recursive
1099 uninstall: uninstall-recursive
1100
1101 install-am: all-am
1102 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1103
1104 installcheck: installcheck-recursive
1105 install-strip:
1106 if test -z '$(STRIP)'; then \
1107 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1108 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1109 install; \
1110 else \
1111 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1112 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1113 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
1114 fi
1115 mostlyclean-generic:
1116 -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
1117 -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
1118 -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
1119
1120 clean-generic:
1121
1122 distclean-generic:
1123 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1124 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1125
1126 maintainer-clean-generic:
1127 @echo "This command is intended for maintainers to use"
1128 @echo "it deletes files that may require special tools to rebuild."
1129 clean: clean-recursive
1130
1131 clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
1132 mostlyclean-am
1133
1134 distclean: distclean-recursive
1135 -rm -rf ./$(DEPDIR)
1136 -rm -f Makefile
1137 distclean-am: clean-am distclean-compile distclean-generic \
1138 distclean-tags
1139
1140 dvi: dvi-recursive
1141
1142 dvi-am:
1143
1144 html: html-recursive
1145
1146 html-am:
1147
1148 info: info-recursive
1149
1150 info-am:
1151
1152 install-data-am:
1153
1154 install-dvi: install-dvi-recursive
1155
1156 install-dvi-am:
1157
1158 install-exec-am:
1159
1160 install-html: install-html-recursive
1161
1162 install-html-am:
1163
1164 install-info: install-info-recursive
1165
1166 install-info-am:
1167
1168 install-man:
1169
1170 install-pdf: install-pdf-recursive
1171
1172 install-pdf-am:
1173
1174 install-ps: install-ps-recursive
1175
1176 install-ps-am:
1177
1178 installcheck-am:
1179
1180 maintainer-clean: maintainer-clean-recursive
1181 -rm -rf ./$(DEPDIR)
1182 -rm -f Makefile
1183 maintainer-clean-am: distclean-am maintainer-clean-generic
1184
1185 mostlyclean: mostlyclean-recursive
1186
1187 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1188 mostlyclean-libtool
1189
1190 pdf: pdf-recursive
1191
1192 pdf-am:
1193
1194 ps: ps-recursive
1195
1196 ps-am:
1197
1198 uninstall-am:
1199
1200 .MAKE: $(am__recursive_targets) check-am install-am install-strip
1201
1202 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
1203 check-TESTS check-am clean clean-checkPROGRAMS clean-generic \
1204 clean-libtool cscopelist-am ctags ctags-am distclean \
1205 distclean-compile distclean-generic distclean-libtool \
1206 distclean-tags distdir dvi dvi-am html html-am info info-am \
1207 install install-am install-data install-data-am install-dvi \
1208 install-dvi-am install-exec install-exec-am install-html \
1209 install-html-am install-info install-info-am install-man \
1210 install-pdf install-pdf-am install-ps install-ps-am \
1211 install-strip installcheck installcheck-am installdirs \
1212 installdirs-am maintainer-clean maintainer-clean-generic \
1213 mostlyclean mostlyclean-compile mostlyclean-generic \
1214 mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \
1215 uninstall uninstall-am
1216
1217
1218 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1219 # Otherwise a system limit (for SysV at least) may be exceeded.
1220 .NOEXPORT:
0 #include "../opendmarc_internal.h"
1 #include "../dmarc.h"
2
3 #define TESTFILE "testfiles/effective_tld_names.dat"
4 typedef struct {
5 char * subdomain;
6 char * tld;
7 int mode;
8 int outcome;
9 } TEST_ALIGNMENT_T;
10
11 int
12 main(int argc, char **argv)
13 {
14 TEST_ALIGNMENT_T *alignp;
15 TEST_ALIGNMENT_T alignm_test[] = {
16 /* 1 */ {"a.b.c.bcx.com", "bcx.com", DMARC_RECORD_A_RELAXED, 0},
17 /* 2 */ {"a.b.c.edu.ar", "edr.au", DMARC_RECORD_A_STRICT, -1},
18 /* 3 */ {"oooo.com", "ooo.com", DMARC_RECORD_A_STRICT, -1},
19 /* 4 */ {"a.foo.com", "b.foo.com", DMARC_RECORD_A_RELAXED, 0},
20 /* 5 */ {".mac.com.", "mac.com", DMARC_RECORD_A_STRICT, 0},
21 /* 6 */ {"....mac.com....", "mac.com", DMARC_RECORD_A_STRICT, 0},
22 /* 7 */ {"mac...com", "..com", DMARC_RECORD_A_STRICT, -1},
23 /* 8 */ {"a.b.com", "b.com", DMARC_RECORD_A_RELAXED, 0},
24 /* 9 */ {"b.com", "a.b.com", DMARC_RECORD_A_RELAXED, 0},
25 /* 10 */ {"a.b.de", "a.b.de", DMARC_RECORD_A_STRICT, 0},
26 {NULL, NULL, 0},
27 };
28 int outcome;
29 int pass, fails, count;
30 char * srcdir;
31
32 srcdir = getenv("srcdir");
33 if (srcdir != NULL)
34 {
35 if (chdir(srcdir) != 0)
36 {
37 perror(srcdir);
38 return 1;
39 }
40 }
41
42 pass = fails = count = 0;
43 /*
44 * First without a tld file.
45 */
46 for (alignp = alignm_test; alignp != NULL && alignp->subdomain != NULL; ++alignp)
47 {
48 count += 1;
49 outcome = opendmarc_policy_check_alignment(alignp->subdomain, alignp->tld, alignp->mode);
50 if (outcome == alignp->outcome)
51 {
52 //printf("\tALIGNMENT No TLD file: find test: %d: PASS\n", count);
53 pass += 1;
54 }
55 else
56 {
57 printf("\tALIGNMENT No TLD file: domain=%s versus tld=%s relaxed test No. %d: FAIL\n", alignp->subdomain, alignp->tld, count);
58 fails += 1;
59 }
60 }
61 /*
62 * Second with a tld file.
63 */
64 if (opendmarc_tld_read_file(TESTFILE, "//", "*.", "!") != 0)
65 {
66 printf("\tTLD find test: %s: could not read. Skipping\n", TESTFILE);
67 return 0;
68 }
69 count = 0;
70 for (alignp = alignm_test; alignp != NULL && alignp->subdomain != NULL; ++alignp)
71 {
72 count += 1;
73 outcome = opendmarc_policy_check_alignment(alignp->subdomain, alignp->tld, alignp->mode);
74 if (outcome == alignp->outcome)
75 {
76 //printf("\tALIGNMENT With TLD file: find test: %d: PASS\n", count);
77 pass += 1;
78 }
79 else
80 {
81 printf("\tALIGNMENT No With file: find test: %d: FAIL\n", count);
82 fails += 1;
83 }
84 }
85 printf("ALIGNMENT find test: pass=%d, fail=%d\n", pass, fails);
86 return fails;
87 }
0 #include "../opendmarc_internal.h"
1 #include "../dmarc.h"
2
3 #define TESTFILE "testfiles/effective_tld_names.dat"
4
5 int
6 main(int argc, char **argv)
7 {
8 static char *record= "v=DMARC1; p=none; sp=none; adkim=s; aspf=s; pct=50; ri=300; rf=afrf; rua=mailto:dmarc-a@abuse.net; ruf=mailto:dmarc-f@abuse.net";
9 DMARC_POLICY_T *pctx;
10 OPENDMARC_STATUS_T status;
11 int pass, fails, count;
12 int pct;
13 int adkim;
14 int aspf;
15
16 pass = fails = count = 0;
17 pctx = opendmarc_policy_connect_init("1.2.3.4", 0);
18 if (pctx == NULL)
19 {
20 (void) fprintf(stderr, "opendmarc_policy_connect_init: %s\n", strerror(errno));
21 return 1;
22 }
23 status = opendmarc_policy_parse_dmarc(pctx, "abuse.net", record);
24 if (status != DMARC_PARSE_OKAY)
25 {
26 printf("\t%s(%d): opendmarc_policy_parse_dmarc: %s: FAIL\n", __FILE__, __LINE__, opendmarc_policy_status_to_str(status));
27 fails += 1;
28 }
29 status = opendmarc_policy_fetch_pct(pctx, &pct);
30 if (status != DMARC_PARSE_OKAY)
31 {
32 printf("\t%s(%d): opendmarc_policy_fetch_pct: %s: FAIL\n", __FILE__, __LINE__, opendmarc_policy_status_to_str(status));
33 fails += 1;
34 }
35 if (pct != 50)
36 {
37 printf("\t%s(%d): opendmarc_policy_fetch_pct: expected 50 got %d: FAIL\n", __FILE__, __LINE__, pct);
38 fails += 1;
39 }
40 status = opendmarc_policy_fetch_adkim(pctx, &adkim);
41 if (status != DMARC_PARSE_OKAY)
42 {
43 printf("\t%s(%d): opendmarc_policy_fetch_adkim: %s: FAIL\n", __FILE__, __LINE__, opendmarc_policy_status_to_str(status));
44 fails += 1;
45 }
46 if (adkim != DMARC_RECORD_A_STRICT)
47 {
48 printf("\t%s(%d): opendmarc_policy_fetch_adkim: expected %d got %d: FAIL\n", __FILE__, __LINE__, DMARC_RECORD_A_STRICT, adkim);
49 fails += 1;
50 }
51 status = opendmarc_policy_fetch_aspf(pctx, &aspf);
52 if (status != DMARC_PARSE_OKAY)
53 {
54 printf("\t%s(%d): opendmarc_policy_fetch_aspf: %s: FAIL\n", __FILE__, __LINE__, opendmarc_policy_status_to_str(status));
55 fails += 1;
56 }
57 if (aspf != DMARC_RECORD_A_STRICT)
58 {
59 printf("\t%s(%d): opendmarc_policy_fetch_adkim: expected %d got %d: FAIL\n", __FILE__, __LINE__, DMARC_RECORD_A_STRICT, aspf);
60 fails += 1;
61 }
62 return fails;
63 }
0 #include "../opendmarc_internal.h"
1 #ifndef OPENDMARC_POLICY_C
2 # define OPENDMARC_POLICY_C
3 #endif /* ! OPENDMARC_POLICY_C */
4 #include "../dmarc.h"
5
6 #define TESTFILE "testfiles/effective_tld_names.dat"
7
8 typedef struct {
9 char *dmarc;
10 int outcome;
11 } TEST_DMARC_PARSE_T;
12
13 int
14 main(int argc, char **argv)
15 {
16 TEST_DMARC_PARSE_T *dpp;
17 TEST_DMARC_PARSE_T dpp_test[] = {
18 /* 1 */ {"v=DMARC1; p=none; rf=afrf; rua=mailto:dmarc-a@abuse.net; ruf=mailto:dmarc-f@abuse.net", DMARC_PARSE_OKAY},
19 /* 2 */ {"v=DMARC1; p=none;", DMARC_PARSE_OKAY},
20 /* 3 */ {"v=DMARC1; p=reject;", DMARC_PARSE_OKAY},
21 /* 4 */ {"v=DMARC1; p=quarantine;", DMARC_PARSE_OKAY},
22 /* 5 */ {"v=DMARC1; p=n;", DMARC_PARSE_OKAY},
23 /* 6 */ {"", DMARC_PARSE_ERROR_EMPTY},
24 /* 7 */ {"V=BOB", DMARC_PARSE_ERROR_BAD_VERSION},
25 /* 8 */ {"v=DMARC1; p=bob;", DMARC_PARSE_ERROR_BAD_VALUE},
26 /* 9 */ {"v=DMARC1; p=none; sp=bob;", DMARC_PARSE_ERROR_BAD_VALUE},
27 /* 10 */ {"v=DMARC1; p=none; adkim=bob;", DMARC_PARSE_ERROR_BAD_VALUE},
28 /* 11 */ {"v=DMARC1; p=none; aspf=bob;", DMARC_PARSE_ERROR_BAD_VALUE},
29 /* 12 */ {"v=DMARC1; p=none; rf=bob;", DMARC_PARSE_ERROR_BAD_VALUE},
30 /* 13 */ {"v=DMARC1; p=none; ri=bob;", DMARC_PARSE_ERROR_BAD_VALUE},
31 /* 14 */ {"v=DMARC1; p=none; pct=500;", DMARC_PARSE_ERROR_BAD_VALUE},
32 /* 15 */ {"v=DMARC1; pct=100;", DMARC_PARSE_ERROR_NO_REQUIRED_P},
33 /* 16 */ {"v=DMARC1; p=none; rua=ftp://abuse.com", DMARC_PARSE_OKAY},
34 /* 17 */ {"v=DMARC1; p=none; ruf=mailto://abuse.com", DMARC_PARSE_OKAY},
35 /* 18 */ {"v=DMARC1; p=none; ruf=mailto://abuse.com; foo=bar; buzz=happy;", DMARC_PARSE_OKAY},
36 {NULL, 0},
37 };
38 int pass, fails, count;
39 DMARC_POLICY_T *pctx;
40 OPENDMARC_STATUS_T status;
41
42 pass = fails = count = 0;
43 for (dpp = dpp_test; dpp != NULL && dpp->dmarc != NULL; ++dpp)
44 {
45 count += 1;
46 pctx = opendmarc_policy_connect_init("1.2.3.4", 0);
47 if (pctx == NULL)
48 {
49 (void) fprintf(stderr, "opendmarc_policy_connect_init: %s\n", strerror(errno));
50 return 1;
51 }
52 status = opendmarc_policy_parse_dmarc(pctx, "abuse.net", dpp->dmarc);
53 if (status == dpp->outcome)
54 {
55 //printf("\tDMARC Policy Parse: %d: PASS\n", count);
56 pass += 1;
57 }
58 else
59 {
60 printf("\tDMARC Policy Parse: %d: \"%s\", status=%d FAIL\n", count, dpp->dmarc, status);
61 fails += 1;
62 }
63 pctx = opendmarc_policy_connect_shutdown(pctx);
64 }
65 printf("DMARC Policy Parse: pass=%d, fail=%d\n", pass, fails);
66 return fails;
67 }
0 #include "../opendmarc_internal.h"
1
2 typedef struct {
3 char *raw;
4 char *should_get;
5 } TEST_FINEDDOMAIN_T;
6
7 int
8 main(int argc, char **argv)
9 {
10 TEST_FINEDDOMAIN_T *domp;
11 TEST_FINEDDOMAIN_T domain_test[] = {
12 /* 1 */ {"Joe Johnson <joe@joe.com>", "joe.com"},
13 /* 2 */ {"\"Johnson, Joe <joe@joe.com>\" joe@joe.com", "joe.com"},
14 /* 3 */ {"\"Joe Johnson\" <joe@joe.com>", "joe.com"},
15 /* 4 */ {"(Joe Johnson) joe@joe.com", "joe.com"},
16 /* 5 */ {"joe@joe.com", "joe.com"},
17 /* 6 */ {"<<<><joe@joe.com>>>", "joe.com"},
18 /* 7 */ {"Joe Johnson <joe@joe.com>, ace@ace.com", "joe.com"},
19 /* 8 */ {"joe@joe.com, ace@ace.com", "joe.com"},
20 /* 9 */ {"Mail From:<joe@joe.com>", "joe.com"},
21 /* 10 */ {"\"Mandel, Bob\" <joe@joe.com>", "joe.com"},
22 /* 11 */ {"(,) joe@joe.com", "joe.com"},
23 /* 12 */ {"\"( bob@bob.com)\" joe@joe.com", "joe.com"},
24 /* 12 */ {"From: Davide D'Marco <user@blah.com>", "blah.com"},
25 {NULL, NULL},
26 };
27 u_char dbuf[256];
28 int pass, fails, count;
29 u_char *dp;
30
31 pass = fails = count = 0;
32 for (domp = domain_test; domp != NULL && domp->raw != NULL; ++domp)
33 {
34 count += 1;
35 dp = opendmarc_util_finddomain(domp->raw, dbuf, sizeof dbuf);
36 if (dp == NULL)
37 {
38 (void) printf("\t%s: %s\n", domp->raw, strerror(errno));
39 ++fails;
40 continue;
41 }
42 if (strcmp(dbuf, domp->should_get) == 0)
43 {
44 //printf("\tFinddomain test: %d: PASS\n", count);
45 pass += 1;
46 }
47 else
48 {
49 printf("\tFinddomain test: %d: FAIL\n", count);
50 fails += 1;
51 }
52 }
53 printf("Finddomain test: pass=%d, fail=%d\n", pass, fails);
54 return fails;
55 }
0 #include "../opendmarc_internal.h"
1 #ifndef OPENDMARC_POLICY_C
2 # define OPENDMARC_POLICY_C
3 #endif /* ! OPENDMARC_POLICY_C */
4 #include "../dmarc.h"
5
6 int
7 main(int argc, char **argv)
8 {
9 char * record = "v=DMARC1; p=none; rf=afrf; fo=1:s rua=mailto:dmarc-a@abuse.net; ruf=mailto:dmarc-f@abuse.net";
10 int pass, fails, count;
11 DMARC_POLICY_T *pctx;
12 OPENDMARC_STATUS_T status;
13 char small_buf[10];
14 char big_buf[BUFSIZ * 4];
15
16 pass = fails = count = 0;
17 pctx = opendmarc_policy_connect_init("1.2.3.4", 0);
18 if (pctx == NULL)
19 {
20 (void) fprintf(stderr, "opendmarc_policy_connect_init: %s\n", strerror(errno));
21 return 1;
22 }
23 status = opendmarc_policy_parse_dmarc(pctx, "abuse.net", record);
24 if (status == DMARC_PARSE_OKAY)
25 {
26 pass += 1;
27 }
28 else
29 {
30 printf("\tDMARC Policy Parse: \"%s\" FAIL\n", record);
31 fails += 1;
32 }
33 if (opendmarc_policy_to_buf(NULL, NULL, 0) == EINVAL)
34 {
35 pass += 1;
36 }
37 else
38 {
39 printf("\tDMARC Policy Parse To NULL Buffer: FAIL\n");
40 fails += 1;
41 }
42 if (opendmarc_policy_to_buf(pctx, small_buf, sizeof small_buf) == E2BIG)
43 {
44 pass += 1;
45 }
46 else
47 {
48 printf("\tDMARC Policy Parse To Small Buffer: FAIL\n");
49 fails += 1;
50 }
51 if (opendmarc_policy_to_buf(pctx, big_buf, sizeof big_buf) == 0)
52 {
53 pass += 1;
54 }
55 else
56 {
57 printf("\tDMARC Policy Parse To Big Buffer: FAIL\n");
58 fails += 1;
59 }
60
61 pctx = opendmarc_policy_connect_shutdown(pctx);
62 printf("DMARC Policy Parse To Buffer: pass=%d, fail=%d\n", pass, fails);
63 return fails;
64 }
0 #include "opendmarc_internal.h"
1 #include "dmarc.h"
2
3 #if WITH_SPF
4
5 #if HAVE_SPF2_H
6 // Yes we have the spf.h file, so we test libspf2
7 typedef struct {
8 char *helo;
9 char *mfrom;
10 char *ip;
11 int outcome;
12 } SPF2_T;
13
14 int
15 opendmarc_spf2_run_test()
16 {
17 SPF2_T tests[] = {
18 /* {"bcx.com", "root@bcx.com", "204.14.152.228", DMARC_POLICY_SPF_OUTCOME_PASS}, */
19 {"agari.com", "root@agari.com", "2001:a60:901e::22", DMARC_POLICY_SPF_OUTCOME_FAIL},
20 {"agari.com", "root@agari.com", "1.2.3.4", DMARC_POLICY_SPF_OUTCOME_FAIL},
21 {"agari.com", "root@agari.com", "185.28.196.1", DMARC_POLICY_SPF_OUTCOME_PASS},
22 /* {"bcx.com", "<>", "204.14.152.227", DMARC_POLICY_SPF_OUTCOME_FAIL}, */
23 {NULL, NULL, NULL, 0}
24 };
25 int status;
26 char human[512];
27 int used_mfrom;
28 int failures = 0;
29 int success = 0;
30 SPF2_T * tpp;
31
32 for (tpp = tests; tpp->helo != NULL; tpp++)
33 {
34 (void) memset(human, '\0', sizeof human);
35 status = opendmarc_spf2_test(tpp->ip, tpp->mfrom, tpp->helo, NULL, FALSE, human, sizeof human, &used_mfrom);
36 if (status != tpp->outcome)
37 {
38 printf("Error: ip=\"%s\", mfrom=\"%s\", helo=\"%s\", error(%d)= %s\n", tpp->ip, tpp->mfrom, tpp->helo, status, human);
39 ++failures;
40 }
41 else
42 {
43 //printf("Success: ip=\"%s\", mfrom=\"%s\", helo=\"%s\", error(%d)= %s\n", tpp->ip, tpp->mfrom, tpp->helo, status, human);
44 ++success;
45 }
46 }
47 printf("Test opendmarc_spf_ip4_tests(): %d pass, %d fail\n", success, failures);
48 return failures;
49 }
50
51 #else /* HAVE_SPF2_H */
52 // No spf.h so we test the internal library.
53
54 typedef struct {
55 char * ip;
56 char * mfrom;
57 char * helo;
58 char * spfrecord;
59 int status;
60 } SL;
61
62 int
63 opendmarc_spf_test_records(void)
64 {
65 SL spflist[] = {
66 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 ip4:204.14.152.228 -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* simple pass ipv4 */
67 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 ip4:204.14.152.0/24 -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* simple pass ipv4 cidr */
68 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 ip4:204.14.252.0/24 -all", DMARC_POLICY_SPF_OUTCOME_FAIL}, /* simple fail ipv4 cidr */
69 {"2001:a60:901e::22", "<foo@bcx.com>", "bcx.com", "v=spf1 ip6:2001:a60:901e::22 -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* simple pass ipv6 compressed versus compressed */
70 {"2001:a60:901e:0:0:0:0:22", "<foo@bcx.com>", "bcx.com", "v=spf1 ip6:2001:a60:901e::22 -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* simple pass ipv6 compressed versus uncompressed */
71 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 mx -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* mx check */
72 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", NULL, DMARC_POLICY_SPF_OUTCOME_PASS}, /* force a lookup */
73 {"204.14.152.228", "<>", "bcx.com", "v=spf1 mx -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* mx check with helo*/
74 {"204.14.152.228", "MAILER_DAEMON", "bcx.com", "v=spf1 mx -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* mx check with helo*/
75 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 -ip4:1.2.3.4 ip4:204.14.152.228 -all", DMARC_POLICY_SPF_OUTCOME_FAIL}, /* fail before success */
76 {"174.137.46.2", "<foo@bcx.com>", "bcx.com", "v=spf1 include:_netblocks.zdsys.com -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* pass with include */
77 {"204.14.152.228", "<foo@sf1.bcx.com>", "sf1.bcx.com", "v=spf1 include:bcx.com -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* pass with include */
78 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 include:bcx.org -all", DMARC_POLICY_SPF_OUTCOME_FAIL}, /* fail with include */
79 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 -a", DMARC_POLICY_SPF_OUTCOME_PASS}, /* a record test pass */
80 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 a -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* a record test pass */
81 {"204.14.152.227", "<foo@bcx.com>", "bcx.com", "v=spf1 -a", DMARC_POLICY_SPF_OUTCOME_FAIL}, /* a record test fail */
82 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 a:sf1.bcx.com -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* a record test pass */
83 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 ptr -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* ptr record test pass */
84 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 ptr:bcx.com -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* ptr record test pass */
85 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 exists:%s -all", DMARC_POLICY_SPF_OUTCOME_FAIL}, /* exists bad syntax */
86 {"204.14.152.228", "<foo@bcx.com>", "bcx.com", "v=spf1 exists:%{s} -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* exits good record */
87 {"204.14.152.228", "<foo@sf1.bcx.com>", "sf1.bcx.com", "v=spf1 redirect:bcx.com -all", DMARC_POLICY_SPF_OUTCOME_PASS}, /* pass with redirect */
88 {NULL, NULL, NULL, NULL, 0},
89 };
90 SL * sp;
91 int status;
92 int success, failures;
93 int use_mfrom;
94 char human[BUFSIZ];
95
96 success = failures = 0;
97 for (sp = spflist; sp->ip != NULL; ++sp)
98 {
99 status = opendmarc_spf_test(sp->ip, sp->mfrom, sp->helo, sp->spfrecord, FALSE, human, sizeof human, &use_mfrom);
100 if (status != sp->status)
101 {
102 printf("Error: ip=\"%s\", mfrom=\"%s\", helo=\"%s\", spf=\"%s\", error(%d)= %s\n", sp->ip, sp->mfrom, sp->helo,
103 sp->spfrecord == NULL ? "NULL" : sp->spfrecord, status, human);
104 ++failures;
105 continue;
106 }
107 ++success;
108 }
109 printf("Test opendmarc_spf_test_records(): %d pass, %d fail\n", success, failures);
110 return failures;
111 }
112
113 int
114 opendmarc_spf_test_exp()
115 {
116 SPF_CTX_T * ctx;
117 char * mfrom = "foo@bcx.com";
118 char * ip = "204.14.152.228";
119 char * helo = "bcx.com";
120 char * spf = "v=spf1 ip4:1.2.3.4 exp:http://%{s}/spf -all";
121 char * converted = "http://bcx.com/spf";
122 char errbuf[BUFSIZ];
123 int ret;
124 int success = 0;
125 int failures = 0;
126 int use_mfrom = FALSE;
127
128 ctx = opendmarc_spf_alloc_ctx();
129 (void) opendmarc_spf_specify_mailfrom(ctx, mfrom, strlen(mfrom), &use_mfrom);
130 (void) opendmarc_spf_specify_helo_domain(ctx, helo, strlen(helo));
131 (void) opendmarc_spf_specify_ip_address(ctx, ip, strlen(ip));
132 (void) opendmarc_spf_specify_record(ctx, spf, strlen(spf));
133
134 ret = opendmarc_spf_parse(ctx, 0, errbuf, sizeof errbuf);
135 if (ret != 0)
136 {
137 if (strcasecmp(opendmarc_spf_status_to_msg(ctx, ret), converted) == 0)
138 ++success;
139 else
140 ++failures;
141 }
142 else
143 ++failures;
144
145 ctx = opendmarc_spf_free_ctx(ctx);
146 printf("Test opendmarc_spf_run_test(): %d pass, %d fail\n", success, failures);
147 return failures;
148 }
149
150 typedef struct {
151 char *connect_ip;
152 char *record_ip;
153 int outcome;
154 } IP6LIST;
155
156 int
157 opendmarc_spf_ip6_tests(void)
158 {
159 IP6LIST ip6list[] = {
160 {"2001:a60:901e::22", "2001:a60:901e::22", TRUE},
161 {"2001:a60:901e::22", "2001:a60:901e:00:00:00:00:22", TRUE},
162 {"2001:a60:901e::2", "2001:a60:901e::0/126", TRUE},
163 {"2001:a60:901e::2:0", "2001:a60:901e::0/95", TRUE},
164 {"50.57.199.2", "50.57.199.0/27", FALSE},
165 {NULL, NULL}
166 };
167 IP6LIST *ipp;
168 int success, failures;
169
170 success = failures = 0;
171 for (ipp = ip6list; ipp->connect_ip != NULL; ++ipp)
172 {
173 if (opendmarc_spf_ipv6_cidr_check(ipp->connect_ip, ipp->record_ip) != ipp->outcome)
174 {
175 printf("Error: %s compared to %s failed\n", ipp->connect_ip, ipp->record_ip);
176 ++failures;
177 continue;
178 }
179 ++success;
180 }
181 printf("Test opendmarc_spf_ip6_tests(): %d pass, %d fail\n", success, failures);
182 return failures;
183 return 0;
184 }
185
186 typedef struct {
187 char *connect_ip;
188 char *record_ip;
189 int outcome;
190 } IP4LIST;
191
192 int
193 opendmarc_spf_ip4_tests(void)
194 {
195 IP4LIST ip4list[] = {
196 {"50.57.199.2", "50.57.199.0/27", TRUE},
197 {"51.57.199.2", "50.57.199.0/27", FALSE},
198 {NULL, NULL}
199 };
200 IP4LIST *ipp;
201 int success, failures;
202 u_long ip;
203
204 success = failures = 0;
205 for (ipp = ip4list; ipp->connect_ip != NULL; ++ipp)
206 {
207 ip = inet_addr(ipp->connect_ip);
208 ip = htonl(ip);
209 if (opendmarc_spf_cidr_address(ip, ipp->record_ip) != ipp->outcome)
210 {
211 printf("Error: %s compared to %s failed\n", ipp->connect_ip, ipp->record_ip);
212 ++failures;
213 continue;
214 }
215 ++success;
216 }
217 printf("Test opendmarc_spf_ip4_tests(): %d pass, %d fail\n", success, failures);
218 return failures;
219 }
220 #endif /* HAVE_SPF2_H */
221
222 int
223 main(int argc, char **argv)
224 {
225
226 #if HAVE_SPF2_H
227 if (opendmarc_spf2_run_test() != 0)
228 #else /* HAVE_SPF2_H */
229 if (opendmarc_spf_ip6_tests() != 0 || opendmarc_spf_ip4_tests() != 0 || opendmarc_spf_test_records() != 0 || opendmarc_spf_test_exp() != 0)
230 #endif /* HAVE_SPF2_H */
231 return 1;
232 return 0;
233 }
234
235 #endif /* WITH_SPF */
0 #include "../opendmarc_internal.h"
1
2 #define TESTFILE "testfiles/effective_tld_names.dat"
3
4 typedef struct {
5 char *domain;
6 char *tld;
7 } TEST_TLD_T;
8
9 int
10 main(int argc, char **argv)
11 {
12 TEST_TLD_T *tldp;
13 TEST_TLD_T tld_test[] = {
14 /* 1 */ {"a.b.c.bcx.com", "bcx.com"}, /* *.com */
15 /* 2 */ {"a.b.c.educ.ar", "educ.ar"}, /* !educ.ar */
16 /* 3 */ {"a.b.c.xn--mgba3a4f16a.ir", "c.xn--mgba3a4f16a.ir"},
17 /* 4 */ {"a.b.c.\0xd8\0xa7\0xdb\0x8c\0xd8\0xb1\0xd8\0xa7\0xd9\0x86.ar", "c.\0xd8\0xa7\0xdb\0x8c\0xd8\0xb1\0xd8\0xa7\0xd9\0x86.ar"},
18 {NULL, NULL},
19 };
20 u_char tldbuf[256];
21 int pass, fails, count;
22
23 if (opendmarc_tld_read_file(TESTFILE, "//", "*.", "!") != 0)
24 {
25 printf("\tTLD find test: %s: could not read. Skipping\n", TESTFILE);
26 return 0;
27 }
28 pass = fails = count = 0;
29 for (tldp = tld_test; tldp != NULL && tldp->domain != NULL; ++tldp)
30 {
31 count += 1;
32 (void) opendmarc_get_tld(tldp->domain, tldbuf, sizeof tldbuf);
33 if (memcmp(tldp->tld, tldbuf, strlen(tldp->tld)) == 0)
34 {
35 //printf("\tTLD find test: %d: PASS\n", count);
36 pass += 1;
37 }
38 else
39 {
40 printf("\tTLD find test: %d: FAIL\n", count);
41 fails += 1;
42 }
43 }
44 printf("TLD find test: pass=%d, fail=%d\n", pass, fails);
45 return fails;
46 }
0 #include "../opendmarc_internal.h"
1 #include "../dmarc.h"
2
3 typedef struct {
4 char *fname;
5 int outcome;
6 } TEST_T;
7
8 int
9 main(int argc, char **argv)
10 {
11 TEST_T *xmlp;
12 TEST_T xml_files[] = {
13 /* 1 */ {"testfiles/nosuchfile.xml", ENOENT},
14 /* 2 */ {"testfiles/good.com!example.com!1337270400!1337356799.xml", 0},
15 /* 3 */ {"testfiles/bad.com!example.com!1337140800!1337227200.xml", 0},
16 {NULL, 0},
17 };
18 u_char ** ary;
19 char * srcdir;
20 char ebuf[256];
21 int pass, fails, count;
22
23 srcdir = getenv("srcdir");
24 if (srcdir != NULL)
25 {
26 if (chdir(srcdir) != 0)
27 {
28 perror(srcdir);
29 return 1;
30 }
31 }
32
33 pass = fails = count = 0;
34 for (xmlp = xml_files; xmlp != NULL && xmlp->fname != NULL; ++xmlp)
35 {
36 count += 1;
37 ary = opendmarc_xml_parse(xmlp->fname, ebuf, sizeof ebuf);
38 if (ary == NULL && errno != xmlp->outcome)
39 {
40 (void) printf("\t%s\n%s", xmlp->fname, ebuf);
41 ++fails;
42 continue;
43 }
44 ary = opendmarc_util_clearargv(ary);
45 ++pass;
46 }
47 printf("Parse XML File test: pass=%d, fail=%d\n", pass, fails);
48 return fails;
49 }
0 AUTOMAKE_OPTIONS=foreign
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
17 am__make_running_with_option = \
18 case $${target_option-} in \
19 ?) ;; \
20 *) echo "am__make_running_with_option: internal error: invalid" \
21 "target option '$${target_option-}' specified" >&2; \
22 exit 1;; \
23 esac; \
24 has_opt=no; \
25 sane_makeflags=$$MAKEFLAGS; \
26 if $(am__is_gnu_make); then \
27 sane_makeflags=$$MFLAGS; \
28 else \
29 case $$MAKEFLAGS in \
30 *\\[\ \ ]*) \
31 bs=\\; \
32 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
33 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
34 esac; \
35 fi; \
36 skip_next=no; \
37 strip_trailopt () \
38 { \
39 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
40 }; \
41 for flg in $$sane_makeflags; do \
42 test $$skip_next = yes && { skip_next=no; continue; }; \
43 case $$flg in \
44 *=*|--*) continue;; \
45 -*I) strip_trailopt 'I'; skip_next=yes;; \
46 -*I?*) strip_trailopt 'I';; \
47 -*O) strip_trailopt 'O'; skip_next=yes;; \
48 -*O?*) strip_trailopt 'O';; \
49 -*l) strip_trailopt 'l'; skip_next=yes;; \
50 -*l?*) strip_trailopt 'l';; \
51 -[dEDm]) skip_next=yes;; \
52 -[JT]) skip_next=yes;; \
53 esac; \
54 case $$flg in \
55 *$$target_option*) has_opt=yes; break;; \
56 esac; \
57 done; \
58 test $$has_opt = yes
59 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
60 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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 subdir = libopendmarc/tests/testfiles
80 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
81 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
82 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
83 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
84 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
85 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
86 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
87 $(ACLOCAL_M4)
88 mkinstalldirs = $(install_sh) -d
89 CONFIG_HEADER = $(top_builddir)/build-config.h
90 CONFIG_CLEAN_FILES =
91 CONFIG_CLEAN_VPATH_FILES =
92 AM_V_P = $(am__v_P_@AM_V@)
93 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
94 am__v_P_0 = false
95 am__v_P_1 = :
96 AM_V_GEN = $(am__v_GEN_@AM_V@)
97 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
98 am__v_GEN_0 = @echo " GEN " $@;
99 am__v_GEN_1 =
100 AM_V_at = $(am__v_at_@AM_V@)
101 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
102 am__v_at_0 = @
103 am__v_at_1 =
104 SOURCES =
105 DIST_SOURCES =
106 am__can_run_installinfo = \
107 case $$AM_UPDATE_INFO_DIR in \
108 n|no|NO) false;; \
109 *) (install-info --version) >/dev/null 2>&1;; \
110 esac
111 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
112 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
113 ACLOCAL = @ACLOCAL@
114 AMTAR = @AMTAR@
115 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
116 AR = @AR@
117 AUTOCONF = @AUTOCONF@
118 AUTOHEADER = @AUTOHEADER@
119 AUTOMAKE = @AUTOMAKE@
120 AWK = @AWK@
121 CC = @CC@
122 CCDEPMODE = @CCDEPMODE@
123 CFLAGS = @CFLAGS@
124 CPP = @CPP@
125 CPPFLAGS = @CPPFLAGS@
126 CYGPATH_W = @CYGPATH_W@
127 DEFS = @DEFS@
128 DEPDIR = @DEPDIR@
129 DLLTOOL = @DLLTOOL@
130 DSYMUTIL = @DSYMUTIL@
131 DUMPBIN = @DUMPBIN@
132 ECHO_C = @ECHO_C@
133 ECHO_N = @ECHO_N@
134 ECHO_T = @ECHO_T@
135 EGREP = @EGREP@
136 EXEEXT = @EXEEXT@
137 FGREP = @FGREP@
138 GREP = @GREP@
139 HEX_VERSION = @HEX_VERSION@
140 INSTALL = @INSTALL@
141 INSTALL_DATA = @INSTALL_DATA@
142 INSTALL_PROGRAM = @INSTALL_PROGRAM@
143 INSTALL_SCRIPT = @INSTALL_SCRIPT@
144 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
145 LD = @LD@
146 LDFLAGS = @LDFLAGS@
147 LIBDMARC_DIR = @LIBDMARC_DIR@
148 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
149 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
150 LIBMILTER_LIBS = @LIBMILTER_LIBS@
151 LIBOBJS = @LIBOBJS@
152 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
153 LIBRESOLV = @LIBRESOLV@
154 LIBS = @LIBS@
155 LIBTOOL = @LIBTOOL@
156 LIPO = @LIPO@
157 LN_S = @LN_S@
158 LTLIBOBJS = @LTLIBOBJS@
159 MAKEINFO = @MAKEINFO@
160 MANIFEST_TOOL = @MANIFEST_TOOL@
161 MKDIR_P = @MKDIR_P@
162 NM = @NM@
163 NMEDIT = @NMEDIT@
164 OBJDUMP = @OBJDUMP@
165 OBJEXT = @OBJEXT@
166 OTOOL = @OTOOL@
167 OTOOL64 = @OTOOL64@
168 PACKAGE = @PACKAGE@
169 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
170 PACKAGE_NAME = @PACKAGE_NAME@
171 PACKAGE_STRING = @PACKAGE_STRING@
172 PACKAGE_TARNAME = @PACKAGE_TARNAME@
173 PACKAGE_URL = @PACKAGE_URL@
174 PACKAGE_VERSION = @PACKAGE_VERSION@
175 PATH_SEPARATOR = @PATH_SEPARATOR@
176 PKG_CONFIG = @PKG_CONFIG@
177 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
178 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
179 PTHREAD_CC = @PTHREAD_CC@
180 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
181 PTHREAD_LIBS = @PTHREAD_LIBS@
182 RANLIB = @RANLIB@
183 SED = @SED@
184 SET_MAKE = @SET_MAKE@
185 SHELL = @SHELL@
186 SQL_BACKEND = @SQL_BACKEND@
187 STRIP = @STRIP@
188 SYSCONFDIR = @SYSCONFDIR@
189 VERSION = @VERSION@
190 abs_builddir = @abs_builddir@
191 abs_srcdir = @abs_srcdir@
192 abs_top_builddir = @abs_top_builddir@
193 abs_top_srcdir = @abs_top_srcdir@
194 ac_aux_dir = @ac_aux_dir@
195 ac_ct_AR = @ac_ct_AR@
196 ac_ct_CC = @ac_ct_CC@
197 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
198 am__include = @am__include@
199 am__leading_dot = @am__leading_dot@
200 am__quote = @am__quote@
201 am__tar = @am__tar@
202 am__untar = @am__untar@
203 ax_pthread_config = @ax_pthread_config@
204 bindir = @bindir@
205 build = @build@
206 build_alias = @build_alias@
207 build_cpu = @build_cpu@
208 build_os = @build_os@
209 build_vendor = @build_vendor@
210 builddir = @builddir@
211 datadir = @datadir@
212 datarootdir = @datarootdir@
213 docdir = @docdir@
214 dvidir = @dvidir@
215 exec_prefix = @exec_prefix@
216 host = @host@
217 host_alias = @host_alias@
218 host_cpu = @host_cpu@
219 host_os = @host_os@
220 host_vendor = @host_vendor@
221 htmldir = @htmldir@
222 includedir = @includedir@
223 infodir = @infodir@
224 install_sh = @install_sh@
225 libdir = @libdir@
226 libexecdir = @libexecdir@
227 localedir = @localedir@
228 localstatedir = @localstatedir@
229 mandir = @mandir@
230 miltertest = @miltertest@
231 mkdir_p = @mkdir_p@
232 oldincludedir = @oldincludedir@
233 pdfdir = @pdfdir@
234 prefix = @prefix@
235 program_transform_name = @program_transform_name@
236 psdir = @psdir@
237 sbindir = @sbindir@
238 sharedstatedir = @sharedstatedir@
239 srcdir = @srcdir@
240 sysconfdir = @sysconfdir@
241 target_alias = @target_alias@
242 top_build_prefix = @top_build_prefix@
243 top_builddir = @top_builddir@
244 top_srcdir = @top_srcdir@
245 AUTOMAKE_OPTIONS = foreign
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) --foreign libopendmarc/tests/testfiles/Makefile'; \
259 $(am__cd) $(top_srcdir) && \
260 $(AUTOMAKE) --foreign libopendmarc/tests/testfiles/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
287 ctags CTAGS:
288
289 cscope cscopelist:
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 if test -z '$(STRIP)'; then \
337 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
338 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
339 install; \
340 else \
341 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
342 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
343 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
344 fi
345 mostlyclean-generic:
346
347 clean-generic:
348
349 distclean-generic:
350 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
351 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
352
353 maintainer-clean-generic:
354 @echo "This command is intended for maintainers to use"
355 @echo "it deletes files that may require special tools to rebuild."
356 clean: clean-am
357
358 clean-am: clean-generic clean-libtool mostlyclean-am
359
360 distclean: distclean-am
361 -rm -f Makefile
362 distclean-am: clean-am distclean-generic
363
364 dvi: dvi-am
365
366 dvi-am:
367
368 html: html-am
369
370 html-am:
371
372 info: info-am
373
374 info-am:
375
376 install-data-am:
377
378 install-dvi: install-dvi-am
379
380 install-dvi-am:
381
382 install-exec-am:
383
384 install-html: install-html-am
385
386 install-html-am:
387
388 install-info: install-info-am
389
390 install-info-am:
391
392 install-man:
393
394 install-pdf: install-pdf-am
395
396 install-pdf-am:
397
398 install-ps: install-ps-am
399
400 install-ps-am:
401
402 installcheck-am:
403
404 maintainer-clean: maintainer-clean-am
405 -rm -f Makefile
406 maintainer-clean-am: distclean-am maintainer-clean-generic
407
408 mostlyclean: mostlyclean-am
409
410 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
411
412 pdf: pdf-am
413
414 pdf-am:
415
416 ps: ps-am
417
418 ps-am:
419
420 uninstall-am:
421
422 .MAKE: install-am install-strip
423
424 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
425 cscopelist-am ctags-am distclean distclean-generic \
426 distclean-libtool distdir dvi dvi-am html html-am info info-am \
427 install install-am install-data install-data-am install-dvi \
428 install-dvi-am install-exec install-exec-am install-html \
429 install-html-am install-info install-info-am install-man \
430 install-pdf install-pdf-am install-ps install-ps-am \
431 install-strip installcheck installcheck-am installdirs \
432 maintainer-clean maintainer-clean-generic mostlyclean \
433 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
434 tags-am uninstall uninstall-am
435
436
437 # Tell versions [3.59,3.63) of GNU make to not export all variables.
438 # Otherwise a system limit (for SysV at least) may be exceeded.
439 .NOEXPORT:
0 <?xml version="1.0" encoding="windows-1252"?><ns1:feedback xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns1='http://dmarc.org/dmarc-xml/0.1' xsi:schemaLocation='http://dmarc.org/dmarc-xml/0.1 dmarc_agg_report.xsd'><report_metadata><org_name>AOL</org_name><email>postmaster@aol.com</email><report_id>example.com_1337227200</report_id><date_range><begin>1337140800</begin><end>1337227200</end></date_range></report_metadata>
1
2 <policy_published><domain>example.com</domain><adkim>r</adkim><aspf>r</aspf><p>reject</p><sp>reject</sp><pct>100</pct></policy_published>
3 <record><row><source_ip>108.166.27.220</source_ip><count>267</count><policy_evaluated><disposition></disposition></policy_evaluated></row><identifiers><header_from>example.com</header_from></identifiers><auth_results><dkim><domain>example.com</domain><result>pass</result></dkim><spf><domain>example.com</domain><result>fail</result></spf></auth_results></record>
4 <record><row><source_ip>108r.166.27.220</source_ip><count>16</count><policy_evaluated><disposition>none</disposition></policy_evaluated></row><identifiers><header_from>example.com</header_from></identifiers><auth_results><dkim><domain>example.com</domain><result>pass</result></dkim><spf><domain>NULL</domain><result>none</result></spf></auth_results></record>
5 <record><row><source_ip>118.103.89.13</source_ip><count>1</count><policy_evaluated><disposition>none</disposition></policy_evaluated></row><identifiers><header_from>example.com<foo</header_from></identifiers><auth_results><dkim><domain>example.com</domain><result>fail</result></dkim><spf><domain>NULL</domain><result>none</result></spf></auth_results></record>
0 // This Source Code Form is subject to the terms of the Mozilla Public
1 // License, v. 2.0. If a copy of the MPL was not distributed with this
2 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
3
4 // ===BEGIN ICANN DOMAINS===
5
6 // ac : http://en.wikipedia.org/wiki/.ac
7 ac
8 com.ac
9 edu.ac
10 gov.ac
11 net.ac
12 mil.ac
13 org.ac
14
15 // ad : http://en.wikipedia.org/wiki/.ad
16 ad
17 nom.ad
18
19 // ae : http://en.wikipedia.org/wiki/.ae
20 // see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php
21 ae
22 co.ae
23 net.ae
24 org.ae
25 sch.ae
26 ac.ae
27 gov.ae
28 mil.ae
29
30 // aero : see http://www.information.aero/index.php?id=66
31 aero
32 accident-investigation.aero
33 accident-prevention.aero
34 aerobatic.aero
35 aeroclub.aero
36 aerodrome.aero
37 agents.aero
38 aircraft.aero
39 airline.aero
40 airport.aero
41 air-surveillance.aero
42 airtraffic.aero
43 air-traffic-control.aero
44 ambulance.aero
45 amusement.aero
46 association.aero
47 author.aero
48 ballooning.aero
49 broker.aero
50 caa.aero
51 cargo.aero
52 catering.aero
53 certification.aero
54 championship.aero
55 charter.aero
56 civilaviation.aero
57 club.aero
58 conference.aero
59 consultant.aero
60 consulting.aero
61 control.aero
62 council.aero
63 crew.aero
64 design.aero
65 dgca.aero
66 educator.aero
67 emergency.aero
68 engine.aero
69 engineer.aero
70 entertainment.aero
71 equipment.aero
72 exchange.aero
73 express.aero
74 federation.aero
75 flight.aero
76 freight.aero
77 fuel.aero
78 gliding.aero
79 government.aero
80 groundhandling.aero
81 group.aero
82 hanggliding.aero
83 homebuilt.aero
84 insurance.aero
85 journal.aero
86 journalist.aero
87 leasing.aero
88 logistics.aero
89 magazine.aero
90 maintenance.aero
91 marketplace.aero
92 media.aero
93 microlight.aero
94 modelling.aero
95 navigation.aero
96 parachuting.aero
97 paragliding.aero
98 passenger-association.aero
99 pilot.aero
100 press.aero
101 production.aero
102 recreation.aero
103 repbody.aero
104 res.aero
105 research.aero
106 rotorcraft.aero
107 safety.aero
108 scientist.aero
109 services.aero
110 show.aero
111 skydiving.aero
112 software.aero
113 student.aero
114 taxi.aero
115 trader.aero
116 trading.aero
117 trainer.aero
118 union.aero
119 workinggroup.aero
120 works.aero
121
122 // af : http://www.nic.af/help.jsp
123 af
124 gov.af
125 com.af
126 org.af
127 net.af
128 edu.af
129
130 // ag : http://www.nic.ag/prices.htm
131 ag
132 com.ag
133 org.ag
134 net.ag
135 co.ag
136 nom.ag
137
138 // ai : http://nic.com.ai/
139 ai
140 off.ai
141 com.ai
142 net.ai
143 org.ai
144
145 // al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31
146 al
147 com.al
148 edu.al
149 gov.al
150 mil.al
151 net.al
152 org.al
153
154 // am : http://en.wikipedia.org/wiki/.am
155 am
156
157 // an : http://www.una.an/an_domreg/default.asp
158 an
159 com.an
160 net.an
161 org.an
162 edu.an
163
164 // ao : http://en.wikipedia.org/wiki/.ao
165 // http://www.dns.ao/REGISTR.DOC
166 ao
167 ed.ao
168 gv.ao
169 og.ao
170 co.ao
171 pb.ao
172 it.ao
173
174 // aq : http://en.wikipedia.org/wiki/.aq
175 aq
176
177 // ar : https://nic.ar/normativa-vigente.xhtml
178 ar
179 com.ar
180 edu.ar
181 gob.ar
182 int.ar
183 mil.ar
184 net.ar
185 org.ar
186 tur.ar
187
188 // arpa : http://en.wikipedia.org/wiki/.arpa
189 // Confirmed by registry <iana-questions@icann.org> 2008-06-18
190 arpa
191 e164.arpa
192 in-addr.arpa
193 ip6.arpa
194 iris.arpa
195 uri.arpa
196 urn.arpa
197
198 // as : http://en.wikipedia.org/wiki/.as
199 as
200 gov.as
201
202 // asia : http://en.wikipedia.org/wiki/.asia
203 asia
204
205 // at : http://en.wikipedia.org/wiki/.at
206 // Confirmed by registry <it@nic.at> 2008-06-17
207 at
208 ac.at
209 co.at
210 gv.at
211 or.at
212
213 // au : http://en.wikipedia.org/wiki/.au
214 // http://www.auda.org.au/
215 au
216 // 2LDs
217 com.au
218 net.au
219 org.au
220 edu.au
221 gov.au
222 asn.au
223 id.au
224 csiro.au
225 // Historic 2LDs (closed to new registration, but sites still exist)
226 info.au
227 conf.au
228 oz.au
229 // CGDNs - http://www.cgdn.org.au/
230 act.au
231 nsw.au
232 nt.au
233 qld.au
234 sa.au
235 tas.au
236 vic.au
237 wa.au
238 // 3LDs
239 act.edu.au
240 nsw.edu.au
241 nt.edu.au
242 qld.edu.au
243 sa.edu.au
244 tas.edu.au
245 vic.edu.au
246 wa.edu.au
247 act.gov.au
248 // nsw.gov.au Bug 547985 - Removed at request of <Shae.Donelan@services.nsw.gov.au>
249 // nt.gov.au Bug 940478 - Removed at request of Greg Connors <Greg.Connors@nt.gov.au>
250 qld.gov.au
251 sa.gov.au
252 tas.gov.au
253 vic.gov.au
254 wa.gov.au
255
256 // aw : http://en.wikipedia.org/wiki/.aw
257 aw
258 com.aw
259
260 // ax : http://en.wikipedia.org/wiki/.ax
261 ax
262
263 // az : http://en.wikipedia.org/wiki/.az
264 az
265 com.az
266 net.az
267 int.az
268 gov.az
269 org.az
270 edu.az
271 info.az
272 pp.az
273 mil.az
274 name.az
275 pro.az
276 biz.az
277
278 // ba : http://en.wikipedia.org/wiki/.ba
279 ba
280 org.ba
281 net.ba
282 edu.ba
283 gov.ba
284 mil.ba
285 unsa.ba
286 unbi.ba
287 co.ba
288 com.ba
289 rs.ba
290
291 // bb : http://en.wikipedia.org/wiki/.bb
292 bb
293 biz.bb
294 com.bb
295 edu.bb
296 gov.bb
297 info.bb
298 net.bb
299 org.bb
300 store.bb
301
302 // bd : http://en.wikipedia.org/wiki/.bd
303 *.bd
304
305 // be : http://en.wikipedia.org/wiki/.be
306 // Confirmed by registry <tech@dns.be> 2008-06-08
307 be
308 ac.be
309
310 // bf : http://en.wikipedia.org/wiki/.bf
311 bf
312 gov.bf
313
314 // bg : http://en.wikipedia.org/wiki/.bg
315 // https://www.register.bg/user/static/rules/en/index.html
316 bg
317 a.bg
318 b.bg
319 c.bg
320 d.bg
321 e.bg
322 f.bg
323 g.bg
324 h.bg
325 i.bg
326 j.bg
327 k.bg
328 l.bg
329 m.bg
330 n.bg
331 o.bg
332 p.bg
333 q.bg
334 r.bg
335 s.bg
336 t.bg
337 u.bg
338 v.bg
339 w.bg
340 x.bg
341 y.bg
342 z.bg
343 0.bg
344 1.bg
345 2.bg
346 3.bg
347 4.bg
348 5.bg
349 6.bg
350 7.bg
351 8.bg
352 9.bg
353
354 // bh : http://en.wikipedia.org/wiki/.bh
355 bh
356 com.bh
357 edu.bh
358 net.bh
359 org.bh
360 gov.bh
361
362 // bi : http://en.wikipedia.org/wiki/.bi
363 // http://whois.nic.bi/
364 bi
365 co.bi
366 com.bi
367 edu.bi
368 or.bi
369 org.bi
370
371 // biz : http://en.wikipedia.org/wiki/.biz
372 biz
373
374 // bj : http://en.wikipedia.org/wiki/.bj
375 bj
376 asso.bj
377 barreau.bj
378 gouv.bj
379
380 // bm : http://www.bermudanic.bm/dnr-text.txt
381 bm
382 com.bm
383 edu.bm
384 gov.bm
385 net.bm
386 org.bm
387
388 // bn : http://en.wikipedia.org/wiki/.bn
389 *.bn
390
391 // bo : http://www.nic.bo/
392 bo
393 com.bo
394 edu.bo
395 gov.bo
396 gob.bo
397 int.bo
398 org.bo
399 net.bo
400 mil.bo
401 tv.bo
402
403 // br : http://registro.br/dominio/dpn.html
404 // Submitted by registry <fneves@registro.br> 2011-03-01
405 br
406 adm.br
407 adv.br
408 agr.br
409 am.br
410 arq.br
411 art.br
412 ato.br
413 b.br
414 bio.br
415 blog.br
416 bmd.br
417 cim.br
418 cng.br
419 cnt.br
420 com.br
421 coop.br
422 ecn.br
423 eco.br
424 edu.br
425 emp.br
426 eng.br
427 esp.br
428 etc.br
429 eti.br
430 far.br
431 flog.br
432 fm.br
433 fnd.br
434 fot.br
435 fst.br
436 g12.br
437 ggf.br
438 gov.br
439 imb.br
440 ind.br
441 inf.br
442 jor.br
443 jus.br
444 leg.br
445 lel.br
446 mat.br
447 med.br
448 mil.br
449 mus.br
450 net.br
451 nom.br
452 not.br
453 ntr.br
454 odo.br
455 org.br
456 ppg.br
457 pro.br
458 psc.br
459 psi.br
460 qsl.br
461 radio.br
462 rec.br
463 slg.br
464 srv.br
465 taxi.br
466 teo.br
467 tmp.br
468 trd.br
469 tur.br
470 tv.br
471 vet.br
472 vlog.br
473 wiki.br
474 zlg.br
475
476 // bs : http://www.nic.bs/rules.html
477 bs
478 com.bs
479 net.bs
480 org.bs
481 edu.bs
482 gov.bs
483
484 // bt : http://en.wikipedia.org/wiki/.bt
485 bt
486 com.bt
487 edu.bt
488 gov.bt
489 net.bt
490 org.bt
491
492 // bv : No registrations at this time.
493 // Submitted by registry <jarle@uninett.no> 2006-06-16
494 bv
495
496 // bw : http://en.wikipedia.org/wiki/.bw
497 // http://www.gobin.info/domainname/bw.doc
498 // list of other 2nd level tlds ?
499 bw
500 co.bw
501 org.bw
502
503 // by : http://en.wikipedia.org/wiki/.by
504 // http://tld.by/rules_2006_en.html
505 // list of other 2nd level tlds ?
506 by
507 gov.by
508 mil.by
509 // Official information does not indicate that com.by is a reserved
510 // second-level domain, but it's being used as one (see www.google.com.by and
511 // www.yahoo.com.by, for example), so we list it here for safety's sake.
512 com.by
513
514 // http://hoster.by/
515 of.by
516
517 // bz : http://en.wikipedia.org/wiki/.bz
518 // http://www.belizenic.bz/
519 bz
520 com.bz
521 net.bz
522 org.bz
523 edu.bz
524 gov.bz
525
526 // ca : http://en.wikipedia.org/wiki/.ca
527 ca
528 // ca geographical names
529 ab.ca
530 bc.ca
531 mb.ca
532 nb.ca
533 nf.ca
534 nl.ca
535 ns.ca
536 nt.ca
537 nu.ca
538 on.ca
539 pe.ca
540 qc.ca
541 sk.ca
542 yk.ca
543 // gc.ca: http://en.wikipedia.org/wiki/.gc.ca
544 // see also: http://registry.gc.ca/en/SubdomainFAQ
545 gc.ca
546
547 // cat : http://en.wikipedia.org/wiki/.cat
548 cat
549
550 // cc : http://en.wikipedia.org/wiki/.cc
551 cc
552
553 // cd : http://en.wikipedia.org/wiki/.cd
554 // see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1
555 cd
556 gov.cd
557
558 // cf : http://en.wikipedia.org/wiki/.cf
559 cf
560
561 // cg : http://en.wikipedia.org/wiki/.cg
562 cg
563
564 // ch : http://en.wikipedia.org/wiki/.ch
565 ch
566
567 // ci : http://en.wikipedia.org/wiki/.ci
568 // http://www.nic.ci/index.php?page=charte
569 ci
570 org.ci
571 or.ci
572 com.ci
573 co.ci
574 edu.ci
575 ed.ci
576 ac.ci
577 net.ci
578 go.ci
579 asso.ci
580 aéroport.ci
581 int.ci
582 presse.ci
583 md.ci
584 gouv.ci
585
586 // ck : http://en.wikipedia.org/wiki/.ck
587 *.ck
588 !www.ck
589
590 // cl : http://en.wikipedia.org/wiki/.cl
591 cl
592 gov.cl
593 gob.cl
594 co.cl
595 mil.cl
596
597 // cm : http://en.wikipedia.org/wiki/.cm
598 cm
599 gov.cm
600
601 // cn : http://en.wikipedia.org/wiki/.cn
602 // Submitted by registry <tanyaling@cnnic.cn> 2008-06-11
603 cn
604 ac.cn
605 com.cn
606 edu.cn
607 gov.cn
608 net.cn
609 org.cn
610 mil.cn
611 公司.cn
612 网络.cn
613 網絡.cn
614 // cn geographic names
615 ah.cn
616 bj.cn
617 cq.cn
618 fj.cn
619 gd.cn
620 gs.cn
621 gz.cn
622 gx.cn
623 ha.cn
624 hb.cn
625 he.cn
626 hi.cn
627 hl.cn
628 hn.cn
629 jl.cn
630 js.cn
631 jx.cn
632 ln.cn
633 nm.cn
634 nx.cn
635 qh.cn
636 sc.cn
637 sd.cn
638 sh.cn
639 sn.cn
640 sx.cn
641 tj.cn
642 xj.cn
643 xz.cn
644 yn.cn
645 zj.cn
646 hk.cn
647 mo.cn
648 tw.cn
649
650 // co : http://en.wikipedia.org/wiki/.co
651 // Submitted by registry <tecnico@uniandes.edu.co> 2008-06-11
652 co
653 arts.co
654 com.co
655 edu.co
656 firm.co
657 gov.co
658 info.co
659 int.co
660 mil.co
661 net.co
662 nom.co
663 org.co
664 rec.co
665 web.co
666
667 // com : http://en.wikipedia.org/wiki/.com
668 com
669
670 // coop : http://en.wikipedia.org/wiki/.coop
671 coop
672
673 // cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do
674 cr
675 ac.cr
676 co.cr
677 ed.cr
678 fi.cr
679 go.cr
680 or.cr
681 sa.cr
682
683 // cu : http://en.wikipedia.org/wiki/.cu
684 cu
685 com.cu
686 edu.cu
687 org.cu
688 net.cu
689 gov.cu
690 inf.cu
691
692 // cv : http://en.wikipedia.org/wiki/.cv
693 cv
694
695 // cw : http://www.una.cw/cw_registry/
696 // Confirmed by registry <registry@una.net> 2013-03-26
697 cw
698 com.cw
699 edu.cw
700 net.cw
701 org.cw
702
703 // cx : http://en.wikipedia.org/wiki/.cx
704 // list of other 2nd level tlds ?
705 cx
706 gov.cx
707
708 // cy : http://en.wikipedia.org/wiki/.cy
709 *.cy
710
711 // cz : http://en.wikipedia.org/wiki/.cz
712 cz
713
714 // de : http://en.wikipedia.org/wiki/.de
715 // Confirmed by registry <ops@denic.de> (with technical
716 // reservations) 2008-07-01
717 de
718
719 // dj : http://en.wikipedia.org/wiki/.dj
720 dj
721
722 // dk : http://en.wikipedia.org/wiki/.dk
723 // Confirmed by registry <robert@dk-hostmaster.dk> 2008-06-17
724 dk
725
726 // dm : http://en.wikipedia.org/wiki/.dm
727 dm
728 com.dm
729 net.dm
730 org.dm
731 edu.dm
732 gov.dm
733
734 // do : http://en.wikipedia.org/wiki/.do
735 do
736 art.do
737 com.do
738 edu.do
739 gob.do
740 gov.do
741 mil.do
742 net.do
743 org.do
744 sld.do
745 web.do
746
747 // dz : http://en.wikipedia.org/wiki/.dz
748 dz
749 com.dz
750 org.dz
751 net.dz
752 gov.dz
753 edu.dz
754 asso.dz
755 pol.dz
756 art.dz
757
758 // ec : http://www.nic.ec/reg/paso1.asp
759 // Submitted by registry <vabboud@nic.ec> 2008-07-04
760 ec
761 com.ec
762 info.ec
763 net.ec
764 fin.ec
765 k12.ec
766 med.ec
767 pro.ec
768 org.ec
769 edu.ec
770 gov.ec
771 gob.ec
772 mil.ec
773
774 // edu : http://en.wikipedia.org/wiki/.edu
775 edu
776
777 // ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B
778 ee
779 edu.ee
780 gov.ee
781 riik.ee
782 lib.ee
783 med.ee
784 com.ee
785 pri.ee
786 aip.ee
787 org.ee
788 fie.ee
789
790 // eg : http://en.wikipedia.org/wiki/.eg
791 eg
792 com.eg
793 edu.eg
794 eun.eg
795 gov.eg
796 mil.eg
797 name.eg
798 net.eg
799 org.eg
800 sci.eg
801
802 // er : http://en.wikipedia.org/wiki/.er
803 *.er
804
805 // es : https://www.nic.es/site_ingles/ingles/dominios/index.html
806 es
807 com.es
808 nom.es
809 org.es
810 gob.es
811 edu.es
812
813 // et : http://en.wikipedia.org/wiki/.et
814 *.et
815
816 // eu : http://en.wikipedia.org/wiki/.eu
817 eu
818
819 // fi : http://en.wikipedia.org/wiki/.fi
820 fi
821 // aland.fi : http://en.wikipedia.org/wiki/.ax
822 // This domain is being phased out in favor of .ax. As there are still many
823 // domains under aland.fi, we still keep it on the list until aland.fi is
824 // completely removed.
825 // TODO: Check for updates (expected to be phased out around Q1/2009)
826 aland.fi
827
828 // fj : http://en.wikipedia.org/wiki/.fj
829 *.fj
830
831 // fk : http://en.wikipedia.org/wiki/.fk
832 *.fk
833
834 // fm : http://en.wikipedia.org/wiki/.fm
835 fm
836
837 // fo : http://en.wikipedia.org/wiki/.fo
838 fo
839
840 // fr : http://www.afnic.fr/
841 // domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs
842 fr
843 com.fr
844 asso.fr
845 nom.fr
846 prd.fr
847 presse.fr
848 tm.fr
849 // domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels
850 aeroport.fr
851 assedic.fr
852 avocat.fr
853 avoues.fr
854 cci.fr
855 chambagri.fr
856 chirurgiens-dentistes.fr
857 experts-comptables.fr
858 geometre-expert.fr
859 gouv.fr
860 greta.fr
861 huissier-justice.fr
862 medecin.fr
863 notaires.fr
864 pharmacien.fr
865 port.fr
866 veterinaire.fr
867
868 // ga : http://en.wikipedia.org/wiki/.ga
869 ga
870
871 // gb : This registry is effectively dormant
872 // Submitted by registry <Damien.Shaw@ja.net> 2008-06-12
873 gb
874
875 // gd : http://en.wikipedia.org/wiki/.gd
876 gd
877
878 // ge : http://www.nic.net.ge/policy_en.pdf
879 ge
880 com.ge
881 edu.ge
882 gov.ge
883 org.ge
884 mil.ge
885 net.ge
886 pvt.ge
887
888 // gf : http://en.wikipedia.org/wiki/.gf
889 gf
890
891 // gg : http://www.channelisles.net/register-domains/
892 // Confirmed by registry <nigel@channelisles.net> 2013-11-28
893 gg
894 co.gg
895 net.gg
896 org.gg
897
898 // gh : http://en.wikipedia.org/wiki/.gh
899 // see also: http://www.nic.gh/reg_now.php
900 // Although domains directly at second level are not possible at the moment,
901 // they have been possible for some time and may come back.
902 gh
903 com.gh
904 edu.gh
905 gov.gh
906 org.gh
907 mil.gh
908
909 // gi : http://www.nic.gi/rules.html
910 gi
911 com.gi
912 ltd.gi
913 gov.gi
914 mod.gi
915 edu.gi
916 org.gi
917
918 // gl : http://en.wikipedia.org/wiki/.gl
919 // http://nic.gl
920 gl
921
922 // gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm
923 gm
924
925 // gn : http://psg.com/dns/gn/gn.txt
926 // Submitted by registry <randy@psg.com> 2008-06-17
927 gn
928 ac.gn
929 com.gn
930 edu.gn
931 gov.gn
932 org.gn
933 net.gn
934
935 // gov : http://en.wikipedia.org/wiki/.gov
936 gov
937
938 // gp : http://www.nic.gp/index.php?lang=en
939 gp
940 com.gp
941 net.gp
942 mobi.gp
943 edu.gp
944 org.gp
945 asso.gp
946
947 // gq : http://en.wikipedia.org/wiki/.gq
948 gq
949
950 // gr : https://grweb.ics.forth.gr/english/1617-B-2005.html
951 // Submitted by registry <segred@ics.forth.gr> 2008-06-09
952 gr
953 com.gr
954 edu.gr
955 net.gr
956 org.gr
957 gov.gr
958
959 // gs : http://en.wikipedia.org/wiki/.gs
960 gs
961
962 // gt : http://www.gt/politicas_de_registro.html
963 gt
964 com.gt
965 edu.gt
966 gob.gt
967 ind.gt
968 mil.gt
969 net.gt
970 org.gt
971
972 // gu : http://gadao.gov.gu/registration.txt
973 *.gu
974
975 // gw : http://en.wikipedia.org/wiki/.gw
976 gw
977
978 // gy : http://en.wikipedia.org/wiki/.gy
979 // http://registry.gy/
980 gy
981 co.gy
982 com.gy
983 net.gy
984
985 // hk : https://www.hkdnr.hk
986 // Submitted by registry <hk.tech@hkirc.hk> 2008-06-11
987 hk
988 com.hk
989 edu.hk
990 gov.hk
991 idv.hk
992 net.hk
993 org.hk
994 公司.hk
995 教育.hk
996 敎育.hk
997 政府.hk
998 個人.hk
999 个人.hk
1000 箇人.hk
1001 網络.hk
1002 网络.hk
1003 组織.hk
1004 網絡.hk
1005 网絡.hk
1006 组织.hk
1007 組織.hk
1008 組织.hk
1009
1010 // hm : http://en.wikipedia.org/wiki/.hm
1011 hm
1012
1013 // hn : http://www.nic.hn/politicas/ps02,,05.html
1014 hn
1015 com.hn
1016 edu.hn
1017 org.hn
1018 net.hn
1019 mil.hn
1020 gob.hn
1021
1022 // hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf
1023 hr
1024 iz.hr
1025 from.hr
1026 name.hr
1027 com.hr
1028
1029 // ht : http://www.nic.ht/info/charte.cfm
1030 ht
1031 com.ht
1032 shop.ht
1033 firm.ht
1034 info.ht
1035 adult.ht
1036 net.ht
1037 pro.ht
1038 org.ht
1039 med.ht
1040 art.ht
1041 coop.ht
1042 pol.ht
1043 asso.ht
1044 edu.ht
1045 rel.ht
1046 gouv.ht
1047 perso.ht
1048
1049 // hu : http://www.domain.hu/domain/English/sld.html
1050 // Confirmed by registry <pasztor@iszt.hu> 2008-06-12
1051 hu
1052 co.hu
1053 info.hu
1054 org.hu
1055 priv.hu
1056 sport.hu
1057 tm.hu
1058 2000.hu
1059 agrar.hu
1060 bolt.hu
1061 casino.hu
1062 city.hu
1063 erotica.hu
1064 erotika.hu
1065 film.hu
1066 forum.hu
1067 games.hu
1068 hotel.hu
1069 ingatlan.hu
1070 jogasz.hu
1071 konyvelo.hu
1072 lakas.hu
1073 media.hu
1074 news.hu
1075 reklam.hu
1076 sex.hu
1077 shop.hu
1078 suli.hu
1079 szex.hu
1080 tozsde.hu
1081 utazas.hu
1082 video.hu
1083
1084 // id : https://register.pandi.or.id/
1085 id
1086 ac.id
1087 biz.id
1088 co.id
1089 go.id
1090 mil.id
1091 my.id
1092 net.id
1093 or.id
1094 sch.id
1095 web.id
1096
1097 // ie : http://en.wikipedia.org/wiki/.ie
1098 ie
1099 gov.ie
1100
1101 // il : http://en.wikipedia.org/wiki/.il
1102 *.il
1103
1104 // im : https://www.nic.im/
1105 // Submitted by registry <info@nic.im> 2013-11-15
1106 im
1107 ac.im
1108 co.im
1109 com.im
1110 ltd.co.im
1111 net.im
1112 org.im
1113 plc.co.im
1114 tt.im
1115 tv.im
1116
1117 // in : http://en.wikipedia.org/wiki/.in
1118 // see also: http://www.inregistry.in/policies/
1119 // Please note, that nic.in is not an offical eTLD, but used by most
1120 // government institutions.
1121 in
1122 co.in
1123 firm.in
1124 net.in
1125 org.in
1126 gen.in
1127 ind.in
1128 nic.in
1129 ac.in
1130 edu.in
1131 res.in
1132 gov.in
1133 mil.in
1134
1135 // info : http://en.wikipedia.org/wiki/.info
1136 info
1137
1138 // int : http://en.wikipedia.org/wiki/.int
1139 // Confirmed by registry <iana-questions@icann.org> 2008-06-18
1140 int
1141 eu.int
1142
1143 // io : http://www.nic.io/rules.html
1144 // list of other 2nd level tlds ?
1145 io
1146 com.io
1147
1148 // iq : http://www.cmc.iq/english/iq/iqregister1.htm
1149 iq
1150 gov.iq
1151 edu.iq
1152 mil.iq
1153 com.iq
1154 org.iq
1155 net.iq
1156
1157 // ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules
1158 // Also see http://www.nic.ir/Internationalized_Domain_Names
1159 // Two <iran>.ir entries added at request of <tech-team@nic.ir>, 2010-04-16
1160 ir
1161 ac.ir
1162 co.ir
1163 gov.ir
1164 id.ir
1165 net.ir
1166 org.ir
1167 sch.ir
1168 // xn--mgba3a4f16a.ir (<iran>.ir, Persian YEH)
1169 ایران.ir
1170 // xn--mgba3a4fra.ir (<iran>.ir, Arabic YEH)
1171 ايران.ir
1172
1173 // is : http://www.isnic.is/domain/rules.php
1174 // Confirmed by registry <marius@isgate.is> 2008-12-06
1175 is
1176 net.is
1177 com.is
1178 edu.is
1179 gov.is
1180 org.is
1181 int.is
1182
1183 // it : http://en.wikipedia.org/wiki/.it
1184 it
1185 gov.it
1186 edu.it
1187 // list of reserved geo-names :
1188 // http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf
1189 // (There is also a list of reserved geo-names corresponding to Italian
1190 // municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is
1191 // not included here.)
1192 agrigento.it
1193 ag.it
1194 alessandria.it
1195 al.it
1196 ancona.it
1197 an.it
1198 aosta.it
1199 aoste.it
1200 ao.it
1201 arezzo.it
1202 ar.it
1203 ascoli-piceno.it
1204 ascolipiceno.it
1205 ap.it
1206 asti.it
1207 at.it
1208 avellino.it
1209 av.it
1210 bari.it
1211 ba.it
1212 andria-barletta-trani.it
1213 andriabarlettatrani.it
1214 trani-barletta-andria.it
1215 tranibarlettaandria.it
1216 barletta-trani-andria.it
1217 barlettatraniandria.it
1218 andria-trani-barletta.it
1219 andriatranibarletta.it
1220 trani-andria-barletta.it
1221 traniandriabarletta.it
1222 bt.it
1223 belluno.it
1224 bl.it
1225 benevento.it
1226 bn.it
1227 bergamo.it
1228 bg.it
1229 biella.it
1230 bi.it
1231 bologna.it
1232 bo.it
1233 bolzano.it
1234 bozen.it
1235 balsan.it
1236 alto-adige.it
1237 altoadige.it
1238 suedtirol.it
1239 bz.it
1240 brescia.it
1241 bs.it
1242 brindisi.it
1243 br.it
1244 cagliari.it
1245 ca.it
1246 caltanissetta.it
1247 cl.it
1248 campobasso.it
1249 cb.it
1250 carboniaiglesias.it
1251 carbonia-iglesias.it
1252 iglesias-carbonia.it
1253 iglesiascarbonia.it
1254 ci.it
1255 caserta.it
1256 ce.it
1257 catania.it
1258 ct.it
1259 catanzaro.it
1260 cz.it
1261 chieti.it
1262 ch.it
1263 como.it
1264 co.it
1265 cosenza.it
1266 cs.it
1267 cremona.it
1268 cr.it
1269 crotone.it
1270 kr.it
1271 cuneo.it
1272 cn.it
1273 dell-ogliastra.it
1274 dellogliastra.it
1275 ogliastra.it
1276 og.it
1277 enna.it
1278 en.it
1279 ferrara.it
1280 fe.it
1281 fermo.it
1282 fm.it
1283 firenze.it
1284 florence.it
1285 fi.it
1286 foggia.it
1287 fg.it
1288 forli-cesena.it
1289 forlicesena.it
1290 cesena-forli.it
1291 cesenaforli.it
1292 fc.it
1293 frosinone.it
1294 fr.it
1295 genova.it
1296 genoa.it
1297 ge.it
1298 gorizia.it
1299 go.it
1300 grosseto.it
1301 gr.it
1302 imperia.it
1303 im.it
1304 isernia.it
1305 is.it
1306 laquila.it
1307 aquila.it
1308 aq.it
1309 la-spezia.it
1310 laspezia.it
1311 sp.it
1312 latina.it
1313 lt.it
1314 lecce.it
1315 le.it
1316 lecco.it
1317 lc.it
1318 livorno.it
1319 li.it
1320 lodi.it
1321 lo.it
1322 lucca.it
1323 lu.it
1324 macerata.it
1325 mc.it
1326 mantova.it
1327 mn.it
1328 massa-carrara.it
1329 massacarrara.it
1330 carrara-massa.it
1331 carraramassa.it
1332 ms.it
1333 matera.it
1334 mt.it
1335 medio-campidano.it
1336 mediocampidano.it
1337 campidano-medio.it
1338 campidanomedio.it
1339 vs.it
1340 messina.it
1341 me.it
1342 milano.it
1343 milan.it
1344 mi.it
1345 modena.it
1346 mo.it
1347 monza.it
1348 monza-brianza.it
1349 monzabrianza.it
1350 monzaebrianza.it
1351 monzaedellabrianza.it
1352 monza-e-della-brianza.it
1353 mb.it
1354 napoli.it
1355 naples.it
1356 na.it
1357 novara.it
1358 no.it
1359 nuoro.it
1360 nu.it
1361 oristano.it
1362 or.it
1363 padova.it
1364 padua.it
1365 pd.it
1366 palermo.it
1367 pa.it
1368 parma.it
1369 pr.it
1370 pavia.it
1371 pv.it
1372 perugia.it
1373 pg.it
1374 pescara.it
1375 pe.it
1376 pesaro-urbino.it
1377 pesarourbino.it
1378 urbino-pesaro.it
1379 urbinopesaro.it
1380 pu.it
1381 piacenza.it
1382 pc.it
1383 pisa.it
1384 pi.it
1385 pistoia.it
1386 pt.it
1387 pordenone.it
1388 pn.it
1389 potenza.it
1390 pz.it
1391 prato.it
1392 po.it
1393 ragusa.it
1394 rg.it
1395 ravenna.it
1396 ra.it
1397 reggio-calabria.it
1398 reggiocalabria.it
1399 rc.it
1400 reggio-emilia.it
1401 reggioemilia.it
1402 re.it
1403 rieti.it
1404 ri.it
1405 rimini.it
1406 rn.it
1407 roma.it
1408 rome.it
1409 rm.it
1410 rovigo.it
1411 ro.it
1412 salerno.it
1413 sa.it
1414 sassari.it
1415 ss.it
1416 savona.it
1417 sv.it
1418 siena.it
1419 si.it
1420 siracusa.it
1421 sr.it
1422 sondrio.it
1423 so.it
1424 taranto.it
1425 ta.it
1426 tempio-olbia.it
1427 tempioolbia.it
1428 olbia-tempio.it
1429 olbiatempio.it
1430 ot.it
1431 teramo.it
1432 te.it
1433 terni.it
1434 tr.it
1435 torino.it
1436 turin.it
1437 to.it
1438 trapani.it
1439 tp.it
1440 trento.it
1441 trentino.it
1442 tn.it
1443 treviso.it
1444 tv.it
1445 trieste.it
1446 ts.it
1447 udine.it
1448 ud.it
1449 varese.it
1450 va.it
1451 venezia.it
1452 venice.it
1453 ve.it
1454 verbania.it
1455 vb.it
1456 vercelli.it
1457 vc.it
1458 verona.it
1459 vr.it
1460 vibo-valentia.it
1461 vibovalentia.it
1462 vv.it
1463 vicenza.it
1464 vi.it
1465 viterbo.it
1466 vt.it
1467
1468 // je : http://www.channelisles.net/register-domains/
1469 // Confirmed by registry <nigel@channelisles.net> 2013-11-28
1470 je
1471 co.je
1472 net.je
1473 org.je
1474
1475 // jm : http://www.com.jm/register.html
1476 *.jm
1477
1478 // jo : http://www.dns.jo/Registration_policy.aspx
1479 jo
1480 com.jo
1481 org.jo
1482 net.jo
1483 edu.jo
1484 sch.jo
1485 gov.jo
1486 mil.jo
1487 name.jo
1488
1489 // jobs : http://en.wikipedia.org/wiki/.jobs
1490 jobs
1491
1492 // jp : http://en.wikipedia.org/wiki/.jp
1493 // http://jprs.co.jp/en/jpdomain.html
1494 // Submitted by registry <info@jprs.jp> 2012-05-28
1495 jp
1496 // jp organizational type names
1497 ac.jp
1498 ad.jp
1499 co.jp
1500 ed.jp
1501 go.jp
1502 gr.jp
1503 lg.jp
1504 ne.jp
1505 or.jp
1506 // jp preficture type names
1507 aichi.jp
1508 akita.jp
1509 aomori.jp
1510 chiba.jp
1511 ehime.jp
1512 fukui.jp
1513 fukuoka.jp
1514 fukushima.jp
1515 gifu.jp
1516 gunma.jp
1517 hiroshima.jp
1518 hokkaido.jp
1519 hyogo.jp
1520 ibaraki.jp
1521 ishikawa.jp
1522 iwate.jp
1523 kagawa.jp
1524 kagoshima.jp
1525 kanagawa.jp
1526 kochi.jp
1527 kumamoto.jp
1528 kyoto.jp
1529 mie.jp
1530 miyagi.jp
1531 miyazaki.jp
1532 nagano.jp
1533 nagasaki.jp
1534 nara.jp
1535 niigata.jp
1536 oita.jp
1537 okayama.jp
1538 okinawa.jp
1539 osaka.jp
1540 saga.jp
1541 saitama.jp
1542 shiga.jp
1543 shimane.jp
1544 shizuoka.jp
1545 tochigi.jp
1546 tokushima.jp
1547 tokyo.jp
1548 tottori.jp
1549 toyama.jp
1550 wakayama.jp
1551 yamagata.jp
1552 yamaguchi.jp
1553 yamanashi.jp
1554 // jp geographic type names
1555 // http://jprs.jp/doc/rule/saisoku-1.html
1556 *.kawasaki.jp
1557 *.kitakyushu.jp
1558 *.kobe.jp
1559 *.nagoya.jp
1560 *.sapporo.jp
1561 *.sendai.jp
1562 *.yokohama.jp
1563 !city.kawasaki.jp
1564 !city.kitakyushu.jp
1565 !city.kobe.jp
1566 !city.nagoya.jp
1567 !city.sapporo.jp
1568 !city.sendai.jp
1569 !city.yokohama.jp
1570 // 4th level registration
1571 aisai.aichi.jp
1572 ama.aichi.jp
1573 anjo.aichi.jp
1574 asuke.aichi.jp
1575 chiryu.aichi.jp
1576 chita.aichi.jp
1577 fuso.aichi.jp
1578 gamagori.aichi.jp
1579 handa.aichi.jp
1580 hazu.aichi.jp
1581 hekinan.aichi.jp
1582 higashiura.aichi.jp
1583 ichinomiya.aichi.jp
1584 inazawa.aichi.jp
1585 inuyama.aichi.jp
1586 isshiki.aichi.jp
1587 iwakura.aichi.jp
1588 kanie.aichi.jp
1589 kariya.aichi.jp
1590 kasugai.aichi.jp
1591 kira.aichi.jp
1592 kiyosu.aichi.jp
1593 komaki.aichi.jp
1594 konan.aichi.jp
1595 kota.aichi.jp
1596 mihama.aichi.jp
1597 miyoshi.aichi.jp
1598 nagakute.aichi.jp
1599 nishio.aichi.jp
1600 nisshin.aichi.jp
1601 obu.aichi.jp
1602 oguchi.aichi.jp
1603 oharu.aichi.jp
1604 okazaki.aichi.jp
1605 owariasahi.aichi.jp
1606 seto.aichi.jp
1607 shikatsu.aichi.jp
1608 shinshiro.aichi.jp
1609 shitara.aichi.jp
1610 tahara.aichi.jp
1611 takahama.aichi.jp
1612 tobishima.aichi.jp
1613 toei.aichi.jp
1614 togo.aichi.jp
1615 tokai.aichi.jp
1616 tokoname.aichi.jp
1617 toyoake.aichi.jp
1618 toyohashi.aichi.jp
1619 toyokawa.aichi.jp
1620 toyone.aichi.jp
1621 toyota.aichi.jp
1622 tsushima.aichi.jp
1623 yatomi.aichi.jp
1624 akita.akita.jp
1625 daisen.akita.jp
1626 fujisato.akita.jp
1627 gojome.akita.jp
1628 hachirogata.akita.jp
1629 happou.akita.jp
1630 higashinaruse.akita.jp
1631 honjo.akita.jp
1632 honjyo.akita.jp
1633 ikawa.akita.jp
1634 kamikoani.akita.jp
1635 kamioka.akita.jp
1636 katagami.akita.jp
1637 kazuno.akita.jp
1638 kitaakita.akita.jp
1639 kosaka.akita.jp
1640 kyowa.akita.jp
1641 misato.akita.jp
1642 mitane.akita.jp
1643 moriyoshi.akita.jp
1644 nikaho.akita.jp
1645 noshiro.akita.jp
1646 odate.akita.jp
1647 oga.akita.jp
1648 ogata.akita.jp
1649 semboku.akita.jp
1650 yokote.akita.jp
1651 yurihonjo.akita.jp
1652 aomori.aomori.jp
1653 gonohe.aomori.jp
1654 hachinohe.aomori.jp
1655 hashikami.aomori.jp
1656 hiranai.aomori.jp
1657 hirosaki.aomori.jp
1658 itayanagi.aomori.jp
1659 kuroishi.aomori.jp
1660 misawa.aomori.jp
1661 mutsu.aomori.jp
1662 nakadomari.aomori.jp
1663 noheji.aomori.jp
1664 oirase.aomori.jp
1665 owani.aomori.jp
1666 rokunohe.aomori.jp
1667 sannohe.aomori.jp
1668 shichinohe.aomori.jp
1669 shingo.aomori.jp
1670 takko.aomori.jp
1671 towada.aomori.jp
1672 tsugaru.aomori.jp
1673 tsuruta.aomori.jp
1674 abiko.chiba.jp
1675 asahi.chiba.jp
1676 chonan.chiba.jp
1677 chosei.chiba.jp
1678 choshi.chiba.jp
1679 chuo.chiba.jp
1680 funabashi.chiba.jp
1681 futtsu.chiba.jp
1682 hanamigawa.chiba.jp
1683 ichihara.chiba.jp
1684 ichikawa.chiba.jp
1685 ichinomiya.chiba.jp
1686 inzai.chiba.jp
1687 isumi.chiba.jp
1688 kamagaya.chiba.jp
1689 kamogawa.chiba.jp
1690 kashiwa.chiba.jp
1691 katori.chiba.jp
1692 katsuura.chiba.jp
1693 kimitsu.chiba.jp
1694 kisarazu.chiba.jp
1695 kozaki.chiba.jp
1696 kujukuri.chiba.jp
1697 kyonan.chiba.jp
1698 matsudo.chiba.jp
1699 midori.chiba.jp
1700 mihama.chiba.jp
1701 minamiboso.chiba.jp
1702 mobara.chiba.jp
1703 mutsuzawa.chiba.jp
1704 nagara.chiba.jp
1705 nagareyama.chiba.jp
1706 narashino.chiba.jp
1707 narita.chiba.jp
1708 noda.chiba.jp
1709 oamishirasato.chiba.jp
1710 omigawa.chiba.jp
1711 onjuku.chiba.jp
1712 otaki.chiba.jp
1713 sakae.chiba.jp
1714 sakura.chiba.jp
1715 shimofusa.chiba.jp
1716 shirako.chiba.jp
1717 shiroi.chiba.jp
1718 shisui.chiba.jp
1719 sodegaura.chiba.jp
1720 sosa.chiba.jp
1721 tako.chiba.jp
1722 tateyama.chiba.jp
1723 togane.chiba.jp
1724 tohnosho.chiba.jp
1725 tomisato.chiba.jp
1726 urayasu.chiba.jp
1727 yachimata.chiba.jp
1728 yachiyo.chiba.jp
1729 yokaichiba.chiba.jp
1730 yokoshibahikari.chiba.jp
1731 yotsukaido.chiba.jp
1732 ainan.ehime.jp
1733 honai.ehime.jp
1734 ikata.ehime.jp
1735 imabari.ehime.jp
1736 iyo.ehime.jp
1737 kamijima.ehime.jp
1738 kihoku.ehime.jp
1739 kumakogen.ehime.jp
1740 masaki.ehime.jp
1741 matsuno.ehime.jp
1742 matsuyama.ehime.jp
1743 namikata.ehime.jp
1744 niihama.ehime.jp
1745 ozu.ehime.jp
1746 saijo.ehime.jp
1747 seiyo.ehime.jp
1748 shikokuchuo.ehime.jp
1749 tobe.ehime.jp
1750 toon.ehime.jp
1751 uchiko.ehime.jp
1752 uwajima.ehime.jp
1753 yawatahama.ehime.jp
1754 echizen.fukui.jp
1755 eiheiji.fukui.jp
1756 fukui.fukui.jp
1757 ikeda.fukui.jp
1758 katsuyama.fukui.jp
1759 mihama.fukui.jp
1760 minamiechizen.fukui.jp
1761 obama.fukui.jp
1762 ohi.fukui.jp
1763 ono.fukui.jp
1764 sabae.fukui.jp
1765 sakai.fukui.jp
1766 takahama.fukui.jp
1767 tsuruga.fukui.jp
1768 wakasa.fukui.jp
1769 ashiya.fukuoka.jp
1770 buzen.fukuoka.jp
1771 chikugo.fukuoka.jp
1772 chikuho.fukuoka.jp
1773 chikujo.fukuoka.jp
1774 chikushino.fukuoka.jp
1775 chikuzen.fukuoka.jp
1776 chuo.fukuoka.jp
1777 dazaifu.fukuoka.jp
1778 fukuchi.fukuoka.jp
1779 hakata.fukuoka.jp
1780 higashi.fukuoka.jp
1781 hirokawa.fukuoka.jp
1782 hisayama.fukuoka.jp
1783 iizuka.fukuoka.jp
1784 inatsuki.fukuoka.jp
1785 kaho.fukuoka.jp
1786 kasuga.fukuoka.jp
1787 kasuya.fukuoka.jp
1788 kawara.fukuoka.jp
1789 keisen.fukuoka.jp
1790 koga.fukuoka.jp
1791 kurate.fukuoka.jp
1792 kurogi.fukuoka.jp
1793 kurume.fukuoka.jp
1794 minami.fukuoka.jp
1795 miyako.fukuoka.jp
1796 miyama.fukuoka.jp
1797 miyawaka.fukuoka.jp
1798 mizumaki.fukuoka.jp
1799 munakata.fukuoka.jp
1800 nakagawa.fukuoka.jp
1801 nakama.fukuoka.jp
1802 nishi.fukuoka.jp
1803 nogata.fukuoka.jp
1804 ogori.fukuoka.jp
1805 okagaki.fukuoka.jp
1806 okawa.fukuoka.jp
1807 oki.fukuoka.jp
1808 omuta.fukuoka.jp
1809 onga.fukuoka.jp
1810 onojo.fukuoka.jp
1811 oto.fukuoka.jp
1812 saigawa.fukuoka.jp
1813 sasaguri.fukuoka.jp
1814 shingu.fukuoka.jp
1815 shinyoshitomi.fukuoka.jp
1816 shonai.fukuoka.jp
1817 soeda.fukuoka.jp
1818 sue.fukuoka.jp
1819 tachiarai.fukuoka.jp
1820 tagawa.fukuoka.jp
1821 takata.fukuoka.jp
1822 toho.fukuoka.jp
1823 toyotsu.fukuoka.jp
1824 tsuiki.fukuoka.jp
1825 ukiha.fukuoka.jp
1826 umi.fukuoka.jp
1827 usui.fukuoka.jp
1828 yamada.fukuoka.jp
1829 yame.fukuoka.jp
1830 yanagawa.fukuoka.jp
1831 yukuhashi.fukuoka.jp
1832 aizubange.fukushima.jp
1833 aizumisato.fukushima.jp
1834 aizuwakamatsu.fukushima.jp
1835 asakawa.fukushima.jp
1836 bandai.fukushima.jp
1837 date.fukushima.jp
1838 fukushima.fukushima.jp
1839 furudono.fukushima.jp
1840 futaba.fukushima.jp
1841 hanawa.fukushima.jp
1842 higashi.fukushima.jp
1843 hirata.fukushima.jp
1844 hirono.fukushima.jp
1845 iitate.fukushima.jp
1846 inawashiro.fukushima.jp
1847 ishikawa.fukushima.jp
1848 iwaki.fukushima.jp
1849 izumizaki.fukushima.jp
1850 kagamiishi.fukushima.jp
1851 kaneyama.fukushima.jp
1852 kawamata.fukushima.jp
1853 kitakata.fukushima.jp
1854 kitashiobara.fukushima.jp
1855 koori.fukushima.jp
1856 koriyama.fukushima.jp
1857 kunimi.fukushima.jp
1858 miharu.fukushima.jp
1859 mishima.fukushima.jp
1860 namie.fukushima.jp
1861 nango.fukushima.jp
1862 nishiaizu.fukushima.jp
1863 nishigo.fukushima.jp
1864 okuma.fukushima.jp
1865 omotego.fukushima.jp
1866 ono.fukushima.jp
1867 otama.fukushima.jp
1868 samegawa.fukushima.jp
1869 shimogo.fukushima.jp
1870 shirakawa.fukushima.jp
1871 showa.fukushima.jp
1872 soma.fukushima.jp
1873 sukagawa.fukushima.jp
1874 taishin.fukushima.jp
1875 tamakawa.fukushima.jp
1876 tanagura.fukushima.jp
1877 tenei.fukushima.jp
1878 yabuki.fukushima.jp
1879 yamato.fukushima.jp
1880 yamatsuri.fukushima.jp
1881 yanaizu.fukushima.jp
1882 yugawa.fukushima.jp
1883 anpachi.gifu.jp
1884 ena.gifu.jp
1885 gifu.gifu.jp
1886 ginan.gifu.jp
1887 godo.gifu.jp
1888 gujo.gifu.jp
1889 hashima.gifu.jp
1890 hichiso.gifu.jp
1891 hida.gifu.jp
1892 higashishirakawa.gifu.jp
1893 ibigawa.gifu.jp
1894 ikeda.gifu.jp
1895 kakamigahara.gifu.jp
1896 kani.gifu.jp
1897 kasahara.gifu.jp
1898 kasamatsu.gifu.jp
1899 kawaue.gifu.jp
1900 kitagata.gifu.jp
1901 mino.gifu.jp
1902 minokamo.gifu.jp
1903 mitake.gifu.jp
1904 mizunami.gifu.jp
1905 motosu.gifu.jp
1906 nakatsugawa.gifu.jp
1907 ogaki.gifu.jp
1908 sakahogi.gifu.jp
1909 seki.gifu.jp
1910 sekigahara.gifu.jp
1911 shirakawa.gifu.jp
1912 tajimi.gifu.jp
1913 takayama.gifu.jp
1914 tarui.gifu.jp
1915 toki.gifu.jp
1916 tomika.gifu.jp
1917 wanouchi.gifu.jp
1918 yamagata.gifu.jp
1919 yaotsu.gifu.jp
1920 yoro.gifu.jp
1921 annaka.gunma.jp
1922 chiyoda.gunma.jp
1923 fujioka.gunma.jp
1924 higashiagatsuma.gunma.jp
1925 isesaki.gunma.jp
1926 itakura.gunma.jp
1927 kanna.gunma.jp
1928 kanra.gunma.jp
1929 katashina.gunma.jp
1930 kawaba.gunma.jp
1931 kiryu.gunma.jp
1932 kusatsu.gunma.jp
1933 maebashi.gunma.jp
1934 meiwa.gunma.jp
1935 midori.gunma.jp
1936 minakami.gunma.jp
1937 naganohara.gunma.jp
1938 nakanojo.gunma.jp
1939 nanmoku.gunma.jp
1940 numata.gunma.jp
1941 oizumi.gunma.jp
1942 ora.gunma.jp
1943 ota.gunma.jp
1944 shibukawa.gunma.jp
1945 shimonita.gunma.jp
1946 shinto.gunma.jp
1947 showa.gunma.jp
1948 takasaki.gunma.jp
1949 takayama.gunma.jp
1950 tamamura.gunma.jp
1951 tatebayashi.gunma.jp
1952 tomioka.gunma.jp
1953 tsukiyono.gunma.jp
1954 tsumagoi.gunma.jp
1955 ueno.gunma.jp
1956 yoshioka.gunma.jp
1957 asaminami.hiroshima.jp
1958 daiwa.hiroshima.jp
1959 etajima.hiroshima.jp
1960 fuchu.hiroshima.jp
1961 fukuyama.hiroshima.jp
1962 hatsukaichi.hiroshima.jp
1963 higashihiroshima.hiroshima.jp
1964 hongo.hiroshima.jp
1965 jinsekikogen.hiroshima.jp
1966 kaita.hiroshima.jp
1967 kui.hiroshima.jp
1968 kumano.hiroshima.jp
1969 kure.hiroshima.jp
1970 mihara.hiroshima.jp
1971 miyoshi.hiroshima.jp
1972 naka.hiroshima.jp
1973 onomichi.hiroshima.jp
1974 osakikamijima.hiroshima.jp
1975 otake.hiroshima.jp
1976 saka.hiroshima.jp
1977 sera.hiroshima.jp
1978 seranishi.hiroshima.jp
1979 shinichi.hiroshima.jp
1980 shobara.hiroshima.jp
1981 takehara.hiroshima.jp
1982 abashiri.hokkaido.jp
1983 abira.hokkaido.jp
1984 aibetsu.hokkaido.jp
1985 akabira.hokkaido.jp
1986 akkeshi.hokkaido.jp
1987 asahikawa.hokkaido.jp
1988 ashibetsu.hokkaido.jp
1989 ashoro.hokkaido.jp
1990 assabu.hokkaido.jp
1991 atsuma.hokkaido.jp
1992 bibai.hokkaido.jp
1993 biei.hokkaido.jp
1994 bifuka.hokkaido.jp
1995 bihoro.hokkaido.jp
1996 biratori.hokkaido.jp
1997 chippubetsu.hokkaido.jp
1998 chitose.hokkaido.jp
1999 date.hokkaido.jp
2000 ebetsu.hokkaido.jp
2001 embetsu.hokkaido.jp
2002 eniwa.hokkaido.jp
2003 erimo.hokkaido.jp
2004 esan.hokkaido.jp
2005 esashi.hokkaido.jp
2006 fukagawa.hokkaido.jp
2007 fukushima.hokkaido.jp
2008 furano.hokkaido.jp
2009 furubira.hokkaido.jp
2010 haboro.hokkaido.jp
2011 hakodate.hokkaido.jp
2012 hamatonbetsu.hokkaido.jp
2013 hidaka.hokkaido.jp
2014 higashikagura.hokkaido.jp
2015 higashikawa.hokkaido.jp
2016 hiroo.hokkaido.jp
2017 hokuryu.hokkaido.jp
2018 hokuto.hokkaido.jp
2019 honbetsu.hokkaido.jp
2020 horokanai.hokkaido.jp
2021 horonobe.hokkaido.jp
2022 ikeda.hokkaido.jp
2023 imakane.hokkaido.jp
2024 ishikari.hokkaido.jp
2025 iwamizawa.hokkaido.jp
2026 iwanai.hokkaido.jp
2027 kamifurano.hokkaido.jp
2028 kamikawa.hokkaido.jp
2029 kamishihoro.hokkaido.jp
2030 kamisunagawa.hokkaido.jp
2031 kamoenai.hokkaido.jp
2032 kayabe.hokkaido.jp
2033 kembuchi.hokkaido.jp
2034 kikonai.hokkaido.jp
2035 kimobetsu.hokkaido.jp
2036 kitahiroshima.hokkaido.jp
2037 kitami.hokkaido.jp
2038 kiyosato.hokkaido.jp
2039 koshimizu.hokkaido.jp
2040 kunneppu.hokkaido.jp
2041 kuriyama.hokkaido.jp
2042 kuromatsunai.hokkaido.jp
2043 kushiro.hokkaido.jp
2044 kutchan.hokkaido.jp
2045 kyowa.hokkaido.jp
2046 mashike.hokkaido.jp
2047 matsumae.hokkaido.jp
2048 mikasa.hokkaido.jp
2049 minamifurano.hokkaido.jp
2050 mombetsu.hokkaido.jp
2051 moseushi.hokkaido.jp
2052 mukawa.hokkaido.jp
2053 muroran.hokkaido.jp
2054 naie.hokkaido.jp
2055 nakagawa.hokkaido.jp
2056 nakasatsunai.hokkaido.jp
2057 nakatombetsu.hokkaido.jp
2058 nanae.hokkaido.jp
2059 nanporo.hokkaido.jp
2060 nayoro.hokkaido.jp
2061 nemuro.hokkaido.jp
2062 niikappu.hokkaido.jp
2063 niki.hokkaido.jp
2064 nishiokoppe.hokkaido.jp
2065 noboribetsu.hokkaido.jp
2066 numata.hokkaido.jp
2067 obihiro.hokkaido.jp
2068 obira.hokkaido.jp
2069 oketo.hokkaido.jp
2070 okoppe.hokkaido.jp
2071 otaru.hokkaido.jp
2072 otobe.hokkaido.jp
2073 otofuke.hokkaido.jp
2074 otoineppu.hokkaido.jp
2075 oumu.hokkaido.jp
2076 ozora.hokkaido.jp
2077 pippu.hokkaido.jp
2078 rankoshi.hokkaido.jp
2079 rebun.hokkaido.jp
2080 rikubetsu.hokkaido.jp
2081 rishiri.hokkaido.jp
2082 rishirifuji.hokkaido.jp
2083 saroma.hokkaido.jp
2084 sarufutsu.hokkaido.jp
2085 shakotan.hokkaido.jp
2086 shari.hokkaido.jp
2087 shibecha.hokkaido.jp
2088 shibetsu.hokkaido.jp
2089 shikabe.hokkaido.jp
2090 shikaoi.hokkaido.jp
2091 shimamaki.hokkaido.jp
2092 shimizu.hokkaido.jp
2093 shimokawa.hokkaido.jp
2094 shinshinotsu.hokkaido.jp
2095 shintoku.hokkaido.jp
2096 shiranuka.hokkaido.jp
2097 shiraoi.hokkaido.jp
2098 shiriuchi.hokkaido.jp
2099 sobetsu.hokkaido.jp
2100 sunagawa.hokkaido.jp
2101 taiki.hokkaido.jp
2102 takasu.hokkaido.jp
2103 takikawa.hokkaido.jp
2104 takinoue.hokkaido.jp
2105 teshikaga.hokkaido.jp
2106 tobetsu.hokkaido.jp
2107 tohma.hokkaido.jp
2108 tomakomai.hokkaido.jp
2109 tomari.hokkaido.jp
2110 toya.hokkaido.jp
2111 toyako.hokkaido.jp
2112 toyotomi.hokkaido.jp
2113 toyoura.hokkaido.jp
2114 tsubetsu.hokkaido.jp
2115 tsukigata.hokkaido.jp
2116 urakawa.hokkaido.jp
2117 urausu.hokkaido.jp
2118 uryu.hokkaido.jp
2119 utashinai.hokkaido.jp
2120 wakkanai.hokkaido.jp
2121 wassamu.hokkaido.jp
2122 yakumo.hokkaido.jp
2123 yoichi.hokkaido.jp
2124 aioi.hyogo.jp
2125 akashi.hyogo.jp
2126 ako.hyogo.jp
2127 amagasaki.hyogo.jp
2128 aogaki.hyogo.jp
2129 asago.hyogo.jp
2130 ashiya.hyogo.jp
2131 awaji.hyogo.jp
2132 fukusaki.hyogo.jp
2133 goshiki.hyogo.jp
2134 harima.hyogo.jp
2135 himeji.hyogo.jp
2136 ichikawa.hyogo.jp
2137 inagawa.hyogo.jp
2138 itami.hyogo.jp
2139 kakogawa.hyogo.jp
2140 kamigori.hyogo.jp
2141 kamikawa.hyogo.jp
2142 kasai.hyogo.jp
2143 kasuga.hyogo.jp
2144 kawanishi.hyogo.jp
2145 miki.hyogo.jp
2146 minamiawaji.hyogo.jp
2147 nishinomiya.hyogo.jp
2148 nishiwaki.hyogo.jp
2149 ono.hyogo.jp
2150 sanda.hyogo.jp
2151 sannan.hyogo.jp
2152 sasayama.hyogo.jp
2153 sayo.hyogo.jp
2154 shingu.hyogo.jp
2155 shinonsen.hyogo.jp
2156 shiso.hyogo.jp
2157 sumoto.hyogo.jp
2158 taishi.hyogo.jp
2159 taka.hyogo.jp
2160 takarazuka.hyogo.jp
2161 takasago.hyogo.jp
2162 takino.hyogo.jp
2163 tamba.hyogo.jp
2164 tatsuno.hyogo.jp
2165 toyooka.hyogo.jp
2166 yabu.hyogo.jp
2167 yashiro.hyogo.jp
2168 yoka.hyogo.jp
2169 yokawa.hyogo.jp
2170 ami.ibaraki.jp
2171 asahi.ibaraki.jp
2172 bando.ibaraki.jp
2173 chikusei.ibaraki.jp
2174 daigo.ibaraki.jp
2175 fujishiro.ibaraki.jp
2176 hitachi.ibaraki.jp
2177 hitachinaka.ibaraki.jp
2178 hitachiomiya.ibaraki.jp
2179 hitachiota.ibaraki.jp
2180 ibaraki.ibaraki.jp
2181 ina.ibaraki.jp
2182 inashiki.ibaraki.jp
2183 itako.ibaraki.jp
2184 iwama.ibaraki.jp
2185 joso.ibaraki.jp
2186 kamisu.ibaraki.jp
2187 kasama.ibaraki.jp
2188 kashima.ibaraki.jp
2189 kasumigaura.ibaraki.jp
2190 koga.ibaraki.jp
2191 miho.ibaraki.jp
2192 mito.ibaraki.jp
2193 moriya.ibaraki.jp
2194 naka.ibaraki.jp
2195 namegata.ibaraki.jp
2196 oarai.ibaraki.jp
2197 ogawa.ibaraki.jp
2198 omitama.ibaraki.jp
2199 ryugasaki.ibaraki.jp
2200 sakai.ibaraki.jp
2201 sakuragawa.ibaraki.jp
2202 shimodate.ibaraki.jp
2203 shimotsuma.ibaraki.jp
2204 shirosato.ibaraki.jp
2205 sowa.ibaraki.jp
2206 suifu.ibaraki.jp
2207 takahagi.ibaraki.jp
2208 tamatsukuri.ibaraki.jp
2209 tokai.ibaraki.jp
2210 tomobe.ibaraki.jp
2211 tone.ibaraki.jp
2212 toride.ibaraki.jp
2213 tsuchiura.ibaraki.jp
2214 tsukuba.ibaraki.jp
2215 uchihara.ibaraki.jp
2216 ushiku.ibaraki.jp
2217 yachiyo.ibaraki.jp
2218 yamagata.ibaraki.jp
2219 yawara.ibaraki.jp
2220 yuki.ibaraki.jp
2221 anamizu.ishikawa.jp
2222 hakui.ishikawa.jp
2223 hakusan.ishikawa.jp
2224 kaga.ishikawa.jp
2225 kahoku.ishikawa.jp
2226 kanazawa.ishikawa.jp
2227 kawakita.ishikawa.jp
2228 komatsu.ishikawa.jp
2229 nakanoto.ishikawa.jp
2230 nanao.ishikawa.jp
2231 nomi.ishikawa.jp
2232 nonoichi.ishikawa.jp
2233 noto.ishikawa.jp
2234 shika.ishikawa.jp
2235 suzu.ishikawa.jp
2236 tsubata.ishikawa.jp
2237 tsurugi.ishikawa.jp
2238 uchinada.ishikawa.jp
2239 wajima.ishikawa.jp
2240 fudai.iwate.jp
2241 fujisawa.iwate.jp
2242 hanamaki.iwate.jp
2243 hiraizumi.iwate.jp
2244 hirono.iwate.jp
2245 ichinohe.iwate.jp
2246 ichinoseki.iwate.jp
2247 iwaizumi.iwate.jp
2248 iwate.iwate.jp
2249 joboji.iwate.jp
2250 kamaishi.iwate.jp
2251 kanegasaki.iwate.jp
2252 karumai.iwate.jp
2253 kawai.iwate.jp
2254 kitakami.iwate.jp
2255 kuji.iwate.jp
2256 kunohe.iwate.jp
2257 kuzumaki.iwate.jp
2258 miyako.iwate.jp
2259 mizusawa.iwate.jp
2260 morioka.iwate.jp
2261 ninohe.iwate.jp
2262 noda.iwate.jp
2263 ofunato.iwate.jp
2264 oshu.iwate.jp
2265 otsuchi.iwate.jp
2266 rikuzentakata.iwate.jp
2267 shiwa.iwate.jp
2268 shizukuishi.iwate.jp
2269 sumita.iwate.jp
2270 takizawa.iwate.jp
2271 tanohata.iwate.jp
2272 tono.iwate.jp
2273 yahaba.iwate.jp
2274 yamada.iwate.jp
2275 ayagawa.kagawa.jp
2276 higashikagawa.kagawa.jp
2277 kanonji.kagawa.jp
2278 kotohira.kagawa.jp
2279 manno.kagawa.jp
2280 marugame.kagawa.jp
2281 mitoyo.kagawa.jp
2282 naoshima.kagawa.jp
2283 sanuki.kagawa.jp
2284 tadotsu.kagawa.jp
2285 takamatsu.kagawa.jp
2286 tonosho.kagawa.jp
2287 uchinomi.kagawa.jp
2288 utazu.kagawa.jp
2289 zentsuji.kagawa.jp
2290 akune.kagoshima.jp
2291 amami.kagoshima.jp
2292 hioki.kagoshima.jp
2293 isa.kagoshima.jp
2294 isen.kagoshima.jp
2295 izumi.kagoshima.jp
2296 kagoshima.kagoshima.jp
2297 kanoya.kagoshima.jp
2298 kawanabe.kagoshima.jp
2299 kinko.kagoshima.jp
2300 kouyama.kagoshima.jp
2301 makurazaki.kagoshima.jp
2302 matsumoto.kagoshima.jp
2303 minamitane.kagoshima.jp
2304 nakatane.kagoshima.jp
2305 nishinoomote.kagoshima.jp
2306 satsumasendai.kagoshima.jp
2307 soo.kagoshima.jp
2308 tarumizu.kagoshima.jp
2309 yusui.kagoshima.jp
2310 aikawa.kanagawa.jp
2311 atsugi.kanagawa.jp
2312 ayase.kanagawa.jp
2313 chigasaki.kanagawa.jp
2314 ebina.kanagawa.jp
2315 fujisawa.kanagawa.jp
2316 hadano.kanagawa.jp
2317 hakone.kanagawa.jp
2318 hiratsuka.kanagawa.jp
2319 isehara.kanagawa.jp
2320 kaisei.kanagawa.jp
2321 kamakura.kanagawa.jp
2322 kiyokawa.kanagawa.jp
2323 matsuda.kanagawa.jp
2324 minamiashigara.kanagawa.jp
2325 miura.kanagawa.jp
2326 nakai.kanagawa.jp
2327 ninomiya.kanagawa.jp
2328 odawara.kanagawa.jp
2329 oi.kanagawa.jp
2330 oiso.kanagawa.jp
2331 sagamihara.kanagawa.jp
2332 samukawa.kanagawa.jp
2333 tsukui.kanagawa.jp
2334 yamakita.kanagawa.jp
2335 yamato.kanagawa.jp
2336 yokosuka.kanagawa.jp
2337 yugawara.kanagawa.jp
2338 zama.kanagawa.jp
2339 zushi.kanagawa.jp
2340 aki.kochi.jp
2341 geisei.kochi.jp
2342 hidaka.kochi.jp
2343 higashitsuno.kochi.jp
2344 ino.kochi.jp
2345 kagami.kochi.jp
2346 kami.kochi.jp
2347 kitagawa.kochi.jp
2348 kochi.kochi.jp
2349 mihara.kochi.jp
2350 motoyama.kochi.jp
2351 muroto.kochi.jp
2352 nahari.kochi.jp
2353 nakamura.kochi.jp
2354 nankoku.kochi.jp
2355 nishitosa.kochi.jp
2356 niyodogawa.kochi.jp
2357 ochi.kochi.jp
2358 okawa.kochi.jp
2359 otoyo.kochi.jp
2360 otsuki.kochi.jp
2361 sakawa.kochi.jp
2362 sukumo.kochi.jp
2363 susaki.kochi.jp
2364 tosa.kochi.jp
2365 tosashimizu.kochi.jp
2366 toyo.kochi.jp
2367 tsuno.kochi.jp
2368 umaji.kochi.jp
2369 yasuda.kochi.jp
2370 yusuhara.kochi.jp
2371 amakusa.kumamoto.jp
2372 arao.kumamoto.jp
2373 aso.kumamoto.jp
2374 choyo.kumamoto.jp
2375 gyokuto.kumamoto.jp
2376 hitoyoshi.kumamoto.jp
2377 kamiamakusa.kumamoto.jp
2378 kashima.kumamoto.jp
2379 kikuchi.kumamoto.jp
2380 kosa.kumamoto.jp
2381 kumamoto.kumamoto.jp
2382 mashiki.kumamoto.jp
2383 mifune.kumamoto.jp
2384 minamata.kumamoto.jp
2385 minamioguni.kumamoto.jp
2386 nagasu.kumamoto.jp
2387 nishihara.kumamoto.jp
2388 oguni.kumamoto.jp
2389 ozu.kumamoto.jp
2390 sumoto.kumamoto.jp
2391 takamori.kumamoto.jp
2392 uki.kumamoto.jp
2393 uto.kumamoto.jp
2394 yamaga.kumamoto.jp
2395 yamato.kumamoto.jp
2396 yatsushiro.kumamoto.jp
2397 ayabe.kyoto.jp
2398 fukuchiyama.kyoto.jp
2399 higashiyama.kyoto.jp
2400 ide.kyoto.jp
2401 ine.kyoto.jp
2402 joyo.kyoto.jp
2403 kameoka.kyoto.jp
2404 kamo.kyoto.jp
2405 kita.kyoto.jp
2406 kizu.kyoto.jp
2407 kumiyama.kyoto.jp
2408 kyotamba.kyoto.jp
2409 kyotanabe.kyoto.jp
2410 kyotango.kyoto.jp
2411 maizuru.kyoto.jp
2412 minami.kyoto.jp
2413 minamiyamashiro.kyoto.jp
2414 miyazu.kyoto.jp
2415 muko.kyoto.jp
2416 nagaokakyo.kyoto.jp
2417 nakagyo.kyoto.jp
2418 nantan.kyoto.jp
2419 oyamazaki.kyoto.jp
2420 sakyo.kyoto.jp
2421 seika.kyoto.jp
2422 tanabe.kyoto.jp
2423 uji.kyoto.jp
2424 ujitawara.kyoto.jp
2425 wazuka.kyoto.jp
2426 yamashina.kyoto.jp
2427 yawata.kyoto.jp
2428 asahi.mie.jp
2429 inabe.mie.jp
2430 ise.mie.jp
2431 kameyama.mie.jp
2432 kawagoe.mie.jp
2433 kiho.mie.jp
2434 kisosaki.mie.jp
2435 kiwa.mie.jp
2436 komono.mie.jp
2437 kumano.mie.jp
2438 kuwana.mie.jp
2439 matsusaka.mie.jp
2440 meiwa.mie.jp
2441 mihama.mie.jp
2442 minamiise.mie.jp
2443 misugi.mie.jp
2444 miyama.mie.jp
2445 nabari.mie.jp
2446 shima.mie.jp
2447 suzuka.mie.jp
2448 tado.mie.jp
2449 taiki.mie.jp
2450 taki.mie.jp
2451 tamaki.mie.jp
2452 toba.mie.jp
2453 tsu.mie.jp
2454 udono.mie.jp
2455 ureshino.mie.jp
2456 watarai.mie.jp
2457 yokkaichi.mie.jp
2458 furukawa.miyagi.jp
2459 higashimatsushima.miyagi.jp
2460 ishinomaki.miyagi.jp
2461 iwanuma.miyagi.jp
2462 kakuda.miyagi.jp
2463 kami.miyagi.jp
2464 kawasaki.miyagi.jp
2465 kesennuma.miyagi.jp
2466 marumori.miyagi.jp
2467 matsushima.miyagi.jp
2468 minamisanriku.miyagi.jp
2469 misato.miyagi.jp
2470 murata.miyagi.jp
2471 natori.miyagi.jp
2472 ogawara.miyagi.jp
2473 ohira.miyagi.jp
2474 onagawa.miyagi.jp
2475 osaki.miyagi.jp
2476 rifu.miyagi.jp
2477 semine.miyagi.jp
2478 shibata.miyagi.jp
2479 shichikashuku.miyagi.jp
2480 shikama.miyagi.jp
2481 shiogama.miyagi.jp
2482 shiroishi.miyagi.jp
2483 tagajo.miyagi.jp
2484 taiwa.miyagi.jp
2485 tome.miyagi.jp
2486 tomiya.miyagi.jp
2487 wakuya.miyagi.jp
2488 watari.miyagi.jp
2489 yamamoto.miyagi.jp
2490 zao.miyagi.jp
2491 aya.miyazaki.jp
2492 ebino.miyazaki.jp
2493 gokase.miyazaki.jp
2494 hyuga.miyazaki.jp
2495 kadogawa.miyazaki.jp
2496 kawaminami.miyazaki.jp
2497 kijo.miyazaki.jp
2498 kitagawa.miyazaki.jp
2499 kitakata.miyazaki.jp
2500 kitaura.miyazaki.jp
2501 kobayashi.miyazaki.jp
2502 kunitomi.miyazaki.jp
2503 kushima.miyazaki.jp
2504 mimata.miyazaki.jp
2505 miyakonojo.miyazaki.jp
2506 miyazaki.miyazaki.jp
2507 morotsuka.miyazaki.jp
2508 nichinan.miyazaki.jp
2509 nishimera.miyazaki.jp
2510 nobeoka.miyazaki.jp
2511 saito.miyazaki.jp
2512 shiiba.miyazaki.jp
2513 shintomi.miyazaki.jp
2514 takaharu.miyazaki.jp
2515 takanabe.miyazaki.jp
2516 takazaki.miyazaki.jp
2517 tsuno.miyazaki.jp
2518 achi.nagano.jp
2519 agematsu.nagano.jp
2520 anan.nagano.jp
2521 aoki.nagano.jp
2522 asahi.nagano.jp
2523 azumino.nagano.jp
2524 chikuhoku.nagano.jp
2525 chikuma.nagano.jp
2526 chino.nagano.jp
2527 fujimi.nagano.jp
2528 hakuba.nagano.jp
2529 hara.nagano.jp
2530 hiraya.nagano.jp
2531 iida.nagano.jp
2532 iijima.nagano.jp
2533 iiyama.nagano.jp
2534 iizuna.nagano.jp
2535 ikeda.nagano.jp
2536 ikusaka.nagano.jp
2537 ina.nagano.jp
2538 karuizawa.nagano.jp
2539 kawakami.nagano.jp
2540 kiso.nagano.jp
2541 kisofukushima.nagano.jp
2542 kitaaiki.nagano.jp
2543 komagane.nagano.jp
2544 komoro.nagano.jp
2545 matsukawa.nagano.jp
2546 matsumoto.nagano.jp
2547 miasa.nagano.jp
2548 minamiaiki.nagano.jp
2549 minamimaki.nagano.jp
2550 minamiminowa.nagano.jp
2551 minowa.nagano.jp
2552 miyada.nagano.jp
2553 miyota.nagano.jp
2554 mochizuki.nagano.jp
2555 nagano.nagano.jp
2556 nagawa.nagano.jp
2557 nagiso.nagano.jp
2558 nakagawa.nagano.jp
2559 nakano.nagano.jp
2560 nozawaonsen.nagano.jp
2561 obuse.nagano.jp
2562 ogawa.nagano.jp
2563 okaya.nagano.jp
2564 omachi.nagano.jp
2565 omi.nagano.jp
2566 ookuwa.nagano.jp
2567 ooshika.nagano.jp
2568 otaki.nagano.jp
2569 otari.nagano.jp
2570 sakae.nagano.jp
2571 sakaki.nagano.jp
2572 saku.nagano.jp
2573 sakuho.nagano.jp
2574 shimosuwa.nagano.jp
2575 shinanomachi.nagano.jp
2576 shiojiri.nagano.jp
2577 suwa.nagano.jp
2578 suzaka.nagano.jp
2579 takagi.nagano.jp
2580 takamori.nagano.jp
2581 takayama.nagano.jp
2582 tateshina.nagano.jp
2583 tatsuno.nagano.jp
2584 togakushi.nagano.jp
2585 togura.nagano.jp
2586 tomi.nagano.jp
2587 ueda.nagano.jp
2588 wada.nagano.jp
2589 yamagata.nagano.jp
2590 yamanouchi.nagano.jp
2591 yasaka.nagano.jp
2592 yasuoka.nagano.jp
2593 chijiwa.nagasaki.jp
2594 futsu.nagasaki.jp
2595 goto.nagasaki.jp
2596 hasami.nagasaki.jp
2597 hirado.nagasaki.jp
2598 iki.nagasaki.jp
2599 isahaya.nagasaki.jp
2600 kawatana.nagasaki.jp
2601 kuchinotsu.nagasaki.jp
2602 matsuura.nagasaki.jp
2603 nagasaki.nagasaki.jp
2604 obama.nagasaki.jp
2605 omura.nagasaki.jp
2606 oseto.nagasaki.jp
2607 saikai.nagasaki.jp
2608 sasebo.nagasaki.jp
2609 seihi.nagasaki.jp
2610 shimabara.nagasaki.jp
2611 shinkamigoto.nagasaki.jp
2612 togitsu.nagasaki.jp
2613 tsushima.nagasaki.jp
2614 unzen.nagasaki.jp
2615 ando.nara.jp
2616 gose.nara.jp
2617 heguri.nara.jp
2618 higashiyoshino.nara.jp
2619 ikaruga.nara.jp
2620 ikoma.nara.jp
2621 kamikitayama.nara.jp
2622 kanmaki.nara.jp
2623 kashiba.nara.jp
2624 kashihara.nara.jp
2625 katsuragi.nara.jp
2626 kawai.nara.jp
2627 kawakami.nara.jp
2628 kawanishi.nara.jp
2629 koryo.nara.jp
2630 kurotaki.nara.jp
2631 mitsue.nara.jp
2632 miyake.nara.jp
2633 nara.nara.jp
2634 nosegawa.nara.jp
2635 oji.nara.jp
2636 ouda.nara.jp
2637 oyodo.nara.jp
2638 sakurai.nara.jp
2639 sango.nara.jp
2640 shimoichi.nara.jp
2641 shimokitayama.nara.jp
2642 shinjo.nara.jp
2643 soni.nara.jp
2644 takatori.nara.jp
2645 tawaramoto.nara.jp
2646 tenkawa.nara.jp
2647 tenri.nara.jp
2648 uda.nara.jp
2649 yamatokoriyama.nara.jp
2650 yamatotakada.nara.jp
2651 yamazoe.nara.jp
2652 yoshino.nara.jp
2653 aga.niigata.jp
2654 agano.niigata.jp
2655 gosen.niigata.jp
2656 itoigawa.niigata.jp
2657 izumozaki.niigata.jp
2658 joetsu.niigata.jp
2659 kamo.niigata.jp
2660 kariwa.niigata.jp
2661 kashiwazaki.niigata.jp
2662 minamiuonuma.niigata.jp
2663 mitsuke.niigata.jp
2664 muika.niigata.jp
2665 murakami.niigata.jp
2666 myoko.niigata.jp
2667 nagaoka.niigata.jp
2668 niigata.niigata.jp
2669 ojiya.niigata.jp
2670 omi.niigata.jp
2671 sado.niigata.jp
2672 sanjo.niigata.jp
2673 seiro.niigata.jp
2674 seirou.niigata.jp
2675 sekikawa.niigata.jp
2676 shibata.niigata.jp
2677 tagami.niigata.jp
2678 tainai.niigata.jp
2679 tochio.niigata.jp
2680 tokamachi.niigata.jp
2681 tsubame.niigata.jp
2682 tsunan.niigata.jp
2683 uonuma.niigata.jp
2684 yahiko.niigata.jp
2685 yoita.niigata.jp
2686 yuzawa.niigata.jp
2687 beppu.oita.jp
2688 bungoono.oita.jp
2689 bungotakada.oita.jp
2690 hasama.oita.jp
2691 hiji.oita.jp
2692 himeshima.oita.jp
2693 hita.oita.jp
2694 kamitsue.oita.jp
2695 kokonoe.oita.jp
2696 kuju.oita.jp
2697 kunisaki.oita.jp
2698 kusu.oita.jp
2699 oita.oita.jp
2700 saiki.oita.jp
2701 taketa.oita.jp
2702 tsukumi.oita.jp
2703 usa.oita.jp
2704 usuki.oita.jp
2705 yufu.oita.jp
2706 akaiwa.okayama.jp
2707 asakuchi.okayama.jp
2708 bizen.okayama.jp
2709 hayashima.okayama.jp
2710 ibara.okayama.jp
2711 kagamino.okayama.jp
2712 kasaoka.okayama.jp
2713 kibichuo.okayama.jp
2714 kumenan.okayama.jp
2715 kurashiki.okayama.jp
2716 maniwa.okayama.jp
2717 misaki.okayama.jp
2718 nagi.okayama.jp
2719 niimi.okayama.jp
2720 nishiawakura.okayama.jp
2721 okayama.okayama.jp
2722 satosho.okayama.jp
2723 setouchi.okayama.jp
2724 shinjo.okayama.jp
2725 shoo.okayama.jp
2726 soja.okayama.jp
2727 takahashi.okayama.jp
2728 tamano.okayama.jp
2729 tsuyama.okayama.jp
2730 wake.okayama.jp
2731 yakage.okayama.jp
2732 aguni.okinawa.jp
2733 ginowan.okinawa.jp
2734 ginoza.okinawa.jp
2735 gushikami.okinawa.jp
2736 haebaru.okinawa.jp
2737 higashi.okinawa.jp
2738 hirara.okinawa.jp
2739 iheya.okinawa.jp
2740 ishigaki.okinawa.jp
2741 ishikawa.okinawa.jp
2742 itoman.okinawa.jp
2743 izena.okinawa.jp
2744 kadena.okinawa.jp
2745 kin.okinawa.jp
2746 kitadaito.okinawa.jp
2747 kitanakagusuku.okinawa.jp
2748 kumejima.okinawa.jp
2749 kunigami.okinawa.jp
2750 minamidaito.okinawa.jp
2751 motobu.okinawa.jp
2752 nago.okinawa.jp
2753 naha.okinawa.jp
2754 nakagusuku.okinawa.jp
2755 nakijin.okinawa.jp
2756 nanjo.okinawa.jp
2757 nishihara.okinawa.jp
2758 ogimi.okinawa.jp
2759 okinawa.okinawa.jp
2760 onna.okinawa.jp
2761 shimoji.okinawa.jp
2762 taketomi.okinawa.jp
2763 tarama.okinawa.jp
2764 tokashiki.okinawa.jp
2765 tomigusuku.okinawa.jp
2766 tonaki.okinawa.jp
2767 urasoe.okinawa.jp
2768 uruma.okinawa.jp
2769 yaese.okinawa.jp
2770 yomitan.okinawa.jp
2771 yonabaru.okinawa.jp
2772 yonaguni.okinawa.jp
2773 zamami.okinawa.jp
2774 abeno.osaka.jp
2775 chihayaakasaka.osaka.jp
2776 chuo.osaka.jp
2777 daito.osaka.jp
2778 fujiidera.osaka.jp
2779 habikino.osaka.jp
2780 hannan.osaka.jp
2781 higashiosaka.osaka.jp
2782 higashisumiyoshi.osaka.jp
2783 higashiyodogawa.osaka.jp
2784 hirakata.osaka.jp
2785 ibaraki.osaka.jp
2786 ikeda.osaka.jp
2787 izumi.osaka.jp
2788 izumiotsu.osaka.jp
2789 izumisano.osaka.jp
2790 kadoma.osaka.jp
2791 kaizuka.osaka.jp
2792 kanan.osaka.jp
2793 kashiwara.osaka.jp
2794 katano.osaka.jp
2795 kawachinagano.osaka.jp
2796 kishiwada.osaka.jp
2797 kita.osaka.jp
2798 kumatori.osaka.jp
2799 matsubara.osaka.jp
2800 minato.osaka.jp
2801 minoh.osaka.jp
2802 misaki.osaka.jp
2803 moriguchi.osaka.jp
2804 neyagawa.osaka.jp
2805 nishi.osaka.jp
2806 nose.osaka.jp
2807 osakasayama.osaka.jp
2808 sakai.osaka.jp
2809 sayama.osaka.jp
2810 sennan.osaka.jp
2811 settsu.osaka.jp
2812 shijonawate.osaka.jp
2813 shimamoto.osaka.jp
2814 suita.osaka.jp
2815 tadaoka.osaka.jp
2816 taishi.osaka.jp
2817 tajiri.osaka.jp
2818 takaishi.osaka.jp
2819 takatsuki.osaka.jp
2820 tondabayashi.osaka.jp
2821 toyonaka.osaka.jp
2822 toyono.osaka.jp
2823 yao.osaka.jp
2824 ariake.saga.jp
2825 arita.saga.jp
2826 fukudomi.saga.jp
2827 genkai.saga.jp
2828 hamatama.saga.jp
2829 hizen.saga.jp
2830 imari.saga.jp
2831 kamimine.saga.jp
2832 kanzaki.saga.jp
2833 karatsu.saga.jp
2834 kashima.saga.jp
2835 kitagata.saga.jp
2836 kitahata.saga.jp
2837 kiyama.saga.jp
2838 kouhoku.saga.jp
2839 kyuragi.saga.jp
2840 nishiarita.saga.jp
2841 ogi.saga.jp
2842 omachi.saga.jp
2843 ouchi.saga.jp
2844 saga.saga.jp
2845 shiroishi.saga.jp
2846 taku.saga.jp
2847 tara.saga.jp
2848 tosu.saga.jp
2849 yoshinogari.saga.jp
2850 arakawa.saitama.jp
2851 asaka.saitama.jp
2852 chichibu.saitama.jp
2853 fujimi.saitama.jp
2854 fujimino.saitama.jp
2855 fukaya.saitama.jp
2856 hanno.saitama.jp
2857 hanyu.saitama.jp
2858 hasuda.saitama.jp
2859 hatogaya.saitama.jp
2860 hatoyama.saitama.jp
2861 hidaka.saitama.jp
2862 higashichichibu.saitama.jp
2863 higashimatsuyama.saitama.jp
2864 honjo.saitama.jp
2865 ina.saitama.jp
2866 iruma.saitama.jp
2867 iwatsuki.saitama.jp
2868 kamiizumi.saitama.jp
2869 kamikawa.saitama.jp
2870 kamisato.saitama.jp
2871 kasukabe.saitama.jp
2872 kawagoe.saitama.jp
2873 kawaguchi.saitama.jp
2874 kawajima.saitama.jp
2875 kazo.saitama.jp
2876 kitamoto.saitama.jp
2877 koshigaya.saitama.jp
2878 kounosu.saitama.jp
2879 kuki.saitama.jp
2880 kumagaya.saitama.jp
2881 matsubushi.saitama.jp
2882 minano.saitama.jp
2883 misato.saitama.jp
2884 miyashiro.saitama.jp
2885 miyoshi.saitama.jp
2886 moroyama.saitama.jp
2887 nagatoro.saitama.jp
2888 namegawa.saitama.jp
2889 niiza.saitama.jp
2890 ogano.saitama.jp
2891 ogawa.saitama.jp
2892 ogose.saitama.jp
2893 okegawa.saitama.jp
2894 omiya.saitama.jp
2895 otaki.saitama.jp
2896 ranzan.saitama.jp
2897 ryokami.saitama.jp
2898 saitama.saitama.jp
2899 sakado.saitama.jp
2900 satte.saitama.jp
2901 sayama.saitama.jp
2902 shiki.saitama.jp
2903 shiraoka.saitama.jp
2904 soka.saitama.jp
2905 sugito.saitama.jp
2906 toda.saitama.jp
2907 tokigawa.saitama.jp
2908 tokorozawa.saitama.jp
2909 tsurugashima.saitama.jp
2910 urawa.saitama.jp
2911 warabi.saitama.jp
2912 yashio.saitama.jp
2913 yokoze.saitama.jp
2914 yono.saitama.jp
2915 yorii.saitama.jp
2916 yoshida.saitama.jp
2917 yoshikawa.saitama.jp
2918 yoshimi.saitama.jp
2919 aisho.shiga.jp
2920 gamo.shiga.jp
2921 higashiomi.shiga.jp
2922 hikone.shiga.jp
2923 koka.shiga.jp
2924 konan.shiga.jp
2925 kosei.shiga.jp
2926 koto.shiga.jp
2927 kusatsu.shiga.jp
2928 maibara.shiga.jp
2929 moriyama.shiga.jp
2930 nagahama.shiga.jp
2931 nishiazai.shiga.jp
2932 notogawa.shiga.jp
2933 omihachiman.shiga.jp
2934 otsu.shiga.jp
2935 ritto.shiga.jp
2936 ryuoh.shiga.jp
2937 takashima.shiga.jp
2938 takatsuki.shiga.jp
2939 torahime.shiga.jp
2940 toyosato.shiga.jp
2941 yasu.shiga.jp
2942 akagi.shimane.jp
2943 ama.shimane.jp
2944 gotsu.shimane.jp
2945 hamada.shimane.jp
2946 higashiizumo.shimane.jp
2947 hikawa.shimane.jp
2948 hikimi.shimane.jp
2949 izumo.shimane.jp
2950 kakinoki.shimane.jp
2951 masuda.shimane.jp
2952 matsue.shimane.jp
2953 misato.shimane.jp
2954 nishinoshima.shimane.jp
2955 ohda.shimane.jp
2956 okinoshima.shimane.jp
2957 okuizumo.shimane.jp
2958 shimane.shimane.jp
2959 tamayu.shimane.jp
2960 tsuwano.shimane.jp
2961 unnan.shimane.jp
2962 yakumo.shimane.jp
2963 yasugi.shimane.jp
2964 yatsuka.shimane.jp
2965 arai.shizuoka.jp
2966 atami.shizuoka.jp
2967 fuji.shizuoka.jp
2968 fujieda.shizuoka.jp
2969 fujikawa.shizuoka.jp
2970 fujinomiya.shizuoka.jp
2971 fukuroi.shizuoka.jp
2972 gotemba.shizuoka.jp
2973 haibara.shizuoka.jp
2974 hamamatsu.shizuoka.jp
2975 higashiizu.shizuoka.jp
2976 ito.shizuoka.jp
2977 iwata.shizuoka.jp
2978 izu.shizuoka.jp
2979 izunokuni.shizuoka.jp
2980 kakegawa.shizuoka.jp
2981 kannami.shizuoka.jp
2982 kawanehon.shizuoka.jp
2983 kawazu.shizuoka.jp
2984 kikugawa.shizuoka.jp
2985 kosai.shizuoka.jp
2986 makinohara.shizuoka.jp
2987 matsuzaki.shizuoka.jp
2988 minamiizu.shizuoka.jp
2989 mishima.shizuoka.jp
2990 morimachi.shizuoka.jp
2991 nishiizu.shizuoka.jp
2992 numazu.shizuoka.jp
2993 omaezaki.shizuoka.jp
2994 shimada.shizuoka.jp
2995 shimizu.shizuoka.jp
2996 shimoda.shizuoka.jp
2997 shizuoka.shizuoka.jp
2998 susono.shizuoka.jp
2999 yaizu.shizuoka.jp
3000 yoshida.shizuoka.jp
3001 ashikaga.tochigi.jp
3002 bato.tochigi.jp
3003 haga.tochigi.jp
3004 ichikai.tochigi.jp
3005 iwafune.tochigi.jp
3006 kaminokawa.tochigi.jp
3007 kanuma.tochigi.jp
3008 karasuyama.tochigi.jp
3009 kuroiso.tochigi.jp
3010 mashiko.tochigi.jp
3011 mibu.tochigi.jp
3012 moka.tochigi.jp
3013 motegi.tochigi.jp
3014 nasu.tochigi.jp
3015 nasushiobara.tochigi.jp
3016 nikko.tochigi.jp
3017 nishikata.tochigi.jp
3018 nogi.tochigi.jp
3019 ohira.tochigi.jp
3020 ohtawara.tochigi.jp
3021 oyama.tochigi.jp
3022 sakura.tochigi.jp
3023 sano.tochigi.jp
3024 shimotsuke.tochigi.jp
3025 shioya.tochigi.jp
3026 takanezawa.tochigi.jp
3027 tochigi.tochigi.jp
3028 tsuga.tochigi.jp
3029 ujiie.tochigi.jp
3030 utsunomiya.tochigi.jp
3031 yaita.tochigi.jp
3032 aizumi.tokushima.jp
3033 anan.tokushima.jp
3034 ichiba.tokushima.jp
3035 itano.tokushima.jp
3036 kainan.tokushima.jp
3037 komatsushima.tokushima.jp
3038 matsushige.tokushima.jp
3039 mima.tokushima.jp
3040 minami.tokushima.jp
3041 miyoshi.tokushima.jp
3042 mugi.tokushima.jp
3043 nakagawa.tokushima.jp
3044 naruto.tokushima.jp
3045 sanagochi.tokushima.jp
3046 shishikui.tokushima.jp
3047 tokushima.tokushima.jp
3048 wajiki.tokushima.jp
3049 adachi.tokyo.jp
3050 akiruno.tokyo.jp
3051 akishima.tokyo.jp
3052 aogashima.tokyo.jp
3053 arakawa.tokyo.jp
3054 bunkyo.tokyo.jp
3055 chiyoda.tokyo.jp
3056 chofu.tokyo.jp
3057 chuo.tokyo.jp
3058 edogawa.tokyo.jp
3059 fuchu.tokyo.jp
3060 fussa.tokyo.jp
3061 hachijo.tokyo.jp
3062 hachioji.tokyo.jp
3063 hamura.tokyo.jp
3064 higashikurume.tokyo.jp
3065 higashimurayama.tokyo.jp
3066 higashiyamato.tokyo.jp
3067 hino.tokyo.jp
3068 hinode.tokyo.jp
3069 hinohara.tokyo.jp
3070 inagi.tokyo.jp
3071 itabashi.tokyo.jp
3072 katsushika.tokyo.jp
3073 kita.tokyo.jp
3074 kiyose.tokyo.jp
3075 kodaira.tokyo.jp
3076 koganei.tokyo.jp
3077 kokubunji.tokyo.jp
3078 komae.tokyo.jp
3079 koto.tokyo.jp
3080 kouzushima.tokyo.jp
3081 kunitachi.tokyo.jp
3082 machida.tokyo.jp
3083 meguro.tokyo.jp
3084 minato.tokyo.jp
3085 mitaka.tokyo.jp
3086 mizuho.tokyo.jp
3087 musashimurayama.tokyo.jp
3088 musashino.tokyo.jp
3089 nakano.tokyo.jp
3090 nerima.tokyo.jp
3091 ogasawara.tokyo.jp
3092 okutama.tokyo.jp
3093 ome.tokyo.jp
3094 oshima.tokyo.jp
3095 ota.tokyo.jp
3096 setagaya.tokyo.jp
3097 shibuya.tokyo.jp
3098 shinagawa.tokyo.jp
3099 shinjuku.tokyo.jp
3100 suginami.tokyo.jp
3101 sumida.tokyo.jp
3102 tachikawa.tokyo.jp
3103 taito.tokyo.jp
3104 tama.tokyo.jp
3105 toshima.tokyo.jp
3106 chizu.tottori.jp
3107 hino.tottori.jp
3108 kawahara.tottori.jp
3109 koge.tottori.jp
3110 kotoura.tottori.jp
3111 misasa.tottori.jp
3112 nanbu.tottori.jp
3113 nichinan.tottori.jp
3114 sakaiminato.tottori.jp
3115 tottori.tottori.jp
3116 wakasa.tottori.jp
3117 yazu.tottori.jp
3118 yonago.tottori.jp
3119 asahi.toyama.jp
3120 fuchu.toyama.jp
3121 fukumitsu.toyama.jp
3122 funahashi.toyama.jp
3123 himi.toyama.jp
3124 imizu.toyama.jp
3125 inami.toyama.jp
3126 johana.toyama.jp
3127 kamiichi.toyama.jp
3128 kurobe.toyama.jp
3129 nakaniikawa.toyama.jp
3130 namerikawa.toyama.jp
3131 nanto.toyama.jp
3132 nyuzen.toyama.jp
3133 oyabe.toyama.jp
3134 taira.toyama.jp
3135 takaoka.toyama.jp
3136 tateyama.toyama.jp
3137 toga.toyama.jp
3138 tonami.toyama.jp
3139 toyama.toyama.jp
3140 unazuki.toyama.jp
3141 uozu.toyama.jp
3142 yamada.toyama.jp
3143 arida.wakayama.jp
3144 aridagawa.wakayama.jp
3145 gobo.wakayama.jp
3146 hashimoto.wakayama.jp
3147 hidaka.wakayama.jp
3148 hirogawa.wakayama.jp
3149 inami.wakayama.jp
3150 iwade.wakayama.jp
3151 kainan.wakayama.jp
3152 kamitonda.wakayama.jp
3153 katsuragi.wakayama.jp
3154 kimino.wakayama.jp
3155 kinokawa.wakayama.jp
3156 kitayama.wakayama.jp
3157 koya.wakayama.jp
3158 koza.wakayama.jp
3159 kozagawa.wakayama.jp
3160 kudoyama.wakayama.jp
3161 kushimoto.wakayama.jp
3162 mihama.wakayama.jp
3163 misato.wakayama.jp
3164 nachikatsuura.wakayama.jp
3165 shingu.wakayama.jp
3166 shirahama.wakayama.jp
3167 taiji.wakayama.jp
3168 tanabe.wakayama.jp
3169 wakayama.wakayama.jp
3170 yuasa.wakayama.jp
3171 yura.wakayama.jp
3172 asahi.yamagata.jp
3173 funagata.yamagata.jp
3174 higashine.yamagata.jp
3175 iide.yamagata.jp
3176 kahoku.yamagata.jp
3177 kaminoyama.yamagata.jp
3178 kaneyama.yamagata.jp
3179 kawanishi.yamagata.jp
3180 mamurogawa.yamagata.jp
3181 mikawa.yamagata.jp
3182 murayama.yamagata.jp
3183 nagai.yamagata.jp
3184 nakayama.yamagata.jp
3185 nanyo.yamagata.jp
3186 nishikawa.yamagata.jp
3187 obanazawa.yamagata.jp
3188 oe.yamagata.jp
3189 oguni.yamagata.jp
3190 ohkura.yamagata.jp
3191 oishida.yamagata.jp
3192 sagae.yamagata.jp
3193 sakata.yamagata.jp
3194 sakegawa.yamagata.jp
3195 shinjo.yamagata.jp
3196 shirataka.yamagata.jp
3197 shonai.yamagata.jp
3198 takahata.yamagata.jp
3199 tendo.yamagata.jp
3200 tozawa.yamagata.jp
3201 tsuruoka.yamagata.jp
3202 yamagata.yamagata.jp
3203 yamanobe.yamagata.jp
3204 yonezawa.yamagata.jp
3205 yuza.yamagata.jp
3206 abu.yamaguchi.jp
3207 hagi.yamaguchi.jp
3208 hikari.yamaguchi.jp
3209 hofu.yamaguchi.jp
3210 iwakuni.yamaguchi.jp
3211 kudamatsu.yamaguchi.jp
3212 mitou.yamaguchi.jp
3213 nagato.yamaguchi.jp
3214 oshima.yamaguchi.jp
3215 shimonoseki.yamaguchi.jp
3216 shunan.yamaguchi.jp
3217 tabuse.yamaguchi.jp
3218 tokuyama.yamaguchi.jp
3219 toyota.yamaguchi.jp
3220 ube.yamaguchi.jp
3221 yuu.yamaguchi.jp
3222 chuo.yamanashi.jp
3223 doshi.yamanashi.jp
3224 fuefuki.yamanashi.jp
3225 fujikawa.yamanashi.jp
3226 fujikawaguchiko.yamanashi.jp
3227 fujiyoshida.yamanashi.jp
3228 hayakawa.yamanashi.jp
3229 hokuto.yamanashi.jp
3230 ichikawamisato.yamanashi.jp
3231 kai.yamanashi.jp
3232 kofu.yamanashi.jp
3233 koshu.yamanashi.jp
3234 kosuge.yamanashi.jp
3235 minami-alps.yamanashi.jp
3236 minobu.yamanashi.jp
3237 nakamichi.yamanashi.jp
3238 nanbu.yamanashi.jp
3239 narusawa.yamanashi.jp
3240 nirasaki.yamanashi.jp
3241 nishikatsura.yamanashi.jp
3242 oshino.yamanashi.jp
3243 otsuki.yamanashi.jp
3244 showa.yamanashi.jp
3245 tabayama.yamanashi.jp
3246 tsuru.yamanashi.jp
3247 uenohara.yamanashi.jp
3248 yamanakako.yamanashi.jp
3249 yamanashi.yamanashi.jp
3250
3251 // ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145
3252 *.ke
3253
3254 // kg : http://www.domain.kg/dmn_n.html
3255 kg
3256 org.kg
3257 net.kg
3258 com.kg
3259 edu.kg
3260 gov.kg
3261 mil.kg
3262
3263 // kh : http://www.mptc.gov.kh/dns_registration.htm
3264 *.kh
3265
3266 // ki : http://www.ki/dns/index.html
3267 ki
3268 edu.ki
3269 biz.ki
3270 net.ki
3271 org.ki
3272 gov.ki
3273 info.ki
3274 com.ki
3275
3276 // km : http://en.wikipedia.org/wiki/.km
3277 // http://www.domaine.km/documents/charte.doc
3278 km
3279 org.km
3280 nom.km
3281 gov.km
3282 prd.km
3283 tm.km
3284 edu.km
3285 mil.km
3286 ass.km
3287 com.km
3288 // These are only mentioned as proposed suggestions at domaine.km, but
3289 // http://en.wikipedia.org/wiki/.km says they're available for registration:
3290 coop.km
3291 asso.km
3292 presse.km
3293 medecin.km
3294 notaires.km
3295 pharmaciens.km
3296 veterinaire.km
3297 gouv.km
3298
3299 // kn : http://en.wikipedia.org/wiki/.kn
3300 // http://www.dot.kn/domainRules.html
3301 kn
3302 net.kn
3303 org.kn
3304 edu.kn
3305 gov.kn
3306
3307 // kp : http://www.kcce.kp/en_index.php
3308 kp
3309 com.kp
3310 edu.kp
3311 gov.kp
3312 org.kp
3313 rep.kp
3314 tra.kp
3315
3316 // kr : http://en.wikipedia.org/wiki/.kr
3317 // see also: http://domain.nida.or.kr/eng/registration.jsp
3318 kr
3319 ac.kr
3320 co.kr
3321 es.kr
3322 go.kr
3323 hs.kr
3324 kg.kr
3325 mil.kr
3326 ms.kr
3327 ne.kr
3328 or.kr
3329 pe.kr
3330 re.kr
3331 sc.kr
3332 // kr geographical names
3333 busan.kr
3334 chungbuk.kr
3335 chungnam.kr
3336 daegu.kr
3337 daejeon.kr
3338 gangwon.kr
3339 gwangju.kr
3340 gyeongbuk.kr
3341 gyeonggi.kr
3342 gyeongnam.kr
3343 incheon.kr
3344 jeju.kr
3345 jeonbuk.kr
3346 jeonnam.kr
3347 seoul.kr
3348 ulsan.kr
3349
3350 // kw : http://en.wikipedia.org/wiki/.kw
3351 *.kw
3352
3353 // ky : http://www.icta.ky/da_ky_reg_dom.php
3354 // Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17
3355 ky
3356 edu.ky
3357 gov.ky
3358 com.ky
3359 org.ky
3360 net.ky
3361
3362 // kz : http://en.wikipedia.org/wiki/.kz
3363 // see also: http://www.nic.kz/rules/index.jsp
3364 kz
3365 org.kz
3366 edu.kz
3367 net.kz
3368 gov.kz
3369 mil.kz
3370 com.kz
3371
3372 // la : http://en.wikipedia.org/wiki/.la
3373 // Submitted by registry <gavin.brown@nic.la> 2008-06-10
3374 la
3375 int.la
3376 net.la
3377 info.la
3378 edu.la
3379 gov.la
3380 per.la
3381 com.la
3382 org.la
3383
3384 // lb : http://en.wikipedia.org/wiki/.lb
3385 // Submitted by registry <randy@psg.com> 2008-06-17
3386 lb
3387 com.lb
3388 edu.lb
3389 gov.lb
3390 net.lb
3391 org.lb
3392
3393 // lc : http://en.wikipedia.org/wiki/.lc
3394 // see also: http://www.nic.lc/rules.htm
3395 lc
3396 com.lc
3397 net.lc
3398 co.lc
3399 org.lc
3400 edu.lc
3401 gov.lc
3402
3403 // li : http://en.wikipedia.org/wiki/.li
3404 li
3405
3406 // lk : http://www.nic.lk/seclevpr.html
3407 lk
3408 gov.lk
3409 sch.lk
3410 net.lk
3411 int.lk
3412 com.lk
3413 org.lk
3414 edu.lk
3415 ngo.lk
3416 soc.lk
3417 web.lk
3418 ltd.lk
3419 assn.lk
3420 grp.lk
3421 hotel.lk
3422
3423 // lr : http://psg.com/dns/lr/lr.txt
3424 // Submitted by registry <randy@psg.com> 2008-06-17
3425 lr
3426 com.lr
3427 edu.lr
3428 gov.lr
3429 org.lr
3430 net.lr
3431
3432 // ls : http://en.wikipedia.org/wiki/.ls
3433 ls
3434 co.ls
3435 org.ls
3436
3437 // lt : http://en.wikipedia.org/wiki/.lt
3438 lt
3439 // gov.lt : http://www.gov.lt/index_en.php
3440 gov.lt
3441
3442 // lu : http://www.dns.lu/en/
3443 lu
3444
3445 // lv : http://www.nic.lv/DNS/En/generic.php
3446 lv
3447 com.lv
3448 edu.lv
3449 gov.lv
3450 org.lv
3451 mil.lv
3452 id.lv
3453 net.lv
3454 asn.lv
3455 conf.lv
3456
3457 // ly : http://www.nic.ly/regulations.php
3458 ly
3459 com.ly
3460 net.ly
3461 gov.ly
3462 plc.ly
3463 edu.ly
3464 sch.ly
3465 med.ly
3466 org.ly
3467 id.ly
3468
3469 // ma : http://en.wikipedia.org/wiki/.ma
3470 // http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf
3471 ma
3472 co.ma
3473 net.ma
3474 gov.ma
3475 org.ma
3476 ac.ma
3477 press.ma
3478
3479 // mc : http://www.nic.mc/
3480 mc
3481 tm.mc
3482 asso.mc
3483
3484 // md : http://en.wikipedia.org/wiki/.md
3485 md
3486
3487 // me : http://en.wikipedia.org/wiki/.me
3488 me
3489 co.me
3490 net.me
3491 org.me
3492 edu.me
3493 ac.me
3494 gov.me
3495 its.me
3496 priv.me
3497
3498 // mg : http://www.nic.mg/tarif.htm
3499 mg
3500 org.mg
3501 nom.mg
3502 gov.mg
3503 prd.mg
3504 tm.mg
3505 edu.mg
3506 mil.mg
3507 com.mg
3508
3509 // mh : http://en.wikipedia.org/wiki/.mh
3510 mh
3511
3512 // mil : http://en.wikipedia.org/wiki/.mil
3513 mil
3514
3515 // mk : http://en.wikipedia.org/wiki/.mk
3516 // see also: http://dns.marnet.net.mk/postapka.php
3517 mk
3518 com.mk
3519 org.mk
3520 net.mk
3521 edu.mk
3522 gov.mk
3523 inf.mk
3524 name.mk
3525
3526 // ml : http://www.gobin.info/domainname/ml-template.doc
3527 // see also: http://en.wikipedia.org/wiki/.ml
3528 ml
3529 com.ml
3530 edu.ml
3531 gouv.ml
3532 gov.ml
3533 net.ml
3534 org.ml
3535 presse.ml
3536
3537 // mm : http://en.wikipedia.org/wiki/.mm
3538 *.mm
3539
3540 // mn : http://en.wikipedia.org/wiki/.mn
3541 mn
3542 gov.mn
3543 edu.mn
3544 org.mn
3545
3546 // mo : http://www.monic.net.mo/
3547 mo
3548 com.mo
3549 net.mo
3550 org.mo
3551 edu.mo
3552 gov.mo
3553
3554 // mobi : http://en.wikipedia.org/wiki/.mobi
3555 mobi
3556
3557 // mp : http://www.dot.mp/
3558 // Confirmed by registry <dcamacho@saipan.com> 2008-06-17
3559 mp
3560
3561 // mq : http://en.wikipedia.org/wiki/.mq
3562 mq
3563
3564 // mr : http://en.wikipedia.org/wiki/.mr
3565 mr
3566 gov.mr
3567
3568 // ms : http://en.wikipedia.org/wiki/.ms
3569 ms
3570
3571 // mt : https://www.nic.org.mt/go/policy
3572 // Submitted by registry <help@nic.org.mt> 2013-11-19
3573 mt
3574 com.mt
3575 edu.mt
3576 net.mt
3577 org.mt
3578
3579 // mu : http://en.wikipedia.org/wiki/.mu
3580 mu
3581 com.mu
3582 net.mu
3583 org.mu
3584 gov.mu
3585 ac.mu
3586 co.mu
3587 or.mu
3588
3589 // museum : http://about.museum/naming/
3590 // http://index.museum/
3591 museum
3592 academy.museum
3593 agriculture.museum
3594 air.museum
3595 airguard.museum
3596 alabama.museum
3597 alaska.museum
3598 amber.museum
3599 ambulance.museum
3600 american.museum
3601 americana.museum
3602 americanantiques.museum
3603 americanart.museum
3604 amsterdam.museum
3605 and.museum
3606 annefrank.museum
3607 anthro.museum
3608 anthropology.museum
3609 antiques.museum
3610 aquarium.museum
3611 arboretum.museum
3612 archaeological.museum
3613 archaeology.museum
3614 architecture.museum
3615 art.museum
3616 artanddesign.museum
3617 artcenter.museum
3618 artdeco.museum
3619 arteducation.museum
3620 artgallery.museum
3621 arts.museum
3622 artsandcrafts.museum
3623 asmatart.museum
3624 assassination.museum
3625 assisi.museum
3626 association.museum
3627 astronomy.museum
3628 atlanta.museum
3629 austin.museum
3630 australia.museum
3631 automotive.museum
3632 aviation.museum
3633 axis.museum
3634 badajoz.museum
3635 baghdad.museum
3636 bahn.museum
3637 bale.museum
3638 baltimore.museum
3639 barcelona.museum
3640 baseball.museum
3641 basel.museum
3642 baths.museum
3643 bauern.museum
3644 beauxarts.museum
3645 beeldengeluid.museum
3646 bellevue.museum
3647 bergbau.museum
3648 berkeley.museum
3649 berlin.museum
3650 bern.museum
3651 bible.museum
3652 bilbao.museum
3653 bill.museum
3654 birdart.museum
3655 birthplace.museum
3656 bonn.museum
3657 boston.museum
3658 botanical.museum
3659 botanicalgarden.museum
3660 botanicgarden.museum
3661 botany.museum
3662 brandywinevalley.museum
3663 brasil.museum
3664 bristol.museum
3665 british.museum
3666 britishcolumbia.museum
3667 broadcast.museum
3668 brunel.museum
3669 brussel.museum
3670 brussels.museum
3671 bruxelles.museum
3672 building.museum
3673 burghof.museum
3674 bus.museum
3675 bushey.museum
3676 cadaques.museum
3677 california.museum
3678 cambridge.museum
3679 can.museum
3680 canada.museum
3681 capebreton.museum
3682 carrier.museum
3683 cartoonart.museum
3684 casadelamoneda.museum
3685 castle.museum
3686 castres.museum
3687 celtic.museum
3688 center.museum
3689 chattanooga.museum
3690 cheltenham.museum
3691 chesapeakebay.museum
3692 chicago.museum
3693 children.museum
3694 childrens.museum
3695 childrensgarden.museum
3696 chiropractic.museum
3697 chocolate.museum
3698 christiansburg.museum
3699 cincinnati.museum
3700 cinema.museum
3701 circus.museum
3702 civilisation.museum
3703 civilization.museum
3704 civilwar.museum
3705 clinton.museum
3706 clock.museum
3707 coal.museum
3708 coastaldefence.museum
3709 cody.museum
3710 coldwar.museum
3711 collection.museum
3712 colonialwilliamsburg.museum
3713 coloradoplateau.museum
3714 columbia.museum
3715 columbus.museum
3716 communication.museum
3717 communications.museum
3718 community.museum
3719 computer.museum
3720 computerhistory.museum
3721 comunicações.museum
3722 contemporary.museum
3723 contemporaryart.museum
3724 convent.museum
3725 copenhagen.museum
3726 corporation.museum
3727 correios-e-telecomunicações.museum
3728 corvette.museum
3729 costume.museum
3730 countryestate.museum
3731 county.museum
3732 crafts.museum
3733 cranbrook.museum
3734 creation.museum
3735 cultural.museum
3736 culturalcenter.museum
3737 culture.museum
3738 cyber.museum
3739 cymru.museum
3740 dali.museum
3741 dallas.museum
3742 database.museum
3743 ddr.museum
3744 decorativearts.museum
3745 delaware.museum
3746 delmenhorst.museum
3747 denmark.museum
3748 depot.museum
3749 design.museum
3750 detroit.museum
3751 dinosaur.museum
3752 discovery.museum
3753 dolls.museum
3754 donostia.museum
3755 durham.museum
3756 eastafrica.museum
3757 eastcoast.museum
3758 education.museum
3759 educational.museum
3760 egyptian.museum
3761 eisenbahn.museum
3762 elburg.museum
3763 elvendrell.museum
3764 embroidery.museum
3765 encyclopedic.museum
3766 england.museum
3767 entomology.museum
3768 environment.museum
3769 environmentalconservation.museum
3770 epilepsy.museum
3771 essex.museum
3772 estate.museum
3773 ethnology.museum
3774 exeter.museum
3775 exhibition.museum
3776 family.museum
3777 farm.museum
3778 farmequipment.museum
3779 farmers.museum
3780 farmstead.museum
3781 field.museum
3782 figueres.museum
3783 filatelia.museum
3784 film.museum
3785 fineart.museum
3786 finearts.museum
3787 finland.museum
3788 flanders.museum
3789 florida.museum
3790 force.museum
3791 fortmissoula.museum
3792 fortworth.museum
3793 foundation.museum
3794 francaise.museum
3795 frankfurt.museum
3796 franziskaner.museum
3797 freemasonry.museum
3798 freiburg.museum
3799 fribourg.museum
3800 frog.museum
3801 fundacio.museum
3802 furniture.museum
3803 gallery.museum
3804 garden.museum
3805 gateway.museum
3806 geelvinck.museum
3807 gemological.museum
3808 geology.museum
3809 georgia.museum
3810 giessen.museum
3811 glas.museum
3812 glass.museum
3813 gorge.museum
3814 grandrapids.museum
3815 graz.museum
3816 guernsey.museum
3817 halloffame.museum
3818 hamburg.museum
3819 handson.museum
3820 harvestcelebration.museum
3821 hawaii.museum
3822 health.museum
3823 heimatunduhren.museum
3824 hellas.museum
3825 helsinki.museum
3826 hembygdsforbund.museum
3827 heritage.museum
3828 histoire.museum
3829 historical.museum
3830 historicalsociety.museum
3831 historichouses.museum
3832 historisch.museum
3833 historisches.museum
3834 history.museum
3835 historyofscience.museum
3836 horology.museum
3837 house.museum
3838 humanities.museum
3839 illustration.museum
3840 imageandsound.museum
3841 indian.museum
3842 indiana.museum
3843 indianapolis.museum
3844 indianmarket.museum
3845 intelligence.museum
3846 interactive.museum
3847 iraq.museum
3848 iron.museum
3849 isleofman.museum
3850 jamison.museum
3851 jefferson.museum
3852 jerusalem.museum
3853 jewelry.museum
3854 jewish.museum
3855 jewishart.museum
3856 jfk.museum
3857 journalism.museum
3858 judaica.museum
3859 judygarland.museum
3860 juedisches.museum
3861 juif.museum
3862 karate.museum
3863 karikatur.museum
3864 kids.museum
3865 koebenhavn.museum
3866 koeln.museum
3867 kunst.museum
3868 kunstsammlung.museum
3869 kunstunddesign.museum
3870 labor.museum
3871 labour.museum
3872 lajolla.museum
3873 lancashire.museum
3874 landes.museum
3875 lans.museum
3876 läns.museum
3877 larsson.museum
3878 lewismiller.museum
3879 lincoln.museum
3880 linz.museum
3881 living.museum
3882 livinghistory.museum
3883 localhistory.museum
3884 london.museum
3885 losangeles.museum
3886 louvre.museum
3887 loyalist.museum
3888 lucerne.museum
3889 luxembourg.museum
3890 luzern.museum
3891 mad.museum
3892 madrid.museum
3893 mallorca.museum
3894 manchester.museum
3895 mansion.museum
3896 mansions.museum
3897 manx.museum
3898 marburg.museum
3899 maritime.museum
3900 maritimo.museum
3901 maryland.museum
3902 marylhurst.museum
3903 media.museum
3904 medical.museum
3905 medizinhistorisches.museum
3906 meeres.museum
3907 memorial.museum
3908 mesaverde.museum
3909 michigan.museum
3910 midatlantic.museum
3911 military.museum
3912 mill.museum
3913 miners.museum
3914 mining.museum
3915 minnesota.museum
3916 missile.museum
3917 missoula.museum
3918 modern.museum
3919 moma.museum
3920 money.museum
3921 monmouth.museum
3922 monticello.museum
3923 montreal.museum
3924 moscow.museum
3925 motorcycle.museum
3926 muenchen.museum
3927 muenster.museum
3928 mulhouse.museum
3929 muncie.museum
3930 museet.museum
3931 museumcenter.museum
3932 museumvereniging.museum
3933 music.museum
3934 national.museum
3935 nationalfirearms.museum
3936 nationalheritage.museum
3937 nativeamerican.museum
3938 naturalhistory.museum
3939 naturalhistorymuseum.museum
3940 naturalsciences.museum
3941 nature.museum
3942 naturhistorisches.museum
3943 natuurwetenschappen.museum
3944 naumburg.museum
3945 naval.museum
3946 nebraska.museum
3947 neues.museum
3948 newhampshire.museum
3949 newjersey.museum
3950 newmexico.museum
3951 newport.museum
3952 newspaper.museum
3953 newyork.museum
3954 niepce.museum
3955 norfolk.museum
3956 north.museum
3957 nrw.museum
3958 nuernberg.museum
3959 nuremberg.museum
3960 nyc.museum
3961 nyny.museum
3962 oceanographic.museum
3963 oceanographique.museum
3964 omaha.museum
3965 online.museum
3966 ontario.museum
3967 openair.museum
3968 oregon.museum
3969 oregontrail.museum
3970 otago.museum
3971 oxford.museum
3972 pacific.museum
3973 paderborn.museum
3974 palace.museum
3975 paleo.museum
3976 palmsprings.museum
3977 panama.museum
3978 paris.museum
3979 pasadena.museum
3980 pharmacy.museum
3981 philadelphia.museum
3982 philadelphiaarea.museum
3983 philately.museum
3984 phoenix.museum
3985 photography.museum
3986 pilots.museum
3987 pittsburgh.museum
3988 planetarium.museum
3989 plantation.museum
3990 plants.museum
3991 plaza.museum
3992 portal.museum
3993 portland.museum
3994 portlligat.museum
3995 posts-and-telecommunications.museum
3996 preservation.museum
3997 presidio.museum
3998 press.museum
3999 project.museum
4000 public.museum
4001 pubol.museum
4002 quebec.museum
4003 railroad.museum
4004 railway.museum
4005 research.museum
4006 resistance.museum
4007 riodejaneiro.museum
4008 rochester.museum
4009 rockart.museum
4010 roma.museum
4011 russia.museum
4012 saintlouis.museum
4013 salem.museum
4014 salvadordali.museum
4015 salzburg.museum
4016 sandiego.museum
4017 sanfrancisco.museum
4018 santabarbara.museum
4019 santacruz.museum
4020 santafe.museum
4021 saskatchewan.museum
4022 satx.museum
4023 savannahga.museum
4024 schlesisches.museum
4025 schoenbrunn.museum
4026 schokoladen.museum
4027 school.museum
4028 schweiz.museum
4029 science.museum
4030 scienceandhistory.museum
4031 scienceandindustry.museum
4032 sciencecenter.museum
4033 sciencecenters.museum
4034 science-fiction.museum
4035 sciencehistory.museum
4036 sciences.museum
4037 sciencesnaturelles.museum
4038 scotland.museum
4039 seaport.museum
4040 settlement.museum
4041 settlers.museum
4042 shell.museum
4043 sherbrooke.museum
4044 sibenik.museum
4045 silk.museum
4046 ski.museum
4047 skole.museum
4048 society.museum
4049 sologne.museum
4050 soundandvision.museum
4051 southcarolina.museum
4052 southwest.museum
4053 space.museum
4054 spy.museum
4055 square.museum
4056 stadt.museum
4057 stalbans.museum
4058 starnberg.museum
4059 state.museum
4060 stateofdelaware.museum
4061 station.museum
4062 steam.museum
4063 steiermark.museum
4064 stjohn.museum
4065 stockholm.museum
4066 stpetersburg.museum
4067 stuttgart.museum
4068 suisse.museum
4069 surgeonshall.museum
4070 surrey.museum
4071 svizzera.museum
4072 sweden.museum
4073 sydney.museum
4074 tank.museum
4075 tcm.museum
4076 technology.museum
4077 telekommunikation.museum
4078 television.museum
4079 texas.museum
4080 textile.museum
4081 theater.museum
4082 time.museum
4083 timekeeping.museum
4084 topology.museum
4085 torino.museum
4086 touch.museum
4087 town.museum
4088 transport.museum
4089 tree.museum
4090 trolley.museum
4091 trust.museum
4092 trustee.museum
4093 uhren.museum
4094 ulm.museum
4095 undersea.museum
4096 university.museum
4097 usa.museum
4098 usantiques.museum
4099 usarts.museum
4100 uscountryestate.museum
4101 usculture.museum
4102 usdecorativearts.museum
4103 usgarden.museum
4104 ushistory.museum
4105 ushuaia.museum
4106 uslivinghistory.museum
4107 utah.museum
4108 uvic.museum
4109 valley.museum
4110 vantaa.museum
4111 versailles.museum
4112 viking.museum
4113 village.museum
4114 virginia.museum
4115 virtual.museum
4116 virtuel.museum
4117 vlaanderen.museum
4118 volkenkunde.museum
4119 wales.museum
4120 wallonie.museum
4121 war.museum
4122 washingtondc.museum
4123 watchandclock.museum
4124 watch-and-clock.museum
4125 western.museum
4126 westfalen.museum
4127 whaling.museum
4128 wildlife.museum
4129 williamsburg.museum
4130 windmill.museum
4131 workshop.museum
4132 york.museum
4133 yorkshire.museum
4134 yosemite.museum
4135 youth.museum
4136 zoological.museum
4137 zoology.museum
4138 ירושלים.museum
4139 иком.museum
4140
4141 // mv : http://en.wikipedia.org/wiki/.mv
4142 // "mv" included because, contra Wikipedia, google.mv exists.
4143 mv
4144 aero.mv
4145 biz.mv
4146 com.mv
4147 coop.mv
4148 edu.mv
4149 gov.mv
4150 info.mv
4151 int.mv
4152 mil.mv
4153 museum.mv
4154 name.mv
4155 net.mv
4156 org.mv
4157 pro.mv
4158
4159 // mw : http://www.registrar.mw/
4160 mw
4161 ac.mw
4162 biz.mw
4163 co.mw
4164 com.mw
4165 coop.mw
4166 edu.mw
4167 gov.mw
4168 int.mw
4169 museum.mw
4170 net.mw
4171 org.mw
4172
4173 // mx : http://www.nic.mx/
4174 // Submitted by registry <farias@nic.mx> 2008-06-19
4175 mx
4176 com.mx
4177 org.mx
4178 gob.mx
4179 edu.mx
4180 net.mx
4181
4182 // my : http://www.mynic.net.my/
4183 my
4184 com.my
4185 net.my
4186 org.my
4187 gov.my
4188 edu.my
4189 mil.my
4190 name.my
4191
4192 // mz : http://www.gobin.info/domainname/mz-template.doc
4193 *.mz
4194 !teledata.mz
4195
4196 // na : http://www.na-nic.com.na/
4197 // http://www.info.na/domain/
4198 na
4199 info.na
4200 pro.na
4201 name.na
4202 school.na
4203 or.na
4204 dr.na
4205 us.na
4206 mx.na
4207 ca.na
4208 in.na
4209 cc.na
4210 tv.na
4211 ws.na
4212 mobi.na
4213 co.na
4214 com.na
4215 org.na
4216
4217 // name : has 2nd-level tlds, but there's no list of them
4218 name
4219
4220 // nc : http://www.cctld.nc/
4221 nc
4222 asso.nc
4223
4224 // ne : http://en.wikipedia.org/wiki/.ne
4225 ne
4226
4227 // net : http://en.wikipedia.org/wiki/.net
4228 net
4229
4230 // nf : http://en.wikipedia.org/wiki/.nf
4231 nf
4232 com.nf
4233 net.nf
4234 per.nf
4235 rec.nf
4236 web.nf
4237 arts.nf
4238 firm.nf
4239 info.nf
4240 other.nf
4241 store.nf
4242
4243 // ng : http://psg.com/dns/ng/
4244 ng
4245 com.ng
4246 edu.ng
4247 name.ng
4248 net.ng
4249 org.ng
4250 sch.ng
4251 gov.ng
4252 mil.ng
4253 mobi.ng
4254
4255 // ni : http://www.nic.ni/dominios.htm
4256 *.ni
4257
4258 // nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html
4259 // Confirmed by registry <Antoin.Verschuren@sidn.nl> (with technical
4260 // reservations) 2008-06-08
4261 nl
4262
4263 // BV.nl will be a registry for dutch BV's (besloten vennootschap)
4264 bv.nl
4265
4266 // no : http://www.norid.no/regelverk/index.en.html
4267 // The Norwegian registry has declined to notify us of updates. The web pages
4268 // referenced below are the official source of the data. There is also an
4269 // announce mailing list:
4270 // https://postlister.uninett.no/sympa/info/norid-diskusjon
4271 no
4272 // Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html
4273 fhs.no
4274 vgs.no
4275 fylkesbibl.no
4276 folkebibl.no
4277 museum.no
4278 idrett.no
4279 priv.no
4280 // Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html
4281 mil.no
4282 stat.no
4283 dep.no
4284 kommune.no
4285 herad.no
4286 // no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html
4287 // counties
4288 aa.no
4289 ah.no
4290 bu.no
4291 fm.no
4292 hl.no
4293 hm.no
4294 jan-mayen.no
4295 mr.no
4296 nl.no
4297 nt.no
4298 of.no
4299 ol.no
4300 oslo.no
4301 rl.no
4302 sf.no
4303 st.no
4304 svalbard.no
4305 tm.no
4306 tr.no
4307 va.no
4308 vf.no
4309 // primary and lower secondary schools per county
4310 gs.aa.no
4311 gs.ah.no
4312 gs.bu.no
4313 gs.fm.no
4314 gs.hl.no
4315 gs.hm.no
4316 gs.jan-mayen.no
4317 gs.mr.no
4318 gs.nl.no
4319 gs.nt.no
4320 gs.of.no
4321 gs.ol.no
4322 gs.oslo.no
4323 gs.rl.no
4324 gs.sf.no
4325 gs.st.no
4326 gs.svalbard.no
4327 gs.tm.no
4328 gs.tr.no
4329 gs.va.no
4330 gs.vf.no
4331 // cities
4332 akrehamn.no
4333 åkrehamn.no
4334 algard.no
4335 ålgård.no
4336 arna.no
4337 brumunddal.no
4338 bryne.no
4339 bronnoysund.no
4340 brønnøysund.no
4341 drobak.no
4342 drøbak.no
4343 egersund.no
4344 fetsund.no
4345 floro.no
4346 florø.no
4347 fredrikstad.no
4348 hokksund.no
4349 honefoss.no
4350 hønefoss.no
4351 jessheim.no
4352 jorpeland.no
4353 jørpeland.no
4354 kirkenes.no
4355 kopervik.no
4356 krokstadelva.no
4357 langevag.no
4358 langevåg.no
4359 leirvik.no
4360 mjondalen.no
4361 mjøndalen.no
4362 mo-i-rana.no
4363 mosjoen.no
4364 mosjøen.no
4365 nesoddtangen.no
4366 orkanger.no
4367 osoyro.no
4368 osøyro.no
4369 raholt.no
4370 råholt.no
4371 sandnessjoen.no
4372 sandnessjøen.no
4373 skedsmokorset.no
4374 slattum.no
4375 spjelkavik.no
4376 stathelle.no
4377 stavern.no
4378 stjordalshalsen.no
4379 stjørdalshalsen.no
4380 tananger.no
4381 tranby.no
4382 vossevangen.no
4383 // communities
4384 afjord.no
4385 åfjord.no
4386 agdenes.no
4387 al.no
4388 ål.no
4389 alesund.no
4390 ålesund.no
4391 alstahaug.no
4392 alta.no
4393 áltá.no
4394 alaheadju.no
4395 álaheadju.no
4396 alvdal.no
4397 amli.no
4398 åmli.no
4399 amot.no
4400 åmot.no
4401 andebu.no
4402 andoy.no
4403 andøy.no
4404 andasuolo.no
4405 ardal.no
4406 årdal.no
4407 aremark.no
4408 arendal.no
4409 ås.no
4410 aseral.no
4411 åseral.no
4412 asker.no
4413 askim.no
4414 askvoll.no
4415 askoy.no
4416 askøy.no
4417 asnes.no
4418 åsnes.no
4419 audnedaln.no
4420 aukra.no
4421 aure.no
4422 aurland.no
4423 aurskog-holand.no
4424 aurskog-høland.no
4425 austevoll.no
4426 austrheim.no
4427 averoy.no
4428 averøy.no
4429 balestrand.no
4430 ballangen.no
4431 balat.no
4432 bálát.no
4433 balsfjord.no
4434 bahccavuotna.no
4435 báhccavuotna.no
4436 bamble.no
4437 bardu.no
4438 beardu.no
4439 beiarn.no
4440 bajddar.no
4441 bájddar.no
4442 baidar.no
4443 báidár.no
4444 berg.no
4445 bergen.no
4446 berlevag.no
4447 berlevåg.no
4448 bearalvahki.no
4449 bearalváhki.no
4450 bindal.no
4451 birkenes.no
4452 bjarkoy.no
4453 bjarkøy.no
4454 bjerkreim.no
4455 bjugn.no
4456 bodo.no
4457 bodø.no
4458 badaddja.no
4459 bådåddjå.no
4460 budejju.no
4461 bokn.no
4462 bremanger.no
4463 bronnoy.no
4464 brønnøy.no
4465 bygland.no
4466 bykle.no
4467 barum.no
4468 bærum.no
4469 bo.telemark.no
4470 bø.telemark.no
4471 bo.nordland.no
4472 bø.nordland.no
4473 bievat.no
4474 bievát.no
4475 bomlo.no
4476 bømlo.no
4477 batsfjord.no
4478 båtsfjord.no
4479 bahcavuotna.no
4480 báhcavuotna.no
4481 dovre.no
4482 drammen.no
4483 drangedal.no
4484 dyroy.no
4485 dyrøy.no
4486 donna.no
4487 dønna.no
4488 eid.no
4489 eidfjord.no
4490 eidsberg.no
4491 eidskog.no
4492 eidsvoll.no
4493 eigersund.no
4494 elverum.no
4495 enebakk.no
4496 engerdal.no
4497 etne.no
4498 etnedal.no
4499 evenes.no
4500 evenassi.no
4501 evenášši.no
4502 evje-og-hornnes.no
4503 farsund.no
4504 fauske.no
4505 fuossko.no
4506 fuoisku.no
4507 fedje.no
4508 fet.no
4509 finnoy.no
4510 finnøy.no
4511 fitjar.no
4512 fjaler.no
4513 fjell.no
4514 flakstad.no
4515 flatanger.no
4516 flekkefjord.no
4517 flesberg.no
4518 flora.no
4519 fla.no
4520 flå.no
4521 folldal.no
4522 forsand.no
4523 fosnes.no
4524 frei.no
4525 frogn.no
4526 froland.no
4527 frosta.no
4528 frana.no
4529 fræna.no
4530 froya.no
4531 frøya.no
4532 fusa.no
4533 fyresdal.no
4534 forde.no
4535 førde.no
4536 gamvik.no
4537 gangaviika.no
4538 gáŋgaviika.no
4539 gaular.no
4540 gausdal.no
4541 gildeskal.no
4542 gildeskål.no
4543 giske.no
4544 gjemnes.no
4545 gjerdrum.no
4546 gjerstad.no
4547 gjesdal.no
4548 gjovik.no
4549 gjøvik.no
4550 gloppen.no
4551 gol.no
4552 gran.no
4553 grane.no
4554 granvin.no
4555 gratangen.no
4556 grimstad.no
4557 grong.no
4558 kraanghke.no
4559 kråanghke.no
4560 grue.no
4561 gulen.no
4562 hadsel.no
4563 halden.no
4564 halsa.no
4565 hamar.no
4566 hamaroy.no
4567 habmer.no
4568 hábmer.no
4569 hapmir.no
4570 hápmir.no
4571 hammerfest.no
4572 hammarfeasta.no
4573 hámmárfeasta.no
4574 haram.no
4575 hareid.no
4576 harstad.no
4577 hasvik.no
4578 aknoluokta.no
4579 ákŋoluokta.no
4580 hattfjelldal.no
4581 aarborte.no
4582 haugesund.no
4583 hemne.no
4584 hemnes.no
4585 hemsedal.no
4586 heroy.more-og-romsdal.no
4587 herøy.møre-og-romsdal.no
4588 heroy.nordland.no
4589 herøy.nordland.no
4590 hitra.no
4591 hjartdal.no
4592 hjelmeland.no
4593 hobol.no
4594 hobøl.no
4595 hof.no
4596 hol.no
4597 hole.no
4598 holmestrand.no
4599 holtalen.no
4600 holtålen.no
4601 hornindal.no
4602 horten.no
4603 hurdal.no
4604 hurum.no
4605 hvaler.no
4606 hyllestad.no
4607 hagebostad.no
4608 hægebostad.no
4609 hoyanger.no
4610 høyanger.no
4611 hoylandet.no
4612 høylandet.no
4613 ha.no
4614 hå.no
4615 ibestad.no
4616 inderoy.no
4617 inderøy.no
4618 iveland.no
4619 jevnaker.no
4620 jondal.no
4621 jolster.no
4622 jølster.no
4623 karasjok.no
4624 karasjohka.no
4625 kárášjohka.no
4626 karlsoy.no
4627 galsa.no
4628 gálsá.no
4629 karmoy.no
4630 karmøy.no
4631 kautokeino.no
4632 guovdageaidnu.no
4633 klepp.no
4634 klabu.no
4635 klæbu.no
4636 kongsberg.no
4637 kongsvinger.no
4638 kragero.no
4639 kragerø.no
4640 kristiansand.no
4641 kristiansund.no
4642 krodsherad.no
4643 krødsherad.no
4644 kvalsund.no
4645 rahkkeravju.no
4646 ráhkkerávju.no
4647 kvam.no
4648 kvinesdal.no
4649 kvinnherad.no
4650 kviteseid.no
4651 kvitsoy.no
4652 kvitsøy.no
4653 kvafjord.no
4654 kvæfjord.no
4655 giehtavuoatna.no
4656 kvanangen.no
4657 kvænangen.no
4658 navuotna.no
4659 návuotna.no
4660 kafjord.no
4661 kåfjord.no
4662 gaivuotna.no
4663 gáivuotna.no
4664 larvik.no
4665 lavangen.no
4666 lavagis.no
4667 loabat.no
4668 loabát.no
4669 lebesby.no
4670 davvesiida.no
4671 leikanger.no
4672 leirfjord.no
4673 leka.no
4674 leksvik.no
4675 lenvik.no
4676 leangaviika.no
4677 leaŋgaviika.no
4678 lesja.no
4679 levanger.no
4680 lier.no
4681 lierne.no
4682 lillehammer.no
4683 lillesand.no
4684 lindesnes.no
4685 lindas.no
4686 lindås.no
4687 lom.no
4688 loppa.no
4689 lahppi.no
4690 láhppi.no
4691 lund.no
4692 lunner.no
4693 luroy.no
4694 lurøy.no
4695 luster.no
4696 lyngdal.no
4697 lyngen.no
4698 ivgu.no
4699 lardal.no
4700 lerdal.no
4701 lærdal.no
4702 lodingen.no
4703 lødingen.no
4704 lorenskog.no
4705 lørenskog.no
4706 loten.no
4707 løten.no
4708 malvik.no
4709 masoy.no
4710 måsøy.no
4711 muosat.no
4712 muosát.no
4713 mandal.no
4714 marker.no
4715 marnardal.no
4716 masfjorden.no
4717 meland.no
4718 meldal.no
4719 melhus.no
4720 meloy.no
4721 meløy.no
4722 meraker.no
4723 meråker.no
4724 moareke.no
4725 moåreke.no
4726 midsund.no
4727 midtre-gauldal.no
4728 modalen.no
4729 modum.no
4730 molde.no
4731 moskenes.no
4732 moss.no
4733 mosvik.no
4734 malselv.no
4735 målselv.no
4736 malatvuopmi.no
4737 málatvuopmi.no
4738 namdalseid.no
4739 aejrie.no
4740 namsos.no
4741 namsskogan.no
4742 naamesjevuemie.no
4743 nååmesjevuemie.no
4744 laakesvuemie.no
4745 nannestad.no
4746 narvik.no
4747 narviika.no
4748 naustdal.no
4749 nedre-eiker.no
4750 nes.akershus.no
4751 nes.buskerud.no
4752 nesna.no
4753 nesodden.no
4754 nesseby.no
4755 unjarga.no
4756 unjárga.no
4757 nesset.no
4758 nissedal.no
4759 nittedal.no
4760 nord-aurdal.no
4761 nord-fron.no
4762 nord-odal.no
4763 norddal.no
4764 nordkapp.no
4765 davvenjarga.no
4766 davvenjárga.no
4767 nordre-land.no
4768 nordreisa.no
4769 raisa.no
4770 ráisa.no
4771 nore-og-uvdal.no
4772 notodden.no
4773 naroy.no
4774 nærøy.no
4775 notteroy.no
4776 nøtterøy.no
4777 odda.no
4778 oksnes.no
4779 øksnes.no
4780 oppdal.no
4781 oppegard.no
4782 oppegård.no
4783 orkdal.no
4784 orland.no
4785 ørland.no
4786 orskog.no
4787 ørskog.no
4788 orsta.no
4789 ørsta.no
4790 os.hedmark.no
4791 os.hordaland.no
4792 osen.no
4793 osteroy.no
4794 osterøy.no
4795 ostre-toten.no
4796 østre-toten.no
4797 overhalla.no
4798 ovre-eiker.no
4799 øvre-eiker.no
4800 oyer.no
4801 øyer.no
4802 oygarden.no
4803 øygarden.no
4804 oystre-slidre.no
4805 øystre-slidre.no
4806 porsanger.no
4807 porsangu.no
4808 porsáŋgu.no
4809 porsgrunn.no
4810 radoy.no
4811 radøy.no
4812 rakkestad.no
4813 rana.no
4814 ruovat.no
4815 randaberg.no
4816 rauma.no
4817 rendalen.no
4818 rennebu.no
4819 rennesoy.no
4820 rennesøy.no
4821 rindal.no
4822 ringebu.no
4823 ringerike.no
4824 ringsaker.no
4825 rissa.no
4826 risor.no
4827 risør.no
4828 roan.no
4829 rollag.no
4830 rygge.no
4831 ralingen.no
4832 rælingen.no
4833 rodoy.no
4834 rødøy.no
4835 romskog.no
4836 rømskog.no
4837 roros.no
4838 røros.no
4839 rost.no
4840 røst.no
4841 royken.no
4842 røyken.no
4843 royrvik.no
4844 røyrvik.no
4845 rade.no
4846 råde.no
4847 salangen.no
4848 siellak.no
4849 saltdal.no
4850 salat.no
4851 sálát.no
4852 sálat.no
4853 samnanger.no
4854 sande.more-og-romsdal.no
4855 sande.møre-og-romsdal.no
4856 sande.vestfold.no
4857 sandefjord.no
4858 sandnes.no
4859 sandoy.no
4860 sandøy.no
4861 sarpsborg.no
4862 sauda.no
4863 sauherad.no
4864 sel.no
4865 selbu.no
4866 selje.no
4867 seljord.no
4868 sigdal.no
4869 siljan.no
4870 sirdal.no
4871 skaun.no
4872 skedsmo.no
4873 ski.no
4874 skien.no
4875 skiptvet.no
4876 skjervoy.no
4877 skjervøy.no
4878 skierva.no
4879 skiervá.no
4880 skjak.no
4881 skjåk.no
4882 skodje.no
4883 skanland.no
4884 skånland.no
4885 skanit.no
4886 skánit.no
4887 smola.no
4888 smøla.no
4889 snillfjord.no
4890 snasa.no
4891 snåsa.no
4892 snoasa.no
4893 snaase.no
4894 snåase.no
4895 sogndal.no
4896 sokndal.no
4897 sola.no
4898 solund.no
4899 songdalen.no
4900 sortland.no
4901 spydeberg.no
4902 stange.no
4903 stavanger.no
4904 steigen.no
4905 steinkjer.no
4906 stjordal.no
4907 stjørdal.no
4908 stokke.no
4909 stor-elvdal.no
4910 stord.no
4911 stordal.no
4912 storfjord.no
4913 omasvuotna.no
4914 strand.no
4915 stranda.no
4916 stryn.no
4917 sula.no
4918 suldal.no
4919 sund.no
4920 sunndal.no
4921 surnadal.no
4922 sveio.no
4923 svelvik.no
4924 sykkylven.no
4925 sogne.no
4926 søgne.no
4927 somna.no
4928 sømna.no
4929 sondre-land.no
4930 søndre-land.no
4931 sor-aurdal.no
4932 sør-aurdal.no
4933 sor-fron.no
4934 sør-fron.no
4935 sor-odal.no
4936 sør-odal.no
4937 sor-varanger.no
4938 sør-varanger.no
4939 matta-varjjat.no
4940 mátta-várjjat.no
4941 sorfold.no
4942 sørfold.no
4943 sorreisa.no
4944 sørreisa.no
4945 sorum.no
4946 sørum.no
4947 tana.no
4948 deatnu.no
4949 time.no
4950 tingvoll.no
4951 tinn.no
4952 tjeldsund.no
4953 dielddanuorri.no
4954 tjome.no
4955 tjøme.no
4956 tokke.no
4957 tolga.no
4958 torsken.no
4959 tranoy.no
4960 tranøy.no
4961 tromso.no
4962 tromsø.no
4963 tromsa.no
4964 romsa.no
4965 trondheim.no
4966 troandin.no
4967 trysil.no
4968 trana.no
4969 træna.no
4970 trogstad.no
4971 trøgstad.no
4972 tvedestrand.no
4973 tydal.no
4974 tynset.no
4975 tysfjord.no
4976 divtasvuodna.no
4977 divttasvuotna.no
4978 tysnes.no
4979 tysvar.no
4980 tysvær.no
4981 tonsberg.no
4982 tønsberg.no
4983 ullensaker.no
4984 ullensvang.no
4985 ulvik.no
4986 utsira.no
4987 vadso.no
4988 vadsø.no
4989 cahcesuolo.no
4990 čáhcesuolo.no
4991 vaksdal.no
4992 valle.no
4993 vang.no
4994 vanylven.no
4995 vardo.no
4996 vardø.no
4997 varggat.no
4998 várggát.no
4999 vefsn.no
5000 vaapste.no
5001 vega.no
5002 vegarshei.no
5003 vegårshei.no
5004 vennesla.no
5005 verdal.no
5006 verran.no
5007 vestby.no
5008 vestnes.no
5009 vestre-slidre.no
5010 vestre-toten.no
5011 vestvagoy.no
5012 vestvågøy.no
5013 vevelstad.no
5014 vik.no
5015 vikna.no
5016 vindafjord.no
5017 volda.no
5018 voss.no
5019 varoy.no
5020 værøy.no
5021 vagan.no
5022 vågan.no
5023 voagat.no
5024 vagsoy.no
5025 vågsøy.no
5026 vaga.no
5027 vågå.no
5028 valer.ostfold.no
5029 våler.østfold.no
5030 valer.hedmark.no
5031 våler.hedmark.no
5032
5033 // np : http://www.mos.com.np/register.html
5034 *.np
5035
5036 // nr : http://cenpac.net.nr/dns/index.html
5037 // Confirmed by registry <technician@cenpac.net.nr> 2008-06-17
5038 nr
5039 biz.nr
5040 info.nr
5041 gov.nr
5042 edu.nr
5043 org.nr
5044 net.nr
5045 com.nr
5046
5047 // nu : http://en.wikipedia.org/wiki/.nu
5048 nu
5049
5050 // nz : http://en.wikipedia.org/wiki/.nz
5051 *.nz
5052
5053 // om : http://en.wikipedia.org/wiki/.om
5054 om
5055 co.om
5056 com.om
5057 edu.om
5058 gov.om
5059 med.om
5060 museum.om
5061 net.om
5062 org.om
5063 pro.om
5064
5065 // org : http://en.wikipedia.org/wiki/.org
5066 org
5067
5068 // pa : http://www.nic.pa/
5069 // Some additional second level "domains" resolve directly as hostnames, such as
5070 // pannet.pa, so we add a rule for "pa".
5071 pa
5072 ac.pa
5073 gob.pa
5074 com.pa
5075 org.pa
5076 sld.pa
5077 edu.pa
5078 net.pa
5079 ing.pa
5080 abo.pa
5081 med.pa
5082 nom.pa
5083
5084 // pe : https://www.nic.pe/InformeFinalComision.pdf
5085 pe
5086 edu.pe
5087 gob.pe
5088 nom.pe
5089 mil.pe
5090 org.pe
5091 com.pe
5092 net.pe
5093
5094 // pf : http://www.gobin.info/domainname/formulaire-pf.pdf
5095 pf
5096 com.pf
5097 org.pf
5098 edu.pf
5099
5100 // pg : http://en.wikipedia.org/wiki/.pg
5101 *.pg
5102
5103 // ph : http://www.domains.ph/FAQ2.asp
5104 // Submitted by registry <jed@email.com.ph> 2008-06-13
5105 ph
5106 com.ph
5107 net.ph
5108 org.ph
5109 gov.ph
5110 edu.ph
5111 ngo.ph
5112 mil.ph
5113 i.ph
5114
5115 // pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK
5116 pk
5117 com.pk
5118 net.pk
5119 edu.pk
5120 org.pk
5121 fam.pk
5122 biz.pk
5123 web.pk
5124 gov.pk
5125 gob.pk
5126 gok.pk
5127 gon.pk
5128 gop.pk
5129 gos.pk
5130 info.pk
5131
5132 // pl : http://www.dns.pl/english/
5133 pl
5134 // NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html
5135 aid.pl
5136 agro.pl
5137 atm.pl
5138 auto.pl
5139 biz.pl
5140 com.pl
5141 edu.pl
5142 gmina.pl
5143 gsm.pl
5144 info.pl
5145 mail.pl
5146 miasta.pl
5147 media.pl
5148 mil.pl
5149 net.pl
5150 nieruchomosci.pl
5151 nom.pl
5152 org.pl
5153 pc.pl
5154 powiat.pl
5155 priv.pl
5156 realestate.pl
5157 rel.pl
5158 sex.pl
5159 shop.pl
5160 sklep.pl
5161 sos.pl
5162 szkola.pl
5163 targi.pl
5164 tm.pl
5165 tourism.pl
5166 travel.pl
5167 turystyka.pl
5168 // ICM functional domains (icm.edu.pl)
5169 6bone.pl
5170 art.pl
5171 mbone.pl
5172 // Government domains (administred by ippt.gov.pl)
5173 gov.pl
5174 uw.gov.pl
5175 um.gov.pl
5176 ug.gov.pl
5177 upow.gov.pl
5178 starostwo.gov.pl
5179 so.gov.pl
5180 sr.gov.pl
5181 po.gov.pl
5182 pa.gov.pl
5183 // other functional domains
5184 ngo.pl
5185 irc.pl
5186 usenet.pl
5187 // NASK geographical domains : http://www.dns.pl/english/dns-regiony.html
5188 augustow.pl
5189 babia-gora.pl
5190 bedzin.pl
5191 beskidy.pl
5192 bialowieza.pl
5193 bialystok.pl
5194 bielawa.pl
5195 bieszczady.pl
5196 boleslawiec.pl
5197 bydgoszcz.pl
5198 bytom.pl
5199 cieszyn.pl
5200 czeladz.pl
5201 czest.pl
5202 dlugoleka.pl
5203 elblag.pl
5204 elk.pl
5205 glogow.pl
5206 gniezno.pl
5207 gorlice.pl
5208 grajewo.pl
5209 ilawa.pl
5210 jaworzno.pl
5211 jelenia-gora.pl
5212 jgora.pl
5213 kalisz.pl
5214 kazimierz-dolny.pl
5215 karpacz.pl
5216 kartuzy.pl
5217 kaszuby.pl
5218 katowice.pl
5219 kepno.pl
5220 ketrzyn.pl
5221 klodzko.pl
5222 kobierzyce.pl
5223 kolobrzeg.pl
5224 konin.pl
5225 konskowola.pl
5226 kutno.pl
5227 lapy.pl
5228 lebork.pl
5229 legnica.pl
5230 lezajsk.pl
5231 limanowa.pl
5232 lomza.pl
5233 lowicz.pl
5234 lubin.pl
5235 lukow.pl
5236 malbork.pl
5237 malopolska.pl
5238 mazowsze.pl
5239 mazury.pl
5240 mielec.pl
5241 mielno.pl
5242 mragowo.pl
5243 naklo.pl
5244 nowaruda.pl
5245 nysa.pl
5246 olawa.pl
5247 olecko.pl
5248 olkusz.pl
5249 olsztyn.pl
5250 opoczno.pl
5251 opole.pl
5252 ostroda.pl
5253 ostroleka.pl
5254 ostrowiec.pl
5255 ostrowwlkp.pl
5256 pila.pl
5257 pisz.pl
5258 podhale.pl
5259 podlasie.pl
5260 polkowice.pl
5261 pomorze.pl
5262 pomorskie.pl
5263 prochowice.pl
5264 pruszkow.pl
5265 przeworsk.pl
5266 pulawy.pl
5267 radom.pl
5268 rawa-maz.pl
5269 rybnik.pl
5270 rzeszow.pl
5271 sanok.pl
5272 sejny.pl
5273 siedlce.pl
5274 slask.pl
5275 slupsk.pl
5276 sosnowiec.pl
5277 stalowa-wola.pl
5278 skoczow.pl
5279 starachowice.pl
5280 stargard.pl
5281 suwalki.pl
5282 swidnica.pl
5283 swiebodzin.pl
5284 swinoujscie.pl
5285 szczecin.pl
5286 szczytno.pl
5287 tarnobrzeg.pl
5288 tgory.pl
5289 turek.pl
5290 tychy.pl
5291 ustka.pl
5292 walbrzych.pl
5293 warmia.pl
5294 warszawa.pl
5295 waw.pl
5296 wegrow.pl
5297 wielun.pl
5298 wlocl.pl
5299 wloclawek.pl
5300 wodzislaw.pl
5301 wolomin.pl
5302 wroclaw.pl
5303 zachpomor.pl
5304 zagan.pl
5305 zarow.pl
5306 zgora.pl
5307 zgorzelec.pl
5308 // TASK geographical domains (www.task.gda.pl/uslugi/dns)
5309 gda.pl
5310 gdansk.pl
5311 gdynia.pl
5312 med.pl
5313 sopot.pl
5314 // other geographical domains
5315 gliwice.pl
5316 krakow.pl
5317 poznan.pl
5318 wroc.pl
5319 zakopane.pl
5320
5321 // pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
5322 pm
5323
5324 // pn : http://www.government.pn/PnRegistry/policies.htm
5325 pn
5326 gov.pn
5327 co.pn
5328 org.pn
5329 edu.pn
5330 net.pn
5331
5332 // post : http://en.wikipedia.org/wiki/.post
5333 post
5334
5335 // pr : http://www.nic.pr/index.asp?f=1
5336 pr
5337 com.pr
5338 net.pr
5339 org.pr
5340 gov.pr
5341 edu.pr
5342 isla.pr
5343 pro.pr
5344 biz.pr
5345 info.pr
5346 name.pr
5347 // these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr
5348 est.pr
5349 prof.pr
5350 ac.pr
5351
5352 // pro : http://www.nic.pro/support_faq.htm
5353 pro
5354 aca.pro
5355 bar.pro
5356 cpa.pro
5357 jur.pro
5358 law.pro
5359 med.pro
5360 eng.pro
5361
5362 // ps : http://en.wikipedia.org/wiki/.ps
5363 // http://www.nic.ps/registration/policy.html#reg
5364 ps
5365 edu.ps
5366 gov.ps
5367 sec.ps
5368 plo.ps
5369 com.ps
5370 org.ps
5371 net.ps
5372
5373 // pt : http://online.dns.pt/dns/start_dns
5374 pt
5375 net.pt
5376 gov.pt
5377 org.pt
5378 edu.pt
5379 int.pt
5380 publ.pt
5381 com.pt
5382 nome.pt
5383
5384 // pw : http://en.wikipedia.org/wiki/.pw
5385 pw
5386 co.pw
5387 ne.pw
5388 or.pw
5389 ed.pw
5390 go.pw
5391 belau.pw
5392
5393 // py : http://www.nic.py/pautas.html#seccion_9
5394 // Confirmed by registry 2012-10-03
5395 py
5396 com.py
5397 coop.py
5398 edu.py
5399 gov.py
5400 mil.py
5401 net.py
5402 org.py
5403
5404 // qa : http://domains.qa/en/
5405 qa
5406 com.qa
5407 edu.qa
5408 gov.qa
5409 mil.qa
5410 name.qa
5411 net.qa
5412 org.qa
5413 sch.qa
5414
5415 // re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs
5416 re
5417 com.re
5418 asso.re
5419 nom.re
5420
5421 // ro : http://www.rotld.ro/
5422 ro
5423 com.ro
5424 org.ro
5425 tm.ro
5426 nt.ro
5427 nom.ro
5428 info.ro
5429 rec.ro
5430 arts.ro
5431 firm.ro
5432 store.ro
5433 www.ro
5434
5435 // rs : http://en.wikipedia.org/wiki/.rs
5436 rs
5437 co.rs
5438 org.rs
5439 edu.rs
5440 ac.rs
5441 gov.rs
5442 in.rs
5443
5444 // ru : http://www.cctld.ru/ru/docs/aktiv_8.php
5445 // Industry domains
5446 ru
5447 ac.ru
5448 com.ru
5449 edu.ru
5450 int.ru
5451 net.ru
5452 org.ru
5453 pp.ru
5454 // Geographical domains
5455 adygeya.ru
5456 altai.ru
5457 amur.ru
5458 arkhangelsk.ru
5459 astrakhan.ru
5460 bashkiria.ru
5461 belgorod.ru
5462 bir.ru
5463 bryansk.ru
5464 buryatia.ru
5465 cbg.ru
5466 chel.ru
5467 chelyabinsk.ru
5468 chita.ru
5469 chukotka.ru
5470 chuvashia.ru
5471 dagestan.ru
5472 dudinka.ru
5473 e-burg.ru
5474 grozny.ru
5475 irkutsk.ru
5476 ivanovo.ru
5477 izhevsk.ru
5478 jar.ru
5479 joshkar-ola.ru
5480 kalmykia.ru
5481 kaluga.ru
5482 kamchatka.ru
5483 karelia.ru
5484 kazan.ru
5485 kchr.ru
5486 kemerovo.ru
5487 khabarovsk.ru
5488 khakassia.ru
5489 khv.ru
5490 kirov.ru
5491 koenig.ru
5492 komi.ru
5493 kostroma.ru
5494 krasnoyarsk.ru
5495 kuban.ru
5496 kurgan.ru
5497 kursk.ru
5498 lipetsk.ru
5499 magadan.ru
5500 mari.ru
5501 mari-el.ru
5502 marine.ru
5503 mordovia.ru
5504 mosreg.ru
5505 msk.ru
5506 murmansk.ru
5507 nalchik.ru
5508 nnov.ru
5509 nov.ru
5510 novosibirsk.ru
5511 nsk.ru
5512 omsk.ru
5513 orenburg.ru
5514 oryol.ru
5515 palana.ru
5516 penza.ru
5517 perm.ru
5518 pskov.ru
5519 ptz.ru
5520 rnd.ru
5521 ryazan.ru
5522 sakhalin.ru
5523 samara.ru
5524 saratov.ru
5525 simbirsk.ru
5526 smolensk.ru
5527 spb.ru
5528 stavropol.ru
5529 stv.ru
5530 surgut.ru
5531 tambov.ru
5532 tatarstan.ru
5533 tom.ru
5534 tomsk.ru
5535 tsaritsyn.ru
5536 tsk.ru
5537 tula.ru
5538 tuva.ru
5539 tver.ru
5540 tyumen.ru
5541 udm.ru
5542 udmurtia.ru
5543 ulan-ude.ru
5544 vladikavkaz.ru
5545 vladimir.ru
5546 vladivostok.ru
5547 volgograd.ru
5548 vologda.ru
5549 voronezh.ru
5550 vrn.ru
5551 vyatka.ru
5552 yakutia.ru
5553 yamal.ru
5554 yaroslavl.ru
5555 yekaterinburg.ru
5556 yuzhno-sakhalinsk.ru
5557 // More geographical domains
5558 amursk.ru
5559 baikal.ru
5560 cmw.ru
5561 fareast.ru
5562 jamal.ru
5563 kms.ru
5564 k-uralsk.ru
5565 kustanai.ru
5566 kuzbass.ru
5567 magnitka.ru
5568 mytis.ru
5569 nakhodka.ru
5570 nkz.ru
5571 norilsk.ru
5572 oskol.ru
5573 pyatigorsk.ru
5574 rubtsovsk.ru
5575 snz.ru
5576 syzran.ru
5577 vdonsk.ru
5578 zgrad.ru
5579 // State domains
5580 gov.ru
5581 mil.ru
5582 // Technical domains
5583 test.ru
5584
5585 // rw : http://www.nic.rw/cgi-bin/policy.pl
5586 rw
5587 gov.rw
5588 net.rw
5589 edu.rw
5590 ac.rw
5591 com.rw
5592 co.rw
5593 int.rw
5594 mil.rw
5595 gouv.rw
5596
5597 // sa : http://www.nic.net.sa/
5598 sa
5599 com.sa
5600 net.sa
5601 org.sa
5602 gov.sa
5603 med.sa
5604 pub.sa
5605 edu.sa
5606 sch.sa
5607
5608 // sb : http://www.sbnic.net.sb/
5609 // Submitted by registry <lee.humphries@telekom.com.sb> 2008-06-08
5610 sb
5611 com.sb
5612 edu.sb
5613 gov.sb
5614 net.sb
5615 org.sb
5616
5617 // sc : http://www.nic.sc/
5618 sc
5619 com.sc
5620 gov.sc
5621 net.sc
5622 org.sc
5623 edu.sc
5624
5625 // sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm
5626 // Submitted by registry <admin@isoc.sd> 2008-06-17
5627 sd
5628 com.sd
5629 net.sd
5630 org.sd
5631 edu.sd
5632 med.sd
5633 tv.sd
5634 gov.sd
5635 info.sd
5636
5637 // se : http://en.wikipedia.org/wiki/.se
5638 // Submitted by registry <Patrik.Wallstrom@iis.se> 2008-06-24
5639 se
5640 a.se
5641 ac.se
5642 b.se
5643 bd.se
5644 brand.se
5645 c.se
5646 d.se
5647 e.se
5648 f.se
5649 fh.se
5650 fhsk.se
5651 fhv.se
5652 g.se
5653 h.se
5654 i.se
5655 k.se
5656 komforb.se
5657 kommunalforbund.se
5658 komvux.se
5659 l.se
5660 lanbib.se
5661 m.se
5662 n.se
5663 naturbruksgymn.se
5664 o.se
5665 org.se
5666 p.se
5667 parti.se
5668 pp.se
5669 press.se
5670 r.se
5671 s.se
5672 sshn.se
5673 t.se
5674 tm.se
5675 u.se
5676 w.se
5677 x.se
5678 y.se
5679 z.se
5680
5681 // sg : http://www.nic.net.sg/page/registration-policies-procedures-and-guidelines
5682 sg
5683 com.sg
5684 net.sg
5685 org.sg
5686 gov.sg
5687 edu.sg
5688 per.sg
5689
5690 // sh : http://www.nic.sh/registrar.html
5691 sh
5692 com.sh
5693 net.sh
5694 gov.sh
5695 org.sh
5696 mil.sh
5697
5698 // si : http://en.wikipedia.org/wiki/.si
5699 si
5700
5701 // sj : No registrations at this time.
5702 // Submitted by registry <jarle@uninett.no> 2008-06-16
5703 sj
5704
5705 // sk : http://en.wikipedia.org/wiki/.sk
5706 // list of 2nd level domains ?
5707 sk
5708
5709 // sl : http://www.nic.sl
5710 // Submitted by registry <adam@neoip.com> 2008-06-12
5711 sl
5712 com.sl
5713 net.sl
5714 edu.sl
5715 gov.sl
5716 org.sl
5717
5718 // sm : http://en.wikipedia.org/wiki/.sm
5719 sm
5720
5721 // sn : http://en.wikipedia.org/wiki/.sn
5722 sn
5723 art.sn
5724 com.sn
5725 edu.sn
5726 gouv.sn
5727 org.sn
5728 perso.sn
5729 univ.sn
5730
5731 // so : http://www.soregistry.com/
5732 so
5733 com.so
5734 net.so
5735 org.so
5736
5737 // sr : http://en.wikipedia.org/wiki/.sr
5738 sr
5739
5740 // st : http://www.nic.st/html/policyrules/
5741 st
5742 co.st
5743 com.st
5744 consulado.st
5745 edu.st
5746 embaixada.st
5747 gov.st
5748 mil.st
5749 net.st
5750 org.st
5751 principe.st
5752 saotome.st
5753 store.st
5754
5755 // su : http://en.wikipedia.org/wiki/.su
5756 su
5757
5758 // sv : http://www.svnet.org.sv/niveldos.pdf
5759 sv
5760 com.sv
5761 edu.sv
5762 gob.sv
5763 org.sv
5764 red.sv
5765
5766 // sx : http://en.wikipedia.org/wiki/.sx
5767 // Confirmed by registry <jcvignes@openregistry.com> 2012-05-31
5768 sx
5769 gov.sx
5770
5771 // sy : http://en.wikipedia.org/wiki/.sy
5772 // see also: http://www.gobin.info/domainname/sy.doc
5773 sy
5774 edu.sy
5775 gov.sy
5776 net.sy
5777 mil.sy
5778 com.sy
5779 org.sy
5780
5781 // sz : http://en.wikipedia.org/wiki/.sz
5782 // http://www.sispa.org.sz/
5783 sz
5784 co.sz
5785 ac.sz
5786 org.sz
5787
5788 // tc : http://en.wikipedia.org/wiki/.tc
5789 tc
5790
5791 // td : http://en.wikipedia.org/wiki/.td
5792 td
5793
5794 // tel: http://en.wikipedia.org/wiki/.tel
5795 // http://www.telnic.org/
5796 tel
5797
5798 // tf : http://en.wikipedia.org/wiki/.tf
5799 tf
5800
5801 // tg : http://en.wikipedia.org/wiki/.tg
5802 // http://www.nic.tg/
5803 tg
5804
5805 // th : http://en.wikipedia.org/wiki/.th
5806 // Submitted by registry <krit@thains.co.th> 2008-06-17
5807 th
5808 ac.th
5809 co.th
5810 go.th
5811 in.th
5812 mi.th
5813 net.th
5814 or.th
5815
5816 // tj : http://www.nic.tj/policy.html
5817 tj
5818 ac.tj
5819 biz.tj
5820 co.tj
5821 com.tj
5822 edu.tj
5823 go.tj
5824 gov.tj
5825 int.tj
5826 mil.tj
5827 name.tj
5828 net.tj
5829 nic.tj
5830 org.tj
5831 test.tj
5832 web.tj
5833
5834 // tk : http://en.wikipedia.org/wiki/.tk
5835 tk
5836
5837 // tl : http://en.wikipedia.org/wiki/.tl
5838 tl
5839 gov.tl
5840
5841 // tm : http://www.nic.tm/local.html
5842 tm
5843 com.tm
5844 co.tm
5845 org.tm
5846 net.tm
5847 nom.tm
5848 gov.tm
5849 mil.tm
5850 edu.tm
5851
5852 // tn : http://en.wikipedia.org/wiki/.tn
5853 // http://whois.ati.tn/
5854 tn
5855 com.tn
5856 ens.tn
5857 fin.tn
5858 gov.tn
5859 ind.tn
5860 intl.tn
5861 nat.tn
5862 net.tn
5863 org.tn
5864 info.tn
5865 perso.tn
5866 tourism.tn
5867 edunet.tn
5868 rnrt.tn
5869 rns.tn
5870 rnu.tn
5871 mincom.tn
5872 agrinet.tn
5873 defense.tn
5874 turen.tn
5875
5876 // to : http://en.wikipedia.org/wiki/.to
5877 // Submitted by registry <egullich@colo.to> 2008-06-17
5878 to
5879 com.to
5880 gov.to
5881 net.to
5882 org.to
5883 edu.to
5884 mil.to
5885
5886 // tp : No registrations at this time.
5887 // Submitted by Ryan Sleevi <ryan.sleevi@gmail.com> 2014-01-03
5888 tp
5889
5890 // tr : http://en.wikipedia.org/wiki/.tr
5891 *.tr
5892 !nic.tr
5893 // Used by government in the TRNC
5894 // http://en.wikipedia.org/wiki/.nc.tr
5895 gov.nc.tr
5896
5897 // travel : http://en.wikipedia.org/wiki/.travel
5898 travel
5899
5900 // tt : http://www.nic.tt/
5901 tt
5902 co.tt
5903 com.tt
5904 org.tt
5905 net.tt
5906 biz.tt
5907 info.tt
5908 pro.tt
5909 int.tt
5910 coop.tt
5911 jobs.tt
5912 mobi.tt
5913 travel.tt
5914 museum.tt
5915 aero.tt
5916 name.tt
5917 gov.tt
5918 edu.tt
5919
5920 // tv : http://en.wikipedia.org/wiki/.tv
5921 // Not listing any 2LDs as reserved since none seem to exist in practice,
5922 // Wikipedia notwithstanding.
5923 tv
5924
5925 // tw : http://en.wikipedia.org/wiki/.tw
5926 tw
5927 edu.tw
5928 gov.tw
5929 mil.tw
5930 com.tw
5931 net.tw
5932 org.tw
5933 idv.tw
5934 game.tw
5935 ebiz.tw
5936 club.tw
5937 網路.tw
5938 組織.tw
5939 商業.tw
5940
5941 // tz : http://www.tznic.or.tz/index.php/domains
5942 // Confirmed by registry <manager@tznic.or.tz> 2013-01-22
5943 tz
5944 ac.tz
5945 co.tz
5946 go.tz
5947 hotel.tz
5948 info.tz
5949 me.tz
5950 mil.tz
5951 mobi.tz
5952 ne.tz
5953 or.tz
5954 sc.tz
5955 tv.tz
5956
5957 // ua : https://hostmaster.ua/policy/?ua
5958 // Submitted by registry <dk@cctld.ua> 2012-04-27
5959 ua
5960 // ua 2LD
5961 com.ua
5962 edu.ua
5963 gov.ua
5964 in.ua
5965 net.ua
5966 org.ua
5967 // ua geographic names
5968 // https://hostmaster.ua/2ld/
5969 cherkassy.ua
5970 cherkasy.ua
5971 chernigov.ua
5972 chernihiv.ua
5973 chernivtsi.ua
5974 chernovtsy.ua
5975 ck.ua
5976 cn.ua
5977 cr.ua
5978 crimea.ua
5979 cv.ua
5980 dn.ua
5981 dnepropetrovsk.ua
5982 dnipropetrovsk.ua
5983 dominic.ua
5984 donetsk.ua
5985 dp.ua
5986 if.ua
5987 ivano-frankivsk.ua
5988 kh.ua
5989 kharkiv.ua
5990 kharkov.ua
5991 kherson.ua
5992 khmelnitskiy.ua
5993 khmelnytskyi.ua
5994 kiev.ua
5995 kirovograd.ua
5996 km.ua
5997 kr.ua
5998 krym.ua
5999 ks.ua
6000 kv.ua
6001 kyiv.ua
6002 lg.ua
6003 lt.ua
6004 lugansk.ua
6005 lutsk.ua
6006 lv.ua
6007 lviv.ua
6008 mk.ua
6009 mykolaiv.ua
6010 nikolaev.ua
6011 od.ua
6012 odesa.ua
6013 odessa.ua
6014 pl.ua
6015 poltava.ua
6016 rivne.ua
6017 rovno.ua
6018 rv.ua
6019 sb.ua
6020 sebastopol.ua
6021 sevastopol.ua
6022 sm.ua
6023 sumy.ua
6024 te.ua
6025 ternopil.ua
6026 uz.ua
6027 uzhgorod.ua
6028 vinnica.ua
6029 vinnytsia.ua
6030 vn.ua
6031 volyn.ua
6032 yalta.ua
6033 zaporizhzhe.ua
6034 zaporizhzhia.ua
6035 zhitomir.ua
6036 zhytomyr.ua
6037 zp.ua
6038 zt.ua
6039
6040 // Private registries in .ua
6041 co.ua
6042 pp.ua
6043
6044 // ug : https://www.registry.co.ug/
6045 ug
6046 co.ug
6047 or.ug
6048 ac.ug
6049 sc.ug
6050 go.ug
6051 ne.ug
6052 com.ug
6053 org.ug
6054
6055 // uk : http://en.wikipedia.org/wiki/.uk
6056 // Submitted by registry <noc@nominet.org.uk> 2012-10-02
6057 // and tweaked by us pending further consultation.
6058 *.uk
6059 *.sch.uk
6060 !bl.uk
6061 !british-library.uk
6062 !jet.uk
6063 !mod.uk
6064 !national-library-scotland.uk
6065 !nel.uk
6066 !nic.uk
6067 !nls.uk
6068 !parliament.uk
6069
6070 // us : http://en.wikipedia.org/wiki/.us
6071 us
6072 dni.us
6073 fed.us
6074 isa.us
6075 kids.us
6076 nsn.us
6077 // us geographic names
6078 ak.us
6079 al.us
6080 ar.us
6081 as.us
6082 az.us
6083 ca.us
6084 co.us
6085 ct.us
6086 dc.us
6087 de.us
6088 fl.us
6089 ga.us
6090 gu.us
6091 hi.us
6092 ia.us
6093 id.us
6094 il.us
6095 in.us
6096 ks.us
6097 ky.us
6098 la.us
6099 ma.us
6100 md.us
6101 me.us
6102 mi.us
6103 mn.us
6104 mo.us
6105 ms.us
6106 mt.us
6107 nc.us
6108 nd.us
6109 ne.us
6110 nh.us
6111 nj.us
6112 nm.us
6113 nv.us
6114 ny.us
6115 oh.us
6116 ok.us
6117 or.us
6118 pa.us
6119 pr.us
6120 ri.us
6121 sc.us
6122 sd.us
6123 tn.us
6124 tx.us
6125 ut.us
6126 vi.us
6127 vt.us
6128 va.us
6129 wa.us
6130 wi.us
6131 wv.us
6132 wy.us
6133 // The registrar notes several more specific domains available in each state,
6134 // such as state.*.us, dst.*.us, etc., but resolution of these is somewhat
6135 // haphazard; in some states these domains resolve as addresses, while in others
6136 // only subdomains are available, or even nothing at all. We include the
6137 // most common ones where it's clear that different sites are different
6138 // entities.
6139 k12.ak.us
6140 k12.al.us
6141 k12.ar.us
6142 k12.as.us
6143 k12.az.us
6144 k12.ca.us
6145 k12.co.us
6146 k12.ct.us
6147 k12.dc.us
6148 k12.de.us
6149 k12.fl.us
6150 k12.ga.us
6151 k12.gu.us
6152 // k12.hi.us Bug 614565 - Hawaii has a state-wide DOE login
6153 k12.ia.us
6154 k12.id.us
6155 k12.il.us
6156 k12.in.us
6157 k12.ks.us
6158 k12.ky.us
6159 k12.la.us
6160 k12.ma.us
6161 k12.md.us
6162 k12.me.us
6163 k12.mi.us
6164 k12.mn.us
6165 k12.mo.us
6166 k12.ms.us
6167 k12.mt.us
6168 k12.nc.us
6169 k12.nd.us
6170 k12.ne.us
6171 k12.nh.us
6172 k12.nj.us
6173 k12.nm.us
6174 k12.nv.us
6175 k12.ny.us
6176 k12.oh.us
6177 k12.ok.us
6178 k12.or.us
6179 k12.pa.us
6180 k12.pr.us
6181 k12.ri.us
6182 k12.sc.us
6183 // k12.sd.us Bug 934131 - Removed at request of James Booze <James.Booze@k12.sd.us>
6184 k12.tn.us
6185 k12.tx.us
6186 k12.ut.us
6187 k12.vi.us
6188 k12.vt.us
6189 k12.va.us
6190 k12.wa.us
6191 k12.wi.us
6192 // k12.wv.us Bug 947705 - Removed at request of Verne Britton <verne@wvnet.edu>
6193 k12.wy.us
6194
6195 cc.ak.us
6196 cc.al.us
6197 cc.ar.us
6198 cc.as.us
6199 cc.az.us
6200 cc.ca.us
6201 cc.co.us
6202 cc.ct.us
6203 cc.dc.us
6204 cc.de.us
6205 cc.fl.us
6206 cc.ga.us
6207 cc.gu.us
6208 cc.hi.us
6209 cc.ia.us
6210 cc.id.us
6211 cc.il.us
6212 cc.in.us
6213 cc.ks.us
6214 cc.ky.us
6215 cc.la.us
6216 cc.ma.us
6217 cc.md.us
6218 cc.me.us
6219 cc.mi.us
6220 cc.mn.us
6221 cc.mo.us
6222 cc.ms.us
6223 cc.mt.us
6224 cc.nc.us
6225 cc.nd.us
6226 cc.ne.us
6227 cc.nh.us
6228 cc.nj.us
6229 cc.nm.us
6230 cc.nv.us
6231 cc.ny.us
6232 cc.oh.us
6233 cc.ok.us
6234 cc.or.us
6235 cc.pa.us
6236 cc.pr.us
6237 cc.ri.us
6238 cc.sc.us
6239 cc.sd.us
6240 cc.tn.us
6241 cc.tx.us
6242 cc.ut.us
6243 cc.vi.us
6244 cc.vt.us
6245 cc.va.us
6246 cc.wa.us
6247 cc.wi.us
6248 cc.wv.us
6249 cc.wy.us
6250
6251 lib.ak.us
6252 lib.al.us
6253 lib.ar.us
6254 lib.as.us
6255 lib.az.us
6256 lib.ca.us
6257 lib.co.us
6258 lib.ct.us
6259 lib.dc.us
6260 lib.de.us
6261 lib.fl.us
6262 lib.ga.us
6263 lib.gu.us
6264 lib.hi.us
6265 lib.ia.us
6266 lib.id.us
6267 lib.il.us
6268 lib.in.us
6269 lib.ks.us
6270 lib.ky.us
6271 lib.la.us
6272 lib.ma.us
6273 lib.md.us
6274 lib.me.us
6275 lib.mi.us
6276 lib.mn.us
6277 lib.mo.us
6278 lib.ms.us
6279 lib.mt.us
6280 lib.nc.us
6281 lib.nd.us
6282 lib.ne.us
6283 lib.nh.us
6284 lib.nj.us
6285 lib.nm.us
6286 lib.nv.us
6287 lib.ny.us
6288 lib.oh.us
6289 lib.ok.us
6290 lib.or.us
6291 lib.pa.us
6292 lib.pr.us
6293 lib.ri.us
6294 lib.sc.us
6295 lib.sd.us
6296 lib.tn.us
6297 lib.tx.us
6298 lib.ut.us
6299 lib.vi.us
6300 lib.vt.us
6301 lib.va.us
6302 lib.wa.us
6303 lib.wi.us
6304 // lib.wv.us Bug 941670 - Removed at request of Larry W Arnold <arnold@wvlc.lib.wv.us>
6305 lib.wy.us
6306
6307 // k12.ma.us contains school districts in Massachusetts. The 4LDs are
6308 // managed indepedently except for private (PVT), charter (CHTR) and
6309 // parochial (PAROCH) schools. Those are delegated dorectly to the
6310 // 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net>
6311 pvt.k12.ma.us
6312 chtr.k12.ma.us
6313 paroch.k12.ma.us
6314
6315 // uy : http://www.nic.org.uy/
6316 uy
6317 com.uy
6318 edu.uy
6319 gub.uy
6320 mil.uy
6321 net.uy
6322 org.uy
6323
6324 // uz : http://www.reg.uz/
6325 uz
6326 co.uz
6327 com.uz
6328 net.uz
6329 org.uz
6330
6331 // va : http://en.wikipedia.org/wiki/.va
6332 va
6333
6334 // vc : http://en.wikipedia.org/wiki/.vc
6335 // Submitted by registry <kshah@ca.afilias.info> 2008-06-13
6336 vc
6337 com.vc
6338 net.vc
6339 org.vc
6340 gov.vc
6341 mil.vc
6342 edu.vc
6343
6344 // ve : https://registro.nic.ve/
6345 // Confirmed by registry 2012-10-04
6346 ve
6347 co.ve
6348 com.ve
6349 e12.ve
6350 edu.ve
6351 gov.ve
6352 info.ve
6353 mil.ve
6354 net.ve
6355 org.ve
6356 web.ve
6357
6358 // vg : http://en.wikipedia.org/wiki/.vg
6359 vg
6360
6361 // vi : http://www.nic.vi/newdomainform.htm
6362 // http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other
6363 // TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they
6364 // are available for registration (which they do not seem to be).
6365 vi
6366 co.vi
6367 com.vi
6368 k12.vi
6369 net.vi
6370 org.vi
6371
6372 // vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp
6373 vn
6374 com.vn
6375 net.vn
6376 org.vn
6377 edu.vn
6378 gov.vn
6379 int.vn
6380 ac.vn
6381 biz.vn
6382 info.vn
6383 name.vn
6384 pro.vn
6385 health.vn
6386
6387 // vu : http://en.wikipedia.org/wiki/.vu
6388 // list of 2nd level tlds ?
6389 vu
6390
6391 // wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
6392 wf
6393
6394 // ws : http://en.wikipedia.org/wiki/.ws
6395 // http://samoanic.ws/index.dhtml
6396 ws
6397 com.ws
6398 net.ws
6399 org.ws
6400 gov.ws
6401 edu.ws
6402
6403 // yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
6404 yt
6405
6406 // IDN ccTLDs
6407 // Please sort by ISO 3166 ccTLD, then punicode string
6408 // when submitting patches and follow this format:
6409 // <Punicode> ("<english word>" <language>) : <ISO 3166 ccTLD>
6410 // [optional sponsoring org]
6411 // <URL>
6412
6413 // xn--mgbaam7a8h ("Emerat" Arabic) : AE
6414 // http://nic.ae/english/arabicdomain/rules.jsp
6415 امارات
6416
6417 // xn--54b7fta0cc ("Bangla" Bangla) : BD
6418 বাংলা
6419
6420 // xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN
6421 // CNNIC
6422 // http://cnnic.cn/html/Dir/2005/10/11/3218.htm
6423 中国
6424
6425 // xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN
6426 // CNNIC
6427 // http://cnnic.cn/html/Dir/2005/10/11/3218.htm
6428 中國
6429
6430 // xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ
6431 الجزائر
6432
6433 // xn--wgbh1c ("Egypt" Arabic .masr) : EG
6434 // http://www.dotmasr.eg/
6435 مصر
6436
6437 // xn--node ("ge" Georgian (Mkhedruli)) : GE
6438 გე
6439
6440 // xn--j6w193g ("Hong Kong" Chinese-Han) : HK
6441 // https://www2.hkirc.hk/register/rules.jsp
6442 香港
6443
6444 // xn--h2brj9c ("Bharat" Devanagari) : IN
6445 // India
6446 भारत
6447
6448 // xn--mgbbh1a71e ("Bharat" Arabic) : IN
6449 // India
6450 بھارت
6451
6452 // xn--fpcrj9c3d ("Bharat" Telugu) : IN
6453 // India
6454 భారత్
6455
6456 // xn--gecrj9c ("Bharat" Gujarati) : IN
6457 // India
6458 ભારત
6459
6460 // xn--s9brj9c ("Bharat" Gurmukhi) : IN
6461 // India
6462 ਭਾਰਤ
6463
6464 // xn--45brj9c ("Bharat" Bengali) : IN
6465 // India
6466 ভারত
6467
6468 // xn--xkc2dl3a5ee0h ("India" Tamil) : IN
6469 // India
6470 இந்தியா
6471
6472 // xn--mgba3a4f16a ("Iran" Persian) : IR
6473 ایران
6474
6475 // xn--mgba3a4fra ("Iran" Arabic) : IR
6476 ايران
6477
6478 // xn--mgbayh7gpa ("al-Ordon" Arabic) : JO
6479 // National Information Technology Center (NITC)
6480 // Royal Scientific Society, Al-Jubeiha
6481 الاردن
6482
6483 // xn--3e0b707e ("Republic of Korea" Hangul) : KR
6484 한국
6485
6486 // xn--80ao21a ("Kaz" Kazakh) : KZ
6487 қаз
6488
6489 // xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK
6490 // http://nic.lk
6491 ලංකා
6492
6493 // xn--xkc2al3hye2a ("Ilangai" Tamil) : LK
6494 // http://nic.lk
6495 இலங்கை
6496
6497 // xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA
6498 المغرب
6499
6500 // xn--l1acc ("mon" Mongolian) : MN
6501 мон
6502
6503 // xn--mgbx4cd0ab ("Malaysia" Malay) : MY
6504 مليسيا
6505
6506 // xn--mgb9awbf ("Oman" Arabic) : OM
6507 عمان
6508
6509 // xn--ygbi2ammx ("Falasteen" Arabic) : PS
6510 // The Palestinian National Internet Naming Authority (PNINA)
6511 // http://www.pnina.ps
6512 فلسطين
6513
6514 // xn--90a3ac ("srb" Cyrillic) : RS
6515 срб
6516
6517 // xn--p1ai ("rf" Russian-Cyrillic) : RU
6518 // http://www.cctld.ru/en/docs/rulesrf.php
6519 рф
6520
6521 // xn--wgbl6a ("Qatar" Arabic) : QA
6522 // http://www.ict.gov.qa/
6523 قطر
6524
6525 // xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA
6526 // http://www.nic.net.sa/
6527 السعودية
6528
6529 // xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA
6530 السعودیة
6531
6532 // xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA
6533 السعودیۃ
6534
6535 // xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA
6536 السعوديه
6537
6538 // xn--ogbpf8fl ("Syria" Arabic) : SY
6539 سورية
6540
6541 // xn--mgbtf8fl ("Syria" Arabic) variant : SY
6542 سوريا
6543
6544 // xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG
6545 新加坡
6546
6547 // xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG
6548 சிங்கப்பூர்
6549
6550 // xn--o3cw4h ("Thai" Thai) : TH
6551 // http://www.thnic.co.th
6552 ไทย
6553
6554 // xn--pgbs0dh ("Tunis") : TN
6555 // http://nic.tn
6556 تونس
6557
6558 // xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW
6559 // http://www.twnic.net/english/dn/dn_07a.htm
6560 台灣
6561
6562 // xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW
6563 // http://www.twnic.net/english/dn/dn_07a.htm
6564 台湾
6565
6566 // xn--nnx388a ("Taiwan") variant : TW
6567 臺灣
6568
6569 // xn--j1amh ("ukr" Cyrillic) : UA
6570 укр
6571
6572 // xn--mgb2ddes ("AlYemen" Arabic) : YE
6573 اليمن
6574
6575 // xxx : http://icmregistry.com
6576 xxx
6577
6578 // ye : http://www.y.net.ye/services/domain_name.htm
6579 *.ye
6580
6581 // za : http://www.zadna.org.za/slds.html
6582 *.za
6583
6584 // zm : http://en.wikipedia.org/wiki/.zm
6585 *.zm
6586
6587 // zw : http://en.wikipedia.org/wiki/.zw
6588 *.zw
6589
6590
6591 // xn--80asehdb : 2013-07-14 CORE Association
6592 онлайн
6593
6594 // xn--80aswg : 2013-07-14 CORE Association
6595 сайт
6596
6597 // xn--ngbc5azd : 2013-07-14 International Domain Registry Pty. Ltd.
6598 شبكة
6599
6600 // xn--unup4y : 2013-07-14 Spring Fields, LLC
6601 游戏
6602
6603 // xn--vhquv : 2013-08-28 Dash McCook, LLC
6604 企业
6605
6606 // camera : 2013-08-28 Atomic Maple, LLC
6607 camera
6608
6609 // clothing : 2013-08-28 Steel Lake, LLC
6610 clothing
6611
6612 // lighting : 2013-08-28 John McCook, LLC
6613 lighting
6614
6615 // singles : 2013-08-28 Fern Madison, LLC
6616 singles
6617
6618 // ventures : 2013-08-28 Binky Lake, LLC
6619 ventures
6620
6621 // voyage : 2013-08-28 Ruby House, LLC
6622 voyage
6623
6624 // guru : 2013-08-28 Pioneer Cypress, LLC
6625 guru
6626
6627 // holdings : 2013-08-28 John Madison, LLC
6628 holdings
6629
6630 // equipment : 2013-08-28 Corn Station, LLC
6631 equipment
6632
6633 // bike : 2013-08-28 Grand Hollow, LLC
6634 bike
6635
6636 // estate : 2013-08-28 Trixy Park, LLC
6637 estate
6638
6639 // tattoo : 2013-08-30 Uniregistry,Corp.
6640 tattoo
6641
6642 // xn--3ds443g : 2013-09-09 TLD Registry Limited
6643 在线
6644
6645 // xn--fiq228c5hs : 2013-09-09 TLD Registry Limited
6646 中文网
6647
6648 // land : 2013-09-10 Pine Moon, LLC
6649 land
6650
6651 // plumbing : 2013-09-10 Spring Tigers, LLC
6652 plumbing
6653
6654 // contractors : 2013-09-10 Magic Woods, LLC
6655 contractors
6656
6657 // sexy : 2013-09-11 Uniregistry,Corp.
6658 sexy
6659
6660 // menu : 2013-09-11 Wedding TLD2, LLC
6661 menu
6662
6663 // xn--rhqv96g : 2013-09-11 Stable Tone Limited
6664 世界
6665
6666 // uno : 2013-09-11 Dot Latin, LLC
6667 uno
6668
6669 // gallery : 2013-09-13 Sugar House, LLC
6670 gallery
6671
6672 // technology : 2013-09-13 Auburn Falls
6673 technology
6674
6675 // xn--3bst00m : 2013-09-13 Eagle Horizon Limited
6676 集团
6677
6678 // reviews : 2013-09-13 Extra Cover, LLC
6679 reviews
6680
6681 // guide : 2013-09-13 Snow Moon, LLC
6682 guide
6683
6684 // xn--6qq986b3x1 : 2013-09-13 Tycoon Treasure Limited
6685 我爱你
6686
6687 // graphics : 2013-09-13 Over Madison, LLC
6688 graphics
6689
6690 // construction : 2013-09-13 Fox Dynamite, LLC
6691 construction
6692
6693 // onl : 2013-09-16 I-Registry Ltd.
6694 onl
6695
6696 // xn--q9jyb4c : 2013-09-17 Charleston Road Registry
6697 みんな
6698
6699 // diamonds : 2013-09-23 John Edge, LLC
6700 diamonds
6701
6702 // kiwi : 2013-09-23 Dot Kiwi Limited
6703 kiwi
6704
6705 // enterprises : 2013-09-23 Snow Oaks LLC
6706 enterprises
6707
6708 // today : 2013-09-23 Pearl Woods, LLC
6709 today
6710
6711 // futbol : 2013-09-23 Atomic Falls, LLC
6712 futbol
6713
6714 // photography : 2013-09-23 Sugar Glen, LLC
6715 photography
6716
6717 // tips : 2013-09-23 Corn Willow, LLC
6718 tips
6719
6720 // directory : 2013-09-23 Extra Madison, LLC
6721 directory
6722
6723 // kitchen : 2013-09-23 Just Goodbye, LLC
6724 kitchen
6725
6726 // xn--6frz82g : 2013-09-24 Afilias Limited
6727 移动
6728
6729 // kim : 2013-09-24 Afilias Limited
6730 kim
6731
6732 // xn--cg4bki : 2013-09-27 Samsung SDS Co., LTD
6733 삼성
6734
6735 // monash : 2013-10-01 Monash University
6736 monash
6737
6738 // wed : 2013-10-02 Atgron, Inc.
6739 wed
6740
6741 // pink : 2013-10-02 Afilias Limited
6742 pink
6743
6744 // ruhr : 2013-10-02 regiodot GmbH & Co. KG
6745 ruhr
6746
6747 // buzz : 2013-10-03 DOTSTRATEGY CO.
6748 buzz
6749
6750 // careers : 2013-10-03 Wild Corner, LLC
6751 careers
6752
6753 // shoes : 2013-10-03 Binky Galley, LLC
6754 shoes
6755
6756 // xn--4gbrim : 2013-10-07 Suhub Electronic Establishment
6757 موقع
6758
6759 // career : 2013-10-09 dotCareer, LLC
6760 career
6761
6762 // otsuka : 2013-10-11 Otsuka Holdings Co. Ltd.
6763 otsuka
6764
6765 // xn--fiQ64b : 2013-10-14 CITIC Group Corporation
6766 中信
6767
6768 // gift : 2013-10-18 Uniregistry Corp.
6769 gift
6770
6771 // recipes : 2013-10-18 Grand Island, LLC
6772 recipes
6773
6774 // coffee : 2013-10-18 Trixy Cover, LLC
6775 coffee
6776
6777 // luxury : 2013-10-18 Luxury Partners, LLC
6778 luxury
6779
6780 // domains : 2013-10-18 Sugar Cross, LLC
6781 domains
6782
6783 // photos : 2013-10-18 Sea Corner, LLC
6784 photos
6785
6786 // limo : 2013-10-18 Hidden Frostbite, LLC
6787 limo
6788
6789 // viajes : 2013-10-18 Black Madison, LLC
6790 viajes
6791
6792 // wang : 2013-10-24 Zodiac Leo Limited
6793 wang
6794
6795 // democrat : 2013-10-24 United TLD Holdco Ltd.
6796 democrat
6797
6798 // mango : 2013-10-25 PUNTO FA S.L.
6799 mango
6800
6801 // cab : 2013-10-25 Half Sunset, LLC
6802 cab
6803
6804 // support : 2013-10-25 Grand Orchard, LLC
6805 support
6806
6807 // dance : 2013-10-25 United TLD Holdco Ltd.
6808 dance
6809
6810 // nagoya : 2013-10-25 GMO Registry, Inc.
6811 nagoya
6812
6813 // computer : 2013-10-25 Pine Mill, LLC
6814 computer
6815
6816 // wien : 2013-10-28 punkt.wien GmbH
6817 wien
6818
6819 // berlin : 2013-10-31 dotBERLIN GmbH & Co. KG
6820 berlin
6821
6822 // codes : 2013-10-31 Puff Willow, LLC
6823 codes
6824
6825 // email : 2013-10-31 Spring Madison, LLC
6826 email
6827
6828 // xn--mgbab2bd : 2013-10-31 CORE Association
6829 بازار
6830
6831 // repair : 2013-11-07 Lone Sunset, LLC
6832 repair
6833
6834 // holiday : 2013-11-07 Goose Woods, LLC
6835 holiday
6836
6837 // center : 2013-11-07 Tin Mill, LLC
6838 center
6839
6840 // systems : 2013-11-07 Dash Cypress, LLC
6841 systems
6842
6843 // wiki : 2013-11-07 Top Level Design, LLC
6844 wiki
6845
6846 // ceo : 2013-11-07 CEOTLD Pty Ltd
6847 ceo
6848
6849 // international : 2013-11-07 Wild Way, LLC
6850 international
6851
6852 // solar : 2013-11-07 Ruby Town, LLC
6853 solar
6854
6855 // company : 2013-11-07 Silver Avenue, LLC
6856 company
6857
6858 // education : 2013-11-07 Brice Way, LLC
6859 education
6860
6861 // training : 2013-11-07 Wild Willow, LLC
6862 training
6863
6864 // academy : 2013-11-07 Half Oaks, LLC
6865 academy
6866
6867 // marketing : 2013-11-07 Fern Pass, LLC
6868 marketing
6869
6870 // florist : 2013-11-08 Half Cypress, LLC
6871 florist
6872
6873 // solutions : 2013-11-07 Silver Cover, LLC
6874 solutions
6875
6876 // build : 2013-11-07 Plan Bee LLC
6877 build
6878
6879 // institute : 2013-11-07 Outer Maple, LLC
6880 institute
6881
6882 // builders : 2013-11-07 Atomic Madison, LLC
6883 builders
6884
6885 // red : 2013-11-07 Afilias Limited
6886 red
6887
6888 // blue : 2013-11-07 Afilias Limited
6889 blue
6890
6891 // ninja : 2013-11-07 United TLD Holdco Ltd.
6892 ninja
6893
6894 // business : 2013-11-07 Spring Cross, LLC
6895 business
6896
6897 // gal : 2013-11-07 Asociación puntoGAL
6898 gal
6899
6900 // social : 2013-11-07 United TLD Holdco Ltd.
6901 social
6902
6903 // house : 2013-11-07 Sugar Park, LLC
6904 house
6905
6906 // camp : 2013-11-07 Delta Dynamite, LLC
6907 camp
6908
6909 // immobilien : 2013-11-07 United TLD Holdco Ltd.
6910 immobilien
6911
6912 // moda : 2013-11-07 United TLD Holdco Ltd.
6913 moda
6914
6915 // glass : 2013-11-07 Black Cover, LLC
6916 glass
6917
6918 // management : 2013-11-07 John Goodbye, LLC
6919 management
6920
6921 // kaufen : 2013-11-07 United TLD Holdco Ltd.
6922 kaufen
6923
6924 // farm : 2013-11-07 Just Maple, LLC
6925 farm
6926
6927 // xn--55qw42g : 2013-11-08 China Organizational Name Administration Center
6928 公益
6929
6930 // xn--zfr164b : 2013-11-08 China Organizational Name Administration Center
6931 政务
6932
6933 // club : 2013-11-08 .CLUB DOMAINS, LLC
6934 club
6935
6936 // voting : 2013-11-13 Valuetainment Corp.
6937 voting
6938
6939 // TOKYO : 2013-11-13 GMO Registry, Inc.
6940 TOKYO
6941
6942 // moe : 2013-11-13 Interlink Co., Ltd.
6943 moe
6944
6945 // guitars : 2013-11-14 Uniregistry, Corp.
6946 guitars
6947
6948 // bargains : 2013-11-14 Half Hallow, LLC
6949 bargains
6950
6951 // xn--nqv7fs00ema : 2013-11-14 Public Interest Registry
6952 组织机构
6953
6954 // desi : 2013-11-14 Desi Networks LLC
6955 desi
6956
6957 // cool : 2013-11-14 Koko Lake, LLC
6958 cool
6959
6960 // boutique : 2013-11-14 Over Galley, LLC
6961 boutique
6962
6963 // pics : 2013-11-14 Uniregistry, Corp.
6964 pics
6965
6966 // xn--c1avg : 2013-11-14 Public Interest Registry
6967 орг
6968
6969 // xn--55qx5d : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center)
6970 公司
6971
6972 // xn--io0a7i : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center)
6973 网络
6974
6975 // cheap : 2013-11-14 Sand Cover, LLC
6976 cheap
6977
6978 // xn--xhq521b : 2013-11-14 Guangzhou YU Wei Information Technology Co., Ltd.
6979 广东
6980
6981 // photo : 2013-11-14 Uniregistry, Corp.
6982 photo
6983
6984 // network : 2013-11-14 Trixy Manor, LLC
6985 network
6986
6987 // zone : 2013-11-14 Outer Falls, LLC
6988 zone
6989
6990 // xn--nqv7f : 2013-11-14 Public Interest Registry
6991 机构
6992
6993 // link : 2013-11-14 Uniregistry, Corp.
6994 link
6995
6996 // QPON : 2013-11-14 dotCOOL, Inc.
6997 qpon
6998
6999 // xn--i1b6b1a6a2e : 2013-11-14 Public Interest Registry
7000 संगठन
7001
7002 // agency : 2013-11-14 Steel Falls, LLC
7003 agency
7004
7005 // tienda : 2013-11-14 Victor Manor, LLC
7006 tienda
7007
7008 // works : 2013-11-14 Little Dynamite, LLC
7009 works
7010
7011 // london : 2013-11-14 Dot London Domains Limited
7012 london
7013
7014 // watch : 2013-11-14 Sand Shadow, LLC
7015 watch
7016
7017 // rocks : 2013-11-14 Ruby Moon, LLC
7018 rocks
7019
7020 // SHIKSHA : 2013-11-14 Afilias Limited
7021 shiksha
7022
7023 // xn--d1acj3b : 2013-11-21 The Foundation for Network Initiatives “The Smart Internet”
7024 дети
7025
7026 // budapest : 2013-11-21 Top Level Domain Holdings Limited
7027 budapest
7028
7029 // nrw : 2013-11-21 Minds + Machines GmbH
7030 nrw
7031
7032 // VOTE : 2013-11-21 Monolith Registry LLC
7033 vote
7034
7035 // fishing : 2013-11-21 Top Level Domain Holdings Limited
7036 fishing
7037
7038 // expert : 2013-11-21 Magic Pass, LLC
7039 expert
7040
7041 // horse : 2013-11-21 Top Level Domain Holdings Limited
7042 horse
7043
7044 // christmas : 2013-11-21 Uniregistry, Corp.
7045 christmas
7046
7047 // cooking : 2013-11-21 Top Level Domain Holdings Limited
7048 cooking
7049
7050 // xn--czru2d : 2013-11-21 Zodiac Capricorn Limited
7051 商城
7052
7053 // casa : 2013-11-21 Top Level Domain Holdings Limited
7054 casa
7055
7056 // rich : 2013-11-21 I-REGISTRY Ltd., Niederlassung Deutschland
7057 rich
7058
7059 // VOTO : 2013-11-21 Monolith Registry LLC
7060 voto
7061
7062 // tools : 2013-11-21 Pioneer North, LLC
7063 tools
7064
7065 // xn--45q11c : 2013-11-21 Zodiac Scorpio Limited
7066 八卦
7067
7068 // praxi : 2013-12-05 Praxi S.p.A.
7069 praxi
7070
7071 // events : 2013-12-05 Pioneer Maple, LLC
7072 events
7073
7074 // flights : 2013-12-05 Fox Station, LLC
7075 flights
7076
7077 // report : 2013-12-05 Binky Glen, LLC
7078 report
7079
7080 // partners : 2013-12-05 Magic Glen, LLC
7081 partners
7082
7083 // neustar : 2013-12-05 NeuStar, Inc.
7084 neustar
7085
7086 // rentals : 2013-12-05 Big Hollow,LLC
7087 rentals
7088
7089 // catering : 2013-12-05 New Falls. LLC
7090 catering
7091
7092 // community : 2013-12-05 Fox Orchard, LLC
7093 community
7094
7095 // maison : 2013-12-05 Victor Frostbite, LLC
7096 maison
7097
7098 // parts : 2013-12-05 Sea Goodbye, LLC
7099 parts
7100
7101 // cleaning : 2013-12-05 Fox Shadow, LLC
7102 cleaning
7103
7104 // okinawa : 2013-12-05 BusinessRalliart inc.
7105 okinawa
7106
7107 // foundation : 2013-12-05 John Dale, LLC
7108 foundation
7109
7110 // properties : 2013-12-05 Big Pass, LLC
7111 properties
7112
7113 // vacations : 2013-12-05 Atomic Tigers, LLC
7114 vacations
7115
7116 // productions : 2013-12-05 Magic Birch, LLC
7117 productions
7118
7119 // industries : 2013-12-05 Outer House, LLC
7120 industries
7121
7122 // haus : 2013-12-05 Pixie Edge, LLC
7123 haus
7124
7125 // vision : 2013-12-05 Koko Station, LLC
7126 vision
7127
7128 // mormon : 2013-12-05 IRI Domain Management, LLC (""Applicant"")
7129 mormon
7130
7131 // cards : 2013-12-05 Foggy Hollow, LLC
7132 cards
7133
7134 // ink : 2013-12-05 Top Level Design, LLC
7135 ink
7136
7137 // villas : 2013-12-05 New Sky, LLC
7138 villas
7139
7140 // consulting : 2013-12-05 Pixie Station, LLC
7141 consulting
7142
7143 // cruises : 2013-12-05 Spring Way, LLC
7144 cruises
7145
7146 // krd : 2013-12-05 KRG Department of Information Technology
7147 krd
7148
7149 // xyz : 2013-12-05 XYZ.COM LLC
7150 xyz
7151
7152 // dating : 2013-12-05 Pine Fest, LLC
7153 dating
7154
7155 // exposed : 2013-12-05 Victor Beach, LLC
7156 exposed
7157
7158 // condos : 2013-12-05 Pine House, LLC
7159 condos
7160
7161 // eus : 2013-12-12 Puntueus Fundazioa
7162 eus
7163
7164 // Caravan : 2013-12-12 Caravan International, Inc.
7165 caravan
7166
7167 // actor : 2013-12-12 United TLD Holdco Ltd.
7168 actor
7169
7170 // saarland : 2013-12-12 dotSaarland GmbH
7171 saarland
7172
7173 // yokohama : 2013-12-12 GMO Registry, Inc.
7174 yokohama
7175
7176 // pub : 2013-12-12 United TLD Holdco Ltd.
7177 pub
7178
7179 // xn--p1acf : 2013-12-12 Rusnames Limited
7180 рус
7181
7182 // ren : 2013-12-12 Beijing Qianxiang Wangjing Technology Development Co., Ltd.
7183 ren
7184
7185 // fish : 2013-12-12 Fox Woods, LLC
7186 fish
7187
7188 // BAR : 2013-12-12 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
7189 bar
7190
7191 // DNP : 2013-12-13 Dai Nippon Printing Co., Ltd.
7192 dnp
7193
7194 // bid : 2013-12-19 dot Bid Limited
7195 bid
7196
7197 // supply : 2013-12-19 Half Falls, LLC
7198 supply
7199
7200 // Miami : 2013-12-19 Top Level Domain Holdings Limited
7201 miami
7202
7203 // supplies : 2013-12-19 Atomic Fields, LLC
7204 supplies
7205
7206 // quebec : 2013-12-19 PointQuébec Inc
7207 quebec
7208
7209 // MOSCOW : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
7210 moscow
7211
7212 // globo : 2013-12-19 Globo Comunicação e Participações S.A
7213 globo
7214
7215 // AXA : 2013-12-19 AXA SA
7216 axa
7217
7218 // xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
7219 москва
7220
7221 // xn--czrs0t : 2013-12-19 Wild Island, LLC
7222 商店
7223
7224 // vodka : 2013-12-19 Top Level Domain Holdings Limited
7225 vodka
7226
7227 // REST : 2013-12-19 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
7228 rest
7229
7230 // frogans : 2013-12-19 OP3FT
7231 frogans
7232
7233 // WTC : 2013-12-19 World Trade Centers Association, Inc.
7234 wtc
7235
7236 // rodeo : 2013-12-19 Top Level Domain Holdings Limited
7237 rodeo
7238
7239 // sohu : 2013-12-19 Sohu.com Limited
7240 sohu
7241
7242 // BEST : 2013-12-19 BestTLD Pty Ltd
7243 best
7244
7245 // country : 2013-12-19 Top Level Domain Holdings Limited
7246 country
7247
7248 // KRED : 2013-12-19 KredTLD Pty Ltd
7249 kred
7250
7251 // feedback : 2013-12-19 Top Level Spectrum, Inc.
7252 feedback
7253
7254 // work : 2013-12-19 Top Level Domain Holdings Limited
7255 work
7256
7257 // luxe : 2014-01-09 Top Level Domain Holdings Limited
7258 luxe
7259
7260 // ryukyu : 2014-01-09 BusinessRalliart inc.
7261 ryukyu
7262
7263 // autos : 2014-01-09 DERAutos, LLC
7264 autos
7265
7266 // homes : 2014-01-09 DERHomes, LLC
7267 homes
7268
7269 // jetzt : 2014-01-09 New TLD Company AB
7270 jetzt
7271
7272 // yachts : 2014-01-09 DERYachts, LLC
7273 yachts
7274
7275 // motorcycles : 2014-01-09 DERMotorcycles, LLC
7276 motorcycles
7277
7278 // mini : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft
7279 mini
7280
7281 // ggee : 2014-01-09 GMO Internet, Inc.
7282 ggee
7283
7284 // beer : 2014-01-09 Top Level Domain Holdings Limited
7285 beer
7286
7287 // xn--1qqw23a : 2014-01-13 Guangzhou YU Wei Information Technology Co., Ltd.
7288 佛山
7289
7290 // college : 2014-01-16 XYZ.COM LLC
7291 college
7292
7293 // ovh : 2014-01-16 OVH SAS
7294 ovh
7295
7296 // meet : 2014-01-16 Afilias Limited
7297 meet
7298
7299 // xn--ses554g : 2014-01-16 HU YI GLOBAL INFORMATION RESOURCES (HOLDING) COMPANY. HONGKONG LIMITED
7300 网址
7301
7302 // gop : 2014-01-16 Republican State Leadership Committee, Inc.
7303 gop
7304
7305 // blackfriday : 2014-01-16 Uniregistry, Corp.
7306 blackfriday
7307
7308 // lacaixa : 2014-01-16 CAIXA D'ESTALVIS I PENSIONS DE BARCELONA
7309 lacaixa
7310
7311 // xn--czr694b : 2014-01-16 HU YI GLOBAL INFORMATION RESOURCES(HOLDING) COMPANY.HONGKONG LIMITED
7312 商标
7313
7314 // vegas : 2014-01-16 Dot Vegas, Inc.
7315 vegas
7316
7317 // black : 2014-01-16 Afilias Limited
7318 black
7319
7320
7321 // ===END ICANN DOMAINS===
7322 // ===BEGIN PRIVATE DOMAINS===
7323
7324 // Amazon CloudFront : https://aws.amazon.com/cloudfront/
7325 // Submitted by Donavan Miller <donavanm@amazon.com> 2013-03-22
7326 cloudfront.net
7327
7328 // Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/
7329 // Submitted by Osman Surkatty <osmans@amazon.com> 2013-04-02
7330 compute.amazonaws.com
7331 us-east-1.amazonaws.com
7332 compute-1.amazonaws.com
7333 z-1.compute-1.amazonaws.com
7334 z-2.compute-1.amazonaws.com
7335 ap-northeast-1.compute.amazonaws.com
7336 ap-southeast-1.compute.amazonaws.com
7337 ap-southeast-2.compute.amazonaws.com
7338 eu-west-1.compute.amazonaws.com
7339 sa-east-1.compute.amazonaws.com
7340 us-gov-west-1.compute.amazonaws.com
7341 us-west-1.compute.amazonaws.com
7342 us-west-2.compute.amazonaws.com
7343
7344 // Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/
7345 // Submitted by Adam Stein <astein@amazon.com> 2013-04-02
7346 elasticbeanstalk.com
7347
7348 // Amazon Elastic Load Balancing : https://aws.amazon.com/elasticloadbalancing/
7349 // Submitted by Scott Vidmar <svidmar@amazon.com> 2013-03-27
7350 elb.amazonaws.com
7351
7352 // Amazon S3 : https://aws.amazon.com/s3/
7353 // Submitted by Courtney Eckhardt <coec@amazon.com> 2013-03-22
7354 s3.amazonaws.com
7355 s3-us-west-2.amazonaws.com
7356 s3-us-west-1.amazonaws.com
7357 s3-eu-west-1.amazonaws.com
7358 s3-ap-southeast-1.amazonaws.com
7359 s3-ap-southeast-2.amazonaws.com
7360 s3-ap-northeast-1.amazonaws.com
7361 s3-sa-east-1.amazonaws.com
7362 s3-us-gov-west-1.amazonaws.com
7363 s3-fips-us-gov-west-1.amazonaws.com
7364 s3-website-us-east-1.amazonaws.com
7365 s3-website-us-west-2.amazonaws.com
7366 s3-website-us-west-1.amazonaws.com
7367 s3-website-eu-west-1.amazonaws.com
7368 s3-website-ap-southeast-1.amazonaws.com
7369 s3-website-ap-southeast-2.amazonaws.com
7370 s3-website-ap-northeast-1.amazonaws.com
7371 s3-website-sa-east-1.amazonaws.com
7372 s3-website-us-gov-west-1.amazonaws.com
7373
7374 // BetaInABox
7375 // Submitted by adrian@betainabox.com 2012-09-13
7376 betainabox.com
7377
7378 // CentralNic : http://www.centralnic.com/names/domains
7379 // Submitted by registry <gavin.brown@centralnic.com> 2012-09-27
7380 ae.org
7381 ar.com
7382 br.com
7383 cn.com
7384 com.de
7385 de.com
7386 eu.com
7387 gb.com
7388 gb.net
7389 gr.com
7390 hu.com
7391 hu.net
7392 jp.net
7393 jpn.com
7394 kr.com
7395 no.com
7396 qc.com
7397 ru.com
7398 sa.com
7399 se.com
7400 se.net
7401 uk.com
7402 uk.net
7403 us.com
7404 us.org
7405 uy.com
7406 za.com
7407
7408 // c.la : http://www.c.la/
7409 c.la
7410
7411 // cloudControl : https://www.cloudcontrol.com/
7412 // Submitted by Tobias Wilken <tw@cloudcontrol.com> 2013-07-23
7413 cloudcontrolled.com
7414 cloudcontrolapp.com
7415
7416 // co.ca : http://registry.co.ca/
7417 co.ca
7418
7419 // CoDNS B.V.
7420 co.nl
7421 co.no
7422
7423 // Cupcake : https://cupcake.io/
7424 // Submitted by Jonathan Rudenberg <jonathan@cupcake.io> 2013-10-08
7425 cupcake.is
7426
7427 // DreamHost : http://www.dreamhost.com/
7428 // Submitted by Andrew Farmer <andrew.farmer@dreamhost.com> 2012-10-02
7429 dreamhosters.com
7430
7431 // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/
7432 dyndns-at-home.com
7433 dyndns-at-work.com
7434 dyndns-blog.com
7435 dyndns-free.com
7436 dyndns-home.com
7437 dyndns-ip.com
7438 dyndns-mail.com
7439 dyndns-office.com
7440 dyndns-pics.com
7441 dyndns-remote.com
7442 dyndns-server.com
7443 dyndns-web.com
7444 dyndns-wiki.com
7445 dyndns-work.com
7446 dyndns.biz
7447 dyndns.info
7448 dyndns.org
7449 dyndns.tv
7450 at-band-camp.net
7451 ath.cx
7452 barrel-of-knowledge.info
7453 barrell-of-knowledge.info
7454 better-than.tv
7455 blogdns.com
7456 blogdns.net
7457 blogdns.org
7458 blogsite.org
7459 boldlygoingnowhere.org
7460 broke-it.net
7461 buyshouses.net
7462 cechire.com
7463 dnsalias.com
7464 dnsalias.net
7465 dnsalias.org
7466 dnsdojo.com
7467 dnsdojo.net
7468 dnsdojo.org
7469 does-it.net
7470 doesntexist.com
7471 doesntexist.org
7472 dontexist.com
7473 dontexist.net
7474 dontexist.org
7475 doomdns.com
7476 doomdns.org
7477 dvrdns.org
7478 dyn-o-saur.com
7479 dynalias.com
7480 dynalias.net
7481 dynalias.org
7482 dynathome.net
7483 dyndns.ws
7484 endofinternet.net
7485 endofinternet.org
7486 endoftheinternet.org
7487 est-a-la-maison.com
7488 est-a-la-masion.com
7489 est-le-patron.com
7490 est-mon-blogueur.com
7491 for-better.biz
7492 for-more.biz
7493 for-our.info
7494 for-some.biz
7495 for-the.biz
7496 forgot.her.name
7497 forgot.his.name
7498 from-ak.com
7499 from-al.com
7500 from-ar.com
7501 from-az.net
7502 from-ca.com
7503 from-co.net
7504 from-ct.com
7505 from-dc.com
7506 from-de.com
7507 from-fl.com
7508 from-ga.com
7509 from-hi.com
7510 from-ia.com
7511 from-id.com
7512 from-il.com
7513 from-in.com
7514 from-ks.com
7515 from-ky.com
7516 from-la.net
7517 from-ma.com
7518 from-md.com
7519 from-me.org
7520 from-mi.com
7521 from-mn.com
7522 from-mo.com
7523 from-ms.com
7524 from-mt.com
7525 from-nc.com
7526 from-nd.com
7527 from-ne.com
7528 from-nh.com
7529 from-nj.com
7530 from-nm.com
7531 from-nv.com
7532 from-ny.net
7533 from-oh.com
7534 from-ok.com
7535 from-or.com
7536 from-pa.com
7537 from-pr.com
7538 from-ri.com
7539 from-sc.com
7540 from-sd.com
7541 from-tn.com
7542 from-tx.com
7543 from-ut.com
7544 from-va.com
7545 from-vt.com
7546 from-wa.com
7547 from-wi.com
7548 from-wv.com
7549 from-wy.com
7550 ftpaccess.cc
7551 fuettertdasnetz.de
7552 game-host.org
7553 game-server.cc
7554 getmyip.com
7555 gets-it.net
7556 go.dyndns.org
7557 gotdns.com
7558 gotdns.org
7559 groks-the.info
7560 groks-this.info
7561 ham-radio-op.net
7562 here-for-more.info
7563 hobby-site.com
7564 hobby-site.org
7565 home.dyndns.org
7566 homedns.org
7567 homeftp.net
7568 homeftp.org
7569 homeip.net
7570 homelinux.com
7571 homelinux.net
7572 homelinux.org
7573 homeunix.com
7574 homeunix.net
7575 homeunix.org
7576 iamallama.com
7577 in-the-band.net
7578 is-a-anarchist.com
7579 is-a-blogger.com
7580 is-a-bookkeeper.com
7581 is-a-bruinsfan.org
7582 is-a-bulls-fan.com
7583 is-a-candidate.org
7584 is-a-caterer.com
7585 is-a-celticsfan.org
7586 is-a-chef.com
7587 is-a-chef.net
7588 is-a-chef.org
7589 is-a-conservative.com
7590 is-a-cpa.com
7591 is-a-cubicle-slave.com
7592 is-a-democrat.com
7593 is-a-designer.com
7594 is-a-doctor.com
7595 is-a-financialadvisor.com
7596 is-a-geek.com
7597 is-a-geek.net
7598 is-a-geek.org
7599 is-a-green.com
7600 is-a-guru.com
7601 is-a-hard-worker.com
7602 is-a-hunter.com
7603 is-a-knight.org
7604 is-a-landscaper.com
7605 is-a-lawyer.com
7606 is-a-liberal.com
7607 is-a-libertarian.com
7608 is-a-linux-user.org
7609 is-a-llama.com
7610 is-a-musician.com
7611 is-a-nascarfan.com
7612 is-a-nurse.com
7613 is-a-painter.com
7614 is-a-patsfan.org
7615 is-a-personaltrainer.com
7616 is-a-photographer.com
7617 is-a-player.com
7618 is-a-republican.com
7619 is-a-rockstar.com
7620 is-a-socialist.com
7621 is-a-soxfan.org
7622 is-a-student.com
7623 is-a-teacher.com
7624 is-a-techie.com
7625 is-a-therapist.com
7626 is-an-accountant.com
7627 is-an-actor.com
7628 is-an-actress.com
7629 is-an-anarchist.com
7630 is-an-artist.com
7631 is-an-engineer.com
7632 is-an-entertainer.com
7633 is-by.us
7634 is-certified.com
7635 is-found.org
7636 is-gone.com
7637 is-into-anime.com
7638 is-into-cars.com
7639 is-into-cartoons.com
7640 is-into-games.com
7641 is-leet.com
7642 is-lost.org
7643 is-not-certified.com
7644 is-saved.org
7645 is-slick.com
7646 is-uberleet.com
7647 is-very-bad.org
7648 is-very-evil.org
7649 is-very-good.org
7650 is-very-nice.org
7651 is-very-sweet.org
7652 is-with-theband.com
7653 isa-geek.com
7654 isa-geek.net
7655 isa-geek.org
7656 isa-hockeynut.com
7657 issmarterthanyou.com
7658 isteingeek.de
7659 istmein.de
7660 kicks-ass.net
7661 kicks-ass.org
7662 knowsitall.info
7663 land-4-sale.us
7664 lebtimnetz.de
7665 leitungsen.de
7666 likes-pie.com
7667 likescandy.com
7668 merseine.nu
7669 mine.nu
7670 misconfused.org
7671 mypets.ws
7672 myphotos.cc
7673 neat-url.com
7674 office-on-the.net
7675 on-the-web.tv
7676 podzone.net
7677 podzone.org
7678 readmyblog.org
7679 saves-the-whales.com
7680 scrapper-site.net
7681 scrapping.cc
7682 selfip.biz
7683 selfip.com
7684 selfip.info
7685 selfip.net
7686 selfip.org
7687 sells-for-less.com
7688 sells-for-u.com
7689 sells-it.net
7690 sellsyourhome.org
7691 servebbs.com
7692 servebbs.net
7693 servebbs.org
7694 serveftp.net
7695 serveftp.org
7696 servegame.org
7697 shacknet.nu
7698 simple-url.com
7699 space-to-rent.com
7700 stuff-4-sale.org
7701 stuff-4-sale.us
7702 teaches-yoga.com
7703 thruhere.net
7704 traeumtgerade.de
7705 webhop.biz
7706 webhop.info
7707 webhop.net
7708 webhop.org
7709 worse-than.tv
7710 writesthisblog.com
7711
7712 // Fastly Inc. http://www.fastly.com/
7713 // Submitted by Vladimir Vuksan <vladimir@fastly.com> 2013-05-31
7714 a.ssl.fastly.net
7715 b.ssl.fastly.net
7716 global.ssl.fastly.net
7717 a.prod.fastly.net
7718 global.prod.fastly.net
7719
7720 // GitHub, Inc.
7721 // Submitted by Ben Toews <btoews@github.com> 2013-04-18
7722 github.io
7723
7724 // GlobeHosting, Inc.
7725 // Submitted by Zoltan Egresi <egresi@globehosting.com> 2013-07-12
7726 ro.com
7727
7728 // Google, Inc.
7729 // Submitted by Eduardo Vela <evn@google.com> 2012-10-24
7730 appspot.com
7731 blogspot.be
7732 blogspot.bj
7733 blogspot.ca
7734 blogspot.cf
7735 blogspot.ch
7736 blogspot.co.at
7737 blogspot.co.il
7738 blogspot.co.nz
7739 blogspot.co.uk
7740 blogspot.com
7741 blogspot.com.ar
7742 blogspot.com.au
7743 blogspot.com.br
7744 blogspot.com.es
7745 blogspot.cv
7746 blogspot.cz
7747 blogspot.de
7748 blogspot.dk
7749 blogspot.fi
7750 blogspot.fr
7751 blogspot.gr
7752 blogspot.hk
7753 blogspot.hu
7754 blogspot.ie
7755 blogspot.in
7756 blogspot.it
7757 blogspot.jp
7758 blogspot.kr
7759 blogspot.mr
7760 blogspot.mx
7761 blogspot.nl
7762 blogspot.no
7763 blogspot.pt
7764 blogspot.re
7765 blogspot.ro
7766 blogspot.se
7767 blogspot.sg
7768 blogspot.sk
7769 blogspot.td
7770 blogspot.tw
7771 codespot.com
7772 googleapis.com
7773 googlecode.com
7774
7775 // Heroku : https://www.heroku.com/
7776 // Submitted by Tom Maher <tmaher@heroku.com> 2013-05-02
7777 herokuapp.com
7778 herokussl.com
7779
7780 // iki.fi
7781 // Submitted by Hannu Aronsson <haa@iki.fi> 2009-11-05
7782 iki.fi
7783
7784 // info.at : http://www.info.at/
7785 biz.at
7786 info.at
7787
7788 // Michau Enterprises Limited : http://www.co.pl/
7789 co.pl
7790
7791 // NYC.mn : http://www.information.nyc.mn
7792 // Submitted by Matthew Brown <mattbrown@nyc.mn> 2013-03-11
7793 nyc.mn
7794
7795 // Opera Software, A.S.A.
7796 // Submitted by Yngve Pettersen <yngve@opera.com> 2009-11-26
7797 operaunite.com
7798
7799 // Red Hat, Inc. OpenShift : https://openshift.redhat.com/
7800 // Submitted by Tim Kramer <tkramer@rhcloud.com> 2012-10-24
7801 rhcloud.com
7802
7803 // priv.at : http://www.nic.priv.at/
7804 // Submitted by registry <lendl@nic.at> 2008-06-09
7805 priv.at
7806
7807 // ZaNiC : http://www.za.net/
7808 // Submitted by registry <hostmaster@nic.za.net> 2009-10-03
7809 za.net
7810 za.org
7811
7812 // ===END PRIVATE DOMAINS===
0 <feedback>
1 <report_metadata>
2 <org_name>126.com</org_name>
3 <email>abuse@126.com</email>
4 <report_id>aggr_report_example.com_20120518_126.com</report_id>
5 <date_range>
6 <begin>1337270400.0</begin>
7 <end>1337356799.0</end>
8 </date_range>
9 </report_metadata>
10 <policy_published>
11 <domain>example.com</domain>
12 <adkim>r</adkim>
13 <aspf>r</aspf>
14 <p>reject</p>
15 <sp>reject</sp>
16 <pct>100</pct>
17 </policy_published>
18 <record>
19 <row>
20 <source_ip>116.233.121.204</source_ip>
21 <count>27</count>
22 <policy_evaluated>
23 <disposition>reject</disposition>
24 <dkim>fail</dkim>
25 <spf>fail</spf>
26 </policy_evaluated>
27 </row>
28 <identifiers>
29 <header_from>example.com</header_from>
30 </identifiers>
31 <auth_results>
32 <spf>
33 <domain>example.com</domain>
34 <result>fail</result>
35 </spf>
36 </auth_results>
37 </record>
38 <record>
39 <row>
40 <source_ip>216.32.181.183</source_ip>
41 <count>1</count>
42 <policy_evaluated>
43 <disposition>reject</disposition>
44 <dkim>fail</dkim>
45 <spf>fail</spf>
46 </policy_evaluated>
47 </row>
48 <identifiers>
49 <header_from>example.com</header_from>
50 </identifiers>
51 <auth_results>
52 <dkim>
53 <domain>example.com</domain>
54 <result>neutral</result>
55 <human_result>sigature verify error: message body does not hash to bh value</human_result>
56 </dkim>
57 <spf>
58 <domain>edinburghtc.ac.uk</domain>
59 <result>neutral</result>
60 </spf>
61 </auth_results>
62 </record>
63 <record>
64 <row>
65 <source_ip>58.210.249.101</source_ip>
66 <count>2</count>
67 <policy_evaluated>
68 <disposition>none</disposition>
69 <dkim>pass</dkim>
70 <spf>fail</spf>
71 </policy_evaluated>
72 </row>
73 <identifiers>
74 <header_from>example.com</header_from>
75 </identifiers>
76 <auth_results>
77 <dkim>
78 <domain>example.com</domain>
79 <result>pass</result>
80 <human_result>verify result: all signatures verified</human_result>
81 </dkim>
82 <spf>
83 <domain>hengtonggroup.com</domain>
84 <result>none</result>
85 </spf>
86 </auth_results>
87 </record>
88 <record>
89 <row>
90 <source_ip>65.55.90.228</source_ip>
91 <count>3</count>
92 <policy_evaluated>
93 <disposition>none</disposition>
94 <dkim>pass</dkim>
95 <spf>pass</spf>
96 </policy_evaluated>
97 </row>
98 <identifiers>
99 <header_from>example.com</header_from>
100 </identifiers>
101 <auth_results>
102 <dkim>
103 <domain>example.com</domain>
104 <result>pass</result>
105 <human_result>verify result: all signatures verified</human_result>
106 </dkim>
107 <spf>
108 <domain>live.com</domain>
109 <result>pass</result>
110 </spf>
111 <spf>
112 <domain>hotmail.com</domain>
113 <result>pass</result>
114 </spf>
115 </auth_results>
116 </record>
117 <record>
118 <row>
119 <source_ip>65.55.90.229</source_ip>
120 <count>6</count>
121 <policy_evaluated>
122 <disposition>none</disposition>
123 <dkim>pass</dkim>
124 <spf>pass</spf>
125 </policy_evaluated>
126 </row>
127 <identifiers>
128 <header_from>example.com</header_from>
129 </identifiers>
130 <auth_results>
131 <dkim>
132 <domain>example.com</domain>
133 <result>pass</result>
134 <human_result>verify result: all signatures verified</human_result>
135 </dkim>
136 <spf>
137 <domain>hotmail.it</domain>
138 <result>pass</result>
139 </spf>
140 <spf>
141 <domain>hotmail.com</domain>
142 <result>pass</result>
143 </spf>
144 </auth_results>
145 </record>
146 <record>
147 <row>
148 <source_ip>222.92.5.93</source_ip>
149 <count>3</count>
150 <policy_evaluated>
151 <disposition>reject</disposition>
152 <dkim>fail</dkim>
153 <spf>fail</spf>
154 </policy_evaluated>
155 </row>
156 <identifiers>
157 <header_from>example.com</header_from>
158 </identifiers>
159 <auth_results>
160 <spf>
161 <domain>example.com</domain>
162 <result>fail</result>
163 </spf>
164 </auth_results>
165 </record>
166 <record>
167 <row>
168 <source_ip>65.55.90.220</source_ip>
169 <count>9</count>
170 <policy_evaluated>
171 <disposition>none</disposition>
172 <dkim>pass</dkim>
173 <spf>pass</spf>
174 </policy_evaluated>
175 </row>
176 <identifiers>
177 <header_from>example.com</header_from>
178 </identifiers>
179 <auth_results>
180 <dkim>
181 <domain>example.com</domain>
182 <result>pass</result>
183 <human_result>verify result: all signatures verified</human_result>
184 </dkim>
185 <spf>
186 <domain>hotmail.de</domain>
187 <result>pass</result>
188 </spf>
189 <spf>
190 <domain>hotmail.com</domain>
191 <result>pass</result>
192 </spf>
193 </auth_results>
194 </record>
195 <record>
196 <row>
197 <source_ip>65.55.90.221</source_ip>
198 <count>7</count>
199 <policy_evaluated>
200 <disposition>none</disposition>
201 <dkim>pass</dkim>
202 <spf>pass</spf>
203 </policy_evaluated>
204 </row>
205 <identifiers>
206 <header_from>example.com</header_from>
207 </identifiers>
208 <auth_results>
209 <dkim>
210 <domain>example.com</domain>
211 <result>pass</result>
212 <human_result>verify result: all signatures verified</human_result>
213 </dkim>
214 <spf>
215 <domain>hotmail.com</domain>
216 <result>pass</result>
217 </spf>
218 </auth_results>
219 </record>
220 <record>
221 <row>
222 <source_ip>65.55.90.222</source_ip>
223 <count>4</count>
224 <policy_evaluated>
225 <disposition>none</disposition>
226 <dkim>pass</dkim>
227 <spf>pass</spf>
228 </policy_evaluated>
229 </row>
230 <identifiers>
231 <header_from>example.com</header_from>
232 </identifiers>
233 <auth_results>
234 <dkim>
235 <domain>example.com</domain>
236 <result>pass</result>
237 <human_result>verify result: all signatures verified</human_result>
238 </dkim>
239 <spf>
240 <domain>hotmail.com</domain>
241 <result>pass</result>
242 </spf>
243 </auth_results>
244 </record>
245 <record>
246 <row>
247 <source_ip>65.55.90.223</source_ip>
248 <count>9</count>
249 <policy_evaluated>
250 <disposition>none</disposition>
251 <dkim>pass</dkim>
252 <spf>pass</spf>
253 </policy_evaluated>
254 </row>
255 <identifiers>
256 <header_from>example.com</header_from>
257 </identifiers>
258 <auth_results>
259 <dkim>
260 <domain>example.com</domain>
261 <result>pass</result>
262 <human_result>verify result: all signatures verified</human_result>
263 </dkim>
264 <spf>
265 <domain>hotmail.it</domain>
266 <result>pass</result>
267 </spf>
268 <spf>
269 <domain>hotmail.com</domain>
270 <result>pass</result>
271 </spf>
272 </auth_results>
273 </record>
274 <record>
275 <row>
276 <source_ip>65.55.90.224</source_ip>
277 <count>6</count>
278 <policy_evaluated>
279 <disposition>none</disposition>
280 <dkim>pass</dkim>
281 <spf>pass</spf>
282 </policy_evaluated>
283 </row>
284 <identifiers>
285 <header_from>example.com</header_from>
286 </identifiers>
287 <auth_results>
288 <dkim>
289 <domain>example.com</domain>
290 <result>pass</result>
291 <human_result>verify result: all signatures verified</human_result>
292 </dkim>
293 <spf>
294 <domain>hotmail.it</domain>
295 <result>pass</result>
296 </spf>
297 <spf>
298 <domain>hotmail.com</domain>
299 <result>pass</result>
300 </spf>
301 </auth_results>
302 </record>
303 <record>
304 <row>
305 <source_ip>65.55.90.225</source_ip>
306 <count>3</count>
307 <policy_evaluated>
308 <disposition>none</disposition>
309 <dkim>pass</dkim>
310 <spf>pass</spf>
311 </policy_evaluated>
312 </row>
313 <identifiers>
314 <header_from>example.com</header_from>
315 </identifiers>
316 <auth_results>
317 <dkim>
318 <domain>example.com</domain>
319 <result>pass</result>
320 <human_result>verify result: all signatures verified</human_result>
321 </dkim>
322 <spf>
323 <domain>hotmail.com</domain>
324 <result>pass</result>
325 </spf>
326 </auth_results>
327 </record>
328 <record>
329 <row>
330 <source_ip>65.55.90.226</source_ip>
331 <count>4</count>
332 <policy_evaluated>
333 <disposition>none</disposition>
334 <dkim>pass</dkim>
335 <spf>pass</spf>
336 </policy_evaluated>
337 </row>
338 <identifiers>
339 <header_from>example.com</header_from>
340 </identifiers>
341 <auth_results>
342 <dkim>
343 <domain>example.com</domain>
344 <result>pass</result>
345 <human_result>verify result: all signatures verified</human_result>
346 </dkim>
347 <spf>
348 <domain>hotmail.de</domain>
349 <result>pass</result>
350 </spf>
351 <spf>
352 <domain>hotmail.it</domain>
353 <result>pass</result>
354 </spf>
355 <spf>
356 <domain>hotmail.com</domain>
357 <result>pass</result>
358 </spf>
359 </auth_results>
360 </record>
361 <record>
362 <row>
363 <source_ip>65.55.90.227</source_ip>
364 <count>7</count>
365 <policy_evaluated>
366 <disposition>none</disposition>
367 <dkim>pass</dkim>
368 <spf>pass</spf>
369 </policy_evaluated>
370 </row>
371 <identifiers>
372 <header_from>example.com</header_from>
373 </identifiers>
374 <auth_results>
375 <dkim>
376 <domain>example.com</domain>
377 <result>pass</result>
378 <human_result>verify result: all signatures verified</human_result>
379 </dkim>
380 <spf>
381 <domain>hotmail.com</domain>
382 <result>pass</result>
383 </spf>
384 </auth_results>
385 </record>
386 <record>
387 <row>
388 <source_ip>213.199.154.139</source_ip>
389 <count>1</count>
390 <policy_evaluated>
391 <disposition>reject</disposition>
392 <dkim>fail</dkim>
393 <spf>pass</spf>
394 </policy_evaluated>
395 </row>
396 <identifiers>
397 <header_from>example.com</header_from>
398 </identifiers>
399 <auth_results>
400 <dkim>
401 <domain>example.com</domain>
402 <result>neutral</result>
403 <human_result>sigature verify error: message body does not hash to bh value</human_result>
404 </dkim>
405 <spf>
406 <domain>edinburghtc.ac.uk</domain>
407 <result>pass</result>
408 </spf>
409 </auth_results>
410 </record>
411 <record>
412 <row>
413 <source_ip>123.125.50.217</source_ip>
414 <count>2</count>
415 <policy_evaluated>
416 <disposition>none</disposition>
417 <dkim>pass</dkim>
418 <spf>fail</spf>
419 </policy_evaluated>
420 </row>
421 <identifiers>
422 <header_from>example.com</header_from>
423 </identifiers>
424 <auth_results>
425 <dkim>
426 <domain>example.com</domain>
427 <result>pass</result>
428 <human_result>verify result: all signatures verified</human_result>
429 </dkim>
430 <spf>
431 <domain>gdadc.com</domain>
432 <result>none</result>
433 </spf>
434 <spf>
435 <domain>dicolor.cn</domain>
436 <result>pass</result>
437 </spf>
438 </auth_results>
439 </record>
440 <record>
441 <row>
442 <source_ip>116.236.144.74</source_ip>
443 <count>3</count>
444 <policy_evaluated>
445 <disposition>reject</disposition>
446 <dkim>fail</dkim>
447 <spf>fail</spf>
448 </policy_evaluated>
449 </row>
450 <identifiers>
451 <header_from>example.com</header_from>
452 </identifiers>
453 <auth_results>
454 <spf>
455 <domain>example.com</domain>
456 <result>fail</result>
457 </spf>
458 </auth_results>
459 </record>
460 <record>
461 <row>
462 <source_ip>114.85.115.149</source_ip>
463 <count>5</count>
464 <policy_evaluated>
465 <disposition>reject</disposition>
466 <dkim>fail</dkim>
467 <spf>fail</spf>
468 </policy_evaluated>
469 </row>
470 <identifiers>
471 <header_from>example.com</header_from>
472 </identifiers>
473 <auth_results>
474 <spf>
475 <domain>example.com</domain>
476 <result>fail</result>
477 </spf>
478 </auth_results>
479 </record>
480 <record>
481 <row>
482 <source_ip>98.139.213.126</source_ip>
483 <count>1</count>
484 <policy_evaluated>
485 <disposition>none</disposition>
486 <dkim>pass</dkim>
487 <spf>fail</spf>
488 </policy_evaluated>
489 </row>
490 <identifiers>
491 <header_from>example.com</header_from>
492 </identifiers>
493 <auth_results>
494 <dkim>
495 <domain>example.com</domain>
496 <result>pass</result>
497 <human_result>verify result: all signatures verified</human_result>
498 </dkim>
499 <spf>
500 <domain>example.com</domain>
501 <result>fail</result>
502 </spf>
503 </auth_results>
504 </record>
505 <record>
506 <row>
507 <source_ip>119.254.72.146</source_ip>
508 <count>1</count>
509 <policy_evaluated>
510 <disposition>none</disposition>
511 <dkim>pass</dkim>
512 <spf>fail</spf>
513 </policy_evaluated>
514 </row>
515 <identifiers>
516 <header_from>example.com</header_from>
517 </identifiers>
518 <auth_results>
519 <dkim>
520 <domain>example.com</domain>
521 <result>pass</result>
522 <human_result>verify result: all signatures verified</human_result>
523 </dkim>
524 <spf>
525 <domain>example.com</domain>
526 <result>fail</result>
527 </spf>
528 </auth_results>
529 </record>
530 <record>
531 <row>
532 <source_ip>209.85.216.51</source_ip>
533 <count>2</count>
534 <policy_evaluated>
535 <disposition>none</disposition>
536 <dkim>pass</dkim>
537 <spf>pass</spf>
538 </policy_evaluated>
539 </row>
540 <identifiers>
541 <header_from>example.com</header_from>
542 </identifiers>
543 <auth_results>
544 <dkim>
545 <domain>example.com</domain>
546 <result>pass</result>
547 <human_result>verify result: all signatures verified</human_result>
548 </dkim>
549 <spf>
550 <domain>gmail.com</domain>
551 <result>pass</result>
552 </spf>
553 </auth_results>
554 </record>
555 <record>
556 <row>
557 <source_ip>209.85.216.50</source_ip>
558 <count>4</count>
559 <policy_evaluated>
560 <disposition>none</disposition>
561 <dkim>pass</dkim>
562 <spf>pass</spf>
563 </policy_evaluated>
564 </row>
565 <identifiers>
566 <header_from>example.com</header_from>
567 </identifiers>
568 <auth_results>
569 <dkim>
570 <domain>example.com</domain>
571 <result>pass</result>
572 <human_result>verify result: all signatures verified</human_result>
573 </dkim>
574 <spf>
575 <domain>gmail.com</domain>
576 <result>pass</result>
577 </spf>
578 </auth_results>
579 </record>
580 <record>
581 <row>
582 <source_ip>209.85.216.53</source_ip>
583 <count>4</count>
584 <policy_evaluated>
585 <disposition>none</disposition>
586 <dkim>pass</dkim>
587 <spf>pass</spf>
588 </policy_evaluated>
589 </row>
590 <identifiers>
591 <header_from>example.com</header_from>
592 </identifiers>
593 <auth_results>
594 <dkim>
595 <domain>example.com</domain>
596 <result>pass</result>
597 <human_result>verify result: all signatures verified</human_result>
598 </dkim>
599 <spf>
600 <domain>gmail.com</domain>
601 <result>pass</result>
602 </spf>
603 </auth_results>
604 </record>
605 <record>
606 <row>
607 <source_ip>209.85.216.52</source_ip>
608 <count>3</count>
609 <policy_evaluated>
610 <disposition>none</disposition>
611 <dkim>pass</dkim>
612 <spf>pass</spf>
613 </policy_evaluated>
614 </row>
615 <identifiers>
616 <header_from>example.com</header_from>
617 </identifiers>
618 <auth_results>
619 <dkim>
620 <domain>example.com</domain>
621 <result>pass</result>
622 <human_result>verify result: all signatures verified</human_result>
623 </dkim>
624 <spf>
625 <domain>gmail.com</domain>
626 <result>pass</result>
627 </spf>
628 </auth_results>
629 </record>
630 <record>
631 <row>
632 <source_ip>14.25.101.129</source_ip>
633 <count>2</count>
634 <policy_evaluated>
635 <disposition>reject</disposition>
636 <dkim>fail</dkim>
637 <spf>fail</spf>
638 </policy_evaluated>
639 </row>
640 <identifiers>
641 <header_from>example.com</header_from>
642 </identifiers>
643 <auth_results>
644 <spf>
645 <domain>example.com</domain>
646 <result>fail</result>
647 </spf>
648 </auth_results>
649 </record>
650 <record>
651 <row>
652 <source_ip>121.33.210.22</source_ip>
653 <count>64</count>
654 <policy_evaluated>
655 <disposition>reject</disposition>
656 <dkim>fail</dkim>
657 <spf>fail</spf>
658 </policy_evaluated>
659 </row>
660 <identifiers>
661 <header_from>example.com</header_from>
662 </identifiers>
663 <auth_results>
664 <spf>
665 <domain>example.com</domain>
666 <result>fail</result>
667 </spf>
668 </auth_results>
669 </record>
670 <record>
671 <row>
672 <source_ip>59.50.120.240</source_ip>
673 <count>19</count>
674 <policy_evaluated>
675 <disposition>reject</disposition>
676 <dkim>fail</dkim>
677 <spf>fail</spf>
678 </policy_evaluated>
679 </row>
680 <identifiers>
681 <header_from>example.com</header_from>
682 </identifiers>
683 <auth_results>
684 <spf>
685 <domain>example.com</domain>
686 <result>fail</result>
687 </spf>
688 </auth_results>
689 </record>
690 <record>
691 <row>
692 <source_ip>69.171.232.175</source_ip>
693 <count>304</count>
694 <policy_evaluated>
695 <disposition>none</disposition>
696 <dkim>pass</dkim>
697 <spf>pass</spf>
698 </policy_evaluated>
699 </row>
700 <identifiers>
701 <header_from>pages.example.com, example.com</header_from>
702 </identifiers>
703 <auth_results>
704 <dkim>
705 <domain>pages.example.com</domain>
706 <result>pass</result>
707 <human_result>verify result: all signatures verified</human_result>
708 </dkim>
709 <dkim>
710 <domain>example.com</domain>
711 <result>pass</result>
712 <human_result>verify result: all signatures verified</human_result>
713 </dkim>
714 <spf>
715 <domain>pages.example.com</domain>
716 <result>pass</result>
717 </spf>
718 <spf>
719 <domain>example.com</domain>
720 <result>pass</result>
721 </spf>
722 </auth_results>
723 </record>
724 <record>
725 <row>
726 <source_ip>69.171.232.174</source_ip>
727 <count>306</count>
728 <policy_evaluated>
729 <disposition>none</disposition>
730 <dkim>pass</dkim>
731 <spf>pass</spf>
732 </policy_evaluated>
733 </row>
734 <identifiers>
735 <header_from>pages.example.com, example.com</header_from>
736 </identifiers>
737 <auth_results>
738 <dkim>
739 <domain>pages.example.com</domain>
740 <result>pass</result>
741 <human_result>verify result: all signatures verified</human_result>
742 </dkim>
743 <dkim>
744 <domain>example.com</domain>
745 <result>pass</result>
746 <human_result>verify result: all signatures verified</human_result>
747 </dkim>
748 <spf>
749 <domain>pages.example.com</domain>
750 <result>pass</result>
751 </spf>
752 <spf>
753 <domain>example.com</domain>
754 <result>pass</result>
755 </spf>
756 </auth_results>
757 </record>
758 <record>
759 <row>
760 <source_ip>69.171.232.173</source_ip>
761 <count>286</count>
762 <policy_evaluated>
763 <disposition>none</disposition>
764 <dkim>pass</dkim>
765 <spf>pass</spf>
766 </policy_evaluated>
767 </row>
768 <identifiers>
769 <header_from>pages.example.com, example.com</header_from>
770 </identifiers>
771 <auth_results>
772 <dkim>
773 <domain>pages.example.com</domain>
774 <result>pass</result>
775 <human_result>verify result: all signatures verified</human_result>
776 </dkim>
777 <dkim>
778 <domain>example.com</domain>
779 <result>pass</result>
780 <human_result>verify result: all signatures verified</human_result>
781 </dkim>
782 <spf>
783 <domain>pages.example.com</domain>
784 <result>pass</result>
785 </spf>
786 <spf>
787 <domain>example.com</domain>
788 <result>pass</result>
789 </spf>
790 </auth_results>
791 </record>
792 <record>
793 <row>
794 <source_ip>69.171.232.172</source_ip>
795 <count>305</count>
796 <policy_evaluated>
797 <disposition>none</disposition>
798 <dkim>pass</dkim>
799 <spf>pass</spf>
800 </policy_evaluated>
801 </row>
802 <identifiers>
803 <header_from>pages.example.com, example.com</header_from>
804 </identifiers>
805 <auth_results>
806 <dkim>
807 <domain>pages.example.com</domain>
808 <result>pass</result>
809 <human_result>verify result: all signatures verified</human_result>
810 </dkim>
811 <dkim>
812 <domain>example.com</domain>
813 <result>pass</result>
814 <human_result>verify result: all signatures verified</human_result>
815 </dkim>
816 <spf>
817 <domain>pages.example.com</domain>
818 <result>pass</result>
819 </spf>
820 <spf>
821 <domain>example.com</domain>
822 <result>pass</result>
823 </spf>
824 </auth_results>
825 </record>
826 <record>
827 <row>
828 <source_ip>69.171.232.171</source_ip>
829 <count>279</count>
830 <policy_evaluated>
831 <disposition>none</disposition>
832 <dkim>pass</dkim>
833 <spf>pass</spf>
834 </policy_evaluated>
835 </row>
836 <identifiers>
837 <header_from>pages.example.com, example.com</header_from>
838 </identifiers>
839 <auth_results>
840 <dkim>
841 <domain>pages.example.com</domain>
842 <result>pass</result>
843 <human_result>verify result: all signatures verified</human_result>
844 </dkim>
845 <dkim>
846 <domain>example.com</domain>
847 <result>pass</result>
848 <human_result>verify result: all signatures verified</human_result>
849 </dkim>
850 <spf>
851 <domain>pages.example.com</domain>
852 <result>pass</result>
853 </spf>
854 <spf>
855 <domain>example.com</domain>
856 <result>pass</result>
857 </spf>
858 </auth_results>
859 </record>
860 <record>
861 <row>
862 <source_ip>69.171.232.170</source_ip>
863 <count>286</count>
864 <policy_evaluated>
865 <disposition>none</disposition>
866 <dkim>pass</dkim>
867 <spf>pass</spf>
868 </policy_evaluated>
869 </row>
870 <identifiers>
871 <header_from>pages.example.com, example.com</header_from>
872 </identifiers>
873 <auth_results>
874 <dkim>
875 <domain>pages.example.com</domain>
876 <result>pass</result>
877 <human_result>verify result: all signatures verified</human_result>
878 </dkim>
879 <dkim>
880 <domain>example.com</domain>
881 <result>pass</result>
882 <human_result>verify result: all signatures verified</human_result>
883 </dkim>
884 <spf>
885 <domain>pages.example.com</domain>
886 <result>pass</result>
887 </spf>
888 <spf>
889 <domain>example.com</domain>
890 <result>pass</result>
891 </spf>
892 </auth_results>
893 </record>
894 <record>
895 <row>
896 <source_ip>113.106.199.122</source_ip>
897 <count>8</count>
898 <policy_evaluated>
899 <disposition>reject</disposition>
900 <dkim>fail</dkim>
901 <spf>fail</spf>
902 </policy_evaluated>
903 </row>
904 <identifiers>
905 <header_from>example.com</header_from>
906 </identifiers>
907 <auth_results>
908 <spf>
909 <domain>example.com</domain>
910 <result>fail</result>
911 </spf>
912 </auth_results>
913 </record>
914 <record>
915 <row>
916 <source_ip>113.93.194.50</source_ip>
917 <count>8</count>
918 <policy_evaluated>
919 <disposition>reject</disposition>
920 <dkim>fail</dkim>
921 <spf>fail</spf>
922 </policy_evaluated>
923 </row>
924 <identifiers>
925 <header_from>example.com</header_from>
926 </identifiers>
927 <auth_results>
928 <spf>
929 <domain>example.com</domain>
930 <result>fail</result>
931 </spf>
932 </auth_results>
933 </record>
934 <record>
935 <row>
936 <source_ip>137.43.231.111</source_ip>
937 <count>1</count>
938 <policy_evaluated>
939 <disposition>reject</disposition>
940 <dkim>fail</dkim>
941 <spf>fail</spf>
942 </policy_evaluated>
943 </row>
944 <identifiers>
945 <header_from>example.com</header_from>
946 </identifiers>
947 <auth_results>
948 <dkim>
949 <domain>example.com</domain>
950 <result>neutral</result>
951 <human_result>sigature verify error: message body does not hash to bh value</human_result>
952 </dkim>
953 <spf>
954 <domain>example.com</domain>
955 <result>fail</result>
956 </spf>
957 </auth_results>
958 </record>
959 <record>
960 <row>
961 <source_ip>209.85.215.179</source_ip>
962 <count>1</count>
963 <policy_evaluated>
964 <disposition>none</disposition>
965 <dkim>pass</dkim>
966 <spf>pass</spf>
967 </policy_evaluated>
968 </row>
969 <identifiers>
970 <header_from>example.com</header_from>
971 </identifiers>
972 <auth_results>
973 <dkim>
974 <domain>example.com</domain>
975 <result>pass</result>
976 <human_result>verify result: all signatures verified</human_result>
977 </dkim>
978 <spf>
979 <domain>gmail.com</domain>
980 <result>pass</result>
981 </spf>
982 </auth_results>
983 </record>
984 <record>
985 <row>
986 <source_ip>199.7.202.29</source_ip>
987 <count>2</count>
988 <policy_evaluated>
989 <disposition>none</disposition>
990 <dkim>pass</dkim>
991 <spf>pass</spf>
992 </policy_evaluated>
993 </row>
994 <identifiers>
995 <header_from>em.example.com</header_from>
996 </identifiers>
997 <auth_results>
998 <dkim>
999 <domain>em.example.com</domain>
1000 <result>pass</result>
1001 <human_result>verify result: all signatures verified</human_result>
1002 </dkim>
1003 <spf>
1004 <domain>envfrm.rsys5.com</domain>
1005 <result>pass</result>
1006 </spf>
1007 </auth_results>
1008 </record>
1009 <record>
1010 <row>
1011 <source_ip>209.85.215.176</source_ip>
1012 <count>2</count>
1013 <policy_evaluated>
1014 <disposition>none</disposition>
1015 <dkim>pass</dkim>
1016 <spf>pass</spf>
1017 </policy_evaluated>
1018 </row>
1019 <identifiers>
1020 <header_from>example.com</header_from>
1021 </identifiers>
1022 <auth_results>
1023 <dkim>
1024 <domain>example.com</domain>
1025 <result>pass</result>
1026 <human_result>verify result: all signatures verified</human_result>
1027 </dkim>
1028 <spf>
1029 <domain>gmail.com</domain>
1030 <result>pass</result>
1031 </spf>
1032 </auth_results>
1033 </record>
1034 <record>
1035 <row>
1036 <source_ip>58.39.71.10</source_ip>
1037 <count>9</count>
1038 <policy_evaluated>
1039 <disposition>reject</disposition>
1040 <dkim>fail</dkim>
1041 <spf>fail</spf>
1042 </policy_evaluated>
1043 </row>
1044 <identifiers>
1045 <header_from>example.com</header_from>
1046 </identifiers>
1047 <auth_results>
1048 <spf>
1049 <domain>example.com</domain>
1050 <result>fail</result>
1051 </spf>
1052 </auth_results>
1053 </record>
1054 <record>
1055 <row>
1056 <source_ip>209.85.215.170</source_ip>
1057 <count>1</count>
1058 <policy_evaluated>
1059 <disposition>none</disposition>
1060 <dkim>pass</dkim>
1061 <spf>pass</spf>
1062 </policy_evaluated>
1063 </row>
1064 <identifiers>
1065 <header_from>example.com</header_from>
1066 </identifiers>
1067 <auth_results>
1068 <dkim>
1069 <domain>example.com</domain>
1070 <result>pass</result>
1071 <human_result>verify result: all signatures verified</human_result>
1072 </dkim>
1073 <spf>
1074 <domain>gmail.com</domain>
1075 <result>pass</result>
1076 </spf>
1077 </auth_results>
1078 </record>
1079 <record>
1080 <row>
1081 <source_ip>209.85.215.171</source_ip>
1082 <count>2</count>
1083 <policy_evaluated>
1084 <disposition>none</disposition>
1085 <dkim>pass</dkim>
1086 <spf>pass</spf>
1087 </policy_evaluated>
1088 </row>
1089 <identifiers>
1090 <header_from>example.com</header_from>
1091 </identifiers>
1092 <auth_results>
1093 <dkim>
1094 <domain>example.com</domain>
1095 <result>pass</result>
1096 <human_result>verify result: all signatures verified</human_result>
1097 </dkim>
1098 <spf>
1099 <domain>gmail.com</domain>
1100 <result>pass</result>
1101 </spf>
1102 </auth_results>
1103 </record>
1104 <record>
1105 <row>
1106 <source_ip>209.85.215.172</source_ip>
1107 <count>2</count>
1108 <policy_evaluated>
1109 <disposition>none</disposition>
1110 <dkim>pass</dkim>
1111 <spf>pass</spf>
1112 </policy_evaluated>
1113 </row>
1114 <identifiers>
1115 <header_from>example.com</header_from>
1116 </identifiers>
1117 <auth_results>
1118 <dkim>
1119 <domain>example.com</domain>
1120 <result>pass</result>
1121 <human_result>verify result: all signatures verified</human_result>
1122 </dkim>
1123 <spf>
1124 <domain>gmail.com</domain>
1125 <result>pass</result>
1126 </spf>
1127 </auth_results>
1128 </record>
1129 <record>
1130 <row>
1131 <source_ip>209.85.213.180</source_ip>
1132 <count>6</count>
1133 <policy_evaluated>
1134 <disposition>none</disposition>
1135 <dkim>pass</dkim>
1136 <spf>pass</spf>
1137 </policy_evaluated>
1138 </row>
1139 <identifiers>
1140 <header_from>example.com</header_from>
1141 </identifiers>
1142 <auth_results>
1143 <dkim>
1144 <domain>example.com</domain>
1145 <result>pass</result>
1146 <human_result>verify result: all signatures verified</human_result>
1147 </dkim>
1148 <spf>
1149 <domain>gmail.com</domain>
1150 <result>pass</result>
1151 </spf>
1152 </auth_results>
1153 </record>
1154 <record>
1155 <row>
1156 <source_ip>128.84.148.108</source_ip>
1157 <count>1</count>
1158 <policy_evaluated>
1159 <disposition>none</disposition>
1160 <dkim>pass</dkim>
1161 <spf>fail</spf>
1162 </policy_evaluated>
1163 </row>
1164 <identifiers>
1165 <header_from>example.com</header_from>
1166 </identifiers>
1167 <auth_results>
1168 <dkim>
1169 <domain>example.com</domain>
1170 <result>pass</result>
1171 <human_result>verify result: all signatures verified</human_result>
1172 </dkim>
1173 <spf>
1174 <domain>example.com</domain>
1175 <result>fail</result>
1176 </spf>
1177 </auth_results>
1178 </record>
1179 <record>
1180 <row>
1181 <source_ip>58.240.185.58</source_ip>
1182 <count>3</count>
1183 <policy_evaluated>
1184 <disposition>reject</disposition>
1185 <dkim>fail</dkim>
1186 <spf>fail</spf>
1187 </policy_evaluated>
1188 </row>
1189 <identifiers>
1190 <header_from>example.com</header_from>
1191 </identifiers>
1192 <auth_results>
1193 <spf>
1194 <domain>example.com</domain>
1195 <result>fail</result>
1196 </spf>
1197 </auth_results>
1198 </record>
1199 <record>
1200 <row>
1201 <source_ip>209.85.215.50</source_ip>
1202 <count>1</count>
1203 <policy_evaluated>
1204 <disposition>none</disposition>
1205 <dkim>pass</dkim>
1206 <spf>pass</spf>
1207 </policy_evaluated>
1208 </row>
1209 <identifiers>
1210 <header_from>example.com</header_from>
1211 </identifiers>
1212 <auth_results>
1213 <dkim>
1214 <domain>example.com</domain>
1215 <result>pass</result>
1216 <human_result>verify result: all signatures verified</human_result>
1217 </dkim>
1218 <spf>
1219 <domain>gmail.com</domain>
1220 <result>pass</result>
1221 </spf>
1222 </auth_results>
1223 </record>
1224 <record>
1225 <row>
1226 <source_ip>116.212.53.41</source_ip>
1227 <count>6</count>
1228 <policy_evaluated>
1229 <disposition>reject</disposition>
1230 <dkim>fail</dkim>
1231 <spf>fail</spf>
1232 </policy_evaluated>
1233 </row>
1234 <identifiers>
1235 <header_from>example.com</header_from>
1236 </identifiers>
1237 <auth_results>
1238 <spf>
1239 <domain>example.com</domain>
1240 <result>fail</result>
1241 </spf>
1242 </auth_results>
1243 </record>
1244 <record>
1245 <row>
1246 <source_ip>209.85.215.52</source_ip>
1247 <count>2</count>
1248 <policy_evaluated>
1249 <disposition>none</disposition>
1250 <dkim>pass</dkim>
1251 <spf>pass</spf>
1252 </policy_evaluated>
1253 </row>
1254 <identifiers>
1255 <header_from>example.com</header_from>
1256 </identifiers>
1257 <auth_results>
1258 <dkim>
1259 <domain>example.com</domain>
1260 <result>pass</result>
1261 <human_result>verify result: all signatures verified</human_result>
1262 </dkim>
1263 <spf>
1264 <domain>gmail.com</domain>
1265 <result>pass</result>
1266 </spf>
1267 </auth_results>
1268 </record>
1269 <record>
1270 <row>
1271 <source_ip>209.85.215.53</source_ip>
1272 <count>1</count>
1273 <policy_evaluated>
1274 <disposition>none</disposition>
1275 <dkim>pass</dkim>
1276 <spf>pass</spf>
1277 </policy_evaluated>
1278 </row>
1279 <identifiers>
1280 <header_from>example.com</header_from>
1281 </identifiers>
1282 <auth_results>
1283 <dkim>
1284 <domain>example.com</domain>
1285 <result>pass</result>
1286 <human_result>verify result: all signatures verified</human_result>
1287 </dkim>
1288 <spf>
1289 <domain>gmail.com</domain>
1290 <result>pass</result>
1291 </spf>
1292 </auth_results>
1293 </record>
1294 <record>
1295 <row>
1296 <source_ip>209.85.215.54</source_ip>
1297 <count>2</count>
1298 <policy_evaluated>
1299 <disposition>none</disposition>
1300 <dkim>pass</dkim>
1301 <spf>pass</spf>
1302 </policy_evaluated>
1303 </row>
1304 <identifiers>
1305 <header_from>example.com</header_from>
1306 </identifiers>
1307 <auth_results>
1308 <dkim>
1309 <domain>example.com</domain>
1310 <result>pass</result>
1311 <human_result>verify result: all signatures verified</human_result>
1312 </dkim>
1313 <spf>
1314 <domain>gmail.com</domain>
1315 <result>pass</result>
1316 </spf>
1317 </auth_results>
1318 </record>
1319 <record>
1320 <row>
1321 <source_ip>211.20.177.5</source_ip>
1322 <count>23</count>
1323 <policy_evaluated>
1324 <disposition>none</disposition>
1325 <dkim>pass</dkim>
1326 <spf>fail</spf>
1327 </policy_evaluated>
1328 </row>
1329 <identifiers>
1330 <header_from>example.com</header_from>
1331 </identifiers>
1332 <auth_results>
1333 <dkim>
1334 <domain>example.com</domain>
1335 <result>pass</result>
1336 <human_result>verify result: all signatures verified</human_result>
1337 </dkim>
1338 <spf>
1339 <domain>example.com</domain>
1340 <result>fail</result>
1341 </spf>
1342 </auth_results>
1343 </record>
1344 <record>
1345 <row>
1346 <source_ip>183.43.85.215</source_ip>
1347 <count>2</count>
1348 <policy_evaluated>
1349 <disposition>reject</disposition>
1350 <dkim>fail</dkim>
1351 <spf>fail</spf>
1352 </policy_evaluated>
1353 </row>
1354 <identifiers>
1355 <header_from>example.com</header_from>
1356 </identifiers>
1357 <auth_results>
1358 <spf>
1359 <domain>example.com</domain>
1360 <result>fail</result>
1361 </spf>
1362 </auth_results>
1363 </record>
1364 <record>
1365 <row>
1366 <source_ip>128.135.165.70</source_ip>
1367 <count>2</count>
1368 <policy_evaluated>
1369 <disposition>none</disposition>
1370 <dkim>pass</dkim>
1371 <spf>fail</spf>
1372 </policy_evaluated>
1373 </row>
1374 <identifiers>
1375 <header_from>example.com</header_from>
1376 </identifiers>
1377 <auth_results>
1378 <dkim>
1379 <domain>example.com</domain>
1380 <result>pass</result>
1381 <human_result>verify result: all signatures verified</human_result>
1382 </dkim>
1383 <spf>
1384 <domain>example.com</domain>
1385 <result>fail</result>
1386 </spf>
1387 </auth_results>
1388 </record>
1389 <record>
1390 <row>
1391 <source_ip>178.125.232.125</source_ip>
1392 <count>1</count>
1393 <policy_evaluated>
1394 <disposition>reject</disposition>
1395 <dkim>fail</dkim>
1396 <spf>fail</spf>
1397 </policy_evaluated>
1398 </row>
1399 <identifiers>
1400 <header_from>example.com</header_from>
1401 </identifiers>
1402 <auth_results>
1403 <spf>
1404 <domain>example.com</domain>
1405 <result>fail</result>
1406 </spf>
1407 </auth_results>
1408 </record>
1409 <record>
1410 <row>
1411 <source_ip>113.108.141.10</source_ip>
1412 <count>31</count>
1413 <policy_evaluated>
1414 <disposition>reject</disposition>
1415 <dkim>fail</dkim>
1416 <spf>fail</spf>
1417 </policy_evaluated>
1418 </row>
1419 <identifiers>
1420 <header_from>example.com</header_from>
1421 </identifiers>
1422 <auth_results>
1423 <spf>
1424 <domain>example.com</domain>
1425 <result>fail</result>
1426 </spf>
1427 </auth_results>
1428 </record>
1429 <record>
1430 <row>
1431 <source_ip>58.251.133.18</source_ip>
1432 <count>3</count>
1433 <policy_evaluated>
1434 <disposition>reject</disposition>
1435 <dkim>fail</dkim>
1436 <spf>fail</spf>
1437 </policy_evaluated>
1438 </row>
1439 <identifiers>
1440 <header_from>example.com</header_from>
1441 </identifiers>
1442 <auth_results>
1443 <spf>
1444 <domain>example.com</domain>
1445 <result>fail</result>
1446 </spf>
1447 </auth_results>
1448 </record>
1449 <record>
1450 <row>
1451 <source_ip>59.36.102.84</source_ip>
1452 <count>1</count>
1453 <policy_evaluated>
1454 <disposition>none</disposition>
1455 <dkim>pass</dkim>
1456 <spf>pass</spf>
1457 </policy_evaluated>
1458 </row>
1459 <identifiers>
1460 <header_from>example.com</header_from>
1461 </identifiers>
1462 <auth_results>
1463 <dkim>
1464 <domain>example.com</domain>
1465 <result>pass</result>
1466 <human_result>verify result: all signatures verified</human_result>
1467 </dkim>
1468 <spf>
1469 <domain>21cn.net</domain>
1470 <result>pass</result>
1471 </spf>
1472 </auth_results>
1473 </record>
1474 <record>
1475 <row>
1476 <source_ip>106.10.151.36</source_ip>
1477 <count>1</count>
1478 <policy_evaluated>
1479 <disposition>none</disposition>
1480 <dkim>pass</dkim>
1481 <spf>fail</spf>
1482 </policy_evaluated>
1483 </row>
1484 <identifiers>
1485 <header_from>example.com</header_from>
1486 </identifiers>
1487 <auth_results>
1488 <dkim>
1489 <domain>example.com</domain>
1490 <result>pass</result>
1491 <human_result>verify result: all signatures verified</human_result>
1492 </dkim>
1493 <spf>
1494 <domain>example.com</domain>
1495 <result>fail</result>
1496 </spf>
1497 </auth_results>
1498 </record>
1499 <record>
1500 <row>
1501 <source_ip>220.130.38.191</source_ip>
1502 <count>3</count>
1503 <policy_evaluated>
1504 <disposition>reject</disposition>
1505 <dkim>fail</dkim>
1506 <spf>fail</spf>
1507 </policy_evaluated>
1508 </row>
1509 <identifiers>
1510 <header_from>example.com</header_from>
1511 </identifiers>
1512 <auth_results>
1513 <spf>
1514 <domain>example.com</domain>
1515 <result>fail</result>
1516 </spf>
1517 </auth_results>
1518 </record>
1519 <record>
1520 <row>
1521 <source_ip>209.85.215.175</source_ip>
1522 <count>1</count>
1523 <policy_evaluated>
1524 <disposition>none</disposition>
1525 <dkim>pass</dkim>
1526 <spf>pass</spf>
1527 </policy_evaluated>
1528 </row>
1529 <identifiers>
1530 <header_from>example.com</header_from>
1531 </identifiers>
1532 <auth_results>
1533 <dkim>
1534 <domain>example.com</domain>
1535 <result>pass</result>
1536 <human_result>verify result: all signatures verified</human_result>
1537 </dkim>
1538 <spf>
1539 <domain>gmail.com</domain>
1540 <result>pass</result>
1541 </spf>
1542 </auth_results>
1543 </record>
1544 <record>
1545 <row>
1546 <source_ip>220.181.12.63</source_ip>
1547 <count>1</count>
1548 <policy_evaluated>
1549 <disposition>none</disposition>
1550 <dkim>pass</dkim>
1551 <spf>pass</spf>
1552 </policy_evaluated>
1553 </row>
1554 <identifiers>
1555 <header_from>example.com</header_from>
1556 </identifiers>
1557 <auth_results>
1558 <dkim>
1559 <domain>example.com</domain>
1560 <result>pass</result>
1561 <human_result>verify result: all signatures verified</human_result>
1562 </dkim>
1563 <spf>
1564 <domain>163.com</domain>
1565 <result>pass</result>
1566 </spf>
1567 </auth_results>
1568 </record>
1569 <record>
1570 <row>
1571 <source_ip>209.85.214.171</source_ip>
1572 <count>8</count>
1573 <policy_evaluated>
1574 <disposition>none</disposition>
1575 <dkim>pass</dkim>
1576 <spf>pass</spf>
1577 </policy_evaluated>
1578 </row>
1579 <identifiers>
1580 <header_from>example.com</header_from>
1581 </identifiers>
1582 <auth_results>
1583 <dkim>
1584 <domain>example.com</domain>
1585 <result>pass</result>
1586 <human_result>verify result: all signatures verified</human_result>
1587 </dkim>
1588 <spf>
1589 <domain>gmail.com</domain>
1590 <result>pass</result>
1591 </spf>
1592 </auth_results>
1593 </record>
1594 <record>
1595 <row>
1596 <source_ip>209.85.214.170</source_ip>
1597 <count>14</count>
1598 <policy_evaluated>
1599 <disposition>none</disposition>
1600 <dkim>pass</dkim>
1601 <spf>pass</spf>
1602 </policy_evaluated>
1603 </row>
1604 <identifiers>
1605 <header_from>example.com</header_from>
1606 </identifiers>
1607 <auth_results>
1608 <dkim>
1609 <domain>example.com</domain>
1610 <result>pass</result>
1611 <human_result>verify result: all signatures verified</human_result>
1612 </dkim>
1613 <spf>
1614 <domain>gmail.com</domain>
1615 <result>pass</result>
1616 </spf>
1617 </auth_results>
1618 </record>
1619 <record>
1620 <row>
1621 <source_ip>209.85.214.173</source_ip>
1622 <count>7</count>
1623 <policy_evaluated>
1624 <disposition>none</disposition>
1625 <dkim>pass</dkim>
1626 <spf>pass</spf>
1627 </policy_evaluated>
1628 </row>
1629 <identifiers>
1630 <header_from>example.com</header_from>
1631 </identifiers>
1632 <auth_results>
1633 <dkim>
1634 <domain>example.com</domain>
1635 <result>pass</result>
1636 <human_result>verify result: all signatures verified</human_result>
1637 </dkim>
1638 <spf>
1639 <domain>gmail.com</domain>
1640 <result>pass</result>
1641 </spf>
1642 </auth_results>
1643 </record>
1644 <record>
1645 <row>
1646 <source_ip>209.85.214.172</source_ip>
1647 <count>13</count>
1648 <policy_evaluated>
1649 <disposition>none</disposition>
1650 <dkim>pass</dkim>
1651 <spf>pass</spf>
1652 </policy_evaluated>
1653 </row>
1654 <identifiers>
1655 <header_from>example.com</header_from>
1656 </identifiers>
1657 <auth_results>
1658 <dkim>
1659 <domain>example.com</domain>
1660 <result>pass</result>
1661 <human_result>verify result: all signatures verified</human_result>
1662 </dkim>
1663 <spf>
1664 <domain>gmail.com</domain>
1665 <result>pass</result>
1666 </spf>
1667 </auth_results>
1668 </record>
1669 <record>
1670 <row>
1671 <source_ip>209.85.214.175</source_ip>
1672 <count>15</count>
1673 <policy_evaluated>
1674 <disposition>none</disposition>
1675 <dkim>pass</dkim>
1676 <spf>pass</spf>
1677 </policy_evaluated>
1678 </row>
1679 <identifiers>
1680 <header_from>example.com</header_from>
1681 </identifiers>
1682 <auth_results>
1683 <dkim>
1684 <domain>example.com</domain>
1685 <result>pass</result>
1686 <human_result>verify result: all signatures verified</human_result>
1687 </dkim>
1688 <spf>
1689 <domain>gmail.com</domain>
1690 <result>pass</result>
1691 </spf>
1692 </auth_results>
1693 </record>
1694 <record>
1695 <row>
1696 <source_ip>209.85.214.174</source_ip>
1697 <count>3</count>
1698 <policy_evaluated>
1699 <disposition>none</disposition>
1700 <dkim>pass</dkim>
1701 <spf>pass</spf>
1702 </policy_evaluated>
1703 </row>
1704 <identifiers>
1705 <header_from>example.com</header_from>
1706 </identifiers>
1707 <auth_results>
1708 <dkim>
1709 <domain>example.com</domain>
1710 <result>pass</result>
1711 <human_result>verify result: all signatures verified</human_result>
1712 </dkim>
1713 <spf>
1714 <domain>gmail.com</domain>
1715 <result>pass</result>
1716 </spf>
1717 </auth_results>
1718 </record>
1719 <record>
1720 <row>
1721 <source_ip>209.85.214.177</source_ip>
1722 <count>8</count>
1723 <policy_evaluated>
1724 <disposition>none</disposition>
1725 <dkim>pass</dkim>
1726 <spf>pass</spf>
1727 </policy_evaluated>
1728 </row>
1729 <identifiers>
1730 <header_from>example.com</header_from>
1731 </identifiers>
1732 <auth_results>
1733 <dkim>
1734 <domain>example.com</domain>
1735 <result>pass</result>
1736 <human_result>verify result: all signatures verified</human_result>
1737 </dkim>
1738 <spf>
1739 <domain>gmail.com</domain>
1740 <result>pass</result>
1741 </spf>
1742 </auth_results>
1743 </record>
1744 <record>
1745 <row>
1746 <source_ip>209.85.214.177</source_ip>
1747 <count>1</count>
1748 <policy_evaluated>
1749 <disposition>reject</disposition>
1750 <dkim>fail</dkim>
1751 <spf>pass</spf>
1752 </policy_evaluated>
1753 </row>
1754 <identifiers>
1755 <header_from>example.com</header_from>
1756 </identifiers>
1757 <auth_results>
1758 <dkim>
1759 <domain>example.com</domain>
1760 <result>neutral</result>
1761 <human_result>sigature verify error: message body does not hash to bh value</human_result>
1762 </dkim>
1763 <spf>
1764 <domain>gmail.com</domain>
1765 <result>pass</result>
1766 </spf>
1767 </auth_results>
1768 </record>
1769 <record>
1770 <row>
1771 <source_ip>209.85.214.176</source_ip>
1772 <count>6</count>
1773 <policy_evaluated>
1774 <disposition>none</disposition>
1775 <dkim>pass</dkim>
1776 <spf>pass</spf>
1777 </policy_evaluated>
1778 </row>
1779 <identifiers>
1780 <header_from>example.com</header_from>
1781 </identifiers>
1782 <auth_results>
1783 <dkim>
1784 <domain>example.com</domain>
1785 <result>pass</result>
1786 <human_result>verify result: all signatures verified</human_result>
1787 </dkim>
1788 <spf>
1789 <domain>gmail.com</domain>
1790 <result>pass</result>
1791 </spf>
1792 </auth_results>
1793 </record>
1794 <record>
1795 <row>
1796 <source_ip>209.85.214.179</source_ip>
1797 <count>4</count>
1798 <policy_evaluated>
1799 <disposition>none</disposition>
1800 <dkim>pass</dkim>
1801 <spf>pass</spf>
1802 </policy_evaluated>
1803 </row>
1804 <identifiers>
1805 <header_from>example.com</header_from>
1806 </identifiers>
1807 <auth_results>
1808 <dkim>
1809 <domain>example.com</domain>
1810 <result>pass</result>
1811 <human_result>verify result: all signatures verified</human_result>
1812 </dkim>
1813 <spf>
1814 <domain>gmail.com</domain>
1815 <result>pass</result>
1816 </spf>
1817 </auth_results>
1818 </record>
1819 <record>
1820 <row>
1821 <source_ip>209.85.214.178</source_ip>
1822 <count>6</count>
1823 <policy_evaluated>
1824 <disposition>none</disposition>
1825 <dkim>pass</dkim>
1826 <spf>pass</spf>
1827 </policy_evaluated>
1828 </row>
1829 <identifiers>
1830 <header_from>example.com</header_from>
1831 </identifiers>
1832 <auth_results>
1833 <dkim>
1834 <domain>example.com</domain>
1835 <result>pass</result>
1836 <human_result>verify result: all signatures verified</human_result>
1837 </dkim>
1838 <spf>
1839 <domain>gmail.com</domain>
1840 <result>pass</result>
1841 </spf>
1842 </auth_results>
1843 </record>
1844 <record>
1845 <row>
1846 <source_ip>74.125.83.49</source_ip>
1847 <count>1</count>
1848 <policy_evaluated>
1849 <disposition>none</disposition>
1850 <dkim>pass</dkim>
1851 <spf>pass</spf>
1852 </policy_evaluated>
1853 </row>
1854 <identifiers>
1855 <header_from>example.com</header_from>
1856 </identifiers>
1857 <auth_results>
1858 <dkim>
1859 <domain>example.com</domain>
1860 <result>pass</result>
1861 <human_result>verify result: all signatures verified</human_result>
1862 </dkim>
1863 <spf>
1864 <domain>gmail.com</domain>
1865 <result>pass</result>
1866 </spf>
1867 </auth_results>
1868 </record>
1869 <record>
1870 <row>
1871 <source_ip>220.181.12.70</source_ip>
1872 <count>5</count>
1873 <policy_evaluated>
1874 <disposition>none</disposition>
1875 <dkim>pass</dkim>
1876 <spf>pass</spf>
1877 </policy_evaluated>
1878 </row>
1879 <identifiers>
1880 <header_from>example.com</header_from>
1881 </identifiers>
1882 <auth_results>
1883 <dkim>
1884 <domain>example.com</domain>
1885 <result>pass</result>
1886 <human_result>verify result: all signatures verified</human_result>
1887 </dkim>
1888 <spf>
1889 <domain>163.com</domain>
1890 <result>pass</result>
1891 </spf>
1892 </auth_results>
1893 </record>
1894 <record>
1895 <row>
1896 <source_ip>74.125.83.41</source_ip>
1897 <count>1</count>
1898 <policy_evaluated>
1899 <disposition>none</disposition>
1900 <dkim>pass</dkim>
1901 <spf>pass</spf>
1902 </policy_evaluated>
1903 </row>
1904 <identifiers>
1905 <header_from>example.com</header_from>
1906 </identifiers>
1907 <auth_results>
1908 <dkim>
1909 <domain>example.com</domain>
1910 <result>pass</result>
1911 <human_result>verify result: all signatures verified</human_result>
1912 </dkim>
1913 <spf>
1914 <domain>gmail.com</domain>
1915 <result>pass</result>
1916 </spf>
1917 </auth_results>
1918 </record>
1919 <record>
1920 <row>
1921 <source_ip>209.85.160.179</source_ip>
1922 <count>1</count>
1923 <policy_evaluated>
1924 <disposition>none</disposition>
1925 <dkim>pass</dkim>
1926 <spf>pass</spf>
1927 </policy_evaluated>
1928 </row>
1929 <identifiers>
1930 <header_from>example.com</header_from>
1931 </identifiers>
1932 <auth_results>
1933 <dkim>
1934 <domain>example.com</domain>
1935 <result>pass</result>
1936 <human_result>verify result: all signatures verified</human_result>
1937 </dkim>
1938 <spf>
1939 <domain>gmail.com</domain>
1940 <result>pass</result>
1941 </spf>
1942 </auth_results>
1943 </record>
1944 <record>
1945 <row>
1946 <source_ip>209.85.160.178</source_ip>
1947 <count>1</count>
1948 <policy_evaluated>
1949 <disposition>none</disposition>
1950 <dkim>pass</dkim>
1951 <spf>pass</spf>
1952 </policy_evaluated>
1953 </row>
1954 <identifiers>
1955 <header_from>example.com</header_from>
1956 </identifiers>
1957 <auth_results>
1958 <dkim>
1959 <domain>example.com</domain>
1960 <result>pass</result>
1961 <human_result>verify result: all signatures verified</human_result>
1962 </dkim>
1963 <spf>
1964 <domain>gmail.com</domain>
1965 <result>pass</result>
1966 </spf>
1967 </auth_results>
1968 </record>
1969 <record>
1970 <row>
1971 <source_ip>219.134.86.192</source_ip>
1972 <count>5</count>
1973 <policy_evaluated>
1974 <disposition>reject</disposition>
1975 <dkim>fail</dkim>
1976 <spf>fail</spf>
1977 </policy_evaluated>
1978 </row>
1979 <identifiers>
1980 <header_from>example.com</header_from>
1981 </identifiers>
1982 <auth_results>
1983 <spf>
1984 <domain>example.com</domain>
1985 <result>fail</result>
1986 </spf>
1987 </auth_results>
1988 </record>
1989 <record>
1990 <row>
1991 <source_ip>74.125.83.46</source_ip>
1992 <count>2</count>
1993 <policy_evaluated>
1994 <disposition>none</disposition>
1995 <dkim>pass</dkim>
1996 <spf>pass</spf>
1997 </policy_evaluated>
1998 </row>
1999 <identifiers>
2000 <header_from>example.com</header_from>
2001 </identifiers>
2002 <auth_results>
2003 <dkim>
2004 <domain>example.com</domain>
2005 <result>pass</result>
2006 <human_result>verify result: all signatures verified</human_result>
2007 </dkim>
2008 <spf>
2009 <domain>gmail.com</domain>
2010 <result>pass</result>
2011 </spf>
2012 </auth_results>
2013 </record>
2014 <record>
2015 <row>
2016 <source_ip>113.108.23.48</source_ip>
2017 <count>5</count>
2018 <policy_evaluated>
2019 <disposition>none</disposition>
2020 <dkim>pass</dkim>
2021 <spf>pass</spf>
2022 </policy_evaluated>
2023 </row>
2024 <identifiers>
2025 <header_from>example.com</header_from>
2026 </identifiers>
2027 <auth_results>
2028 <dkim>
2029 <domain>example.com</domain>
2030 <result>pass</result>
2031 <human_result>verify result: all signatures verified</human_result>
2032 </dkim>
2033 <spf>
2034 <domain>qq.com</domain>
2035 <result>pass</result>
2036 </spf>
2037 </auth_results>
2038 </record>
2039 <record>
2040 <row>
2041 <source_ip>113.108.23.49</source_ip>
2042 <count>3</count>
2043 <policy_evaluated>
2044 <disposition>none</disposition>
2045 <dkim>pass</dkim>
2046 <spf>pass</spf>
2047 </policy_evaluated>
2048 </row>
2049 <identifiers>
2050 <header_from>example.com</header_from>
2051 </identifiers>
2052 <auth_results>
2053 <dkim>
2054 <domain>example.com</domain>
2055 <result>pass</result>
2056 <human_result>verify result: all signatures verified</human_result>
2057 </dkim>
2058 <spf>
2059 <domain>qq.com</domain>
2060 <result>pass</result>
2061 </spf>
2062 </auth_results>
2063 </record>
2064 <record>
2065 <row>
2066 <source_ip>65.54.51.100</source_ip>
2067 <count>8</count>
2068 <policy_evaluated>
2069 <disposition>none</disposition>
2070 <dkim>pass</dkim>
2071 <spf>pass</spf>
2072 </policy_evaluated>
2073 </row>
2074 <identifiers>
2075 <header_from>example.com</header_from>
2076 </identifiers>
2077 <auth_results>
2078 <dkim>
2079 <domain>example.com</domain>
2080 <result>pass</result>
2081 <human_result>verify result: all signatures verified</human_result>
2082 </dkim>
2083 <spf>
2084 <domain>hotmail.de</domain>
2085 <result>pass</result>
2086 </spf>
2087 <spf>
2088 <domain>hotmail.it</domain>
2089 <result>pass</result>
2090 </spf>
2091 <spf>
2092 <domain>hotmail.com</domain>
2093 <result>pass</result>
2094 </spf>
2095 </auth_results>
2096 </record>
2097 <record>
2098 <row>
2099 <source_ip>209.85.214.53</source_ip>
2100 <count>5</count>
2101 <policy_evaluated>
2102 <disposition>none</disposition>
2103 <dkim>pass</dkim>
2104 <spf>pass</spf>
2105 </policy_evaluated>
2106 </row>
2107 <identifiers>
2108 <header_from>example.com</header_from>
2109 </identifiers>
2110 <auth_results>
2111 <dkim>
2112 <domain>example.com</domain>
2113 <result>pass</result>
2114 <human_result>verify result: all signatures verified</human_result>
2115 </dkim>
2116 <spf>
2117 <domain>gmail.com</domain>
2118 <result>pass</result>
2119 </spf>
2120 <spf>
2121 <domain>googlemail.com</domain>
2122 <result>pass</result>
2123 </spf>
2124 </auth_results>
2125 </record>
2126 <record>
2127 <row>
2128 <source_ip>209.85.214.52</source_ip>
2129 <count>7</count>
2130 <policy_evaluated>
2131 <disposition>none</disposition>
2132 <dkim>pass</dkim>
2133 <spf>pass</spf>
2134 </policy_evaluated>
2135 </row>
2136 <identifiers>
2137 <header_from>example.com</header_from>
2138 </identifiers>
2139 <auth_results>
2140 <dkim>
2141 <domain>example.com</domain>
2142 <result>pass</result>
2143 <human_result>verify result: all signatures verified</human_result>
2144 </dkim>
2145 <spf>
2146 <domain>gmail.com</domain>
2147 <result>pass</result>
2148 </spf>
2149 <spf>
2150 <domain>googlemail.com</domain>
2151 <result>pass</result>
2152 </spf>
2153 </auth_results>
2154 </record>
2155 <record>
2156 <row>
2157 <source_ip>209.85.214.51</source_ip>
2158 <count>5</count>
2159 <policy_evaluated>
2160 <disposition>none</disposition>
2161 <dkim>pass</dkim>
2162 <spf>pass</spf>
2163 </policy_evaluated>
2164 </row>
2165 <identifiers>
2166 <header_from>example.com</header_from>
2167 </identifiers>
2168 <auth_results>
2169 <dkim>
2170 <domain>example.com</domain>
2171 <result>pass</result>
2172 <human_result>verify result: all signatures verified</human_result>
2173 </dkim>
2174 <spf>
2175 <domain>gmail.com</domain>
2176 <result>pass</result>
2177 </spf>
2178 <spf>
2179 <domain>googlemail.com</domain>
2180 <result>pass</result>
2181 </spf>
2182 </auth_results>
2183 </record>
2184 <record>
2185 <row>
2186 <source_ip>209.85.214.50</source_ip>
2187 <count>2</count>
2188 <policy_evaluated>
2189 <disposition>none</disposition>
2190 <dkim>pass</dkim>
2191 <spf>pass</spf>
2192 </policy_evaluated>
2193 </row>
2194 <identifiers>
2195 <header_from>example.com</header_from>
2196 </identifiers>
2197 <auth_results>
2198 <dkim>
2199 <domain>example.com</domain>
2200 <result>pass</result>
2201 <human_result>verify result: all signatures verified</human_result>
2202 </dkim>
2203 <spf>
2204 <domain>gmail.com</domain>
2205 <result>pass</result>
2206 </spf>
2207 <spf>
2208 <domain>googlemail.com</domain>
2209 <result>pass</result>
2210 </spf>
2211 </auth_results>
2212 </record>
2213 <record>
2214 <row>
2215 <source_ip>113.108.23.44</source_ip>
2216 <count>1</count>
2217 <policy_evaluated>
2218 <disposition>none</disposition>
2219 <dkim>pass</dkim>
2220 <spf>pass</spf>
2221 </policy_evaluated>
2222 </row>
2223 <identifiers>
2224 <header_from>example.com</header_from>
2225 </identifiers>
2226 <auth_results>
2227 <dkim>
2228 <domain>example.com</domain>
2229 <result>pass</result>
2230 <human_result>verify result: all signatures verified</human_result>
2231 </dkim>
2232 <spf>
2233 <domain>qq.com</domain>
2234 <result>pass</result>
2235 </spf>
2236 </auth_results>
2237 </record>
2238 <record>
2239 <row>
2240 <source_ip>113.108.23.45</source_ip>
2241 <count>2</count>
2242 <policy_evaluated>
2243 <disposition>none</disposition>
2244 <dkim>pass</dkim>
2245 <spf>pass</spf>
2246 </policy_evaluated>
2247 </row>
2248 <identifiers>
2249 <header_from>example.com</header_from>
2250 </identifiers>
2251 <auth_results>
2252 <dkim>
2253 <domain>example.com</domain>
2254 <result>pass</result>
2255 <human_result>verify result: all signatures verified</human_result>
2256 </dkim>
2257 <spf>
2258 <domain>qq.com</domain>
2259 <result>pass</result>
2260 </spf>
2261 </auth_results>
2262 </record>
2263 <record>
2264 <row>
2265 <source_ip>113.108.23.46</source_ip>
2266 <count>4</count>
2267 <policy_evaluated>
2268 <disposition>none</disposition>
2269 <dkim>pass</dkim>
2270 <spf>pass</spf>
2271 </policy_evaluated>
2272 </row>
2273 <identifiers>
2274 <header_from>example.com</header_from>
2275 </identifiers>
2276 <auth_results>
2277 <dkim>
2278 <domain>example.com</domain>
2279 <result>pass</result>
2280 <human_result>verify result: all signatures verified</human_result>
2281 </dkim>
2282 <spf>
2283 <domain>qq.com</domain>
2284 <result>pass</result>
2285 </spf>
2286 </auth_results>
2287 </record>
2288 <record>
2289 <row>
2290 <source_ip>113.108.23.47</source_ip>
2291 <count>1</count>
2292 <policy_evaluated>
2293 <disposition>none</disposition>
2294 <dkim>pass</dkim>
2295 <spf>pass</spf>
2296 </policy_evaluated>
2297 </row>
2298 <identifiers>
2299 <header_from>example.com</header_from>
2300 </identifiers>
2301 <auth_results>
2302 <dkim>
2303 <domain>example.com</domain>
2304 <result>pass</result>
2305 <human_result>verify result: all signatures verified</human_result>
2306 </dkim>
2307 <spf>
2308 <domain>qq.com</domain>
2309 <result>pass</result>
2310 </spf>
2311 </auth_results>
2312 </record>
2313 <record>
2314 <row>
2315 <source_ip>110.75.178.13</source_ip>
2316 <count>1</count>
2317 <policy_evaluated>
2318 <disposition>none</disposition>
2319 <dkim>pass</dkim>
2320 <spf>pass</spf>
2321 </policy_evaluated>
2322 </row>
2323 <identifiers>
2324 <header_from>example.com</header_from>
2325 </identifiers>
2326 <auth_results>
2327 <dkim>
2328 <domain>example.com</domain>
2329 <result>pass</result>
2330 <human_result>verify result: all signatures verified</human_result>
2331 </dkim>
2332 <spf>
2333 <domain>cddance.cn</domain>
2334 <result>pass</result>
2335 </spf>
2336 </auth_results>
2337 </record>
2338 <record>
2339 <row>
2340 <source_ip>110.75.178.16</source_ip>
2341 <count>1</count>
2342 <policy_evaluated>
2343 <disposition>none</disposition>
2344 <dkim>pass</dkim>
2345 <spf>pass</spf>
2346 </policy_evaluated>
2347 </row>
2348 <identifiers>
2349 <header_from>example.com</header_from>
2350 </identifiers>
2351 <auth_results>
2352 <dkim>
2353 <domain>example.com</domain>
2354 <result>pass</result>
2355 <human_result>verify result: all signatures verified</human_result>
2356 </dkim>
2357 <spf>
2358 <domain>cddance.cn</domain>
2359 <result>pass</result>
2360 </spf>
2361 </auth_results>
2362 </record>
2363 <record>
2364 <row>
2365 <source_ip>110.75.178.17</source_ip>
2366 <count>2</count>
2367 <policy_evaluated>
2368 <disposition>none</disposition>
2369 <dkim>pass</dkim>
2370 <spf>pass</spf>
2371 </policy_evaluated>
2372 </row>
2373 <identifiers>
2374 <header_from>example.com</header_from>
2375 </identifiers>
2376 <auth_results>
2377 <dkim>
2378 <domain>example.com</domain>
2379 <result>pass</result>
2380 <human_result>verify result: all signatures verified</human_result>
2381 </dkim>
2382 <spf>
2383 <domain>zhtalent.com</domain>
2384 <result>pass</result>
2385 </spf>
2386 <spf>
2387 <domain>dovepaint.com.cn</domain>
2388 <result>pass</result>
2389 </spf>
2390 </auth_results>
2391 </record>
2392 <record>
2393 <row>
2394 <source_ip>110.75.178.14</source_ip>
2395 <count>1</count>
2396 <policy_evaluated>
2397 <disposition>none</disposition>
2398 <dkim>pass</dkim>
2399 <spf>pass</spf>
2400 </policy_evaluated>
2401 </row>
2402 <identifiers>
2403 <header_from>example.com</header_from>
2404 </identifiers>
2405 <auth_results>
2406 <dkim>
2407 <domain>example.com</domain>
2408 <result>pass</result>
2409 <human_result>verify result: all signatures verified</human_result>
2410 </dkim>
2411 <spf>
2412 <domain>cddance.cn</domain>
2413 <result>pass</result>
2414 </spf>
2415 </auth_results>
2416 </record>
2417 <record>
2418 <row>
2419 <source_ip>220.181.12.76</source_ip>
2420 <count>1</count>
2421 <policy_evaluated>
2422 <disposition>none</disposition>
2423 <dkim>pass</dkim>
2424 <spf>pass</spf>
2425 </policy_evaluated>
2426 </row>
2427 <identifiers>
2428 <header_from>example.com</header_from>
2429 </identifiers>
2430 <auth_results>
2431 <dkim>
2432 <domain>example.com</domain>
2433 <result>pass</result>
2434 <human_result>verify result: all signatures verified</human_result>
2435 </dkim>
2436 <spf>
2437 <domain>163.com</domain>
2438 <result>pass</result>
2439 </spf>
2440 </auth_results>
2441 </record>
2442 <record>
2443 <row>
2444 <source_ip>66.220.144.159</source_ip>
2445 <count>2009</count>
2446 <policy_evaluated>
2447 <disposition>none</disposition>
2448 <dkim>pass</dkim>
2449 <spf>pass</spf>
2450 </policy_evaluated>
2451 </row>
2452 <identifiers>
2453 <header_from>pages.example.com, example.com</header_from>
2454 </identifiers>
2455 <auth_results>
2456 <dkim>
2457 <domain>pages.example.com</domain>
2458 <result>pass</result>
2459 <human_result>verify result: all signatures verified</human_result>
2460 </dkim>
2461 <dkim>
2462 <domain>example.com</domain>
2463 <result>pass</result>
2464 <human_result>verify result: all signatures verified</human_result>
2465 </dkim>
2466 <spf>
2467 <domain>pages.example.com</domain>
2468 <result>pass</result>
2469 </spf>
2470 <spf>
2471 <domain>example.com</domain>
2472 <result>pass</result>
2473 </spf>
2474 </auth_results>
2475 </record>
2476 <record>
2477 <row>
2478 <source_ip>65.55.111.151</source_ip>
2479 <count>13</count>
2480 <policy_evaluated>
2481 <disposition>none</disposition>
2482 <dkim>pass</dkim>
2483 <spf>pass</spf>
2484 </policy_evaluated>
2485 </row>
2486 <identifiers>
2487 <header_from>example.com</header_from>
2488 </identifiers>
2489 <auth_results>
2490 <dkim>
2491 <domain>example.com</domain>
2492 <result>pass</result>
2493 <human_result>verify result: all signatures verified</human_result>
2494 </dkim>
2495 <spf>
2496 <domain>hotmail.de</domain>
2497 <result>pass</result>
2498 </spf>
2499 <spf>
2500 <domain>hotmail.it</domain>
2501 <result>pass</result>
2502 </spf>
2503 <spf>
2504 <domain>w.cn</domain>
2505 <result>none</result>
2506 </spf>
2507 <spf>
2508 <domain>hotmail.com</domain>
2509 <result>pass</result>
2510 </spf>
2511 </auth_results>
2512 </record>
2513 <record>
2514 <row>
2515 <source_ip>65.55.111.150</source_ip>
2516 <count>16</count>
2517 <policy_evaluated>
2518 <disposition>none</disposition>
2519 <dkim>pass</dkim>
2520 <spf>pass</spf>
2521 </policy_evaluated>
2522 </row>
2523 <identifiers>
2524 <header_from>example.com</header_from>
2525 </identifiers>
2526 <auth_results>
2527 <dkim>
2528 <domain>example.com</domain>
2529 <result>pass</result>
2530 <human_result>verify result: all signatures verified</human_result>
2531 </dkim>
2532 <spf>
2533 <domain>hotmail.de</domain>
2534 <result>pass</result>
2535 </spf>
2536 <spf>
2537 <domain>hotmail.it</domain>
2538 <result>pass</result>
2539 </spf>
2540 <spf>
2541 <domain>hotmail.com</domain>
2542 <result>pass</result>
2543 </spf>
2544 </auth_results>
2545 </record>
2546 <record>
2547 <row>
2548 <source_ip>65.55.111.153</source_ip>
2549 <count>17</count>
2550 <policy_evaluated>
2551 <disposition>none</disposition>
2552 <dkim>pass</dkim>
2553 <spf>pass</spf>
2554 </policy_evaluated>
2555 </row>
2556 <identifiers>
2557 <header_from>pages.example.com, example.com</header_from>
2558 </identifiers>
2559 <auth_results>
2560 <dkim>
2561 <domain>pages.example.com</domain>
2562 <result>pass</result>
2563 <human_result>verify result: all signatures verified</human_result>
2564 </dkim>
2565 <dkim>
2566 <domain>example.com</domain>
2567 <result>pass</result>
2568 <human_result>verify result: all signatures verified</human_result>
2569 </dkim>
2570 <spf>
2571 <domain>hotmail.it</domain>
2572 <result>pass</result>
2573 </spf>
2574 <spf>
2575 <domain>hotmail.com</domain>
2576 <result>pass</result>
2577 </spf>
2578 </auth_results>
2579 </record>
2580 <record>
2581 <row>
2582 <source_ip>65.55.111.152</source_ip>
2583 <count>13</count>
2584 <policy_evaluated>
2585 <disposition>none</disposition>
2586 <dkim>pass</dkim>
2587 <spf>pass</spf>
2588 </policy_evaluated>
2589 </row>
2590 <identifiers>
2591 <header_from>example.com</header_from>
2592 </identifiers>
2593 <auth_results>
2594 <dkim>
2595 <domain>example.com</domain>
2596 <result>pass</result>
2597 <human_result>verify result: all signatures verified</human_result>
2598 </dkim>
2599 <spf>
2600 <domain>hotmail.it</domain>
2601 <result>pass</result>
2602 </spf>
2603 <spf>
2604 <domain>hotmail.com</domain>
2605 <result>pass</result>
2606 </spf>
2607 </auth_results>
2608 </record>
2609 <record>
2610 <row>
2611 <source_ip>65.55.111.155</source_ip>
2612 <count>12</count>
2613 <policy_evaluated>
2614 <disposition>none</disposition>
2615 <dkim>pass</dkim>
2616 <spf>pass</spf>
2617 </policy_evaluated>
2618 </row>
2619 <identifiers>
2620 <header_from>example.com</header_from>
2621 </identifiers>
2622 <auth_results>
2623 <dkim>
2624 <domain>example.com</domain>
2625 <result>pass</result>
2626 <human_result>verify result: all signatures verified</human_result>
2627 </dkim>
2628 <spf>
2629 <domain>hotmail.it</domain>
2630 <result>pass</result>
2631 </spf>
2632 <spf>
2633 <domain>hotmail.com</domain>
2634 <result>pass</result>
2635 </spf>
2636 </auth_results>
2637 </record>
2638 <record>
2639 <row>
2640 <source_ip>65.55.111.154</source_ip>
2641 <count>17</count>
2642 <policy_evaluated>
2643 <disposition>none</disposition>
2644 <dkim>pass</dkim>
2645 <spf>pass</spf>
2646 </policy_evaluated>
2647 </row>
2648 <identifiers>
2649 <header_from>example.com</header_from>
2650 </identifiers>
2651 <auth_results>
2652 <dkim>
2653 <domain>example.com</domain>
2654 <result>pass</result>
2655 <human_result>verify result: all signatures verified</human_result>
2656 </dkim>
2657 <spf>
2658 <domain>msn.com</domain>
2659 <result>pass</result>
2660 </spf>
2661 <spf>
2662 <domain>hotmail.de</domain>
2663 <result>pass</result>
2664 </spf>
2665 <spf>
2666 <domain>hotmail.it</domain>
2667 <result>pass</result>
2668 </spf>
2669 <spf>
2670 <domain>hotmail.com</domain>
2671 <result>pass</result>
2672 </spf>
2673 </auth_results>
2674 </record>
2675 <record>
2676 <row>
2677 <source_ip>65.55.111.157</source_ip>
2678 <count>13</count>
2679 <policy_evaluated>
2680 <disposition>none</disposition>
2681 <dkim>pass</dkim>
2682 <spf>pass</spf>
2683 </policy_evaluated>
2684 </row>
2685 <identifiers>
2686 <header_from>example.com</header_from>
2687 </identifiers>
2688 <auth_results>
2689 <dkim>
2690 <domain>example.com</domain>
2691 <result>pass</result>
2692 <human_result>verify result: all signatures verified</human_result>
2693 </dkim>
2694 <spf>
2695 <domain>hotmail.de</domain>
2696 <result>pass</result>
2697 </spf>
2698 <spf>
2699 <domain>hotmail.it</domain>
2700 <result>pass</result>
2701 </spf>
2702 <spf>
2703 <domain>hotmail.com</domain>
2704 <result>pass</result>
2705 </spf>
2706 </auth_results>
2707 </record>
2708 <record>
2709 <row>
2710 <source_ip>65.55.111.156</source_ip>
2711 <count>13</count>
2712 <policy_evaluated>
2713 <disposition>none</disposition>
2714 <dkim>pass</dkim>
2715 <spf>pass</spf>
2716 </policy_evaluated>
2717 </row>
2718 <identifiers>
2719 <header_from>example.com</header_from>
2720 </identifiers>
2721 <auth_results>
2722 <dkim>
2723 <domain>example.com</domain>
2724 <result>pass</result>
2725 <human_result>verify result: all signatures verified</human_result>
2726 </dkim>
2727 <spf>
2728 <domain>msn.com</domain>
2729 <result>pass</result>
2730 </spf>
2731 <spf>
2732 <domain>hotmail.de</domain>
2733 <result>pass</result>
2734 </spf>
2735 <spf>
2736 <domain>hotmail.com</domain>
2737 <result>pass</result>
2738 </spf>
2739 </auth_results>
2740 </record>
2741 <record>
2742 <row>
2743 <source_ip>65.55.111.159</source_ip>
2744 <count>15</count>
2745 <policy_evaluated>
2746 <disposition>none</disposition>
2747 <dkim>pass</dkim>
2748 <spf>pass</spf>
2749 </policy_evaluated>
2750 </row>
2751 <identifiers>
2752 <header_from>example.com</header_from>
2753 </identifiers>
2754 <auth_results>
2755 <dkim>
2756 <domain>example.com</domain>
2757 <result>pass</result>
2758 <human_result>verify result: all signatures verified</human_result>
2759 </dkim>
2760 <spf>
2761 <domain>hotmail.de</domain>
2762 <result>pass</result>
2763 </spf>
2764 <spf>
2765 <domain>hotmail.it</domain>
2766 <result>pass</result>
2767 </spf>
2768 <spf>
2769 <domain>live.cn</domain>
2770 <result>pass</result>
2771 </spf>
2772 <spf>
2773 <domain>hotmail.com</domain>
2774 <result>pass</result>
2775 </spf>
2776 </auth_results>
2777 </record>
2778 <record>
2779 <row>
2780 <source_ip>65.55.111.158</source_ip>
2781 <count>12</count>
2782 <policy_evaluated>
2783 <disposition>none</disposition>
2784 <dkim>pass</dkim>
2785 <spf>pass</spf>
2786 </policy_evaluated>
2787 </row>
2788 <identifiers>
2789 <header_from>pages.example.com, example.com</header_from>
2790 </identifiers>
2791 <auth_results>
2792 <dkim>
2793 <domain>pages.example.com</domain>
2794 <result>pass</result>
2795 <human_result>verify result: all signatures verified</human_result>
2796 </dkim>
2797 <dkim>
2798 <domain>example.com</domain>
2799 <result>pass</result>
2800 <human_result>verify result: all signatures verified</human_result>
2801 </dkim>
2802 <spf>
2803 <domain>hotmail.de</domain>
2804 <result>pass</result>
2805 </spf>
2806 <spf>
2807 <domain>hotmail.it</domain>
2808 <result>pass</result>
2809 </spf>
2810 <spf>
2811 <domain>hotmail.com</domain>
2812 <result>pass</result>
2813 </spf>
2814 </auth_results>
2815 </record>
2816 <record>
2817 <row>
2818 <source_ip>129.67.1.161</source_ip>
2819 <count>1</count>
2820 <policy_evaluated>
2821 <disposition>reject</disposition>
2822 <dkim>fail</dkim>
2823 <spf>fail</spf>
2824 </policy_evaluated>
2825 </row>
2826 <identifiers>
2827 <header_from>example.com</header_from>
2828 </identifiers>
2829 <auth_results>
2830 <dkim>
2831 <domain>example.com</domain>
2832 <result>neutral</result>
2833 <human_result>sigature verify error: message body does not hash to bh value</human_result>
2834 </dkim>
2835 <spf>
2836 <domain>nexus.ox.ac.uk</domain>
2837 <result>none</result>
2838 </spf>
2839 </auth_results>
2840 </record>
2841 <record>
2842 <row>
2843 <source_ip>220.181.12.69</source_ip>
2844 <count>3</count>
2845 <policy_evaluated>
2846 <disposition>none</disposition>
2847 <dkim>pass</dkim>
2848 <spf>pass</spf>
2849 </policy_evaluated>
2850 </row>
2851 <identifiers>
2852 <header_from>example.com</header_from>
2853 </identifiers>
2854 <auth_results>
2855 <dkim>
2856 <domain>example.com</domain>
2857 <result>pass</result>
2858 <human_result>verify result: all signatures verified</human_result>
2859 </dkim>
2860 <spf>
2861 <domain>163.com</domain>
2862 <result>pass</result>
2863 </spf>
2864 </auth_results>
2865 </record>
2866 <record>
2867 <row>
2868 <source_ip>66.96.186.3</source_ip>
2869 <count>1</count>
2870 <policy_evaluated>
2871 <disposition>none</disposition>
2872 <dkim>pass</dkim>
2873 <spf>fail</spf>
2874 </policy_evaluated>
2875 </row>
2876 <identifiers>
2877 <header_from>example.com</header_from>
2878 </identifiers>
2879 <auth_results>
2880 <dkim>
2881 <domain>example.com</domain>
2882 <result>pass</result>
2883 <human_result>verify result: all signatures verified</human_result>
2884 </dkim>
2885 <spf>
2886 <domain>example.com</domain>
2887 <result>fail</result>
2888 </spf>
2889 </auth_results>
2890 </record>
2891 <record>
2892 <row>
2893 <source_ip>209.85.217.181</source_ip>
2894 <count>4</count>
2895 <policy_evaluated>
2896 <disposition>none</disposition>
2897 <dkim>pass</dkim>
2898 <spf>pass</spf>
2899 </policy_evaluated>
2900 </row>
2901 <identifiers>
2902 <header_from>example.com</header_from>
2903 </identifiers>
2904 <auth_results>
2905 <dkim>
2906 <domain>example.com</domain>
2907 <result>pass</result>
2908 <human_result>verify result: all signatures verified</human_result>
2909 </dkim>
2910 <spf>
2911 <domain>gmail.com</domain>
2912 <result>pass</result>
2913 </spf>
2914 </auth_results>
2915 </record>
2916 <record>
2917 <row>
2918 <source_ip>209.85.217.180</source_ip>
2919 <count>4</count>
2920 <policy_evaluated>
2921 <disposition>none</disposition>
2922 <dkim>pass</dkim>
2923 <spf>pass</spf>
2924 </policy_evaluated>
2925 </row>
2926 <identifiers>
2927 <header_from>example.com</header_from>
2928 </identifiers>
2929 <auth_results>
2930 <dkim>
2931 <domain>example.com</domain>
2932 <result>pass</result>
2933 <human_result>verify result: all signatures verified</human_result>
2934 </dkim>
2935 <spf>
2936 <domain>gmail.com</domain>
2937 <result>pass</result>
2938 </spf>
2939 </auth_results>
2940 </record>
2941 <record>
2942 <row>
2943 <source_ip>218.189.132.6</source_ip>
2944 <count>6</count>
2945 <policy_evaluated>
2946 <disposition>reject</disposition>
2947 <dkim>fail</dkim>
2948 <spf>fail</spf>
2949 </policy_evaluated>
2950 </row>
2951 <identifiers>
2952 <header_from>example.com</header_from>
2953 </identifiers>
2954 <auth_results>
2955 <spf>
2956 <domain>example.com</domain>
2957 <result>fail</result>
2958 </spf>
2959 </auth_results>
2960 </record>
2961 <record>
2962 <row>
2963 <source_ip>66.220.155.137</source_ip>
2964 <count>1515</count>
2965 <policy_evaluated>
2966 <disposition>none</disposition>
2967 <dkim>pass</dkim>
2968 <spf>pass</spf>
2969 </policy_evaluated>
2970 </row>
2971 <identifiers>
2972 <header_from>pages.example.com, example.com</header_from>
2973 </identifiers>
2974 <auth_results>
2975 <dkim>
2976 <domain>pages.example.com</domain>
2977 <result>pass</result>
2978 <human_result>verify result: all signatures verified</human_result>
2979 </dkim>
2980 <dkim>
2981 <domain>example.com</domain>
2982 <result>pass</result>
2983 <human_result>verify result: all signatures verified</human_result>
2984 </dkim>
2985 <spf>
2986 <domain>pages.example.com</domain>
2987 <result>pass</result>
2988 </spf>
2989 <spf>
2990 <domain>example.com</domain>
2991 <result>pass</result>
2992 </spf>
2993 </auth_results>
2994 </record>
2995 <record>
2996 <row>
2997 <source_ip>66.220.155.136</source_ip>
2998 <count>1524</count>
2999 <policy_evaluated>
3000 <disposition>none</disposition>
3001 <dkim>pass</dkim>
3002 <spf>pass</spf>
3003 </policy_evaluated>
3004 </row>
3005 <identifiers>
3006 <header_from>pages.example.com, example.com</header_from>
3007 </identifiers>
3008 <auth_results>
3009 <dkim>
3010 <domain>pages.example.com</domain>
3011 <result>pass</result>
3012 <human_result>verify result: all signatures verified</human_result>
3013 </dkim>
3014 <dkim>
3015 <domain>example.com</domain>
3016 <result>pass</result>
3017 <human_result>verify result: all signatures verified</human_result>
3018 </dkim>
3019 <spf>
3020 <domain>pages.example.com</domain>
3021 <result>pass</result>
3022 </spf>
3023 <spf>
3024 <domain>example.com</domain>
3025 <result>pass</result>
3026 </spf>
3027 </auth_results>
3028 </record>
3029 <record>
3030 <row>
3031 <source_ip>61.145.121.60</source_ip>
3032 <count>2</count>
3033 <policy_evaluated>
3034 <disposition>none</disposition>
3035 <dkim>pass</dkim>
3036 <spf>fail</spf>
3037 </policy_evaluated>
3038 </row>
3039 <identifiers>
3040 <header_from>example.com</header_from>
3041 </identifiers>
3042 <auth_results>
3043 <dkim>
3044 <domain>example.com</domain>
3045 <result>pass</result>
3046 <human_result>verify result: all signatures verified</human_result>
3047 </dkim>
3048 <spf>
3049 <domain>kypom.com</domain>
3050 <result>none</result>
3051 </spf>
3052 <spf>
3053 <domain>alevel.com.cn</domain>
3054 <result>none</result>
3055 </spf>
3056 </auth_results>
3057 </record>
3058 <record>
3059 <row>
3060 <source_ip>106.10.148.73</source_ip>
3061 <count>1</count>
3062 <policy_evaluated>
3063 <disposition>none</disposition>
3064 <dkim>pass</dkim>
3065 <spf>fail</spf>
3066 </policy_evaluated>
3067 </row>
3068 <identifiers>
3069 <header_from>example.com</header_from>
3070 </identifiers>
3071 <auth_results>
3072 <dkim>
3073 <domain>example.com</domain>
3074 <result>pass</result>
3075 <human_result>verify result: all signatures verified</human_result>
3076 </dkim>
3077 <spf>
3078 <domain>example.com</domain>
3079 <result>fail</result>
3080 </spf>
3081 </auth_results>
3082 </record>
3083 <record>
3084 <row>
3085 <source_ip>74.125.82.42</source_ip>
3086 <count>1</count>
3087 <policy_evaluated>
3088 <disposition>none</disposition>
3089 <dkim>pass</dkim>
3090 <spf>pass</spf>
3091 </policy_evaluated>
3092 </row>
3093 <identifiers>
3094 <header_from>example.com</header_from>
3095 </identifiers>
3096 <auth_results>
3097 <dkim>
3098 <domain>example.com</domain>
3099 <result>pass</result>
3100 <human_result>verify result: all signatures verified</human_result>
3101 </dkim>
3102 <spf>
3103 <domain>gmail.com</domain>
3104 <result>pass</result>
3105 </spf>
3106 </auth_results>
3107 </record>
3108 <record>
3109 <row>
3110 <source_ip>66.220.144.152</source_ip>
3111 <count>2126</count>
3112 <policy_evaluated>
3113 <disposition>none</disposition>
3114 <dkim>pass</dkim>
3115 <spf>pass</spf>
3116 </policy_evaluated>
3117 </row>
3118 <identifiers>
3119 <header_from>pages.example.com, example.com</header_from>
3120 </identifiers>
3121 <auth_results>
3122 <dkim>
3123 <domain>pages.example.com</domain>
3124 <result>pass</result>
3125 <human_result>verify result: all signatures verified</human_result>
3126 </dkim>
3127 <dkim>
3128 <domain>example.com</domain>
3129 <result>pass</result>
3130 <human_result>verify result: all signatures verified</human_result>
3131 </dkim>
3132 <spf>
3133 <domain>pages.example.com</domain>
3134 <result>pass</result>
3135 </spf>
3136 <spf>
3137 <domain>example.com</domain>
3138 <result>pass</result>
3139 </spf>
3140 </auth_results>
3141 </record>
3142 <record>
3143 <row>
3144 <source_ip>121.15.200.74</source_ip>
3145 <count>5</count>
3146 <policy_evaluated>
3147 <disposition>reject</disposition>
3148 <dkim>fail</dkim>
3149 <spf>fail</spf>
3150 </policy_evaluated>
3151 </row>
3152 <identifiers>
3153 <header_from>example.com</header_from>
3154 </identifiers>
3155 <auth_results>
3156 <spf>
3157 <domain>example.com</domain>
3158 <result>fail</result>
3159 </spf>
3160 </auth_results>
3161 </record>
3162 <record>
3163 <row>
3164 <source_ip>121.15.200.71</source_ip>
3165 <count>70</count>
3166 <policy_evaluated>
3167 <disposition>reject</disposition>
3168 <dkim>fail</dkim>
3169 <spf>fail</spf>
3170 </policy_evaluated>
3171 </row>
3172 <identifiers>
3173 <header_from>example.com</header_from>
3174 </identifiers>
3175 <auth_results>
3176 <spf>
3177 <domain>example.com</domain>
3178 <result>fail</result>
3179 </spf>
3180 </auth_results>
3181 </record>
3182 <record>
3183 <row>
3184 <source_ip>66.220.155.139</source_ip>
3185 <count>1242</count>
3186 <policy_evaluated>
3187 <disposition>none</disposition>
3188 <dkim>pass</dkim>
3189 <spf>pass</spf>
3190 </policy_evaluated>
3191 </row>
3192 <identifiers>
3193 <header_from>pages.example.com, example.com</header_from>
3194 </identifiers>
3195 <auth_results>
3196 <dkim>
3197 <domain>pages.example.com</domain>
3198 <result>pass</result>
3199 <human_result>verify result: all signatures verified</human_result>
3200 </dkim>
3201 <dkim>
3202 <domain>example.com</domain>
3203 <result>pass</result>
3204 <human_result>verify result: all signatures verified</human_result>
3205 </dkim>
3206 <spf>
3207 <domain>pages.example.com</domain>
3208 <result>neutral</result>
3209 </spf>
3210 <spf>
3211 <domain>example.com</domain>
3212 <result>pass</result>
3213 </spf>
3214 </auth_results>
3215 </record>
3216 <record>
3217 <row>
3218 <source_ip>66.220.155.138</source_ip>
3219 <count>1506</count>
3220 <policy_evaluated>
3221 <disposition>none</disposition>
3222 <dkim>pass</dkim>
3223 <spf>pass</spf>
3224 </policy_evaluated>
3225 </row>
3226 <identifiers>
3227 <header_from>pages.example.com, example.com</header_from>
3228 </identifiers>
3229 <auth_results>
3230 <dkim>
3231 <domain>pages.example.com</domain>
3232 <result>pass</result>
3233 <human_result>verify result: all signatures verified</human_result>
3234 </dkim>
3235 <dkim>
3236 <domain>example.com</domain>
3237 <result>pass</result>
3238 <human_result>verify result: all signatures verified</human_result>
3239 </dkim>
3240 <spf>
3241 <domain>pages.example.com</domain>
3242 <result>pass</result>
3243 </spf>
3244 <spf>
3245 <domain>example.com</domain>
3246 <result>pass</result>
3247 </spf>
3248 </auth_results>
3249 </record>
3250 <record>
3251 <row>
3252 <source_ip>116.6.95.162</source_ip>
3253 <count>3</count>
3254 <policy_evaluated>
3255 <disposition>reject</disposition>
3256 <dkim>fail</dkim>
3257 <spf>fail</spf>
3258 </policy_evaluated>
3259 </row>
3260 <identifiers>
3261 <header_from>example.com</header_from>
3262 </identifiers>
3263 <auth_results>
3264 <spf>
3265 <domain>example.com</domain>
3266 <result>fail</result>
3267 </spf>
3268 </auth_results>
3269 </record>
3270 <record>
3271 <row>
3272 <source_ip>209.85.213.49</source_ip>
3273 <count>3</count>
3274 <policy_evaluated>
3275 <disposition>none</disposition>
3276 <dkim>pass</dkim>
3277 <spf>pass</spf>
3278 </policy_evaluated>
3279 </row>
3280 <identifiers>
3281 <header_from>example.com</header_from>
3282 </identifiers>
3283 <auth_results>
3284 <dkim>
3285 <domain>example.com</domain>
3286 <result>pass</result>
3287 <human_result>verify result: all signatures verified</human_result>
3288 </dkim>
3289 <spf>
3290 <domain>gmail.com</domain>
3291 <result>pass</result>
3292 </spf>
3293 </auth_results>
3294 </record>
3295 <record>
3296 <row>
3297 <source_ip>209.85.213.48</source_ip>
3298 <count>10</count>
3299 <policy_evaluated>
3300 <disposition>none</disposition>
3301 <dkim>pass</dkim>
3302 <spf>pass</spf>
3303 </policy_evaluated>
3304 </row>
3305 <identifiers>
3306 <header_from>example.com</header_from>
3307 </identifiers>
3308 <auth_results>
3309 <dkim>
3310 <domain>example.com</domain>
3311 <result>pass</result>
3312 <human_result>verify result: all signatures verified</human_result>
3313 </dkim>
3314 <spf>
3315 <domain>gmail.com</domain>
3316 <result>pass</result>
3317 </spf>
3318 </auth_results>
3319 </record>
3320 <record>
3321 <row>
3322 <source_ip>61.135.132.204</source_ip>
3323 <count>1</count>
3324 <policy_evaluated>
3325 <disposition>none</disposition>
3326 <dkim>pass</dkim>
3327 <spf>pass</spf>
3328 </policy_evaluated>
3329 </row>
3330 <identifiers>
3331 <header_from>example.com</header_from>
3332 </identifiers>
3333 <auth_results>
3334 <dkim>
3335 <domain>example.com</domain>
3336 <result>pass</result>
3337 <human_result>verify result: all signatures verified</human_result>
3338 </dkim>
3339 <spf>
3340 <domain>sohu.com</domain>
3341 <result>pass</result>
3342 </spf>
3343 </auth_results>
3344 </record>
3345 <record>
3346 <row>
3347 <source_ip>209.85.213.45</source_ip>
3348 <count>5</count>
3349 <policy_evaluated>
3350 <disposition>none</disposition>
3351 <dkim>pass</dkim>
3352 <spf>pass</spf>
3353 </policy_evaluated>
3354 </row>
3355 <identifiers>
3356 <header_from>example.com</header_from>
3357 </identifiers>
3358 <auth_results>
3359 <dkim>
3360 <domain>example.com</domain>
3361 <result>pass</result>
3362 <human_result>verify result: all signatures verified</human_result>
3363 </dkim>
3364 <spf>
3365 <domain>gmail.com</domain>
3366 <result>pass</result>
3367 </spf>
3368 </auth_results>
3369 </record>
3370 <record>
3371 <row>
3372 <source_ip>66.220.144.157</source_ip>
3373 <count>1989</count>
3374 <policy_evaluated>
3375 <disposition>none</disposition>
3376 <dkim>pass</dkim>
3377 <spf>pass</spf>
3378 </policy_evaluated>
3379 </row>
3380 <identifiers>
3381 <header_from>pages.example.com, example.com</header_from>
3382 </identifiers>
3383 <auth_results>
3384 <dkim>
3385 <domain>pages.example.com</domain>
3386 <result>pass</result>
3387 <human_result>verify result: all signatures verified</human_result>
3388 </dkim>
3389 <dkim>
3390 <domain>example.com</domain>
3391 <result>pass</result>
3392 <human_result>verify result: all signatures verified</human_result>
3393 </dkim>
3394 <spf>
3395 <domain>pages.example.com</domain>
3396 <result>pass</result>
3397 </spf>
3398 <spf>
3399 <domain>example.com</domain>
3400 <result>pass</result>
3401 </spf>
3402 </auth_results>
3403 </record>
3404 <record>
3405 <row>
3406 <source_ip>209.85.213.47</source_ip>
3407 <count>3</count>
3408 <policy_evaluated>
3409 <disposition>none</disposition>
3410 <dkim>pass</dkim>
3411 <spf>pass</spf>
3412 </policy_evaluated>
3413 </row>
3414 <identifiers>
3415 <header_from>example.com</header_from>
3416 </identifiers>
3417 <auth_results>
3418 <dkim>
3419 <domain>example.com</domain>
3420 <result>pass</result>
3421 <human_result>verify result: all signatures verified</human_result>
3422 </dkim>
3423 <spf>
3424 <domain>gmail.com</domain>
3425 <result>pass</result>
3426 </spf>
3427 </auth_results>
3428 </record>
3429 <record>
3430 <row>
3431 <source_ip>209.85.213.46</source_ip>
3432 <count>4</count>
3433 <policy_evaluated>
3434 <disposition>none</disposition>
3435 <dkim>pass</dkim>
3436 <spf>pass</spf>
3437 </policy_evaluated>
3438 </row>
3439 <identifiers>
3440 <header_from>example.com</header_from>
3441 </identifiers>
3442 <auth_results>
3443 <dkim>
3444 <domain>example.com</domain>
3445 <result>pass</result>
3446 <human_result>verify result: all signatures verified</human_result>
3447 </dkim>
3448 <spf>
3449 <domain>gmail.com</domain>
3450 <result>pass</result>
3451 </spf>
3452 </auth_results>
3453 </record>
3454 <record>
3455 <row>
3456 <source_ip>209.85.213.41</source_ip>
3457 <count>7</count>
3458 <policy_evaluated>
3459 <disposition>none</disposition>
3460 <dkim>pass</dkim>
3461 <spf>pass</spf>
3462 </policy_evaluated>
3463 </row>
3464 <identifiers>
3465 <header_from>example.com</header_from>
3466 </identifiers>
3467 <auth_results>
3468 <dkim>
3469 <domain>example.com</domain>
3470 <result>pass</result>
3471 <human_result>verify result: all signatures verified</human_result>
3472 </dkim>
3473 <spf>
3474 <domain>gmail.com</domain>
3475 <result>pass</result>
3476 </spf>
3477 </auth_results>
3478 </record>
3479 <record>
3480 <row>
3481 <source_ip>209.85.213.43</source_ip>
3482 <count>8</count>
3483 <policy_evaluated>
3484 <disposition>none</disposition>
3485 <dkim>pass</dkim>
3486 <spf>pass</spf>
3487 </policy_evaluated>
3488 </row>
3489 <identifiers>
3490 <header_from>pages.example.com, example.com</header_from>
3491 </identifiers>
3492 <auth_results>
3493 <dkim>
3494 <domain>pages.example.com</domain>
3495 <result>pass</result>
3496 <human_result>verify result: all signatures verified</human_result>
3497 </dkim>
3498 <dkim>
3499 <domain>example.com</domain>
3500 <result>pass</result>
3501 <human_result>verify result: all signatures verified</human_result>
3502 </dkim>
3503 <spf>
3504 <domain>gmail.com</domain>
3505 <result>pass</result>
3506 </spf>
3507 </auth_results>
3508 </record>
3509 <record>
3510 <row>
3511 <source_ip>209.85.160.47</source_ip>
3512 <count>3</count>
3513 <policy_evaluated>
3514 <disposition>none</disposition>
3515 <dkim>pass</dkim>
3516 <spf>pass</spf>
3517 </policy_evaluated>
3518 </row>
3519 <identifiers>
3520 <header_from>example.com</header_from>
3521 </identifiers>
3522 <auth_results>
3523 <dkim>
3524 <domain>example.com</domain>
3525 <result>pass</result>
3526 <human_result>verify result: all signatures verified</human_result>
3527 </dkim>
3528 <spf>
3529 <domain>gmail.com</domain>
3530 <result>pass</result>
3531 </spf>
3532 </auth_results>
3533 </record>
3534 <record>
3535 <row>
3536 <source_ip>69.171.232.139</source_ip>
3537 <count>3605</count>
3538 <policy_evaluated>
3539 <disposition>none</disposition>
3540 <dkim>pass</dkim>
3541 <spf>pass</spf>
3542 </policy_evaluated>
3543 </row>
3544 <identifiers>
3545 <header_from>example.com</header_from>
3546 </identifiers>
3547 <auth_results>
3548 <dkim>
3549 <domain>example.com</domain>
3550 <result>pass</result>
3551 <human_result>verify result: all signatures verified</human_result>
3552 </dkim>
3553 <spf>
3554 <domain>example.com</domain>
3555 <result>pass</result>
3556 </spf>
3557 </auth_results>
3558 </record>
3559 <record>
3560 <row>
3561 <source_ip>69.171.232.138</source_ip>
3562 <count>3731</count>
3563 <policy_evaluated>
3564 <disposition>none</disposition>
3565 <dkim>pass</dkim>
3566 <spf>pass</spf>
3567 </policy_evaluated>
3568 </row>
3569 <identifiers>
3570 <header_from>pages.example.com, example.com</header_from>
3571 </identifiers>
3572 <auth_results>
3573 <dkim>
3574 <domain>pages.example.com</domain>
3575 <result>pass</result>
3576 <human_result>verify result: all signatures verified</human_result>
3577 </dkim>
3578 <dkim>
3579 <domain>example.com</domain>
3580 <result>pass</result>
3581 <human_result>verify result: all signatures verified</human_result>
3582 </dkim>
3583 <spf>
3584 <domain>pages.example.com</domain>
3585 <result>pass</result>
3586 </spf>
3587 <spf>
3588 <domain>example.com</domain>
3589 <result>pass</result>
3590 </spf>
3591 </auth_results>
3592 </record>
3593 <record>
3594 <row>
3595 <source_ip>69.171.232.138</source_ip>
3596 <count>1</count>
3597 <policy_evaluated>
3598 <disposition>reject</disposition>
3599 <dkim>fail</dkim>
3600 <spf>fail</spf>
3601 </policy_evaluated>
3602 </row>
3603 <identifiers>
3604 <header_from>example.com</header_from>
3605 </identifiers>
3606 <auth_results>
3607 <dkim>
3608 <domain>example.com</domain>
3609 <result>temperror</result>
3610 <human_result>signature error: temporary dns failure requesting selector</human_result>
3611 </dkim>
3612 <spf>
3613 <domain>example.com</domain>
3614 <result>neutral</result>
3615 </spf>
3616 </auth_results>
3617 </record>
3618 <record>
3619 <row>
3620 <source_ip>66.220.144.155</source_ip>
3621 <count>2048</count>
3622 <policy_evaluated>
3623 <disposition>none</disposition>
3624 <dkim>pass</dkim>
3625 <spf>pass</spf>
3626 </policy_evaluated>
3627 </row>
3628 <identifiers>
3629 <header_from>pages.example.com, example.com</header_from>
3630 </identifiers>
3631 <auth_results>
3632 <dkim>
3633 <domain>pages.example.com</domain>
3634 <result>pass</result>
3635 <human_result>verify result: all signatures verified</human_result>
3636 </dkim>
3637 <dkim>
3638 <domain>example.com</domain>
3639 <result>pass</result>
3640 <human_result>verify result: all signatures verified</human_result>
3641 </dkim>
3642 <spf>
3643 <domain>pages.example.com</domain>
3644 <result>pass</result>
3645 </spf>
3646 <spf>
3647 <domain>example.com</domain>
3648 <result>pass</result>
3649 </spf>
3650 </auth_results>
3651 </record>
3652 <record>
3653 <row>
3654 <source_ip>209.85.160.45</source_ip>
3655 <count>6</count>
3656 <policy_evaluated>
3657 <disposition>none</disposition>
3658 <dkim>pass</dkim>
3659 <spf>pass</spf>
3660 </policy_evaluated>
3661 </row>
3662 <identifiers>
3663 <header_from>example.com</header_from>
3664 </identifiers>
3665 <auth_results>
3666 <dkim>
3667 <domain>example.com</domain>
3668 <result>pass</result>
3669 <human_result>verify result: all signatures verified</human_result>
3670 </dkim>
3671 <spf>
3672 <domain>gmail.com</domain>
3673 <result>pass</result>
3674 </spf>
3675 </auth_results>
3676 </record>
3677 <record>
3678 <row>
3679 <source_ip>69.171.232.137</source_ip>
3680 <count>3383</count>
3681 <policy_evaluated>
3682 <disposition>none</disposition>
3683 <dkim>pass</dkim>
3684 <spf>pass</spf>
3685 </policy_evaluated>
3686 </row>
3687 <identifiers>
3688 <header_from>example.com</header_from>
3689 </identifiers>
3690 <auth_results>
3691 <dkim>
3692 <domain>example.com</domain>
3693 <result>pass</result>
3694 <human_result>verify result: all signatures verified</human_result>
3695 </dkim>
3696 <spf>
3697 <domain>example.com</domain>
3698 <result>pass</result>
3699 </spf>
3700 </auth_results>
3701 </record>
3702 <record>
3703 <row>
3704 <source_ip>69.171.232.136</source_ip>
3705 <count>3580</count>
3706 <policy_evaluated>
3707 <disposition>none</disposition>
3708 <dkim>pass</dkim>
3709 <spf>pass</spf>
3710 </policy_evaluated>
3711 </row>
3712 <identifiers>
3713 <header_from>example.com</header_from>
3714 </identifiers>
3715 <auth_results>
3716 <dkim>
3717 <domain>example.com</domain>
3718 <result>pass</result>
3719 <human_result>verify result: all signatures verified</human_result>
3720 </dkim>
3721 <spf>
3722 <domain>example.com</domain>
3723 <result>pass</result>
3724 </spf>
3725 </auth_results>
3726 </record>
3727 <record>
3728 <row>
3729 <source_ip>69.171.232.135</source_ip>
3730 <count>3628</count>
3731 <policy_evaluated>
3732 <disposition>none</disposition>
3733 <dkim>pass</dkim>
3734 <spf>pass</spf>
3735 </policy_evaluated>
3736 </row>
3737 <identifiers>
3738 <header_from>example.com</header_from>
3739 </identifiers>
3740 <auth_results>
3741 <dkim>
3742 <domain>example.com</domain>
3743 <result>pass</result>
3744 <human_result>verify result: all signatures verified</human_result>
3745 </dkim>
3746 <spf>
3747 <domain>example.com</domain>
3748 <result>pass</result>
3749 </spf>
3750 </auth_results>
3751 </record>
3752 <record>
3753 <row>
3754 <source_ip>106.10.148.92</source_ip>
3755 <count>1</count>
3756 <policy_evaluated>
3757 <disposition>none</disposition>
3758 <dkim>pass</dkim>
3759 <spf>fail</spf>
3760 </policy_evaluated>
3761 </row>
3762 <identifiers>
3763 <header_from>example.com</header_from>
3764 </identifiers>
3765 <auth_results>
3766 <dkim>
3767 <domain>example.com</domain>
3768 <result>pass</result>
3769 <human_result>verify result: all signatures verified</human_result>
3770 </dkim>
3771 <spf>
3772 <domain>example.com</domain>
3773 <result>fail</result>
3774 </spf>
3775 </auth_results>
3776 </record>
3777 <record>
3778 <row>
3779 <source_ip>122.178.241.68</source_ip>
3780 <count>1</count>
3781 <policy_evaluated>
3782 <disposition>reject</disposition>
3783 <dkim>fail</dkim>
3784 <spf>fail</spf>
3785 </policy_evaluated>
3786 </row>
3787 <identifiers>
3788 <header_from>example.com</header_from>
3789 </identifiers>
3790 <auth_results>
3791 <spf>
3792 <domain>example.com</domain>
3793 <result>fail</result>
3794 </spf>
3795 </auth_results>
3796 </record>
3797 <record>
3798 <row>
3799 <source_ip>202.85.51.185</source_ip>
3800 <count>3</count>
3801 <policy_evaluated>
3802 <disposition>reject</disposition>
3803 <dkim>fail</dkim>
3804 <spf>fail</spf>
3805 </policy_evaluated>
3806 </row>
3807 <identifiers>
3808 <header_from>example.com</header_from>
3809 </identifiers>
3810 <auth_results>
3811 <spf>
3812 <domain>example.com</domain>
3813 <result>fail</result>
3814 </spf>
3815 </auth_results>
3816 </record>
3817 <record>
3818 <row>
3819 <source_ip>106.10.151.212</source_ip>
3820 <count>1</count>
3821 <policy_evaluated>
3822 <disposition>none</disposition>
3823 <dkim>pass</dkim>
3824 <spf>fail</spf>
3825 </policy_evaluated>
3826 </row>
3827 <identifiers>
3828 <header_from>example.com</header_from>
3829 </identifiers>
3830 <auth_results>
3831 <dkim>
3832 <domain>example.com</domain>
3833 <result>pass</result>
3834 <human_result>verify result: all signatures verified</human_result>
3835 </dkim>
3836 <spf>
3837 <domain>example.com</domain>
3838 <result>fail</result>
3839 </spf>
3840 </auth_results>
3841 </record>
3842 <record>
3843 <row>
3844 <source_ip>183.63.192.58</source_ip>
3845 <count>1</count>
3846 <policy_evaluated>
3847 <disposition>none</disposition>
3848 <dkim>pass</dkim>
3849 <spf>fail</spf>
3850 </policy_evaluated>
3851 </row>
3852 <identifiers>
3853 <header_from>example.com</header_from>
3854 </identifiers>
3855 <auth_results>
3856 <dkim>
3857 <domain>example.com</domain>
3858 <result>pass</result>
3859 <human_result>verify result: all signatures verified</human_result>
3860 </dkim>
3861 <spf>
3862 <domain>example.com</domain>
3863 <result>fail</result>
3864 </spf>
3865 </auth_results>
3866 </record>
3867 <record>
3868 <row>
3869 <source_ip>211.150.64.25</source_ip>
3870 <count>1</count>
3871 <policy_evaluated>
3872 <disposition>none</disposition>
3873 <dkim>pass</dkim>
3874 <spf>fail</spf>
3875 </policy_evaluated>
3876 </row>
3877 <identifiers>
3878 <header_from>example.com</header_from>
3879 </identifiers>
3880 <auth_results>
3881 <dkim>
3882 <domain>example.com</domain>
3883 <result>pass</result>
3884 <human_result>verify result: all signatures verified</human_result>
3885 </dkim>
3886 <spf>
3887 <domain>chinaopen.com.cn</domain>
3888 <result>none</result>
3889 </spf>
3890 </auth_results>
3891 </record>
3892 <record>
3893 <row>
3894 <source_ip>58.39.145.97</source_ip>
3895 <count>6</count>
3896 <policy_evaluated>
3897 <disposition>reject</disposition>
3898 <dkim>fail</dkim>
3899 <spf>fail</spf>
3900 </policy_evaluated>
3901 </row>
3902 <identifiers>
3903 <header_from>example.com</header_from>
3904 </identifiers>
3905 <auth_results>
3906 <spf>
3907 <domain>example.com</domain>
3908 <result>fail</result>
3909 </spf>
3910 </auth_results>
3911 </record>
3912 <record>
3913 <row>
3914 <source_ip>74.125.245.82</source_ip>
3915 <count>1</count>
3916 <policy_evaluated>
3917 <disposition>none</disposition>
3918 <dkim>pass</dkim>
3919 <spf>pass</spf>
3920 </policy_evaluated>
3921 </row>
3922 <identifiers>
3923 <header_from>example.com</header_from>
3924 </identifiers>
3925 <auth_results>
3926 <dkim>
3927 <domain>example.com</domain>
3928 <result>pass</result>
3929 <human_result>verify result: all signatures verified</human_result>
3930 </dkim>
3931 <spf>
3932 <domain>brown.edu</domain>
3933 <result>pass</result>
3934 </spf>
3935 </auth_results>
3936 </record>
3937 <record>
3938 <row>
3939 <source_ip>220.181.12.65</source_ip>
3940 <count>4</count>
3941 <policy_evaluated>
3942 <disposition>none</disposition>
3943 <dkim>pass</dkim>
3944 <spf>pass</spf>
3945 </policy_evaluated>
3946 </row>
3947 <identifiers>
3948 <header_from>example.com</header_from>
3949 </identifiers>
3950 <auth_results>
3951 <dkim>
3952 <domain>example.com</domain>
3953 <result>pass</result>
3954 <human_result>verify result: all signatures verified</human_result>
3955 </dkim>
3956 <spf>
3957 <domain>163.com</domain>
3958 <result>pass</result>
3959 </spf>
3960 </auth_results>
3961 </record>
3962 <record>
3963 <row>
3964 <source_ip>209.85.160.48</source_ip>
3965 <count>6</count>
3966 <policy_evaluated>
3967 <disposition>none</disposition>
3968 <dkim>pass</dkim>
3969 <spf>pass</spf>
3970 </policy_evaluated>
3971 </row>
3972 <identifiers>
3973 <header_from>example.com</header_from>
3974 </identifiers>
3975 <auth_results>
3976 <dkim>
3977 <domain>example.com</domain>
3978 <result>pass</result>
3979 <human_result>verify result: all signatures verified</human_result>
3980 </dkim>
3981 <spf>
3982 <domain>gmail.com</domain>
3983 <result>pass</result>
3984 </spf>
3985 </auth_results>
3986 </record>
3987 <record>
3988 <row>
3989 <source_ip>209.85.160.49</source_ip>
3990 <count>2</count>
3991 <policy_evaluated>
3992 <disposition>none</disposition>
3993 <dkim>pass</dkim>
3994 <spf>pass</spf>
3995 </policy_evaluated>
3996 </row>
3997 <identifiers>
3998 <header_from>example.com</header_from>
3999 </identifiers>
4000 <auth_results>
4001 <dkim>
4002 <domain>example.com</domain>
4003 <result>pass</result>
4004 <human_result>verify result: all signatures verified</human_result>
4005 </dkim>
4006 <spf>
4007 <domain>gmail.com</domain>
4008 <result>pass</result>
4009 </spf>
4010 </auth_results>
4011 </record>
4012 <record>
4013 <row>
4014 <source_ip>209.85.160.42</source_ip>
4015 <count>6</count>
4016 <policy_evaluated>
4017 <disposition>none</disposition>
4018 <dkim>pass</dkim>
4019 <spf>pass</spf>
4020 </policy_evaluated>
4021 </row>
4022 <identifiers>
4023 <header_from>example.com</header_from>
4024 </identifiers>
4025 <auth_results>
4026 <dkim>
4027 <domain>example.com</domain>
4028 <result>pass</result>
4029 <human_result>verify result: all signatures verified</human_result>
4030 </dkim>
4031 <spf>
4032 <domain>gmail.com</domain>
4033 <result>pass</result>
4034 </spf>
4035 </auth_results>
4036 </record>
4037 <record>
4038 <row>
4039 <source_ip>209.85.160.43</source_ip>
4040 <count>8</count>
4041 <policy_evaluated>
4042 <disposition>none</disposition>
4043 <dkim>pass</dkim>
4044 <spf>pass</spf>
4045 </policy_evaluated>
4046 </row>
4047 <identifiers>
4048 <header_from>example.com</header_from>
4049 </identifiers>
4050 <auth_results>
4051 <dkim>
4052 <domain>example.com</domain>
4053 <result>pass</result>
4054 <human_result>verify result: all signatures verified</human_result>
4055 </dkim>
4056 <spf>
4057 <domain>gmail.com</domain>
4058 <result>pass</result>
4059 </spf>
4060 </auth_results>
4061 </record>
4062 <record>
4063 <row>
4064 <source_ip>66.220.144.151</source_ip>
4065 <count>2087</count>
4066 <policy_evaluated>
4067 <disposition>none</disposition>
4068 <dkim>pass</dkim>
4069 <spf>pass</spf>
4070 </policy_evaluated>
4071 </row>
4072 <identifiers>
4073 <header_from>pages.example.com, example.com</header_from>
4074 </identifiers>
4075 <auth_results>
4076 <dkim>
4077 <domain>pages.example.com</domain>
4078 <result>pass</result>
4079 <human_result>verify result: all signatures verified</human_result>
4080 </dkim>
4081 <dkim>
4082 <domain>example.com</domain>
4083 <result>pass</result>
4084 <human_result>verify result: all signatures verified</human_result>
4085 </dkim>
4086 <spf>
4087 <domain>pages.example.com</domain>
4088 <result>neutral</result>
4089 </spf>
4090 <spf>
4091 <domain>example.com</domain>
4092 <result>pass</result>
4093 </spf>
4094 </auth_results>
4095 </record>
4096 <record>
4097 <row>
4098 <source_ip>66.220.144.150</source_ip>
4099 <count>2105</count>
4100 <policy_evaluated>
4101 <disposition>none</disposition>
4102 <dkim>pass</dkim>
4103 <spf>pass</spf>
4104 </policy_evaluated>
4105 </row>
4106 <identifiers>
4107 <header_from>pages.example.com, example.com</header_from>
4108 </identifiers>
4109 <auth_results>
4110 <dkim>
4111 <domain>pages.example.com</domain>
4112 <result>pass</result>
4113 <human_result>verify result: all signatures verified</human_result>
4114 </dkim>
4115 <dkim>
4116 <domain>example.com</domain>
4117 <result>pass</result>
4118 <human_result>verify result: all signatures verified</human_result>
4119 </dkim>
4120 <spf>
4121 <domain>pages.example.com</domain>
4122 <result>pass</result>
4123 </spf>
4124 <spf>
4125 <domain>example.com</domain>
4126 <result>pass</result>
4127 </spf>
4128 </auth_results>
4129 </record>
4130 <record>
4131 <row>
4132 <source_ip>209.85.160.46</source_ip>
4133 <count>5</count>
4134 <policy_evaluated>
4135 <disposition>none</disposition>
4136 <dkim>pass</dkim>
4137 <spf>pass</spf>
4138 </policy_evaluated>
4139 </row>
4140 <identifiers>
4141 <header_from>example.com</header_from>
4142 </identifiers>
4143 <auth_results>
4144 <dkim>
4145 <domain>example.com</domain>
4146 <result>pass</result>
4147 <human_result>verify result: all signatures verified</human_result>
4148 </dkim>
4149 <spf>
4150 <domain>gmail.com</domain>
4151 <result>pass</result>
4152 </spf>
4153 </auth_results>
4154 </record>
4155 <record>
4156 <row>
4157 <source_ip>66.220.144.156</source_ip>
4158 <count>2145</count>
4159 <policy_evaluated>
4160 <disposition>none</disposition>
4161 <dkim>pass</dkim>
4162 <spf>pass</spf>
4163 </policy_evaluated>
4164 </row>
4165 <identifiers>
4166 <header_from>pages.example.com, example.com</header_from>
4167 </identifiers>
4168 <auth_results>
4169 <dkim>
4170 <domain>pages.example.com</domain>
4171 <result>pass</result>
4172 <human_result>verify result: all signatures verified</human_result>
4173 </dkim>
4174 <dkim>
4175 <domain>example.com</domain>
4176 <result>pass</result>
4177 <human_result>verify result: all signatures verified</human_result>
4178 </dkim>
4179 <spf>
4180 <domain>pages.example.com</domain>
4181 <result>neutral</result>
4182 </spf>
4183 <spf>
4184 <domain>example.com</domain>
4185 <result>pass</result>
4186 </spf>
4187 </auth_results>
4188 </record>
4189 <record>
4190 <row>
4191 <source_ip>209.85.160.44</source_ip>
4192 <count>3</count>
4193 <policy_evaluated>
4194 <disposition>none</disposition>
4195 <dkim>pass</dkim>
4196 <spf>pass</spf>
4197 </policy_evaluated>
4198 </row>
4199 <identifiers>
4200 <header_from>example.com</header_from>
4201 </identifiers>
4202 <auth_results>
4203 <dkim>
4204 <domain>example.com</domain>
4205 <result>pass</result>
4206 <human_result>verify result: all signatures verified</human_result>
4207 </dkim>
4208 <spf>
4209 <domain>gmail.com</domain>
4210 <result>pass</result>
4211 </spf>
4212 </auth_results>
4213 </record>
4214 <record>
4215 <row>
4216 <source_ip>66.220.144.154</source_ip>
4217 <count>2061</count>
4218 <policy_evaluated>
4219 <disposition>none</disposition>
4220 <dkim>pass</dkim>
4221 <spf>pass</spf>
4222 </policy_evaluated>
4223 </row>
4224 <identifiers>
4225 <header_from>pages.example.com, example.com</header_from>
4226 </identifiers>
4227 <auth_results>
4228 <dkim>
4229 <domain>pages.example.com</domain>
4230 <result>pass</result>
4231 <human_result>verify result: all signatures verified</human_result>
4232 </dkim>
4233 <dkim>
4234 <domain>example.com</domain>
4235 <result>pass</result>
4236 <human_result>verify result: all signatures verified</human_result>
4237 </dkim>
4238 <spf>
4239 <domain>pages.example.com</domain>
4240 <result>neutral</result>
4241 </spf>
4242 <spf>
4243 <domain>example.com</domain>
4244 <result>pass</result>
4245 </spf>
4246 </auth_results>
4247 </record>
4248 <record>
4249 <row>
4250 <source_ip>121.197.249.161</source_ip>
4251 <count>1</count>
4252 <policy_evaluated>
4253 <disposition>reject</disposition>
4254 <dkim>fail</dkim>
4255 <spf>fail</spf>
4256 </policy_evaluated>
4257 </row>
4258 <identifiers>
4259 <header_from>example.com</header_from>
4260 </identifiers>
4261 <auth_results>
4262 <dkim>
4263 <domain>example.com</domain>
4264 <result>fail</result>
4265 <human_result>signature error: RSA verify failed</human_result>
4266 </dkim>
4267 <spf>
4268 <domain>gangxing.com.cn</domain>
4269 <result>none</result>
4270 </spf>
4271 </auth_results>
4272 </record>
4273 <record>
4274 <row>
4275 <source_ip>220.181.12.95</source_ip>
4276 <count>3</count>
4277 <policy_evaluated>
4278 <disposition>none</disposition>
4279 <dkim>pass</dkim>
4280 <spf>pass</spf>
4281 </policy_evaluated>
4282 </row>
4283 <identifiers>
4284 <header_from>example.com</header_from>
4285 </identifiers>
4286 <auth_results>
4287 <dkim>
4288 <domain>example.com</domain>
4289 <result>pass</result>
4290 <human_result>verify result: all signatures verified</human_result>
4291 </dkim>
4292 <spf>
4293 <domain>163.com</domain>
4294 <result>pass</result>
4295 </spf>
4296 </auth_results>
4297 </record>
4298 <record>
4299 <row>
4300 <source_ip>69.171.232.148</source_ip>
4301 <count>3678</count>
4302 <policy_evaluated>
4303 <disposition>none</disposition>
4304 <dkim>pass</dkim>
4305 <spf>pass</spf>
4306 </policy_evaluated>
4307 </row>
4308 <identifiers>
4309 <header_from>example.com</header_from>
4310 </identifiers>
4311 <auth_results>
4312 <dkim>
4313 <domain>example.com</domain>
4314 <result>pass</result>
4315 <human_result>verify result: all signatures verified</human_result>
4316 </dkim>
4317 <spf>
4318 <domain>example.com</domain>
4319 <result>pass</result>
4320 </spf>
4321 </auth_results>
4322 </record>
4323 <record>
4324 <row>
4325 <source_ip>218.102.53.104</source_ip>
4326 <count>2</count>
4327 <policy_evaluated>
4328 <disposition>none</disposition>
4329 <dkim>pass</dkim>
4330 <spf>fail</spf>
4331 </policy_evaluated>
4332 </row>
4333 <identifiers>
4334 <header_from>example.com</header_from>
4335 </identifiers>
4336 <auth_results>
4337 <dkim>
4338 <domain>example.com</domain>
4339 <result>pass</result>
4340 <human_result>verify result: all signatures verified</human_result>
4341 </dkim>
4342 <spf>
4343 <domain>example.com</domain>
4344 <result>fail</result>
4345 </spf>
4346 </auth_results>
4347 </record>
4348 <record>
4349 <row>
4350 <source_ip>69.171.232.146</source_ip>
4351 <count>3610</count>
4352 <policy_evaluated>
4353 <disposition>none</disposition>
4354 <dkim>pass</dkim>
4355 <spf>pass</spf>
4356 </policy_evaluated>
4357 </row>
4358 <identifiers>
4359 <header_from>example.com</header_from>
4360 </identifiers>
4361 <auth_results>
4362 <dkim>
4363 <domain>example.com</domain>
4364 <result>pass</result>
4365 <human_result>verify result: all signatures verified</human_result>
4366 </dkim>
4367 <spf>
4368 <domain>example.com</domain>
4369 <result>pass</result>
4370 </spf>
4371 </auth_results>
4372 </record>
4373 <record>
4374 <row>
4375 <source_ip>69.171.232.147</source_ip>
4376 <count>3568</count>
4377 <policy_evaluated>
4378 <disposition>none</disposition>
4379 <dkim>pass</dkim>
4380 <spf>pass</spf>
4381 </policy_evaluated>
4382 </row>
4383 <identifiers>
4384 <header_from>example.com</header_from>
4385 </identifiers>
4386 <auth_results>
4387 <dkim>
4388 <domain>example.com</domain>
4389 <result>pass</result>
4390 <human_result>verify result: all signatures verified</human_result>
4391 </dkim>
4392 <spf>
4393 <domain>example.com</domain>
4394 <result>pass</result>
4395 </spf>
4396 </auth_results>
4397 </record>
4398 <record>
4399 <row>
4400 <source_ip>69.171.232.144</source_ip>
4401 <count>3589</count>
4402 <policy_evaluated>
4403 <disposition>none</disposition>
4404 <dkim>pass</dkim>
4405 <spf>pass</spf>
4406 </policy_evaluated>
4407 </row>
4408 <identifiers>
4409 <header_from>pages.example.com, example.com</header_from>
4410 </identifiers>
4411 <auth_results>
4412 <dkim>
4413 <domain>pages.example.com</domain>
4414 <result>pass</result>
4415 <human_result>verify result: all signatures verified</human_result>
4416 </dkim>
4417 <dkim>
4418 <domain>example.com</domain>
4419 <result>pass</result>
4420 <human_result>verify result: all signatures verified</human_result>
4421 </dkim>
4422 <spf>
4423 <domain>pages.example.com</domain>
4424 <result>neutral</result>
4425 </spf>
4426 <spf>
4427 <domain>example.com</domain>
4428 <result>pass</result>
4429 </spf>
4430 </auth_results>
4431 </record>
4432 <record>
4433 <row>
4434 <source_ip>69.171.232.145</source_ip>
4435 <count>3712</count>
4436 <policy_evaluated>
4437 <disposition>none</disposition>
4438 <dkim>pass</dkim>
4439 <spf>pass</spf>
4440 </policy_evaluated>
4441 </row>
4442 <identifiers>
4443 <header_from>example.com</header_from>
4444 </identifiers>
4445 <auth_results>
4446 <dkim>
4447 <domain>example.com</domain>
4448 <result>pass</result>
4449 <human_result>verify result: all signatures verified</human_result>
4450 </dkim>
4451 <spf>
4452 <domain>example.com</domain>
4453 <result>pass</result>
4454 </spf>
4455 </auth_results>
4456 </record>
4457 <record>
4458 <row>
4459 <source_ip>69.171.232.142</source_ip>
4460 <count>3621</count>
4461 <policy_evaluated>
4462 <disposition>none</disposition>
4463 <dkim>pass</dkim>
4464 <spf>pass</spf>
4465 </policy_evaluated>
4466 </row>
4467 <identifiers>
4468 <header_from>example.com</header_from>
4469 </identifiers>
4470 <auth_results>
4471 <dkim>
4472 <domain>example.com</domain>
4473 <result>pass</result>
4474 <human_result>verify result: all signatures verified</human_result>
4475 </dkim>
4476 <spf>
4477 <domain>example.com</domain>
4478 <result>pass</result>
4479 </spf>
4480 </auth_results>
4481 </record>
4482 <record>
4483 <row>
4484 <source_ip>69.171.232.143</source_ip>
4485 <count>3615</count>
4486 <policy_evaluated>
4487 <disposition>none</disposition>
4488 <dkim>pass</dkim>
4489 <spf>pass</spf>
4490 </policy_evaluated>
4491 </row>
4492 <identifiers>
4493 <header_from>pages.example.com, example.com</header_from>
4494 </identifiers>
4495 <auth_results>
4496 <dkim>
4497 <domain>pages.example.com</domain>
4498 <result>pass</result>
4499 <human_result>verify result: all signatures verified</human_result>
4500 </dkim>
4501 <dkim>
4502 <domain>example.com</domain>
4503 <result>pass</result>
4504 <human_result>verify result: all signatures verified</human_result>
4505 </dkim>
4506 <spf>
4507 <domain>pages.example.com</domain>
4508 <result>neutral</result>
4509 </spf>
4510 <spf>
4511 <domain>example.com</domain>
4512 <result>pass</result>
4513 </spf>
4514 </auth_results>
4515 </record>
4516 <record>
4517 <row>
4518 <source_ip>69.171.232.140</source_ip>
4519 <count>3589</count>
4520 <policy_evaluated>
4521 <disposition>none</disposition>
4522 <dkim>pass</dkim>
4523 <spf>pass</spf>
4524 </policy_evaluated>
4525 </row>
4526 <identifiers>
4527 <header_from>pages.example.com, example.com</header_from>
4528 </identifiers>
4529 <auth_results>
4530 <dkim>
4531 <domain>pages.example.com</domain>
4532 <result>pass</result>
4533 <human_result>verify result: all signatures verified</human_result>
4534 </dkim>
4535 <dkim>
4536 <domain>example.com</domain>
4537 <result>pass</result>
4538 <human_result>verify result: all signatures verified</human_result>
4539 </dkim>
4540 <spf>
4541 <domain>pages.example.com</domain>
4542 <result>pass</result>
4543 </spf>
4544 <spf>
4545 <domain>example.com</domain>
4546 <result>pass</result>
4547 </spf>
4548 </auth_results>
4549 </record>
4550 <record>
4551 <row>
4552 <source_ip>69.171.232.141</source_ip>
4553 <count>3522</count>
4554 <policy_evaluated>
4555 <disposition>none</disposition>
4556 <dkim>pass</dkim>
4557 <spf>pass</spf>
4558 </policy_evaluated>
4559 </row>
4560 <identifiers>
4561 <header_from>example.com</header_from>
4562 </identifiers>
4563 <auth_results>
4564 <dkim>
4565 <domain>example.com</domain>
4566 <result>pass</result>
4567 <human_result>verify result: all signatures verified</human_result>
4568 </dkim>
4569 <spf>
4570 <domain>example.com</domain>
4571 <result>pass</result>
4572 </spf>
4573 </auth_results>
4574 </record>
4575 <record>
4576 <row>
4577 <source_ip>58.62.246.233</source_ip>
4578 <count>8</count>
4579 <policy_evaluated>
4580 <disposition>reject</disposition>
4581 <dkim>fail</dkim>
4582 <spf>fail</spf>
4583 </policy_evaluated>
4584 </row>
4585 <identifiers>
4586 <header_from>example.com</header_from>
4587 </identifiers>
4588 <auth_results>
4589 <spf>
4590 <domain>example.com</domain>
4591 <result>fail</result>
4592 </spf>
4593 </auth_results>
4594 </record>
4595 <record>
4596 <row>
4597 <source_ip>116.7.60.166</source_ip>
4598 <count>8</count>
4599 <policy_evaluated>
4600 <disposition>reject</disposition>
4601 <dkim>fail</dkim>
4602 <spf>fail</spf>
4603 </policy_evaluated>
4604 </row>
4605 <identifiers>
4606 <header_from>example.com</header_from>
4607 </identifiers>
4608 <auth_results>
4609 <spf>
4610 <domain>example.com</domain>
4611 <result>fail</result>
4612 </spf>
4613 </auth_results>
4614 </record>
4615 <record>
4616 <row>
4617 <source_ip>59.61.170.22</source_ip>
4618 <count>12</count>
4619 <policy_evaluated>
4620 <disposition>reject</disposition>
4621 <dkim>fail</dkim>
4622 <spf>fail</spf>
4623 </policy_evaluated>
4624 </row>
4625 <identifiers>
4626 <header_from>example.com</header_from>
4627 </identifiers>
4628 <auth_results>
4629 <spf>
4630 <domain>example.com</domain>
4631 <result>fail</result>
4632 </spf>
4633 </auth_results>
4634 </record>
4635 <record>
4636 <row>
4637 <source_ip>112.64.170.138</source_ip>
4638 <count>17</count>
4639 <policy_evaluated>
4640 <disposition>reject</disposition>
4641 <dkim>fail</dkim>
4642 <spf>fail</spf>
4643 </policy_evaluated>
4644 </row>
4645 <identifiers>
4646 <header_from>example.com</header_from>
4647 </identifiers>
4648 <auth_results>
4649 <spf>
4650 <domain>example.com</domain>
4651 <result>fail</result>
4652 </spf>
4653 </auth_results>
4654 </record>
4655 <record>
4656 <row>
4657 <source_ip>123.58.178.105</source_ip>
4658 <count>1</count>
4659 <policy_evaluated>
4660 <disposition>none</disposition>
4661 <dkim>pass</dkim>
4662 <spf>fail</spf>
4663 </policy_evaluated>
4664 </row>
4665 <identifiers>
4666 <header_from>example.com</header_from>
4667 </identifiers>
4668 <auth_results>
4669 <dkim>
4670 <domain>example.com</domain>
4671 <result>pass</result>
4672 <human_result>verify result: all signatures verified</human_result>
4673 </dkim>
4674 <spf>
4675 <domain>medicalsystem.cn</domain>
4676 <result>none</result>
4677 </spf>
4678 </auth_results>
4679 </record>
4680 <record>
4681 <row>
4682 <source_ip>113.97.163.65</source_ip>
4683 <count>28</count>
4684 <policy_evaluated>
4685 <disposition>reject</disposition>
4686 <dkim>fail</dkim>
4687 <spf>fail</spf>
4688 </policy_evaluated>
4689 </row>
4690 <identifiers>
4691 <header_from>example.com</header_from>
4692 </identifiers>
4693 <auth_results>
4694 <spf>
4695 <domain>example.com</domain>
4696 <result>fail</result>
4697 </spf>
4698 </auth_results>
4699 </record>
4700 <record>
4701 <row>
4702 <source_ip>209.85.220.182</source_ip>
4703 <count>1</count>
4704 <policy_evaluated>
4705 <disposition>none</disposition>
4706 <dkim>pass</dkim>
4707 <spf>pass</spf>
4708 </policy_evaluated>
4709 </row>
4710 <identifiers>
4711 <header_from>example.com</header_from>
4712 </identifiers>
4713 <auth_results>
4714 <dkim>
4715 <domain>example.com</domain>
4716 <result>pass</result>
4717 <human_result>verify result: all signatures verified</human_result>
4718 </dkim>
4719 <spf>
4720 <domain>gmail.com</domain>
4721 <result>pass</result>
4722 </spf>
4723 </auth_results>
4724 </record>
4725 <record>
4726 <row>
4727 <source_ip>209.85.212.169</source_ip>
4728 <count>2</count>
4729 <policy_evaluated>
4730 <disposition>none</disposition>
4731 <dkim>pass</dkim>
4732 <spf>pass</spf>
4733 </policy_evaluated>
4734 </row>
4735 <identifiers>
4736 <header_from>example.com</header_from>
4737 </identifiers>
4738 <auth_results>
4739 <dkim>
4740 <domain>example.com</domain>
4741 <result>pass</result>
4742 <human_result>verify result: all signatures verified</human_result>
4743 </dkim>
4744 <spf>
4745 <domain>gmail.com</domain>
4746 <result>pass</result>
4747 </spf>
4748 </auth_results>
4749 </record>
4750 <record>
4751 <row>
4752 <source_ip>220.181.13.234</source_ip>
4753 <count>1</count>
4754 <policy_evaluated>
4755 <disposition>reject</disposition>
4756 <dkim>fail</dkim>
4757 <spf>fail</spf>
4758 </policy_evaluated>
4759 </row>
4760 <identifiers>
4761 <header_from>example.com</header_from>
4762 </identifiers>
4763 <auth_results>
4764 <spf>
4765 <domain>tslines.com.cn</domain>
4766 <result>none</result>
4767 </spf>
4768 </auth_results>
4769 </record>
4770 <record>
4771 <row>
4772 <source_ip>69.171.232.149</source_ip>
4773 <count>3577</count>
4774 <policy_evaluated>
4775 <disposition>none</disposition>
4776 <dkim>pass</dkim>
4777 <spf>pass</spf>
4778 </policy_evaluated>
4779 </row>
4780 <identifiers>
4781 <header_from>pages.example.com, example.com</header_from>
4782 </identifiers>
4783 <auth_results>
4784 <dkim>
4785 <domain>pages.example.com</domain>
4786 <result>pass</result>
4787 <human_result>verify result: all signatures verified</human_result>
4788 </dkim>
4789 <dkim>
4790 <domain>example.com</domain>
4791 <result>pass</result>
4792 <human_result>verify result: all signatures verified</human_result>
4793 </dkim>
4794 <spf>
4795 <domain>pages.example.com</domain>
4796 <result>pass</result>
4797 </spf>
4798 <spf>
4799 <domain>example.com</domain>
4800 <result>pass</result>
4801 </spf>
4802 </auth_results>
4803 </record>
4804 <record>
4805 <row>
4806 <source_ip>209.85.213.169</source_ip>
4807 <count>2</count>
4808 <policy_evaluated>
4809 <disposition>none</disposition>
4810 <dkim>pass</dkim>
4811 <spf>pass</spf>
4812 </policy_evaluated>
4813 </row>
4814 <identifiers>
4815 <header_from>example.com</header_from>
4816 </identifiers>
4817 <auth_results>
4818 <dkim>
4819 <domain>example.com</domain>
4820 <result>pass</result>
4821 <human_result>verify result: all signatures verified</human_result>
4822 </dkim>
4823 <spf>
4824 <domain>gmail.com</domain>
4825 <result>pass</result>
4826 </spf>
4827 </auth_results>
4828 </record>
4829 <record>
4830 <row>
4831 <source_ip>123.58.177.170</source_ip>
4832 <count>1</count>
4833 <policy_evaluated>
4834 <disposition>none</disposition>
4835 <dkim>pass</dkim>
4836 <spf>pass</spf>
4837 </policy_evaluated>
4838 </row>
4839 <identifiers>
4840 <header_from>example.com</header_from>
4841 </identifiers>
4842 <auth_results>
4843 <dkim>
4844 <domain>example.com</domain>
4845 <result>pass</result>
4846 <human_result>verify result: all signatures verified</human_result>
4847 </dkim>
4848 <spf>
4849 <domain>vip.163.com</domain>
4850 <result>pass</result>
4851 </spf>
4852 </auth_results>
4853 </record>
4854 <record>
4855 <row>
4856 <source_ip>121.14.53.131</source_ip>
4857 <count>2</count>
4858 <policy_evaluated>
4859 <disposition>none</disposition>
4860 <dkim>pass</dkim>
4861 <spf>pass</spf>
4862 </policy_evaluated>
4863 </row>
4864 <identifiers>
4865 <header_from>example.com</header_from>
4866 </identifiers>
4867 <auth_results>
4868 <dkim>
4869 <domain>example.com</domain>
4870 <result>pass</result>
4871 <human_result>verify result: all signatures verified</human_result>
4872 </dkim>
4873 <spf>
4874 <domain>189.cn</domain>
4875 <result>pass</result>
4876 </spf>
4877 </auth_results>
4878 </record>
4879 <record>
4880 <row>
4881 <source_ip>129.186.140.46</source_ip>
4882 <count>1</count>
4883 <policy_evaluated>
4884 <disposition>none</disposition>
4885 <dkim>pass</dkim>
4886 <spf>fail</spf>
4887 </policy_evaluated>
4888 </row>
4889 <identifiers>
4890 <header_from>example.com</header_from>
4891 </identifiers>
4892 <auth_results>
4893 <dkim>
4894 <domain>example.com</domain>
4895 <result>pass</result>
4896 <human_result>verify result: all signatures verified</human_result>
4897 </dkim>
4898 <spf>
4899 <domain>example.com</domain>
4900 <result>neutral</result>
4901 </spf>
4902 </auth_results>
4903 </record>
4904 <record>
4905 <row>
4906 <source_ip>58.64.130.198</source_ip>
4907 <count>1</count>
4908 <policy_evaluated>
4909 <disposition>none</disposition>
4910 <dkim>pass</dkim>
4911 <spf>fail</spf>
4912 </policy_evaluated>
4913 </row>
4914 <identifiers>
4915 <header_from>example.com</header_from>
4916 </identifiers>
4917 <auth_results>
4918 <dkim>
4919 <domain>example.com</domain>
4920 <result>pass</result>
4921 <human_result>verify result: all signatures verified</human_result>
4922 </dkim>
4923 <spf>
4924 <domain>server02.site4host.com</domain>
4925 <result>none</result>
4926 </spf>
4927 </auth_results>
4928 </record>
4929 <record>
4930 <row>
4931 <source_ip>209.85.212.42</source_ip>
4932 <count>9</count>
4933 <policy_evaluated>
4934 <disposition>none</disposition>
4935 <dkim>pass</dkim>
4936 <spf>pass</spf>
4937 </policy_evaluated>
4938 </row>
4939 <identifiers>
4940 <header_from>example.com</header_from>
4941 </identifiers>
4942 <auth_results>
4943 <dkim>
4944 <domain>example.com</domain>
4945 <result>pass</result>
4946 <human_result>verify result: all signatures verified</human_result>
4947 </dkim>
4948 <spf>
4949 <domain>crimson.ua.edu</domain>
4950 <result>none</result>
4951 </spf>
4952 <spf>
4953 <domain>paxex.com.hk</domain>
4954 <result>none</result>
4955 </spf>
4956 <spf>
4957 <domain>gmail.com</domain>
4958 <result>pass</result>
4959 </spf>
4960 </auth_results>
4961 </record>
4962 <record>
4963 <row>
4964 <source_ip>209.85.212.43</source_ip>
4965 <count>6</count>
4966 <policy_evaluated>
4967 <disposition>none</disposition>
4968 <dkim>pass</dkim>
4969 <spf>fail</spf>
4970 </policy_evaluated>
4971 </row>
4972 <identifiers>
4973 <header_from>example.com</header_from>
4974 </identifiers>
4975 <auth_results>
4976 <dkim>
4977 <domain>example.com</domain>
4978 <result>pass</result>
4979 <human_result>verify result: all signatures verified</human_result>
4980 </dkim>
4981 <spf>
4982 <domain>gmail.com</domain>
4983 <result>pass</result>
4984 </spf>
4985 <spf>
4986 <domain>paxex.com.hk</domain>
4987 <result>none</result>
4988 </spf>
4989 </auth_results>
4990 </record>
4991 <record>
4992 <row>
4993 <source_ip>209.85.212.41</source_ip>
4994 <count>5</count>
4995 <policy_evaluated>
4996 <disposition>none</disposition>
4997 <dkim>pass</dkim>
4998 <spf>pass</spf>
4999 </policy_evaluated>
5000 </row>
5001 <identifiers>
5002 <header_from>example.com</header_from>
5003 </identifiers>
5004 <auth_results>
5005 <dkim>
5006 <domain>example.com</domain>
5007 <result>pass</result>
5008 <human_result>verify result: all signatures verified</human_result>
5009 </dkim>
5010 <spf>
5011 <domain>paxex.com.hk</domain>
5012 <result>none</result>
5013 </spf>
5014 <spf>
5015 <domain>gmail.com</domain>
5016 <result>pass</result>
5017 </spf>
5018 </auth_results>
5019 </record>
5020 <record>
5021 <row>
5022 <source_ip>209.85.212.46</source_ip>
5023 <count>6</count>
5024 <policy_evaluated>
5025 <disposition>none</disposition>
5026 <dkim>pass</dkim>
5027 <spf>pass</spf>
5028 </policy_evaluated>
5029 </row>
5030 <identifiers>
5031 <header_from>example.com</header_from>
5032 </identifiers>
5033 <auth_results>
5034 <dkim>
5035 <domain>example.com</domain>
5036 <result>pass</result>
5037 <human_result>verify result: all signatures verified</human_result>
5038 </dkim>
5039 <spf>
5040 <domain>paxex.com.hk</domain>
5041 <result>none</result>
5042 </spf>
5043 <spf>
5044 <domain>gmail.com</domain>
5045 <result>pass</result>
5046 </spf>
5047 </auth_results>
5048 </record>
5049 <record>
5050 <row>
5051 <source_ip>209.85.212.47</source_ip>
5052 <count>7</count>
5053 <policy_evaluated>
5054 <disposition>none</disposition>
5055 <dkim>pass</dkim>
5056 <spf>pass</spf>
5057 </policy_evaluated>
5058 </row>
5059 <identifiers>
5060 <header_from>example.com</header_from>
5061 </identifiers>
5062 <auth_results>
5063 <dkim>
5064 <domain>example.com</domain>
5065 <result>pass</result>
5066 <human_result>verify result: all signatures verified</human_result>
5067 </dkim>
5068 <spf>
5069 <domain>paxex.com.hk</domain>
5070 <result>none</result>
5071 </spf>
5072 <spf>
5073 <domain>gmail.com</domain>
5074 <result>pass</result>
5075 </spf>
5076 </auth_results>
5077 </record>
5078 <record>
5079 <row>
5080 <source_ip>209.85.212.44</source_ip>
5081 <count>9</count>
5082 <policy_evaluated>
5083 <disposition>none</disposition>
5084 <dkim>pass</dkim>
5085 <spf>pass</spf>
5086 </policy_evaluated>
5087 </row>
5088 <identifiers>
5089 <header_from>example.com</header_from>
5090 </identifiers>
5091 <auth_results>
5092 <dkim>
5093 <domain>example.com</domain>
5094 <result>pass</result>
5095 <human_result>verify result: all signatures verified</human_result>
5096 </dkim>
5097 <spf>
5098 <domain>paxex.com.hk</domain>
5099 <result>none</result>
5100 </spf>
5101 <spf>
5102 <domain>gmail.com</domain>
5103 <result>pass</result>
5104 </spf>
5105 </auth_results>
5106 </record>
5107 <record>
5108 <row>
5109 <source_ip>209.85.212.45</source_ip>
5110 <count>5</count>
5111 <policy_evaluated>
5112 <disposition>none</disposition>
5113 <dkim>pass</dkim>
5114 <spf>pass</spf>
5115 </policy_evaluated>
5116 </row>
5117 <identifiers>
5118 <header_from>example.com</header_from>
5119 </identifiers>
5120 <auth_results>
5121 <dkim>
5122 <domain>example.com</domain>
5123 <result>pass</result>
5124 <human_result>verify result: all signatures verified</human_result>
5125 </dkim>
5126 <spf>
5127 <domain>paxex.com.hk</domain>
5128 <result>none</result>
5129 </spf>
5130 <spf>
5131 <domain>gmail.com</domain>
5132 <result>pass</result>
5133 </spf>
5134 </auth_results>
5135 </record>
5136 <record>
5137 <row>
5138 <source_ip>209.85.212.48</source_ip>
5139 <count>2</count>
5140 <policy_evaluated>
5141 <disposition>none</disposition>
5142 <dkim>pass</dkim>
5143 <spf>pass</spf>
5144 </policy_evaluated>
5145 </row>
5146 <identifiers>
5147 <header_from>example.com</header_from>
5148 </identifiers>
5149 <auth_results>
5150 <dkim>
5151 <domain>example.com</domain>
5152 <result>pass</result>
5153 <human_result>verify result: all signatures verified</human_result>
5154 </dkim>
5155 <spf>
5156 <domain>gmail.com</domain>
5157 <result>pass</result>
5158 </spf>
5159 </auth_results>
5160 </record>
5161 <record>
5162 <row>
5163 <source_ip>209.85.210.54</source_ip>
5164 <count>4</count>
5165 <policy_evaluated>
5166 <disposition>none</disposition>
5167 <dkim>pass</dkim>
5168 <spf>pass</spf>
5169 </policy_evaluated>
5170 </row>
5171 <identifiers>
5172 <header_from>example.com</header_from>
5173 </identifiers>
5174 <auth_results>
5175 <dkim>
5176 <domain>example.com</domain>
5177 <result>pass</result>
5178 <human_result>verify result: all signatures verified</human_result>
5179 </dkim>
5180 <spf>
5181 <domain>gmail.com</domain>
5182 <result>pass</result>
5183 </spf>
5184 </auth_results>
5185 </record>
5186 <record>
5187 <row>
5188 <source_ip>209.85.210.53</source_ip>
5189 <count>6</count>
5190 <policy_evaluated>
5191 <disposition>none</disposition>
5192 <dkim>pass</dkim>
5193 <spf>pass</spf>
5194 </policy_evaluated>
5195 </row>
5196 <identifiers>
5197 <header_from>example.com</header_from>
5198 </identifiers>
5199 <auth_results>
5200 <dkim>
5201 <domain>example.com</domain>
5202 <result>pass</result>
5203 <human_result>verify result: all signatures verified</human_result>
5204 </dkim>
5205 <spf>
5206 <domain>gmail.com</domain>
5207 <result>pass</result>
5208 </spf>
5209 </auth_results>
5210 </record>
5211 <record>
5212 <row>
5213 <source_ip>209.85.210.52</source_ip>
5214 <count>4</count>
5215 <policy_evaluated>
5216 <disposition>none</disposition>
5217 <dkim>pass</dkim>
5218 <spf>pass</spf>
5219 </policy_evaluated>
5220 </row>
5221 <identifiers>
5222 <header_from>example.com</header_from>
5223 </identifiers>
5224 <auth_results>
5225 <dkim>
5226 <domain>example.com</domain>
5227 <result>pass</result>
5228 <human_result>verify result: all signatures verified</human_result>
5229 </dkim>
5230 <spf>
5231 <domain>gmail.com</domain>
5232 <result>pass</result>
5233 </spf>
5234 </auth_results>
5235 </record>
5236 <record>
5237 <row>
5238 <source_ip>209.85.210.51</source_ip>
5239 <count>6</count>
5240 <policy_evaluated>
5241 <disposition>none</disposition>
5242 <dkim>pass</dkim>
5243 <spf>pass</spf>
5244 </policy_evaluated>
5245 </row>
5246 <identifiers>
5247 <header_from>example.com</header_from>
5248 </identifiers>
5249 <auth_results>
5250 <dkim>
5251 <domain>example.com</domain>
5252 <result>pass</result>
5253 <human_result>verify result: all signatures verified</human_result>
5254 </dkim>
5255 <spf>
5256 <domain>gmail.com</domain>
5257 <result>pass</result>
5258 </spf>
5259 </auth_results>
5260 </record>
5261 <record>
5262 <row>
5263 <source_ip>209.85.210.50</source_ip>
5264 <count>5</count>
5265 <policy_evaluated>
5266 <disposition>none</disposition>
5267 <dkim>pass</dkim>
5268 <spf>pass</spf>
5269 </policy_evaluated>
5270 </row>
5271 <identifiers>
5272 <header_from>example.com</header_from>
5273 </identifiers>
5274 <auth_results>
5275 <dkim>
5276 <domain>example.com</domain>
5277 <result>pass</result>
5278 <human_result>verify result: all signatures verified</human_result>
5279 </dkim>
5280 <spf>
5281 <domain>gmail.com</domain>
5282 <result>pass</result>
5283 </spf>
5284 <spf>
5285 <domain>aucklanduni.ac.nz</domain>
5286 <result>pass</result>
5287 </spf>
5288 </auth_results>
5289 </record>
5290 <record>
5291 <row>
5292 <source_ip>58.241.193.59</source_ip>
5293 <count>23</count>
5294 <policy_evaluated>
5295 <disposition>reject</disposition>
5296 <dkim>fail</dkim>
5297 <spf>fail</spf>
5298 </policy_evaluated>
5299 </row>
5300 <identifiers>
5301 <header_from>example.com</header_from>
5302 </identifiers>
5303 <auth_results>
5304 <spf>
5305 <domain>example.com</domain>
5306 <result>fail</result>
5307 </spf>
5308 </auth_results>
5309 </record>
5310 <record>
5311 <row>
5312 <source_ip>113.91.150.44</source_ip>
5313 <count>3</count>
5314 <policy_evaluated>
5315 <disposition>reject</disposition>
5316 <dkim>fail</dkim>
5317 <spf>fail</spf>
5318 </policy_evaluated>
5319 </row>
5320 <identifiers>
5321 <header_from>example.com</header_from>
5322 </identifiers>
5323 <auth_results>
5324 <spf>
5325 <domain>example.com</domain>
5326 <result>fail</result>
5327 </spf>
5328 </auth_results>
5329 </record>
5330 <record>
5331 <row>
5332 <source_ip>14.221.178.144</source_ip>
5333 <count>13</count>
5334 <policy_evaluated>
5335 <disposition>reject</disposition>
5336 <dkim>fail</dkim>
5337 <spf>fail</spf>
5338 </policy_evaluated>
5339 </row>
5340 <identifiers>
5341 <header_from>example.com</header_from>
5342 </identifiers>
5343 <auth_results>
5344 <spf>
5345 <domain>example.com</domain>
5346 <result>fail</result>
5347 </spf>
5348 </auth_results>
5349 </record>
5350 <record>
5351 <row>
5352 <source_ip>119.145.16.60</source_ip>
5353 <count>3</count>
5354 <policy_evaluated>
5355 <disposition>reject</disposition>
5356 <dkim>fail</dkim>
5357 <spf>fail</spf>
5358 </policy_evaluated>
5359 </row>
5360 <identifiers>
5361 <header_from>example.com</header_from>
5362 </identifiers>
5363 <auth_results>
5364 <spf>
5365 <domain>example.com</domain>
5366 <result>fail</result>
5367 </spf>
5368 </auth_results>
5369 </record>
5370 <record>
5371 <row>
5372 <source_ip>117.195.65.231</source_ip>
5373 <count>1</count>
5374 <policy_evaluated>
5375 <disposition>reject</disposition>
5376 <dkim>fail</dkim>
5377 <spf>fail</spf>
5378 </policy_evaluated>
5379 </row>
5380 <identifiers>
5381 <header_from>example.com</header_from>
5382 </identifiers>
5383 <auth_results>
5384 <spf>
5385 <domain>example.com</domain>
5386 <result>fail</result>
5387 </spf>
5388 </auth_results>
5389 </record>
5390 <record>
5391 <row>
5392 <source_ip>65.55.90.239</source_ip>
5393 <count>8</count>
5394 <policy_evaluated>
5395 <disposition>none</disposition>
5396 <dkim>pass</dkim>
5397 <spf>pass</spf>
5398 </policy_evaluated>
5399 </row>
5400 <identifiers>
5401 <header_from>example.com</header_from>
5402 </identifiers>
5403 <auth_results>
5404 <dkim>
5405 <domain>example.com</domain>
5406 <result>pass</result>
5407 <human_result>verify result: all signatures verified</human_result>
5408 </dkim>
5409 <spf>
5410 <domain>live.cn</domain>
5411 <result>pass</result>
5412 </spf>
5413 <spf>
5414 <domain>hotmail.com</domain>
5415 <result>pass</result>
5416 </spf>
5417 </auth_results>
5418 </record>
5419 <record>
5420 <row>
5421 <source_ip>65.55.90.238</source_ip>
5422 <count>6</count>
5423 <policy_evaluated>
5424 <disposition>none</disposition>
5425 <dkim>pass</dkim>
5426 <spf>pass</spf>
5427 </policy_evaluated>
5428 </row>
5429 <identifiers>
5430 <header_from>example.com</header_from>
5431 </identifiers>
5432 <auth_results>
5433 <dkim>
5434 <domain>example.com</domain>
5435 <result>pass</result>
5436 <human_result>verify result: all signatures verified</human_result>
5437 </dkim>
5438 <spf>
5439 <domain>hotmail.com</domain>
5440 <result>pass</result>
5441 </spf>
5442 </auth_results>
5443 </record>
5444 <record>
5445 <row>
5446 <source_ip>209.85.160.53</source_ip>
5447 <count>3</count>
5448 <policy_evaluated>
5449 <disposition>none</disposition>
5450 <dkim>pass</dkim>
5451 <spf>pass</spf>
5452 </policy_evaluated>
5453 </row>
5454 <identifiers>
5455 <header_from>example.com</header_from>
5456 </identifiers>
5457 <auth_results>
5458 <dkim>
5459 <domain>example.com</domain>
5460 <result>pass</result>
5461 <human_result>verify result: all signatures verified</human_result>
5462 </dkim>
5463 <spf>
5464 <domain>gmail.com</domain>
5465 <result>pass</result>
5466 </spf>
5467 </auth_results>
5468 </record>
5469 <record>
5470 <row>
5471 <source_ip>65.55.90.233</source_ip>
5472 <count>10</count>
5473 <policy_evaluated>
5474 <disposition>none</disposition>
5475 <dkim>pass</dkim>
5476 <spf>pass</spf>
5477 </policy_evaluated>
5478 </row>
5479 <identifiers>
5480 <header_from>example.com</header_from>
5481 </identifiers>
5482 <auth_results>
5483 <dkim>
5484 <domain>example.com</domain>
5485 <result>pass</result>
5486 <human_result>verify result: all signatures verified</human_result>
5487 </dkim>
5488 <spf>
5489 <domain>hotmail.it</domain>
5490 <result>pass</result>
5491 </spf>
5492 <spf>
5493 <domain>hotmail.com</domain>
5494 <result>pass</result>
5495 </spf>
5496 </auth_results>
5497 </record>
5498 <record>
5499 <row>
5500 <source_ip>65.55.90.232</source_ip>
5501 <count>6</count>
5502 <policy_evaluated>
5503 <disposition>none</disposition>
5504 <dkim>pass</dkim>
5505 <spf>pass</spf>
5506 </policy_evaluated>
5507 </row>
5508 <identifiers>
5509 <header_from>example.com</header_from>
5510 </identifiers>
5511 <auth_results>
5512 <dkim>
5513 <domain>example.com</domain>
5514 <result>pass</result>
5515 <human_result>verify result: all signatures verified</human_result>
5516 </dkim>
5517 <spf>
5518 <domain>hotmail.com</domain>
5519 <result>pass</result>
5520 </spf>
5521 </auth_results>
5522 </record>
5523 <record>
5524 <row>
5525 <source_ip>65.55.90.231</source_ip>
5526 <count>10</count>
5527 <policy_evaluated>
5528 <disposition>none</disposition>
5529 <dkim>pass</dkim>
5530 <spf>pass</spf>
5531 </policy_evaluated>
5532 </row>
5533 <identifiers>
5534 <header_from>example.com</header_from>
5535 </identifiers>
5536 <auth_results>
5537 <dkim>
5538 <domain>example.com</domain>
5539 <result>pass</result>
5540 <human_result>verify result: all signatures verified</human_result>
5541 </dkim>
5542 <spf>
5543 <domain>hotmail.de</domain>
5544 <result>pass</result>
5545 </spf>
5546 <spf>
5547 <domain>hotmail.it</domain>
5548 <result>pass</result>
5549 </spf>
5550 <spf>
5551 <domain>hotmail.com</domain>
5552 <result>pass</result>
5553 </spf>
5554 </auth_results>
5555 </record>
5556 <record>
5557 <row>
5558 <source_ip>65.55.90.230</source_ip>
5559 <count>5</count>
5560 <policy_evaluated>
5561 <disposition>none</disposition>
5562 <dkim>pass</dkim>
5563 <spf>pass</spf>
5564 </policy_evaluated>
5565 </row>
5566 <identifiers>
5567 <header_from>example.com</header_from>
5568 </identifiers>
5569 <auth_results>
5570 <dkim>
5571 <domain>example.com</domain>
5572 <result>pass</result>
5573 <human_result>verify result: all signatures verified</human_result>
5574 </dkim>
5575 <spf>
5576 <domain>hotmail.de</domain>
5577 <result>pass</result>
5578 </spf>
5579 <spf>
5580 <domain>hotmail.it</domain>
5581 <result>pass</result>
5582 </spf>
5583 <spf>
5584 <domain>hotmail.com</domain>
5585 <result>pass</result>
5586 </spf>
5587 </auth_results>
5588 </record>
5589 <record>
5590 <row>
5591 <source_ip>65.55.90.237</source_ip>
5592 <count>4</count>
5593 <policy_evaluated>
5594 <disposition>none</disposition>
5595 <dkim>pass</dkim>
5596 <spf>pass</spf>
5597 </policy_evaluated>
5598 </row>
5599 <identifiers>
5600 <header_from>example.com</header_from>
5601 </identifiers>
5602 <auth_results>
5603 <dkim>
5604 <domain>example.com</domain>
5605 <result>pass</result>
5606 <human_result>verify result: all signatures verified</human_result>
5607 </dkim>
5608 <spf>
5609 <domain>hotmail.de</domain>
5610 <result>pass</result>
5611 </spf>
5612 <spf>
5613 <domain>hotmail.com</domain>
5614 <result>pass</result>
5615 </spf>
5616 </auth_results>
5617 </record>
5618 <record>
5619 <row>
5620 <source_ip>65.55.90.236</source_ip>
5621 <count>9</count>
5622 <policy_evaluated>
5623 <disposition>none</disposition>
5624 <dkim>pass</dkim>
5625 <spf>pass</spf>
5626 </policy_evaluated>
5627 </row>
5628 <identifiers>
5629 <header_from>example.com</header_from>
5630 </identifiers>
5631 <auth_results>
5632 <dkim>
5633 <domain>example.com</domain>
5634 <result>pass</result>
5635 <human_result>verify result: all signatures verified</human_result>
5636 </dkim>
5637 <spf>
5638 <domain>hotmail.fr</domain>
5639 <result>pass</result>
5640 </spf>
5641 <spf>
5642 <domain>hotmail.com</domain>
5643 <result>pass</result>
5644 </spf>
5645 </auth_results>
5646 </record>
5647 <record>
5648 <row>
5649 <source_ip>65.55.90.235</source_ip>
5650 <count>4</count>
5651 <policy_evaluated>
5652 <disposition>none</disposition>
5653 <dkim>pass</dkim>
5654 <spf>pass</spf>
5655 </policy_evaluated>
5656 </row>
5657 <identifiers>
5658 <header_from>example.com</header_from>
5659 </identifiers>
5660 <auth_results>
5661 <dkim>
5662 <domain>example.com</domain>
5663 <result>pass</result>
5664 <human_result>verify result: all signatures verified</human_result>
5665 </dkim>
5666 <spf>
5667 <domain>live.cn</domain>
5668 <result>pass</result>
5669 </spf>
5670 <spf>
5671 <domain>hotmail.com</domain>
5672 <result>pass</result>
5673 </spf>
5674 </auth_results>
5675 </record>
5676 <record>
5677 <row>
5678 <source_ip>65.55.90.234</source_ip>
5679 <count>8</count>
5680 <policy_evaluated>
5681 <disposition>none</disposition>
5682 <dkim>pass</dkim>
5683 <spf>pass</spf>
5684 </policy_evaluated>
5685 </row>
5686 <identifiers>
5687 <header_from>example.com</header_from>
5688 </identifiers>
5689 <auth_results>
5690 <dkim>
5691 <domain>example.com</domain>
5692 <result>pass</result>
5693 <human_result>verify result: all signatures verified</human_result>
5694 </dkim>
5695 <spf>
5696 <domain>hotmail.de</domain>
5697 <result>pass</result>
5698 </spf>
5699 <spf>
5700 <domain>hotmail.it</domain>
5701 <result>pass</result>
5702 </spf>
5703 <spf>
5704 <domain>hotmail.com</domain>
5705 <result>pass</result>
5706 </spf>
5707 </auth_results>
5708 </record>
5709 <record>
5710 <row>
5711 <source_ip>174.139.84.219</source_ip>
5712 <count>1</count>
5713 <policy_evaluated>
5714 <disposition>none</disposition>
5715 <dkim>pass</dkim>
5716 <spf>fail</spf>
5717 </policy_evaluated>
5718 </row>
5719 <identifiers>
5720 <header_from>example.com</header_from>
5721 </identifiers>
5722 <auth_results>
5723 <dkim>
5724 <domain>example.com</domain>
5725 <result>pass</result>
5726 <human_result>verify result: all signatures verified</human_result>
5727 </dkim>
5728 <spf>
5729 <domain>example.com</domain>
5730 <result>fail</result>
5731 </spf>
5732 </auth_results>
5733 </record>
5734 <record>
5735 <row>
5736 <source_ip>209.85.216.169</source_ip>
5737 <count>4</count>
5738 <policy_evaluated>
5739 <disposition>none</disposition>
5740 <dkim>pass</dkim>
5741 <spf>pass</spf>
5742 </policy_evaluated>
5743 </row>
5744 <identifiers>
5745 <header_from>example.com</header_from>
5746 </identifiers>
5747 <auth_results>
5748 <dkim>
5749 <domain>example.com</domain>
5750 <result>pass</result>
5751 <human_result>verify result: all signatures verified</human_result>
5752 </dkim>
5753 <spf>
5754 <domain>gmail.com</domain>
5755 <result>pass</result>
5756 </spf>
5757 </auth_results>
5758 </record>
5759 <record>
5760 <row>
5761 <source_ip>98.139.91.203</source_ip>
5762 <count>1</count>
5763 <policy_evaluated>
5764 <disposition>none</disposition>
5765 <dkim>pass</dkim>
5766 <spf>fail</spf>
5767 </policy_evaluated>
5768 </row>
5769 <identifiers>
5770 <header_from>example.com</header_from>
5771 </identifiers>
5772 <auth_results>
5773 <dkim>
5774 <domain>example.com</domain>
5775 <result>pass</result>
5776 <human_result>verify result: all signatures verified</human_result>
5777 </dkim>
5778 <spf>
5779 <domain>example.com</domain>
5780 <result>fail</result>
5781 </spf>
5782 </auth_results>
5783 </record>
5784 <record>
5785 <row>
5786 <source_ip>218.22.78.146</source_ip>
5787 <count>6</count>
5788 <policy_evaluated>
5789 <disposition>reject</disposition>
5790 <dkim>fail</dkim>
5791 <spf>fail</spf>
5792 </policy_evaluated>
5793 </row>
5794 <identifiers>
5795 <header_from>example.com</header_from>
5796 </identifiers>
5797 <auth_results>
5798 <spf>
5799 <domain>example.com</domain>
5800 <result>fail</result>
5801 </spf>
5802 </auth_results>
5803 </record>
5804 <record>
5805 <row>
5806 <source_ip>218.78.214.8</source_ip>
5807 <count>4</count>
5808 <policy_evaluated>
5809 <disposition>reject</disposition>
5810 <dkim>fail</dkim>
5811 <spf>fail</spf>
5812 </policy_evaluated>
5813 </row>
5814 <identifiers>
5815 <header_from>example.com</header_from>
5816 </identifiers>
5817 <auth_results>
5818 <dkim>
5819 <domain>example.com</domain>
5820 <result>neutral</result>
5821 <human_result>sigature verify error: message body does not hash to bh value</human_result>
5822 </dkim>
5823 <spf>
5824 <domain>smmail.cn</domain>
5825 <result>none</result>
5826 </spf>
5827 </auth_results>
5828 </record>
5829 <record>
5830 <row>
5831 <source_ip>209.85.216.48</source_ip>
5832 <count>1</count>
5833 <policy_evaluated>
5834 <disposition>none</disposition>
5835 <dkim>pass</dkim>
5836 <spf>pass</spf>
5837 </policy_evaluated>
5838 </row>
5839 <identifiers>
5840 <header_from>example.com</header_from>
5841 </identifiers>
5842 <auth_results>
5843 <dkim>
5844 <domain>example.com</domain>
5845 <result>pass</result>
5846 <human_result>verify result: all signatures verified</human_result>
5847 </dkim>
5848 <spf>
5849 <domain>gmail.com</domain>
5850 <result>pass</result>
5851 </spf>
5852 </auth_results>
5853 </record>
5854 <record>
5855 <row>
5856 <source_ip>209.85.216.49</source_ip>
5857 <count>4</count>
5858 <policy_evaluated>
5859 <disposition>none</disposition>
5860 <dkim>pass</dkim>
5861 <spf>pass</spf>
5862 </policy_evaluated>
5863 </row>
5864 <identifiers>
5865 <header_from>example.com</header_from>
5866 </identifiers>
5867 <auth_results>
5868 <dkim>
5869 <domain>example.com</domain>
5870 <result>pass</result>
5871 <human_result>verify result: all signatures verified</human_result>
5872 </dkim>
5873 <spf>
5874 <domain>gmail.com</domain>
5875 <result>pass</result>
5876 </spf>
5877 </auth_results>
5878 </record>
5879 <record>
5880 <row>
5881 <source_ip>209.85.216.46</source_ip>
5882 <count>1</count>
5883 <policy_evaluated>
5884 <disposition>none</disposition>
5885 <dkim>pass</dkim>
5886 <spf>pass</spf>
5887 </policy_evaluated>
5888 </row>
5889 <identifiers>
5890 <header_from>example.com</header_from>
5891 </identifiers>
5892 <auth_results>
5893 <dkim>
5894 <domain>example.com</domain>
5895 <result>pass</result>
5896 <human_result>verify result: all signatures verified</human_result>
5897 </dkim>
5898 <spf>
5899 <domain>gmail.com</domain>
5900 <result>pass</result>
5901 </spf>
5902 </auth_results>
5903 </record>
5904 <record>
5905 <row>
5906 <source_ip>209.85.216.47</source_ip>
5907 <count>4</count>
5908 <policy_evaluated>
5909 <disposition>none</disposition>
5910 <dkim>pass</dkim>
5911 <spf>pass</spf>
5912 </policy_evaluated>
5913 </row>
5914 <identifiers>
5915 <header_from>example.com</header_from>
5916 </identifiers>
5917 <auth_results>
5918 <dkim>
5919 <domain>example.com</domain>
5920 <result>pass</result>
5921 <human_result>verify result: all signatures verified</human_result>
5922 </dkim>
5923 <spf>
5924 <domain>gmail.com</domain>
5925 <result>pass</result>
5926 </spf>
5927 </auth_results>
5928 </record>
5929 <record>
5930 <row>
5931 <source_ip>209.85.216.44</source_ip>
5932 <count>1</count>
5933 <policy_evaluated>
5934 <disposition>none</disposition>
5935 <dkim>pass</dkim>
5936 <spf>pass</spf>
5937 </policy_evaluated>
5938 </row>
5939 <identifiers>
5940 <header_from>example.com</header_from>
5941 </identifiers>
5942 <auth_results>
5943 <dkim>
5944 <domain>example.com</domain>
5945 <result>pass</result>
5946 <human_result>verify result: all signatures verified</human_result>
5947 </dkim>
5948 <spf>
5949 <domain>gmail.com</domain>
5950 <result>pass</result>
5951 </spf>
5952 </auth_results>
5953 </record>
5954 <record>
5955 <row>
5956 <source_ip>209.85.216.45</source_ip>
5957 <count>5</count>
5958 <policy_evaluated>
5959 <disposition>none</disposition>
5960 <dkim>pass</dkim>
5961 <spf>pass</spf>
5962 </policy_evaluated>
5963 </row>
5964 <identifiers>
5965 <header_from>example.com</header_from>
5966 </identifiers>
5967 <auth_results>
5968 <dkim>
5969 <domain>example.com</domain>
5970 <result>pass</result>
5971 <human_result>verify result: all signatures verified</human_result>
5972 </dkim>
5973 <spf>
5974 <domain>gmail.com</domain>
5975 <result>pass</result>
5976 </spf>
5977 </auth_results>
5978 </record>
5979 <record>
5980 <row>
5981 <source_ip>209.85.216.42</source_ip>
5982 <count>3</count>
5983 <policy_evaluated>
5984 <disposition>none</disposition>
5985 <dkim>pass</dkim>
5986 <spf>pass</spf>
5987 </policy_evaluated>
5988 </row>
5989 <identifiers>
5990 <header_from>example.com</header_from>
5991 </identifiers>
5992 <auth_results>
5993 <dkim>
5994 <domain>example.com</domain>
5995 <result>pass</result>
5996 <human_result>verify result: all signatures verified</human_result>
5997 </dkim>
5998 <spf>
5999 <domain>gmail.com</domain>
6000 <result>pass</result>
6001 </spf>
6002 </auth_results>
6003 </record>
6004 <record>
6005 <row>
6006 <source_ip>209.85.216.43</source_ip>
6007 <count>2</count>
6008 <policy_evaluated>
6009 <disposition>none</disposition>
6010 <dkim>pass</dkim>
6011 <spf>pass</spf>
6012 </policy_evaluated>
6013 </row>
6014 <identifiers>
6015 <header_from>example.com</header_from>
6016 </identifiers>
6017 <auth_results>
6018 <dkim>
6019 <domain>example.com</domain>
6020 <result>pass</result>
6021 <human_result>verify result: all signatures verified</human_result>
6022 </dkim>
6023 <spf>
6024 <domain>gmail.com</domain>
6025 <result>pass</result>
6026 </spf>
6027 </auth_results>
6028 </record>
6029 <record>
6030 <row>
6031 <source_ip>209.85.216.41</source_ip>
6032 <count>1</count>
6033 <policy_evaluated>
6034 <disposition>none</disposition>
6035 <dkim>pass</dkim>
6036 <spf>pass</spf>
6037 </policy_evaluated>
6038 </row>
6039 <identifiers>
6040 <header_from>example.com</header_from>
6041 </identifiers>
6042 <auth_results>
6043 <dkim>
6044 <domain>example.com</domain>
6045 <result>pass</result>
6046 <human_result>verify result: all signatures verified</human_result>
6047 </dkim>
6048 <spf>
6049 <domain>gmail.com</domain>
6050 <result>pass</result>
6051 </spf>
6052 </auth_results>
6053 </record>
6054 <record>
6055 <row>
6056 <source_ip>114.113.31.1</source_ip>
6057 <count>1</count>
6058 <policy_evaluated>
6059 <disposition>reject</disposition>
6060 <dkim>fail</dkim>
6061 <spf>fail</spf>
6062 </policy_evaluated>
6063 </row>
6064 <identifiers>
6065 <header_from>example.com</header_from>
6066 </identifiers>
6067 <auth_results>
6068 <spf>
6069 <domain>example.com</domain>
6070 <result>fail</result>
6071 </spf>
6072 </auth_results>
6073 </record>
6074 <record>
6075 <row>
6076 <source_ip>183.23.239.178</source_ip>
6077 <count>6</count>
6078 <policy_evaluated>
6079 <disposition>reject</disposition>
6080 <dkim>fail</dkim>
6081 <spf>fail</spf>
6082 </policy_evaluated>
6083 </row>
6084 <identifiers>
6085 <header_from>example.com</header_from>
6086 </identifiers>
6087 <auth_results>
6088 <spf>
6089 <domain>example.com</domain>
6090 <result>fail</result>
6091 </spf>
6092 </auth_results>
6093 </record>
6094 <record>
6095 <row>
6096 <source_ip>113.108.23.40</source_ip>
6097 <count>2</count>
6098 <policy_evaluated>
6099 <disposition>none</disposition>
6100 <dkim>pass</dkim>
6101 <spf>pass</spf>
6102 </policy_evaluated>
6103 </row>
6104 <identifiers>
6105 <header_from>example.com</header_from>
6106 </identifiers>
6107 <auth_results>
6108 <dkim>
6109 <domain>example.com</domain>
6110 <result>pass</result>
6111 <human_result>verify result: all signatures verified</human_result>
6112 </dkim>
6113 <spf>
6114 <domain>qq.com</domain>
6115 <result>pass</result>
6116 </spf>
6117 </auth_results>
6118 </record>
6119 <record>
6120 <row>
6121 <source_ip>65.55.34.204</source_ip>
6122 <count>16</count>
6123 <policy_evaluated>
6124 <disposition>none</disposition>
6125 <dkim>pass</dkim>
6126 <spf>pass</spf>
6127 </policy_evaluated>
6128 </row>
6129 <identifiers>
6130 <header_from>example.com</header_from>
6131 </identifiers>
6132 <auth_results>
6133 <dkim>
6134 <domain>example.com</domain>
6135 <result>pass</result>
6136 <human_result>verify result: all signatures verified</human_result>
6137 </dkim>
6138 <spf>
6139 <domain>hotmail.de</domain>
6140 <result>pass</result>
6141 </spf>
6142 <spf>
6143 <domain>hotmail.it</domain>
6144 <result>pass</result>
6145 </spf>
6146 <spf>
6147 <domain>hotmail.com</domain>
6148 <result>pass</result>
6149 </spf>
6150 </auth_results>
6151 </record>
6152 <record>
6153 <row>
6154 <source_ip>65.55.34.204</source_ip>
6155 <count>1</count>
6156 <policy_evaluated>
6157 <disposition>reject</disposition>
6158 <dkim>fail</dkim>
6159 <spf>pass</spf>
6160 </policy_evaluated>
6161 </row>
6162 <identifiers>
6163 <header_from>example.com</header_from>
6164 </identifiers>
6165 <auth_results>
6166 <dkim>
6167 <domain>example.com</domain>
6168 <result>fail</result>
6169 <human_result>signature error: RSA verify failed</human_result>
6170 </dkim>
6171 <spf>
6172 <domain>hotmail.com</domain>
6173 <result>pass</result>
6174 </spf>
6175 </auth_results>
6176 </record>
6177 <record>
6178 <row>
6179 <source_ip>65.55.34.205</source_ip>
6180 <count>22</count>
6181 <policy_evaluated>
6182 <disposition>none</disposition>
6183 <dkim>pass</dkim>
6184 <spf>pass</spf>
6185 </policy_evaluated>
6186 </row>
6187 <identifiers>
6188 <header_from>example.com</header_from>
6189 </identifiers>
6190 <auth_results>
6191 <dkim>
6192 <domain>example.com</domain>
6193 <result>pass</result>
6194 <human_result>verify result: all signatures verified</human_result>
6195 </dkim>
6196 <spf>
6197 <domain>hotmail.de</domain>
6198 <result>pass</result>
6199 </spf>
6200 <spf>
6201 <domain>hotmail.it</domain>
6202 <result>pass</result>
6203 </spf>
6204 <spf>
6205 <domain>live.com</domain>
6206 <result>pass</result>
6207 </spf>
6208 <spf>
6209 <domain>live.cn</domain>
6210 <result>pass</result>
6211 </spf>
6212 <spf>
6213 <domain>hotmail.com</domain>
6214 <result>pass</result>
6215 </spf>
6216 </auth_results>
6217 </record>
6218 <record>
6219 <row>
6220 <source_ip>65.55.34.206</source_ip>
6221 <count>18</count>
6222 <policy_evaluated>
6223 <disposition>none</disposition>
6224 <dkim>pass</dkim>
6225 <spf>pass</spf>
6226 </policy_evaluated>
6227 </row>
6228 <identifiers>
6229 <header_from>example.com</header_from>
6230 </identifiers>
6231 <auth_results>
6232 <dkim>
6233 <domain>example.com</domain>
6234 <result>pass</result>
6235 <human_result>verify result: all signatures verified</human_result>
6236 </dkim>
6237 <spf>
6238 <domain>hotmail.de</domain>
6239 <result>pass</result>
6240 </spf>
6241 <spf>
6242 <domain>hotmail.it</domain>
6243 <result>pass</result>
6244 </spf>
6245 <spf>
6246 <domain>hotmail.com</domain>
6247 <result>pass</result>
6248 </spf>
6249 </auth_results>
6250 </record>
6251 <record>
6252 <row>
6253 <source_ip>65.55.34.207</source_ip>
6254 <count>21</count>
6255 <policy_evaluated>
6256 <disposition>none</disposition>
6257 <dkim>pass</dkim>
6258 <spf>pass</spf>
6259 </policy_evaluated>
6260 </row>
6261 <identifiers>
6262 <header_from>pages.example.com, example.com</header_from>
6263 </identifiers>
6264 <auth_results>
6265 <dkim>
6266 <domain>pages.example.com</domain>
6267 <result>pass</result>
6268 <human_result>verify result: all signatures verified</human_result>
6269 </dkim>
6270 <dkim>
6271 <domain>example.com</domain>
6272 <result>pass</result>
6273 <human_result>verify result: all signatures verified</human_result>
6274 </dkim>
6275 <spf>
6276 <domain>hotmail.de</domain>
6277 <result>pass</result>
6278 </spf>
6279 <spf>
6280 <domain>hotmail.it</domain>
6281 <result>pass</result>
6282 </spf>
6283 <spf>
6284 <domain>hotmail.com</domain>
6285 <result>pass</result>
6286 </spf>
6287 </auth_results>
6288 </record>
6289 <record>
6290 <row>
6291 <source_ip>65.55.34.203</source_ip>
6292 <count>15</count>
6293 <policy_evaluated>
6294 <disposition>none</disposition>
6295 <dkim>pass</dkim>
6296 <spf>pass</spf>
6297 </policy_evaluated>
6298 </row>
6299 <identifiers>
6300 <header_from>example.com</header_from>
6301 </identifiers>
6302 <auth_results>
6303 <dkim>
6304 <domain>example.com</domain>
6305 <result>pass</result>
6306 <human_result>verify result: all signatures verified</human_result>
6307 </dkim>
6308 <spf>
6309 <domain>hotmail.de</domain>
6310 <result>pass</result>
6311 </spf>
6312 <spf>
6313 <domain>hotmail.it</domain>
6314 <result>pass</result>
6315 </spf>
6316 <spf>
6317 <domain>hotmail.com</domain>
6318 <result>pass</result>
6319 </spf>
6320 </auth_results>
6321 </record>
6322 <record>
6323 <row>
6324 <source_ip>74.125.82.169</source_ip>
6325 <count>6</count>
6326 <policy_evaluated>
6327 <disposition>none</disposition>
6328 <dkim>pass</dkim>
6329 <spf>pass</spf>
6330 </policy_evaluated>
6331 </row>
6332 <identifiers>
6333 <header_from>example.com</header_from>
6334 </identifiers>
6335 <auth_results>
6336 <dkim>
6337 <domain>example.com</domain>
6338 <result>pass</result>
6339 <human_result>verify result: all signatures verified</human_result>
6340 </dkim>
6341 <spf>
6342 <domain>gmail.com</domain>
6343 <result>pass</result>
6344 </spf>
6345 </auth_results>
6346 </record>
6347 <record>
6348 <row>
6349 <source_ip>216.32.181.184</source_ip>
6350 <count>1</count>
6351 <policy_evaluated>
6352 <disposition>reject</disposition>
6353 <dkim>fail</dkim>
6354 <spf>pass</spf>
6355 </policy_evaluated>
6356 </row>
6357 <identifiers>
6358 <header_from>example.com</header_from>
6359 </identifiers>
6360 <auth_results>
6361 <dkim>
6362 <domain>example.com</domain>
6363 <result>neutral</result>
6364 <human_result>sigature verify error: message body does not hash to bh value</human_result>
6365 </dkim>
6366 <spf>
6367 <domain>connect.polyu.hk</domain>
6368 <result>pass</result>
6369 </spf>
6370 </auth_results>
6371 </record>
6372 <record>
6373 <row>
6374 <source_ip>65.55.34.208</source_ip>
6375 <count>19</count>
6376 <policy_evaluated>
6377 <disposition>none</disposition>
6378 <dkim>pass</dkim>
6379 <spf>pass</spf>
6380 </policy_evaluated>
6381 </row>
6382 <identifiers>
6383 <header_from>example.com</header_from>
6384 </identifiers>
6385 <auth_results>
6386 <dkim>
6387 <domain>example.com</domain>
6388 <result>pass</result>
6389 <human_result>verify result: all signatures verified</human_result>
6390 </dkim>
6391 <spf>
6392 <domain>hotmail.es</domain>
6393 <result>none</result>
6394 </spf>
6395 <spf>
6396 <domain>hotmail.it</domain>
6397 <result>pass</result>
6398 </spf>
6399 <spf>
6400 <domain>hotmail.com</domain>
6401 <result>pass</result>
6402 </spf>
6403 </auth_results>
6404 </record>
6405 <record>
6406 <row>
6407 <source_ip>65.55.34.209</source_ip>
6408 <count>28</count>
6409 <policy_evaluated>
6410 <disposition>none</disposition>
6411 <dkim>pass</dkim>
6412 <spf>pass</spf>
6413 </policy_evaluated>
6414 </row>
6415 <identifiers>
6416 <header_from>example.com</header_from>
6417 </identifiers>
6418 <auth_results>
6419 <dkim>
6420 <domain>example.com</domain>
6421 <result>pass</result>
6422 <human_result>verify result: all signatures verified</human_result>
6423 </dkim>
6424 <spf>
6425 <domain>msn.com</domain>
6426 <result>pass</result>
6427 </spf>
6428 <spf>
6429 <domain>hotmail.de</domain>
6430 <result>pass</result>
6431 </spf>
6432 <spf>
6433 <domain>hotmail.com</domain>
6434 <result>pass</result>
6435 </spf>
6436 </auth_results>
6437 </record>
6438 <record>
6439 <row>
6440 <source_ip>209.85.215.169</source_ip>
6441 <count>1</count>
6442 <policy_evaluated>
6443 <disposition>none</disposition>
6444 <dkim>pass</dkim>
6445 <spf>pass</spf>
6446 </policy_evaluated>
6447 </row>
6448 <identifiers>
6449 <header_from>example.com</header_from>
6450 </identifiers>
6451 <auth_results>
6452 <dkim>
6453 <domain>example.com</domain>
6454 <result>pass</result>
6455 <human_result>verify result: all signatures verified</human_result>
6456 </dkim>
6457 <spf>
6458 <domain>gmail.com</domain>
6459 <result>pass</result>
6460 </spf>
6461 </auth_results>
6462 </record>
6463 <record>
6464 <row>
6465 <source_ip>221.224.112.124</source_ip>
6466 <count>86</count>
6467 <policy_evaluated>
6468 <disposition>reject</disposition>
6469 <dkim>fail</dkim>
6470 <spf>fail</spf>
6471 </policy_evaluated>
6472 </row>
6473 <identifiers>
6474 <header_from>example.com</header_from>
6475 </identifiers>
6476 <auth_results>
6477 <spf>
6478 <domain>example.com</domain>
6479 <result>fail</result>
6480 </spf>
6481 </auth_results>
6482 </record>
6483 <record>
6484 <row>
6485 <source_ip>113.78.27.115</source_ip>
6486 <count>71</count>
6487 <policy_evaluated>
6488 <disposition>reject</disposition>
6489 <dkim>fail</dkim>
6490 <spf>fail</spf>
6491 </policy_evaluated>
6492 </row>
6493 <identifiers>
6494 <header_from>example.com</header_from>
6495 </identifiers>
6496 <auth_results>
6497 <spf>
6498 <domain>example.com</domain>
6499 <result>fail</result>
6500 </spf>
6501 </auth_results>
6502 </record>
6503 <record>
6504 <row>
6505 <source_ip>211.22.166.234</source_ip>
6506 <count>10</count>
6507 <policy_evaluated>
6508 <disposition>reject</disposition>
6509 <dkim>fail</dkim>
6510 <spf>fail</spf>
6511 </policy_evaluated>
6512 </row>
6513 <identifiers>
6514 <header_from>example.com</header_from>
6515 </identifiers>
6516 <auth_results>
6517 <spf>
6518 <domain>example.com</domain>
6519 <result>fail</result>
6520 </spf>
6521 </auth_results>
6522 </record>
6523 <record>
6524 <row>
6525 <source_ip>219.140.169.51</source_ip>
6526 <count>4</count>
6527 <policy_evaluated>
6528 <disposition>reject</disposition>
6529 <dkim>fail</dkim>
6530 <spf>fail</spf>
6531 </policy_evaluated>
6532 </row>
6533 <identifiers>
6534 <header_from>example.com</header_from>
6535 </identifiers>
6536 <auth_results>
6537 <spf>
6538 <domain>example.com</domain>
6539 <result>fail</result>
6540 </spf>
6541 </auth_results>
6542 </record>
6543 <record>
6544 <row>
6545 <source_ip>206.65.164.140</source_ip>
6546 <count>1</count>
6547 <policy_evaluated>
6548 <disposition>none</disposition>
6549 <dkim>pass</dkim>
6550 <spf>fail</spf>
6551 </policy_evaluated>
6552 </row>
6553 <identifiers>
6554 <header_from>example.com</header_from>
6555 </identifiers>
6556 <auth_results>
6557 <dkim>
6558 <domain>example.com</domain>
6559 <result>pass</result>
6560 <human_result>verify result: all signatures verified</human_result>
6561 </dkim>
6562 <spf>
6563 <domain>johnnylo.com</domain>
6564 <result>neutral</result>
6565 </spf>
6566 </auth_results>
6567 </record>
6568 <record>
6569 <row>
6570 <source_ip>66.220.144.162</source_ip>
6571 <count>38</count>
6572 <policy_evaluated>
6573 <disposition>none</disposition>
6574 <dkim>pass</dkim>
6575 <spf>pass</spf>
6576 </policy_evaluated>
6577 </row>
6578 <identifiers>
6579 <header_from>example.com</header_from>
6580 </identifiers>
6581 <auth_results>
6582 <dkim>
6583 <domain>example.com</domain>
6584 <result>pass</result>
6585 <human_result>verify result: all signatures verified</human_result>
6586 </dkim>
6587 <spf>
6588 <domain>example.com</domain>
6589 <result>pass</result>
6590 </spf>
6591 </auth_results>
6592 </record>
6593 <record>
6594 <row>
6595 <source_ip>66.220.144.163</source_ip>
6596 <count>44</count>
6597 <policy_evaluated>
6598 <disposition>none</disposition>
6599 <dkim>pass</dkim>
6600 <spf>pass</spf>
6601 </policy_evaluated>
6602 </row>
6603 <identifiers>
6604 <header_from>example.com</header_from>
6605 </identifiers>
6606 <auth_results>
6607 <dkim>
6608 <domain>example.com</domain>
6609 <result>pass</result>
6610 <human_result>verify result: all signatures verified</human_result>
6611 </dkim>
6612 <spf>
6613 <domain>example.com</domain>
6614 <result>pass</result>
6615 </spf>
6616 </auth_results>
6617 </record>
6618 <record>
6619 <row>
6620 <source_ip>66.220.144.160</source_ip>
6621 <count>30</count>
6622 <policy_evaluated>
6623 <disposition>none</disposition>
6624 <dkim>pass</dkim>
6625 <spf>pass</spf>
6626 </policy_evaluated>
6627 </row>
6628 <identifiers>
6629 <header_from>example.com</header_from>
6630 </identifiers>
6631 <auth_results>
6632 <dkim>
6633 <domain>example.com</domain>
6634 <result>pass</result>
6635 <human_result>verify result: all signatures verified</human_result>
6636 </dkim>
6637 <spf>
6638 <domain>example.com</domain>
6639 <result>pass</result>
6640 </spf>
6641 </auth_results>
6642 </record>
6643 <record>
6644 <row>
6645 <source_ip>66.220.144.161</source_ip>
6646 <count>26</count>
6647 <policy_evaluated>
6648 <disposition>none</disposition>
6649 <dkim>pass</dkim>
6650 <spf>pass</spf>
6651 </policy_evaluated>
6652 </row>
6653 <identifiers>
6654 <header_from>example.com</header_from>
6655 </identifiers>
6656 <auth_results>
6657 <dkim>
6658 <domain>example.com</domain>
6659 <result>pass</result>
6660 <human_result>verify result: all signatures verified</human_result>
6661 </dkim>
6662 <spf>
6663 <domain>example.com</domain>
6664 <result>pass</result>
6665 </spf>
6666 </auth_results>
6667 </record>
6668 <record>
6669 <row>
6670 <source_ip>66.220.144.166</source_ip>
6671 <count>37</count>
6672 <policy_evaluated>
6673 <disposition>none</disposition>
6674 <dkim>pass</dkim>
6675 <spf>pass</spf>
6676 </policy_evaluated>
6677 </row>
6678 <identifiers>
6679 <header_from>example.com</header_from>
6680 </identifiers>
6681 <auth_results>
6682 <dkim>
6683 <domain>example.com</domain>
6684 <result>pass</result>
6685 <human_result>verify result: all signatures verified</human_result>
6686 </dkim>
6687 <spf>
6688 <domain>example.com</domain>
6689 <result>pass</result>
6690 </spf>
6691 </auth_results>
6692 </record>
6693 <record>
6694 <row>
6695 <source_ip>66.220.144.167</source_ip>
6696 <count>31</count>
6697 <policy_evaluated>
6698 <disposition>none</disposition>
6699 <dkim>pass</dkim>
6700 <spf>pass</spf>
6701 </policy_evaluated>
6702 </row>
6703 <identifiers>
6704 <header_from>example.com</header_from>
6705 </identifiers>
6706 <auth_results>
6707 <dkim>
6708 <domain>example.com</domain>
6709 <result>pass</result>
6710 <human_result>verify result: all signatures verified</human_result>
6711 </dkim>
6712 <spf>
6713 <domain>example.com</domain>
6714 <result>pass</result>
6715 </spf>
6716 </auth_results>
6717 </record>
6718 <record>
6719 <row>
6720 <source_ip>66.220.144.164</source_ip>
6721 <count>29</count>
6722 <policy_evaluated>
6723 <disposition>none</disposition>
6724 <dkim>pass</dkim>
6725 <spf>pass</spf>
6726 </policy_evaluated>
6727 </row>
6728 <identifiers>
6729 <header_from>example.com</header_from>
6730 </identifiers>
6731 <auth_results>
6732 <dkim>
6733 <domain>example.com</domain>
6734 <result>pass</result>
6735 <human_result>verify result: all signatures verified</human_result>
6736 </dkim>
6737 <spf>
6738 <domain>example.com</domain>
6739 <result>pass</result>
6740 </spf>
6741 </auth_results>
6742 </record>
6743 <record>
6744 <row>
6745 <source_ip>66.220.144.165</source_ip>
6746 <count>37</count>
6747 <policy_evaluated>
6748 <disposition>none</disposition>
6749 <dkim>pass</dkim>
6750 <spf>pass</spf>
6751 </policy_evaluated>
6752 </row>
6753 <identifiers>
6754 <header_from>example.com</header_from>
6755 </identifiers>
6756 <auth_results>
6757 <dkim>
6758 <domain>example.com</domain>
6759 <result>pass</result>
6760 <human_result>verify result: all signatures verified</human_result>
6761 </dkim>
6762 <spf>
6763 <domain>example.com</domain>
6764 <result>pass</result>
6765 </spf>
6766 </auth_results>
6767 </record>
6768 <record>
6769 <row>
6770 <source_ip>168.95.4.112</source_ip>
6771 <count>1</count>
6772 <policy_evaluated>
6773 <disposition>reject</disposition>
6774 <dkim>fail</dkim>
6775 <spf>fail</spf>
6776 </policy_evaluated>
6777 </row>
6778 <identifiers>
6779 <header_from>example.com</header_from>
6780 </identifiers>
6781 <auth_results>
6782 <spf>
6783 <domain>example.com</domain>
6784 <result>neutral</result>
6785 </spf>
6786 </auth_results>
6787 </record>
6788 <record>
6789 <row>
6790 <source_ip>94.100.176.103</source_ip>
6791 <count>1</count>
6792 <policy_evaluated>
6793 <disposition>none</disposition>
6794 <dkim>pass</dkim>
6795 <spf>fail</spf>
6796 </policy_evaluated>
6797 </row>
6798 <identifiers>
6799 <header_from>example.com</header_from>
6800 </identifiers>
6801 <auth_results>
6802 <dkim>
6803 <domain>example.com</domain>
6804 <result>pass</result>
6805 <human_result>verify result: all signatures verified</human_result>
6806 </dkim>
6807 <spf>
6808 <domain>example.com</domain>
6809 <result>fail</result>
6810 </spf>
6811 </auth_results>
6812 </record>
6813 <record>
6814 <row>
6815 <source_ip>94.100.176.102</source_ip>
6816 <count>1</count>
6817 <policy_evaluated>
6818 <disposition>none</disposition>
6819 <dkim>pass</dkim>
6820 <spf>fail</spf>
6821 </policy_evaluated>
6822 </row>
6823 <identifiers>
6824 <header_from>example.com</header_from>
6825 </identifiers>
6826 <auth_results>
6827 <dkim>
6828 <domain>example.com</domain>
6829 <result>pass</result>
6830 <human_result>verify result: all signatures verified</human_result>
6831 </dkim>
6832 <spf>
6833 <domain>example.com</domain>
6834 <result>fail</result>
6835 </spf>
6836 </auth_results>
6837 </record>
6838 <record>
6839 <row>
6840 <source_ip>209.85.212.49</source_ip>
6841 <count>2</count>
6842 <policy_evaluated>
6843 <disposition>none</disposition>
6844 <dkim>pass</dkim>
6845 <spf>fail</spf>
6846 </policy_evaluated>
6847 </row>
6848 <identifiers>
6849 <header_from>example.com</header_from>
6850 </identifiers>
6851 <auth_results>
6852 <dkim>
6853 <domain>example.com</domain>
6854 <result>pass</result>
6855 <human_result>verify result: all signatures verified</human_result>
6856 </dkim>
6857 <spf>
6858 <domain>gmail.com</domain>
6859 <result>pass</result>
6860 </spf>
6861 <spf>
6862 <domain>paxex.com.hk</domain>
6863 <result>none</result>
6864 </spf>
6865 </auth_results>
6866 </record>
6867 <record>
6868 <row>
6869 <source_ip>218.16.141.14</source_ip>
6870 <count>6</count>
6871 <policy_evaluated>
6872 <disposition>reject</disposition>
6873 <dkim>fail</dkim>
6874 <spf>fail</spf>
6875 </policy_evaluated>
6876 </row>
6877 <identifiers>
6878 <header_from>example.com</header_from>
6879 </identifiers>
6880 <auth_results>
6881 <spf>
6882 <domain>example.com</domain>
6883 <result>fail</result>
6884 </spf>
6885 </auth_results>
6886 </record>
6887 <record>
6888 <row>
6889 <source_ip>209.85.161.182</source_ip>
6890 <count>8</count>
6891 <policy_evaluated>
6892 <disposition>none</disposition>
6893 <dkim>pass</dkim>
6894 <spf>pass</spf>
6895 </policy_evaluated>
6896 </row>
6897 <identifiers>
6898 <header_from>example.com</header_from>
6899 </identifiers>
6900 <auth_results>
6901 <dkim>
6902 <domain>example.com</domain>
6903 <result>pass</result>
6904 <human_result>verify result: all signatures verified</human_result>
6905 </dkim>
6906 <spf>
6907 <domain>gmail.com</domain>
6908 <result>pass</result>
6909 </spf>
6910 </auth_results>
6911 </record>
6912 <record>
6913 <row>
6914 <source_ip>66.220.144.158</source_ip>
6915 <count>2031</count>
6916 <policy_evaluated>
6917 <disposition>none</disposition>
6918 <dkim>pass</dkim>
6919 <spf>pass</spf>
6920 </policy_evaluated>
6921 </row>
6922 <identifiers>
6923 <header_from>pages.example.com, example.com</header_from>
6924 </identifiers>
6925 <auth_results>
6926 <dkim>
6927 <domain>pages.example.com</domain>
6928 <result>pass</result>
6929 <human_result>verify result: all signatures verified</human_result>
6930 </dkim>
6931 <dkim>
6932 <domain>example.com</domain>
6933 <result>pass</result>
6934 <human_result>verify result: all signatures verified</human_result>
6935 </dkim>
6936 <spf>
6937 <domain>pages.example.com</domain>
6938 <result>pass</result>
6939 </spf>
6940 <spf>
6941 <domain>example.com</domain>
6942 <result>pass</result>
6943 </spf>
6944 </auth_results>
6945 </record>
6946 <record>
6947 <row>
6948 <source_ip>209.85.161.181</source_ip>
6949 <count>11</count>
6950 <policy_evaluated>
6951 <disposition>none</disposition>
6952 <dkim>pass</dkim>
6953 <spf>pass</spf>
6954 </policy_evaluated>
6955 </row>
6956 <identifiers>
6957 <header_from>example.com</header_from>
6958 </identifiers>
6959 <auth_results>
6960 <dkim>
6961 <domain>example.com</domain>
6962 <result>pass</result>
6963 <human_result>verify result: all signatures verified</human_result>
6964 </dkim>
6965 <spf>
6966 <domain>gmail.com</domain>
6967 <result>pass</result>
6968 </spf>
6969 </auth_results>
6970 </record>
6971 <record>
6972 <row>
6973 <source_ip>130.253.1.61</source_ip>
6974 <count>1</count>
6975 <policy_evaluated>
6976 <disposition>none</disposition>
6977 <dkim>pass</dkim>
6978 <spf>fail</spf>
6979 </policy_evaluated>
6980 </row>
6981 <identifiers>
6982 <header_from>example.com</header_from>
6983 </identifiers>
6984 <auth_results>
6985 <dkim>
6986 <domain>example.com</domain>
6987 <result>pass</result>
6988 <human_result>verify result: all signatures verified</human_result>
6989 </dkim>
6990 <spf>
6991 <domain>example.com</domain>
6992 <result>fail</result>
6993 </spf>
6994 </auth_results>
6995 </record>
6996 <record>
6997 <row>
6998 <source_ip>209.85.161.180</source_ip>
6999 <count>4</count>
7000 <policy_evaluated>
7001 <disposition>none</disposition>
7002 <dkim>pass</dkim>
7003 <spf>pass</spf>
7004 </policy_evaluated>
7005 </row>
7006 <identifiers>
7007 <header_from>example.com</header_from>
7008 </identifiers>
7009 <auth_results>
7010 <dkim>
7011 <domain>example.com</domain>
7012 <result>pass</result>
7013 <human_result>verify result: all signatures verified</human_result>
7014 </dkim>
7015 <spf>
7016 <domain>gmail.com</domain>
7017 <result>pass</result>
7018 </spf>
7019 </auth_results>
7020 </record>
7021 <record>
7022 <row>
7023 <source_ip>128.196.130.204</source_ip>
7024 <count>1</count>
7025 <policy_evaluated>
7026 <disposition>none</disposition>
7027 <dkim>pass</dkim>
7028 <spf>fail</spf>
7029 </policy_evaluated>
7030 </row>
7031 <identifiers>
7032 <header_from>example.com</header_from>
7033 </identifiers>
7034 <auth_results>
7035 <dkim>
7036 <domain>example.com</domain>
7037 <result>pass</result>
7038 <human_result>verify result: all signatures verified</human_result>
7039 </dkim>
7040 <spf>
7041 <domain>example.com</domain>
7042 <result>fail</result>
7043 </spf>
7044 </auth_results>
7045 </record>
7046 <record>
7047 <row>
7048 <source_ip>74.125.83.51</source_ip>
7049 <count>1</count>
7050 <policy_evaluated>
7051 <disposition>none</disposition>
7052 <dkim>pass</dkim>
7053 <spf>pass</spf>
7054 </policy_evaluated>
7055 </row>
7056 <identifiers>
7057 <header_from>example.com</header_from>
7058 </identifiers>
7059 <auth_results>
7060 <dkim>
7061 <domain>example.com</domain>
7062 <result>pass</result>
7063 <human_result>verify result: all signatures verified</human_result>
7064 </dkim>
7065 <spf>
7066 <domain>gmail.com</domain>
7067 <result>pass</result>
7068 </spf>
7069 </auth_results>
7070 </record>
7071 <record>
7072 <row>
7073 <source_ip>74.125.82.54</source_ip>
7074 <count>6</count>
7075 <policy_evaluated>
7076 <disposition>none</disposition>
7077 <dkim>pass</dkim>
7078 <spf>fail</spf>
7079 </policy_evaluated>
7080 </row>
7081 <identifiers>
7082 <header_from>example.com</header_from>
7083 </identifiers>
7084 <auth_results>
7085 <dkim>
7086 <domain>example.com</domain>
7087 <result>pass</result>
7088 <human_result>verify result: all signatures verified</human_result>
7089 </dkim>
7090 <spf>
7091 <domain>identitydesign.com.sg</domain>
7092 <result>temperror</result>
7093 </spf>
7094 <spf>
7095 <domain>gmail.com</domain>
7096 <result>pass</result>
7097 </spf>
7098 </auth_results>
7099 </record>
7100 <record>
7101 <row>
7102 <source_ip>65.54.51.91</source_ip>
7103 <count>10</count>
7104 <policy_evaluated>
7105 <disposition>none</disposition>
7106 <dkim>pass</dkim>
7107 <spf>pass</spf>
7108 </policy_evaluated>
7109 </row>
7110 <identifiers>
7111 <header_from>example.com</header_from>
7112 </identifiers>
7113 <auth_results>
7114 <dkim>
7115 <domain>example.com</domain>
7116 <result>pass</result>
7117 <human_result>verify result: all signatures verified</human_result>
7118 </dkim>
7119 <spf>
7120 <domain>hotmail.fr</domain>
7121 <result>pass</result>
7122 </spf>
7123 <spf>
7124 <domain>hotmail.it</domain>
7125 <result>pass</result>
7126 </spf>
7127 <spf>
7128 <domain>hotmail.com</domain>
7129 <result>pass</result>
7130 </spf>
7131 </auth_results>
7132 </record>
7133 <record>
7134 <row>
7135 <source_ip>74.125.82.50</source_ip>
7136 <count>2</count>
7137 <policy_evaluated>
7138 <disposition>none</disposition>
7139 <dkim>pass</dkim>
7140 <spf>pass</spf>
7141 </policy_evaluated>
7142 </row>
7143 <identifiers>
7144 <header_from>example.com</header_from>
7145 </identifiers>
7146 <auth_results>
7147 <dkim>
7148 <domain>example.com</domain>
7149 <result>pass</result>
7150 <human_result>verify result: all signatures verified</human_result>
7151 </dkim>
7152 <spf>
7153 <domain>gmail.com</domain>
7154 <result>pass</result>
7155 </spf>
7156 </auth_results>
7157 </record>
7158 <record>
7159 <row>
7160 <source_ip>74.125.82.51</source_ip>
7161 <count>1</count>
7162 <policy_evaluated>
7163 <disposition>none</disposition>
7164 <dkim>pass</dkim>
7165 <spf>pass</spf>
7166 </policy_evaluated>
7167 </row>
7168 <identifiers>
7169 <header_from>example.com</header_from>
7170 </identifiers>
7171 <auth_results>
7172 <dkim>
7173 <domain>example.com</domain>
7174 <result>pass</result>
7175 <human_result>verify result: all signatures verified</human_result>
7176 </dkim>
7177 <spf>
7178 <domain>gmail.com</domain>
7179 <result>pass</result>
7180 </spf>
7181 </auth_results>
7182 </record>
7183 <record>
7184 <row>
7185 <source_ip>74.125.82.52</source_ip>
7186 <count>7</count>
7187 <policy_evaluated>
7188 <disposition>none</disposition>
7189 <dkim>pass</dkim>
7190 <spf>pass</spf>
7191 </policy_evaluated>
7192 </row>
7193 <identifiers>
7194 <header_from>example.com</header_from>
7195 </identifiers>
7196 <auth_results>
7197 <dkim>
7198 <domain>example.com</domain>
7199 <result>pass</result>
7200 <human_result>verify result: all signatures verified</human_result>
7201 </dkim>
7202 <spf>
7203 <domain>gmail.com</domain>
7204 <result>pass</result>
7205 </spf>
7206 </auth_results>
7207 </record>
7208 <record>
7209 <row>
7210 <source_ip>74.125.82.53</source_ip>
7211 <count>3</count>
7212 <policy_evaluated>
7213 <disposition>none</disposition>
7214 <dkim>pass</dkim>
7215 <spf>pass</spf>
7216 </policy_evaluated>
7217 </row>
7218 <identifiers>
7219 <header_from>example.com</header_from>
7220 </identifiers>
7221 <auth_results>
7222 <dkim>
7223 <domain>example.com</domain>
7224 <result>pass</result>
7225 <human_result>verify result: all signatures verified</human_result>
7226 </dkim>
7227 <spf>
7228 <domain>gmail.com</domain>
7229 <result>pass</result>
7230 </spf>
7231 </auth_results>
7232 </record>
7233 <record>
7234 <row>
7235 <source_ip>201.240.22.94</source_ip>
7236 <count>1</count>
7237 <policy_evaluated>
7238 <disposition>reject</disposition>
7239 <dkim>fail</dkim>
7240 <spf>fail</spf>
7241 </policy_evaluated>
7242 </row>
7243 <identifiers>
7244 <header_from>example.com</header_from>
7245 </identifiers>
7246 <auth_results>
7247 <spf>
7248 <domain>example.com</domain>
7249 <result>fail</result>
7250 </spf>
7251 </auth_results>
7252 </record>
7253 <record>
7254 <row>
7255 <source_ip>74.125.83.54</source_ip>
7256 <count>1</count>
7257 <policy_evaluated>
7258 <disposition>none</disposition>
7259 <dkim>pass</dkim>
7260 <spf>pass</spf>
7261 </policy_evaluated>
7262 </row>
7263 <identifiers>
7264 <header_from>example.com</header_from>
7265 </identifiers>
7266 <auth_results>
7267 <dkim>
7268 <domain>example.com</domain>
7269 <result>pass</result>
7270 <human_result>verify result: all signatures verified</human_result>
7271 </dkim>
7272 <spf>
7273 <domain>gmail.com</domain>
7274 <result>pass</result>
7275 </spf>
7276 </auth_results>
7277 </record>
7278 <record>
7279 <row>
7280 <source_ip>219.128.49.161</source_ip>
7281 <count>3</count>
7282 <policy_evaluated>
7283 <disposition>reject</disposition>
7284 <dkim>fail</dkim>
7285 <spf>fail</spf>
7286 </policy_evaluated>
7287 </row>
7288 <identifiers>
7289 <header_from>example.com</header_from>
7290 </identifiers>
7291 <auth_results>
7292 <spf>
7293 <domain>example.com</domain>
7294 <result>fail</result>
7295 </spf>
7296 </auth_results>
7297 </record>
7298 <record>
7299 <row>
7300 <source_ip>141.211.90.68</source_ip>
7301 <count>4</count>
7302 <policy_evaluated>
7303 <disposition>none</disposition>
7304 <dkim>pass</dkim>
7305 <spf>fail</spf>
7306 </policy_evaluated>
7307 </row>
7308 <identifiers>
7309 <header_from>example.com</header_from>
7310 </identifiers>
7311 <auth_results>
7312 <dkim>
7313 <domain>example.com</domain>
7314 <result>pass</result>
7315 <human_result>verify result: all signatures verified</human_result>
7316 </dkim>
7317 <spf>
7318 <domain>example.com</domain>
7319 <result>fail</result>
7320 </spf>
7321 </auth_results>
7322 </record>
7323 <record>
7324 <row>
7325 <source_ip>120.81.136.10</source_ip>
7326 <count>6</count>
7327 <policy_evaluated>
7328 <disposition>reject</disposition>
7329 <dkim>fail</dkim>
7330 <spf>fail</spf>
7331 </policy_evaluated>
7332 </row>
7333 <identifiers>
7334 <header_from>example.com</header_from>
7335 </identifiers>
7336 <auth_results>
7337 <spf>
7338 <domain>example.com</domain>
7339 <result>fail</result>
7340 </spf>
7341 </auth_results>
7342 </record>
7343 <record>
7344 <row>
7345 <source_ip>74.125.83.53</source_ip>
7346 <count>1</count>
7347 <policy_evaluated>
7348 <disposition>none</disposition>
7349 <dkim>pass</dkim>
7350 <spf>pass</spf>
7351 </policy_evaluated>
7352 </row>
7353 <identifiers>
7354 <header_from>example.com</header_from>
7355 </identifiers>
7356 <auth_results>
7357 <dkim>
7358 <domain>example.com</domain>
7359 <result>pass</result>
7360 <human_result>verify result: all signatures verified</human_result>
7361 </dkim>
7362 <spf>
7363 <domain>gmail.com</domain>
7364 <result>pass</result>
7365 </spf>
7366 </auth_results>
7367 </record>
7368 <record>
7369 <row>
7370 <source_ip>74.125.83.52</source_ip>
7371 <count>1</count>
7372 <policy_evaluated>
7373 <disposition>none</disposition>
7374 <dkim>pass</dkim>
7375 <spf>pass</spf>
7376 </policy_evaluated>
7377 </row>
7378 <identifiers>
7379 <header_from>example.com</header_from>
7380 </identifiers>
7381 <auth_results>
7382 <dkim>
7383 <domain>example.com</domain>
7384 <result>pass</result>
7385 <human_result>verify result: all signatures verified</human_result>
7386 </dkim>
7387 <spf>
7388 <domain>gmail.com</domain>
7389 <result>pass</result>
7390 </spf>
7391 </auth_results>
7392 </record>
7393 <record>
7394 <row>
7395 <source_ip>128.175.1.41</source_ip>
7396 <count>1</count>
7397 <policy_evaluated>
7398 <disposition>reject</disposition>
7399 <dkim>fail</dkim>
7400 <spf>fail</spf>
7401 </policy_evaluated>
7402 </row>
7403 <identifiers>
7404 <header_from>example.com</header_from>
7405 </identifiers>
7406 <auth_results>
7407 <dkim>
7408 <domain>example.com</domain>
7409 <result>fail</result>
7410 <human_result>signature error: RSA verify failed</human_result>
7411 </dkim>
7412 <spf>
7413 <domain>example.com</domain>
7414 <result>fail</result>
7415 </spf>
7416 </auth_results>
7417 </record>
7418 <record>
7419 <row>
7420 <source_ip>141.211.90.67</source_ip>
7421 <count>3</count>
7422 <policy_evaluated>
7423 <disposition>none</disposition>
7424 <dkim>pass</dkim>
7425 <spf>fail</spf>
7426 </policy_evaluated>
7427 </row>
7428 <identifiers>
7429 <header_from>example.com</header_from>
7430 </identifiers>
7431 <auth_results>
7432 <dkim>
7433 <domain>example.com</domain>
7434 <result>pass</result>
7435 <human_result>verify result: all signatures verified</human_result>
7436 </dkim>
7437 <spf>
7438 <domain>example.com</domain>
7439 <result>fail</result>
7440 </spf>
7441 </auth_results>
7442 </record>
7443 <record>
7444 <row>
7445 <source_ip>209.85.214.44</source_ip>
7446 <count>3</count>
7447 <policy_evaluated>
7448 <disposition>none</disposition>
7449 <dkim>pass</dkim>
7450 <spf>pass</spf>
7451 </policy_evaluated>
7452 </row>
7453 <identifiers>
7454 <header_from>example.com</header_from>
7455 </identifiers>
7456 <auth_results>
7457 <dkim>
7458 <domain>example.com</domain>
7459 <result>pass</result>
7460 <human_result>verify result: all signatures verified</human_result>
7461 </dkim>
7462 <spf>
7463 <domain>gmail.com</domain>
7464 <result>pass</result>
7465 </spf>
7466 <spf>
7467 <domain>googlemail.com</domain>
7468 <result>pass</result>
7469 </spf>
7470 </auth_results>
7471 </record>
7472 <record>
7473 <row>
7474 <source_ip>209.85.214.45</source_ip>
7475 <count>9</count>
7476 <policy_evaluated>
7477 <disposition>none</disposition>
7478 <dkim>pass</dkim>
7479 <spf>pass</spf>
7480 </policy_evaluated>
7481 </row>
7482 <identifiers>
7483 <header_from>example.com</header_from>
7484 </identifiers>
7485 <auth_results>
7486 <dkim>
7487 <domain>example.com</domain>
7488 <result>pass</result>
7489 <human_result>verify result: all signatures verified</human_result>
7490 </dkim>
7491 <spf>
7492 <domain>gmail.com</domain>
7493 <result>pass</result>
7494 </spf>
7495 <spf>
7496 <domain>googlemail.com</domain>
7497 <result>pass</result>
7498 </spf>
7499 </auth_results>
7500 </record>
7501 <record>
7502 <row>
7503 <source_ip>209.85.214.46</source_ip>
7504 <count>6</count>
7505 <policy_evaluated>
7506 <disposition>none</disposition>
7507 <dkim>pass</dkim>
7508 <spf>pass</spf>
7509 </policy_evaluated>
7510 </row>
7511 <identifiers>
7512 <header_from>example.com</header_from>
7513 </identifiers>
7514 <auth_results>
7515 <dkim>
7516 <domain>example.com</domain>
7517 <result>pass</result>
7518 <human_result>verify result: all signatures verified</human_result>
7519 </dkim>
7520 <spf>
7521 <domain>gmail.com</domain>
7522 <result>pass</result>
7523 </spf>
7524 <spf>
7525 <domain>googlemail.com</domain>
7526 <result>pass</result>
7527 </spf>
7528 </auth_results>
7529 </record>
7530 <record>
7531 <row>
7532 <source_ip>202.108.3.61</source_ip>
7533 <count>1</count>
7534 <policy_evaluated>
7535 <disposition>none</disposition>
7536 <dkim>pass</dkim>
7537 <spf>pass</spf>
7538 </policy_evaluated>
7539 </row>
7540 <identifiers>
7541 <header_from>example.com</header_from>
7542 </identifiers>
7543 <auth_results>
7544 <dkim>
7545 <domain>example.com</domain>
7546 <result>pass</result>
7547 <human_result>verify result: all signatures verified</human_result>
7548 </dkim>
7549 <spf>
7550 <domain>vip.sina.com</domain>
7551 <result>pass</result>
7552 </spf>
7553 </auth_results>
7554 </record>
7555 <record>
7556 <row>
7557 <source_ip>209.85.214.41</source_ip>
7558 <count>13</count>
7559 <policy_evaluated>
7560 <disposition>none</disposition>
7561 <dkim>pass</dkim>
7562 <spf>pass</spf>
7563 </policy_evaluated>
7564 </row>
7565 <identifiers>
7566 <header_from>example.com</header_from>
7567 </identifiers>
7568 <auth_results>
7569 <dkim>
7570 <domain>example.com</domain>
7571 <result>pass</result>
7572 <human_result>verify result: all signatures verified</human_result>
7573 </dkim>
7574 <spf>
7575 <domain>plasticmoulds.net</domain>
7576 <result>none</result>
7577 </spf>
7578 <spf>
7579 <domain>gmail.com</domain>
7580 <result>pass</result>
7581 </spf>
7582 <spf>
7583 <domain>googlemail.com</domain>
7584 <result>pass</result>
7585 </spf>
7586 </auth_results>
7587 </record>
7588 <record>
7589 <row>
7590 <source_ip>209.85.214.42</source_ip>
7591 <count>12</count>
7592 <policy_evaluated>
7593 <disposition>none</disposition>
7594 <dkim>pass</dkim>
7595 <spf>pass</spf>
7596 </policy_evaluated>
7597 </row>
7598 <identifiers>
7599 <header_from>example.com</header_from>
7600 </identifiers>
7601 <auth_results>
7602 <dkim>
7603 <domain>example.com</domain>
7604 <result>pass</result>
7605 <human_result>verify result: all signatures verified</human_result>
7606 </dkim>
7607 <spf>
7608 <domain>gmail.com</domain>
7609 <result>pass</result>
7610 </spf>
7611 <spf>
7612 <domain>googlemail.com</domain>
7613 <result>pass</result>
7614 </spf>
7615 </auth_results>
7616 </record>
7617 <record>
7618 <row>
7619 <source_ip>209.85.214.43</source_ip>
7620 <count>5</count>
7621 <policy_evaluated>
7622 <disposition>none</disposition>
7623 <dkim>pass</dkim>
7624 <spf>pass</spf>
7625 </policy_evaluated>
7626 </row>
7627 <identifiers>
7628 <header_from>example.com</header_from>
7629 </identifiers>
7630 <auth_results>
7631 <dkim>
7632 <domain>example.com</domain>
7633 <result>pass</result>
7634 <human_result>verify result: all signatures verified</human_result>
7635 </dkim>
7636 <spf>
7637 <domain>gmail.com</domain>
7638 <result>pass</result>
7639 </spf>
7640 <spf>
7641 <domain>googlemail.com</domain>
7642 <result>pass</result>
7643 </spf>
7644 </auth_results>
7645 </record>
7646 <record>
7647 <row>
7648 <source_ip>59.34.0.98</source_ip>
7649 <count>13</count>
7650 <policy_evaluated>
7651 <disposition>reject</disposition>
7652 <dkim>fail</dkim>
7653 <spf>fail</spf>
7654 </policy_evaluated>
7655 </row>
7656 <identifiers>
7657 <header_from>example.com</header_from>
7658 </identifiers>
7659 <auth_results>
7660 <spf>
7661 <domain>example.com</domain>
7662 <result>fail</result>
7663 </spf>
7664 </auth_results>
7665 </record>
7666 <record>
7667 <row>
7668 <source_ip>209.85.214.48</source_ip>
7669 <count>8</count>
7670 <policy_evaluated>
7671 <disposition>none</disposition>
7672 <dkim>pass</dkim>
7673 <spf>pass</spf>
7674 </policy_evaluated>
7675 </row>
7676 <identifiers>
7677 <header_from>example.com</header_from>
7678 </identifiers>
7679 <auth_results>
7680 <dkim>
7681 <domain>example.com</domain>
7682 <result>pass</result>
7683 <human_result>verify result: all signatures verified</human_result>
7684 </dkim>
7685 <spf>
7686 <domain>plasticmoulds.net</domain>
7687 <result>none</result>
7688 </spf>
7689 <spf>
7690 <domain>gmail.com</domain>
7691 <result>pass</result>
7692 </spf>
7693 <spf>
7694 <domain>googlemail.com</domain>
7695 <result>pass</result>
7696 </spf>
7697 </auth_results>
7698 </record>
7699 <record>
7700 <row>
7701 <source_ip>209.85.214.49</source_ip>
7702 <count>5</count>
7703 <policy_evaluated>
7704 <disposition>none</disposition>
7705 <dkim>pass</dkim>
7706 <spf>pass</spf>
7707 </policy_evaluated>
7708 </row>
7709 <identifiers>
7710 <header_from>example.com</header_from>
7711 </identifiers>
7712 <auth_results>
7713 <dkim>
7714 <domain>example.com</domain>
7715 <result>pass</result>
7716 <human_result>verify result: all signatures verified</human_result>
7717 </dkim>
7718 <spf>
7719 <domain>gmail.com</domain>
7720 <result>pass</result>
7721 </spf>
7722 <spf>
7723 <domain>googlemail.com</domain>
7724 <result>pass</result>
7725 </spf>
7726 </auth_results>
7727 </record>
7728 <record>
7729 <row>
7730 <source_ip>223.5.50.88</source_ip>
7731 <count>1</count>
7732 <policy_evaluated>
7733 <disposition>reject</disposition>
7734 <dkim>fail</dkim>
7735 <spf>fail</spf>
7736 </policy_evaluated>
7737 </row>
7738 <identifiers>
7739 <header_from>example.com</header_from>
7740 </identifiers>
7741 <auth_results>
7742 <dkim>
7743 <domain>example.com</domain>
7744 <result>fail</result>
7745 <human_result>signature error: RSA verify failed</human_result>
7746 </dkim>
7747 <spf>
7748 <domain>championshk.com</domain>
7749 <result>none</result>
7750 </spf>
7751 </auth_results>
7752 </record>
7753 <record>
7754 <row>
7755 <source_ip>209.85.220.181</source_ip>
7756 <count>1</count>
7757 <policy_evaluated>
7758 <disposition>none</disposition>
7759 <dkim>pass</dkim>
7760 <spf>fail</spf>
7761 </policy_evaluated>
7762 </row>
7763 <identifiers>
7764 <header_from>example.com</header_from>
7765 </identifiers>
7766 <auth_results>
7767 <dkim>
7768 <domain>example.com</domain>
7769 <result>pass</result>
7770 <human_result>verify result: all signatures verified</human_result>
7771 </dkim>
7772 <spf>
7773 <domain>paxex.com.hk</domain>
7774 <result>none</result>
7775 </spf>
7776 </auth_results>
7777 </record>
7778 <record>
7779 <row>
7780 <source_ip>220.181.12.59</source_ip>
7781 <count>2</count>
7782 <policy_evaluated>
7783 <disposition>none</disposition>
7784 <dkim>pass</dkim>
7785 <spf>pass</spf>
7786 </policy_evaluated>
7787 </row>
7788 <identifiers>
7789 <header_from>example.com</header_from>
7790 </identifiers>
7791 <auth_results>
7792 <dkim>
7793 <domain>example.com</domain>
7794 <result>pass</result>
7795 <human_result>verify result: all signatures verified</human_result>
7796 </dkim>
7797 <spf>
7798 <domain>163.com</domain>
7799 <result>pass</result>
7800 </spf>
7801 </auth_results>
7802 </record>
7803 <record>
7804 <row>
7805 <source_ip>219.145.52.191</source_ip>
7806 <count>6</count>
7807 <policy_evaluated>
7808 <disposition>reject</disposition>
7809 <dkim>fail</dkim>
7810 <spf>fail</spf>
7811 </policy_evaluated>
7812 </row>
7813 <identifiers>
7814 <header_from>example.com</header_from>
7815 </identifiers>
7816 <auth_results>
7817 <spf>
7818 <domain>example.com</domain>
7819 <result>fail</result>
7820 </spf>
7821 </auth_results>
7822 </record>
7823 <record>
7824 <row>
7825 <source_ip>220.181.12.57</source_ip>
7826 <count>3</count>
7827 <policy_evaluated>
7828 <disposition>none</disposition>
7829 <dkim>pass</dkim>
7830 <spf>pass</spf>
7831 </policy_evaluated>
7832 </row>
7833 <identifiers>
7834 <header_from>example.com</header_from>
7835 </identifiers>
7836 <auth_results>
7837 <dkim>
7838 <domain>example.com</domain>
7839 <result>pass</result>
7840 <human_result>verify result: all signatures verified</human_result>
7841 </dkim>
7842 <spf>
7843 <domain>163.com</domain>
7844 <result>pass</result>
7845 </spf>
7846 </auth_results>
7847 </record>
7848 <record>
7849 <row>
7850 <source_ip>209.85.215.182</source_ip>
7851 <count>1</count>
7852 <policy_evaluated>
7853 <disposition>none</disposition>
7854 <dkim>pass</dkim>
7855 <spf>pass</spf>
7856 </policy_evaluated>
7857 </row>
7858 <identifiers>
7859 <header_from>example.com</header_from>
7860 </identifiers>
7861 <auth_results>
7862 <dkim>
7863 <domain>example.com</domain>
7864 <result>pass</result>
7865 <human_result>verify result: all signatures verified</human_result>
7866 </dkim>
7867 <spf>
7868 <domain>gmail.com</domain>
7869 <result>pass</result>
7870 </spf>
7871 </auth_results>
7872 </record>
7873 <record>
7874 <row>
7875 <source_ip>183.63.218.200</source_ip>
7876 <count>5</count>
7877 <policy_evaluated>
7878 <disposition>reject</disposition>
7879 <dkim>fail</dkim>
7880 <spf>fail</spf>
7881 </policy_evaluated>
7882 </row>
7883 <identifiers>
7884 <header_from>example.com</header_from>
7885 </identifiers>
7886 <auth_results>
7887 <spf>
7888 <domain>example.com</domain>
7889 <result>fail</result>
7890 </spf>
7891 </auth_results>
7892 </record>
7893 <record>
7894 <row>
7895 <source_ip>220.181.12.51</source_ip>
7896 <count>1</count>
7897 <policy_evaluated>
7898 <disposition>none</disposition>
7899 <dkim>pass</dkim>
7900 <spf>pass</spf>
7901 </policy_evaluated>
7902 </row>
7903 <identifiers>
7904 <header_from>example.com</header_from>
7905 </identifiers>
7906 <auth_results>
7907 <dkim>
7908 <domain>example.com</domain>
7909 <result>pass</result>
7910 <human_result>verify result: all signatures verified</human_result>
7911 </dkim>
7912 <spf>
7913 <domain>163.com</domain>
7914 <result>pass</result>
7915 </spf>
7916 </auth_results>
7917 </record>
7918 <record>
7919 <row>
7920 <source_ip>65.55.111.142</source_ip>
7921 <count>20</count>
7922 <policy_evaluated>
7923 <disposition>none</disposition>
7924 <dkim>pass</dkim>
7925 <spf>pass</spf>
7926 </policy_evaluated>
7927 </row>
7928 <identifiers>
7929 <header_from>example.com</header_from>
7930 </identifiers>
7931 <auth_results>
7932 <dkim>
7933 <domain>example.com</domain>
7934 <result>pass</result>
7935 <human_result>verify result: all signatures verified</human_result>
7936 </dkim>
7937 <spf>
7938 <domain>hotmail.it</domain>
7939 <result>pass</result>
7940 </spf>
7941 <spf>
7942 <domain>hotmail.com</domain>
7943 <result>pass</result>
7944 </spf>
7945 </auth_results>
7946 </record>
7947 <record>
7948 <row>
7949 <source_ip>65.55.111.143</source_ip>
7950 <count>14</count>
7951 <policy_evaluated>
7952 <disposition>none</disposition>
7953 <dkim>pass</dkim>
7954 <spf>pass</spf>
7955 </policy_evaluated>
7956 </row>
7957 <identifiers>
7958 <header_from>pages.example.com, example.com</header_from>
7959 </identifiers>
7960 <auth_results>
7961 <dkim>
7962 <domain>pages.example.com</domain>
7963 <result>pass</result>
7964 <human_result>verify result: all signatures verified</human_result>
7965 </dkim>
7966 <dkim>
7967 <domain>example.com</domain>
7968 <result>pass</result>
7969 <human_result>verify result: all signatures verified</human_result>
7970 </dkim>
7971 <spf>
7972 <domain>hotmail.de</domain>
7973 <result>pass</result>
7974 </spf>
7975 <spf>
7976 <domain>hotmail.it</domain>
7977 <result>pass</result>
7978 </spf>
7979 <spf>
7980 <domain>hotmail.com</domain>
7981 <result>pass</result>
7982 </spf>
7983 </auth_results>
7984 </record>
7985 <record>
7986 <row>
7987 <source_ip>65.55.111.140</source_ip>
7988 <count>17</count>
7989 <policy_evaluated>
7990 <disposition>none</disposition>
7991 <dkim>pass</dkim>
7992 <spf>pass</spf>
7993 </policy_evaluated>
7994 </row>
7995 <identifiers>
7996 <header_from>example.com</header_from>
7997 </identifiers>
7998 <auth_results>
7999 <dkim>
8000 <domain>example.com</domain>
8001 <result>pass</result>
8002 <human_result>verify result: all signatures verified</human_result>
8003 </dkim>
8004 <spf>
8005 <domain>hotmail.de</domain>
8006 <result>pass</result>
8007 </spf>
8008 <spf>
8009 <domain>hotmail.it</domain>
8010 <result>pass</result>
8011 </spf>
8012 <spf>
8013 <domain>hotmail.com</domain>
8014 <result>pass</result>
8015 </spf>
8016 </auth_results>
8017 </record>
8018 <record>
8019 <row>
8020 <source_ip>65.55.111.141</source_ip>
8021 <count>20</count>
8022 <policy_evaluated>
8023 <disposition>none</disposition>
8024 <dkim>pass</dkim>
8025 <spf>pass</spf>
8026 </policy_evaluated>
8027 </row>
8028 <identifiers>
8029 <header_from>example.com</header_from>
8030 </identifiers>
8031 <auth_results>
8032 <dkim>
8033 <domain>example.com</domain>
8034 <result>pass</result>
8035 <human_result>verify result: all signatures verified</human_result>
8036 </dkim>
8037 <spf>
8038 <domain>hotmail.it</domain>
8039 <result>pass</result>
8040 </spf>
8041 <spf>
8042 <domain>w.cn</domain>
8043 <result>none</result>
8044 </spf>
8045 <spf>
8046 <domain>hotmail.com</domain>
8047 <result>pass</result>
8048 </spf>
8049 </auth_results>
8050 </record>
8051 <record>
8052 <row>
8053 <source_ip>65.55.111.146</source_ip>
8054 <count>17</count>
8055 <policy_evaluated>
8056 <disposition>none</disposition>
8057 <dkim>pass</dkim>
8058 <spf>pass</spf>
8059 </policy_evaluated>
8060 </row>
8061 <identifiers>
8062 <header_from>example.com</header_from>
8063 </identifiers>
8064 <auth_results>
8065 <dkim>
8066 <domain>example.com</domain>
8067 <result>pass</result>
8068 <human_result>verify result: all signatures verified</human_result>
8069 </dkim>
8070 <spf>
8071 <domain>hotmail.de</domain>
8072 <result>pass</result>
8073 </spf>
8074 <spf>
8075 <domain>hotmail.it</domain>
8076 <result>pass</result>
8077 </spf>
8078 <spf>
8079 <domain>hotmail.com</domain>
8080 <result>pass</result>
8081 </spf>
8082 </auth_results>
8083 </record>
8084 <record>
8085 <row>
8086 <source_ip>65.55.111.147</source_ip>
8087 <count>16</count>
8088 <policy_evaluated>
8089 <disposition>none</disposition>
8090 <dkim>pass</dkim>
8091 <spf>pass</spf>
8092 </policy_evaluated>
8093 </row>
8094 <identifiers>
8095 <header_from>example.com</header_from>
8096 </identifiers>
8097 <auth_results>
8098 <dkim>
8099 <domain>example.com</domain>
8100 <result>pass</result>
8101 <human_result>verify result: all signatures verified</human_result>
8102 </dkim>
8103 <spf>
8104 <domain>hotmail.de</domain>
8105 <result>pass</result>
8106 </spf>
8107 <spf>
8108 <domain>hotmail.it</domain>
8109 <result>pass</result>
8110 </spf>
8111 <spf>
8112 <domain>hotmail.com</domain>
8113 <result>pass</result>
8114 </spf>
8115 </auth_results>
8116 </record>
8117 <record>
8118 <row>
8119 <source_ip>65.55.111.144</source_ip>
8120 <count>14</count>
8121 <policy_evaluated>
8122 <disposition>none</disposition>
8123 <dkim>pass</dkim>
8124 <spf>pass</spf>
8125 </policy_evaluated>
8126 </row>
8127 <identifiers>
8128 <header_from>example.com</header_from>
8129 </identifiers>
8130 <auth_results>
8131 <dkim>
8132 <domain>example.com</domain>
8133 <result>pass</result>
8134 <human_result>verify result: all signatures verified</human_result>
8135 </dkim>
8136 <spf>
8137 <domain>hotmail.fr</domain>
8138 <result>pass</result>
8139 </spf>
8140 <spf>
8141 <domain>hotmail.de</domain>
8142 <result>pass</result>
8143 </spf>
8144 <spf>
8145 <domain>hotmail.co.uk</domain>
8146 <result>pass</result>
8147 </spf>
8148 <spf>
8149 <domain>hotmail.com</domain>
8150 <result>pass</result>
8151 </spf>
8152 </auth_results>
8153 </record>
8154 <record>
8155 <row>
8156 <source_ip>65.55.111.145</source_ip>
8157 <count>2</count>
8158 <policy_evaluated>
8159 <disposition>none</disposition>
8160 <dkim>pass</dkim>
8161 <spf>pass</spf>
8162 </policy_evaluated>
8163 </row>
8164 <identifiers>
8165 <header_from>example.com</header_from>
8166 </identifiers>
8167 <auth_results>
8168 <dkim>
8169 <domain>example.com</domain>
8170 <result>pass</result>
8171 <human_result>verify result: all signatures verified</human_result>
8172 </dkim>
8173 <spf>
8174 <domain>hotmail.com</domain>
8175 <result>pass</result>
8176 </spf>
8177 </auth_results>
8178 </record>
8179 <record>
8180 <row>
8181 <source_ip>59.121.237.193</source_ip>
8182 <count>9</count>
8183 <policy_evaluated>
8184 <disposition>reject</disposition>
8185 <dkim>fail</dkim>
8186 <spf>fail</spf>
8187 </policy_evaluated>
8188 </row>
8189 <identifiers>
8190 <header_from>example.com</header_from>
8191 </identifiers>
8192 <auth_results>
8193 <spf>
8194 <domain>example.com</domain>
8195 <result>fail</result>
8196 </spf>
8197 </auth_results>
8198 </record>
8199 <record>
8200 <row>
8201 <source_ip>65.55.111.148</source_ip>
8202 <count>15</count>
8203 <policy_evaluated>
8204 <disposition>none</disposition>
8205 <dkim>pass</dkim>
8206 <spf>pass</spf>
8207 </policy_evaluated>
8208 </row>
8209 <identifiers>
8210 <header_from>example.com</header_from>
8211 </identifiers>
8212 <auth_results>
8213 <dkim>
8214 <domain>example.com</domain>
8215 <result>pass</result>
8216 <human_result>verify result: all signatures verified</human_result>
8217 </dkim>
8218 <spf>
8219 <domain>msn.cn</domain>
8220 <result>pass</result>
8221 </spf>
8222 <spf>
8223 <domain>hotmail.it</domain>
8224 <result>pass</result>
8225 </spf>
8226 <spf>
8227 <domain>hotmail.com</domain>
8228 <result>pass</result>
8229 </spf>
8230 </auth_results>
8231 </record>
8232 <record>
8233 <row>
8234 <source_ip>65.55.111.149</source_ip>
8235 <count>21</count>
8236 <policy_evaluated>
8237 <disposition>none</disposition>
8238 <dkim>pass</dkim>
8239 <spf>pass</spf>
8240 </policy_evaluated>
8241 </row>
8242 <identifiers>
8243 <header_from>example.com</header_from>
8244 </identifiers>
8245 <auth_results>
8246 <dkim>
8247 <domain>example.com</domain>
8248 <result>pass</result>
8249 <human_result>verify result: all signatures verified</human_result>
8250 </dkim>
8251 <spf>
8252 <domain>hotmail.de</domain>
8253 <result>pass</result>
8254 </spf>
8255 <spf>
8256 <domain>hotmail.it</domain>
8257 <result>pass</result>
8258 </spf>
8259 <spf>
8260 <domain>live.cn</domain>
8261 <result>pass</result>
8262 </spf>
8263 <spf>
8264 <domain>hotmail.com</domain>
8265 <result>pass</result>
8266 </spf>
8267 </auth_results>
8268 </record>
8269 <record>
8270 <row>
8271 <source_ip>183.14.174.126</source_ip>
8272 <count>3</count>
8273 <policy_evaluated>
8274 <disposition>reject</disposition>
8275 <dkim>fail</dkim>
8276 <spf>fail</spf>
8277 </policy_evaluated>
8278 </row>
8279 <identifiers>
8280 <header_from>example.com</header_from>
8281 </identifiers>
8282 <auth_results>
8283 <spf>
8284 <domain>example.com</domain>
8285 <result>fail</result>
8286 </spf>
8287 </auth_results>
8288 </record>
8289 <record>
8290 <row>
8291 <source_ip>209.85.215.51</source_ip>
8292 <count>2</count>
8293 <policy_evaluated>
8294 <disposition>none</disposition>
8295 <dkim>pass</dkim>
8296 <spf>pass</spf>
8297 </policy_evaluated>
8298 </row>
8299 <identifiers>
8300 <header_from>example.com</header_from>
8301 </identifiers>
8302 <auth_results>
8303 <dkim>
8304 <domain>example.com</domain>
8305 <result>pass</result>
8306 <human_result>verify result: all signatures verified</human_result>
8307 </dkim>
8308 <spf>
8309 <domain>brandeis.edu</domain>
8310 <result>pass</result>
8311 </spf>
8312 <spf>
8313 <domain>gmail.com</domain>
8314 <result>pass</result>
8315 </spf>
8316 </auth_results>
8317 </record>
8318 <record>
8319 <row>
8320 <source_ip>131.252.111.42</source_ip>
8321 <count>1</count>
8322 <policy_evaluated>
8323 <disposition>none</disposition>
8324 <dkim>pass</dkim>
8325 <spf>fail</spf>
8326 </policy_evaluated>
8327 </row>
8328 <identifiers>
8329 <header_from>example.com</header_from>
8330 </identifiers>
8331 <auth_results>
8332 <dkim>
8333 <domain>example.com</domain>
8334 <result>pass</result>
8335 <human_result>verify result: all signatures verified</human_result>
8336 </dkim>
8337 <spf>
8338 <domain>pdx.edu</domain>
8339 <result>none</result>
8340 </spf>
8341 </auth_results>
8342 </record>
8343 <record>
8344 <row>
8345 <source_ip>116.12.55.104</source_ip>
8346 <count>1</count>
8347 <policy_evaluated>
8348 <disposition>none</disposition>
8349 <dkim>pass</dkim>
8350 <spf>fail</spf>
8351 </policy_evaluated>
8352 </row>
8353 <identifiers>
8354 <header_from>example.com</header_from>
8355 </identifiers>
8356 <auth_results>
8357 <dkim>
8358 <domain>example.com</domain>
8359 <result>pass</result>
8360 <human_result>verify result: all signatures verified</human_result>
8361 </dkim>
8362 <spf>
8363 <domain>example.com</domain>
8364 <result>fail</result>
8365 </spf>
8366 </auth_results>
8367 </record>
8368 <record>
8369 <row>
8370 <source_ip>209.85.220.171</source_ip>
8371 <count>1</count>
8372 <policy_evaluated>
8373 <disposition>none</disposition>
8374 <dkim>pass</dkim>
8375 <spf>pass</spf>
8376 </policy_evaluated>
8377 </row>
8378 <identifiers>
8379 <header_from>example.com</header_from>
8380 </identifiers>
8381 <auth_results>
8382 <dkim>
8383 <domain>example.com</domain>
8384 <result>pass</result>
8385 <human_result>verify result: all signatures verified</human_result>
8386 </dkim>
8387 <spf>
8388 <domain>gmail.com</domain>
8389 <result>pass</result>
8390 </spf>
8391 </auth_results>
8392 </record>
8393 <record>
8394 <row>
8395 <source_ip>66.220.155.142</source_ip>
8396 <count>1468</count>
8397 <policy_evaluated>
8398 <disposition>none</disposition>
8399 <dkim>pass</dkim>
8400 <spf>pass</spf>
8401 </policy_evaluated>
8402 </row>
8403 <identifiers>
8404 <header_from>pages.example.com, example.com</header_from>
8405 </identifiers>
8406 <auth_results>
8407 <dkim>
8408 <domain>pages.example.com</domain>
8409 <result>pass</result>
8410 <human_result>verify result: all signatures verified</human_result>
8411 </dkim>
8412 <dkim>
8413 <domain>example.com</domain>
8414 <result>pass</result>
8415 <human_result>verify result: all signatures verified</human_result>
8416 </dkim>
8417 <spf>
8418 <domain>pages.example.com</domain>
8419 <result>pass</result>
8420 </spf>
8421 <spf>
8422 <domain>example.com</domain>
8423 <result>pass</result>
8424 </spf>
8425 </auth_results>
8426 </record>
8427 <record>
8428 <row>
8429 <source_ip>66.220.155.143</source_ip>
8430 <count>1449</count>
8431 <policy_evaluated>
8432 <disposition>none</disposition>
8433 <dkim>pass</dkim>
8434 <spf>pass</spf>
8435 </policy_evaluated>
8436 </row>
8437 <identifiers>
8438 <header_from>pages.example.com, example.com</header_from>
8439 </identifiers>
8440 <auth_results>
8441 <dkim>
8442 <domain>pages.example.com</domain>
8443 <result>pass</result>
8444 <human_result>verify result: all signatures verified</human_result>
8445 </dkim>
8446 <dkim>
8447 <domain>example.com</domain>
8448 <result>pass</result>
8449 <human_result>verify result: all signatures verified</human_result>
8450 </dkim>
8451 <spf>
8452 <domain>pages.example.com</domain>
8453 <result>pass</result>
8454 </spf>
8455 <spf>
8456 <domain>example.com</domain>
8457 <result>pass</result>
8458 </spf>
8459 </auth_results>
8460 </record>
8461 <record>
8462 <row>
8463 <source_ip>66.220.155.140</source_ip>
8464 <count>1204</count>
8465 <policy_evaluated>
8466 <disposition>none</disposition>
8467 <dkim>pass</dkim>
8468 <spf>pass</spf>
8469 </policy_evaluated>
8470 </row>
8471 <identifiers>
8472 <header_from>pages.example.com, example.com</header_from>
8473 </identifiers>
8474 <auth_results>
8475 <dkim>
8476 <domain>pages.example.com</domain>
8477 <result>pass</result>
8478 <human_result>verify result: all signatures verified</human_result>
8479 </dkim>
8480 <dkim>
8481 <domain>example.com</domain>
8482 <result>pass</result>
8483 <human_result>verify result: all signatures verified</human_result>
8484 </dkim>
8485 <spf>
8486 <domain>pages.example.com</domain>
8487 <result>pass</result>
8488 </spf>
8489 <spf>
8490 <domain>example.com</domain>
8491 <result>pass</result>
8492 </spf>
8493 </auth_results>
8494 </record>
8495 <record>
8496 <row>
8497 <source_ip>66.220.155.141</source_ip>
8498 <count>1143</count>
8499 <policy_evaluated>
8500 <disposition>none</disposition>
8501 <dkim>pass</dkim>
8502 <spf>pass</spf>
8503 </policy_evaluated>
8504 </row>
8505 <identifiers>
8506 <header_from>pages.example.com, example.com</header_from>
8507 </identifiers>
8508 <auth_results>
8509 <dkim>
8510 <domain>pages.example.com</domain>
8511 <result>pass</result>
8512 <human_result>verify result: all signatures verified</human_result>
8513 </dkim>
8514 <dkim>
8515 <domain>example.com</domain>
8516 <result>pass</result>
8517 <human_result>verify result: all signatures verified</human_result>
8518 </dkim>
8519 <spf>
8520 <domain>pages.example.com</domain>
8521 <result>neutral</result>
8522 </spf>
8523 <spf>
8524 <domain>example.com</domain>
8525 <result>pass</result>
8526 </spf>
8527 </auth_results>
8528 </record>
8529 <record>
8530 <row>
8531 <source_ip>66.220.155.146</source_ip>
8532 <count>1486</count>
8533 <policy_evaluated>
8534 <disposition>none</disposition>
8535 <dkim>pass</dkim>
8536 <spf>pass</spf>
8537 </policy_evaluated>
8538 </row>
8539 <identifiers>
8540 <header_from>pages.example.com, example.com</header_from>
8541 </identifiers>
8542 <auth_results>
8543 <dkim>
8544 <domain>pages.example.com</domain>
8545 <result>pass</result>
8546 <human_result>verify result: all signatures verified</human_result>
8547 </dkim>
8548 <dkim>
8549 <domain>example.com</domain>
8550 <result>pass</result>
8551 <human_result>verify result: all signatures verified</human_result>
8552 </dkim>
8553 <spf>
8554 <domain>pages.example.com</domain>
8555 <result>pass</result>
8556 </spf>
8557 <spf>
8558 <domain>example.com</domain>
8559 <result>pass</result>
8560 </spf>
8561 </auth_results>
8562 </record>
8563 <record>
8564 <row>
8565 <source_ip>66.220.155.147</source_ip>
8566 <count>1524</count>
8567 <policy_evaluated>
8568 <disposition>none</disposition>
8569 <dkim>pass</dkim>
8570 <spf>pass</spf>
8571 </policy_evaluated>
8572 </row>
8573 <identifiers>
8574 <header_from>pages.example.com, example.com</header_from>
8575 </identifiers>
8576 <auth_results>
8577 <dkim>
8578 <domain>pages.example.com</domain>
8579 <result>pass</result>
8580 <human_result>verify result: all signatures verified</human_result>
8581 </dkim>
8582 <dkim>
8583 <domain>example.com</domain>
8584 <result>pass</result>
8585 <human_result>verify result: all signatures verified</human_result>
8586 </dkim>
8587 <spf>
8588 <domain>pages.example.com</domain>
8589 <result>pass</result>
8590 </spf>
8591 <spf>
8592 <domain>example.com</domain>
8593 <result>pass</result>
8594 </spf>
8595 </auth_results>
8596 </record>
8597 <record>
8598 <row>
8599 <source_ip>66.220.155.144</source_ip>
8600 <count>1543</count>
8601 <policy_evaluated>
8602 <disposition>none</disposition>
8603 <dkim>pass</dkim>
8604 <spf>pass</spf>
8605 </policy_evaluated>
8606 </row>
8607 <identifiers>
8608 <header_from>pages.example.com, example.com</header_from>
8609 </identifiers>
8610 <auth_results>
8611 <dkim>
8612 <domain>pages.example.com</domain>
8613 <result>pass</result>
8614 <human_result>verify result: all signatures verified</human_result>
8615 </dkim>
8616 <dkim>
8617 <domain>example.com</domain>
8618 <result>pass</result>
8619 <human_result>verify result: all signatures verified</human_result>
8620 </dkim>
8621 <spf>
8622 <domain>pages.example.com</domain>
8623 <result>pass</result>
8624 </spf>
8625 <spf>
8626 <domain>example.com</domain>
8627 <result>pass</result>
8628 </spf>
8629 </auth_results>
8630 </record>
8631 <record>
8632 <row>
8633 <source_ip>66.220.155.145</source_ip>
8634 <count>1462</count>
8635 <policy_evaluated>
8636 <disposition>none</disposition>
8637 <dkim>pass</dkim>
8638 <spf>pass</spf>
8639 </policy_evaluated>
8640 </row>
8641 <identifiers>
8642 <header_from>pages.example.com, example.com</header_from>
8643 </identifiers>
8644 <auth_results>
8645 <dkim>
8646 <domain>pages.example.com</domain>
8647 <result>pass</result>
8648 <human_result>verify result: all signatures verified</human_result>
8649 </dkim>
8650 <dkim>
8651 <domain>example.com</domain>
8652 <result>pass</result>
8653 <human_result>verify result: all signatures verified</human_result>
8654 </dkim>
8655 <spf>
8656 <domain>pages.example.com</domain>
8657 <result>neutral</result>
8658 </spf>
8659 <spf>
8660 <domain>example.com</domain>
8661 <result>pass</result>
8662 </spf>
8663 </auth_results>
8664 </record>
8665 <record>
8666 <row>
8667 <source_ip>66.220.155.148</source_ip>
8668 <count>1305</count>
8669 <policy_evaluated>
8670 <disposition>none</disposition>
8671 <dkim>pass</dkim>
8672 <spf>pass</spf>
8673 </policy_evaluated>
8674 </row>
8675 <identifiers>
8676 <header_from>pages.example.com, example.com</header_from>
8677 </identifiers>
8678 <auth_results>
8679 <dkim>
8680 <domain>pages.example.com</domain>
8681 <result>pass</result>
8682 <human_result>verify result: all signatures verified</human_result>
8683 </dkim>
8684 <dkim>
8685 <domain>example.com</domain>
8686 <result>pass</result>
8687 <human_result>verify result: all signatures verified</human_result>
8688 </dkim>
8689 <spf>
8690 <domain>pages.example.com</domain>
8691 <result>pass</result>
8692 </spf>
8693 <spf>
8694 <domain>example.com</domain>
8695 <result>pass</result>
8696 </spf>
8697 </auth_results>
8698 </record>
8699 <record>
8700 <row>
8701 <source_ip>66.220.155.149</source_ip>
8702 <count>1167</count>
8703 <policy_evaluated>
8704 <disposition>none</disposition>
8705 <dkim>pass</dkim>
8706 <spf>pass</spf>
8707 </policy_evaluated>
8708 </row>
8709 <identifiers>
8710 <header_from>pages.example.com, example.com</header_from>
8711 </identifiers>
8712 <auth_results>
8713 <dkim>
8714 <domain>pages.example.com</domain>
8715 <result>pass</result>
8716 <human_result>verify result: all signatures verified</human_result>
8717 </dkim>
8718 <dkim>
8719 <domain>example.com</domain>
8720 <result>pass</result>
8721 <human_result>verify result: all signatures verified</human_result>
8722 </dkim>
8723 <spf>
8724 <domain>pages.example.com</domain>
8725 <result>neutral</result>
8726 </spf>
8727 <spf>
8728 <domain>example.com</domain>
8729 <result>pass</result>
8730 </spf>
8731 </auth_results>
8732 </record>
8733 <record>
8734 <row>
8735 <source_ip>61.132.120.161</source_ip>
8736 <count>9</count>
8737 <policy_evaluated>
8738 <disposition>reject</disposition>
8739 <dkim>fail</dkim>
8740 <spf>fail</spf>
8741 </policy_evaluated>
8742 </row>
8743 <identifiers>
8744 <header_from>example.com</header_from>
8745 </identifiers>
8746 <auth_results>
8747 <spf>
8748 <domain>example.com</domain>
8749 <result>fail</result>
8750 </spf>
8751 </auth_results>
8752 </record>
8753 <record>
8754 <row>
8755 <source_ip>202.101.6.180</source_ip>
8756 <count>1</count>
8757 <policy_evaluated>
8758 <disposition>none</disposition>
8759 <dkim>pass</dkim>
8760 <spf>fail</spf>
8761 </policy_evaluated>
8762 </row>
8763 <identifiers>
8764 <header_from>example.com</header_from>
8765 </identifiers>
8766 <auth_results>
8767 <dkim>
8768 <domain>example.com</domain>
8769 <result>pass</result>
8770 <human_result>verify result: all signatures verified</human_result>
8771 </dkim>
8772 <spf>
8773 <domain>mail.dhu.edu.cn</domain>
8774 <result>none</result>
8775 </spf>
8776 </auth_results>
8777 </record>
8778 <record>
8779 <row>
8780 <source_ip>66.220.144.153</source_ip>
8781 <count>2096</count>
8782 <policy_evaluated>
8783 <disposition>none</disposition>
8784 <dkim>pass</dkim>
8785 <spf>pass</spf>
8786 </policy_evaluated>
8787 </row>
8788 <identifiers>
8789 <header_from>pages.example.com, example.com</header_from>
8790 </identifiers>
8791 <auth_results>
8792 <dkim>
8793 <domain>pages.example.com</domain>
8794 <result>pass</result>
8795 <human_result>verify result: all signatures verified</human_result>
8796 </dkim>
8797 <dkim>
8798 <domain>example.com</domain>
8799 <result>pass</result>
8800 <human_result>verify result: all signatures verified</human_result>
8801 </dkim>
8802 <spf>
8803 <domain>pages.example.com</domain>
8804 <result>pass</result>
8805 </spf>
8806 <spf>
8807 <domain>example.com</domain>
8808 <result>pass</result>
8809 </spf>
8810 </auth_results>
8811 </record>
8812 <record>
8813 <row>
8814 <source_ip>175.43.189.210</source_ip>
8815 <count>5</count>
8816 <policy_evaluated>
8817 <disposition>reject</disposition>
8818 <dkim>fail</dkim>
8819 <spf>fail</spf>
8820 </policy_evaluated>
8821 </row>
8822 <identifiers>
8823 <header_from>example.com</header_from>
8824 </identifiers>
8825 <auth_results>
8826 <spf>
8827 <domain>example.com</domain>
8828 <result>fail</result>
8829 </spf>
8830 </auth_results>
8831 </record>
8832 <record>
8833 <row>
8834 <source_ip>209.85.213.54</source_ip>
8835 <count>4</count>
8836 <policy_evaluated>
8837 <disposition>none</disposition>
8838 <dkim>pass</dkim>
8839 <spf>pass</spf>
8840 </policy_evaluated>
8841 </row>
8842 <identifiers>
8843 <header_from>example.com</header_from>
8844 </identifiers>
8845 <auth_results>
8846 <dkim>
8847 <domain>example.com</domain>
8848 <result>pass</result>
8849 <human_result>verify result: all signatures verified</human_result>
8850 </dkim>
8851 <spf>
8852 <domain>lhe.hk</domain>
8853 <result>none</result>
8854 </spf>
8855 <spf>
8856 <domain>gmail.com</domain>
8857 <result>pass</result>
8858 </spf>
8859 </auth_results>
8860 </record>
8861 <record>
8862 <row>
8863 <source_ip>209.85.213.52</source_ip>
8864 <count>5</count>
8865 <policy_evaluated>
8866 <disposition>none</disposition>
8867 <dkim>pass</dkim>
8868 <spf>pass</spf>
8869 </policy_evaluated>
8870 </row>
8871 <identifiers>
8872 <header_from>example.com</header_from>
8873 </identifiers>
8874 <auth_results>
8875 <dkim>
8876 <domain>example.com</domain>
8877 <result>pass</result>
8878 <human_result>verify result: all signatures verified</human_result>
8879 </dkim>
8880 <spf>
8881 <domain>gmail.com</domain>
8882 <result>pass</result>
8883 </spf>
8884 </auth_results>
8885 </record>
8886 <record>
8887 <row>
8888 <source_ip>209.85.213.53</source_ip>
8889 <count>6</count>
8890 <policy_evaluated>
8891 <disposition>none</disposition>
8892 <dkim>pass</dkim>
8893 <spf>pass</spf>
8894 </policy_evaluated>
8895 </row>
8896 <identifiers>
8897 <header_from>example.com</header_from>
8898 </identifiers>
8899 <auth_results>
8900 <dkim>
8901 <domain>example.com</domain>
8902 <result>pass</result>
8903 <human_result>verify result: all signatures verified</human_result>
8904 </dkim>
8905 <spf>
8906 <domain>gmail.com</domain>
8907 <result>pass</result>
8908 </spf>
8909 </auth_results>
8910 </record>
8911 <record>
8912 <row>
8913 <source_ip>221.176.9.68</source_ip>
8914 <count>9</count>
8915 <policy_evaluated>
8916 <disposition>none</disposition>
8917 <dkim>pass</dkim>
8918 <spf>pass</spf>
8919 </policy_evaluated>
8920 </row>
8921 <identifiers>
8922 <header_from>example.com</header_from>
8923 </identifiers>
8924 <auth_results>
8925 <dkim>
8926 <domain>example.com</domain>
8927 <result>pass</result>
8928 <human_result>verify result: all signatures verified</human_result>
8929 </dkim>
8930 <spf>
8931 <domain>139.com</domain>
8932 <result>pass</result>
8933 </spf>
8934 </auth_results>
8935 </record>
8936 <record>
8937 <row>
8938 <source_ip>209.85.213.51</source_ip>
8939 <count>2</count>
8940 <policy_evaluated>
8941 <disposition>none</disposition>
8942 <dkim>pass</dkim>
8943 <spf>pass</spf>
8944 </policy_evaluated>
8945 </row>
8946 <identifiers>
8947 <header_from>example.com</header_from>
8948 </identifiers>
8949 <auth_results>
8950 <dkim>
8951 <domain>example.com</domain>
8952 <result>pass</result>
8953 <human_result>verify result: all signatures verified</human_result>
8954 </dkim>
8955 <spf>
8956 <domain>gmail.com</domain>
8957 <result>pass</result>
8958 </spf>
8959 </auth_results>
8960 </record>
8961 <record>
8962 <row>
8963 <source_ip>112.91.72.161</source_ip>
8964 <count>1</count>
8965 <policy_evaluated>
8966 <disposition>reject</disposition>
8967 <dkim>fail</dkim>
8968 <spf>fail</spf>
8969 </policy_evaluated>
8970 </row>
8971 <identifiers>
8972 <header_from>example.com</header_from>
8973 </identifiers>
8974 <auth_results>
8975 <spf>
8976 <domain>example.com</domain>
8977 <result>fail</result>
8978 </spf>
8979 </auth_results>
8980 </record>
8981 <record>
8982 <row>
8983 <source_ip>106.10.148.183</source_ip>
8984 <count>1</count>
8985 <policy_evaluated>
8986 <disposition>none</disposition>
8987 <dkim>pass</dkim>
8988 <spf>fail</spf>
8989 </policy_evaluated>
8990 </row>
8991 <identifiers>
8992 <header_from>example.com</header_from>
8993 </identifiers>
8994 <auth_results>
8995 <dkim>
8996 <domain>example.com</domain>
8997 <result>pass</result>
8998 <human_result>verify result: all signatures verified</human_result>
8999 </dkim>
9000 <spf>
9001 <domain>example.com</domain>
9002 <result>fail</result>
9003 </spf>
9004 </auth_results>
9005 </record>
9006 <record>
9007 <row>
9008 <source_ip>216.32.181.182</source_ip>
9009 <count>1</count>
9010 <policy_evaluated>
9011 <disposition>reject</disposition>
9012 <dkim>fail</dkim>
9013 <spf>pass</spf>
9014 </policy_evaluated>
9015 </row>
9016 <identifiers>
9017 <header_from>example.com</header_from>
9018 </identifiers>
9019 <auth_results>
9020 <dkim>
9021 <domain>example.com</domain>
9022 <result>neutral</result>
9023 <human_result>sigature verify error: message body does not hash to bh value</human_result>
9024 </dkim>
9025 <spf>
9026 <domain>ku.edu</domain>
9027 <result>pass</result>
9028 </spf>
9029 </auth_results>
9030 </record>
9031 <record>
9032 <row>
9033 <source_ip>65.55.90.240</source_ip>
9034 <count>10</count>
9035 <policy_evaluated>
9036 <disposition>none</disposition>
9037 <dkim>pass</dkim>
9038 <spf>pass</spf>
9039 </policy_evaluated>
9040 </row>
9041 <identifiers>
9042 <header_from>example.com</header_from>
9043 </identifiers>
9044 <auth_results>
9045 <dkim>
9046 <domain>example.com</domain>
9047 <result>pass</result>
9048 <human_result>verify result: all signatures verified</human_result>
9049 </dkim>
9050 <spf>
9051 <domain>hotmail.de</domain>
9052 <result>pass</result>
9053 </spf>
9054 <spf>
9055 <domain>hotmail.it</domain>
9056 <result>pass</result>
9057 </spf>
9058 <spf>
9059 <domain>hotmail.com</domain>
9060 <result>pass</result>
9061 </spf>
9062 </auth_results>
9063 </record>
9064 <record>
9065 <row>
9066 <source_ip>65.55.90.241</source_ip>
9067 <count>5</count>
9068 <policy_evaluated>
9069 <disposition>none</disposition>
9070 <dkim>pass</dkim>
9071 <spf>pass</spf>
9072 </policy_evaluated>
9073 </row>
9074 <identifiers>
9075 <header_from>example.com</header_from>
9076 </identifiers>
9077 <auth_results>
9078 <dkim>
9079 <domain>example.com</domain>
9080 <result>pass</result>
9081 <human_result>verify result: all signatures verified</human_result>
9082 </dkim>
9083 <spf>
9084 <domain>hotmail.it</domain>
9085 <result>pass</result>
9086 </spf>
9087 <spf>
9088 <domain>hotmail.com</domain>
9089 <result>pass</result>
9090 </spf>
9091 </auth_results>
9092 </record>
9093 <record>
9094 <row>
9095 <source_ip>141.211.14.133</source_ip>
9096 <count>1</count>
9097 <policy_evaluated>
9098 <disposition>none</disposition>
9099 <dkim>pass</dkim>
9100 <spf>fail</spf>
9101 </policy_evaluated>
9102 </row>
9103 <identifiers>
9104 <header_from>example.com</header_from>
9105 </identifiers>
9106 <auth_results>
9107 <dkim>
9108 <domain>example.com</domain>
9109 <result>pass</result>
9110 <human_result>verify result: all signatures verified</human_result>
9111 </dkim>
9112 <spf>
9113 <domain>example.com</domain>
9114 <result>fail</result>
9115 </spf>
9116 </auth_results>
9117 </record>
9118 <record>
9119 <row>
9120 <source_ip>141.211.14.132</source_ip>
9121 <count>4</count>
9122 <policy_evaluated>
9123 <disposition>none</disposition>
9124 <dkim>pass</dkim>
9125 <spf>fail</spf>
9126 </policy_evaluated>
9127 </row>
9128 <identifiers>
9129 <header_from>example.com</header_from>
9130 </identifiers>
9131 <auth_results>
9132 <dkim>
9133 <domain>example.com</domain>
9134 <result>pass</result>
9135 <human_result>verify result: all signatures verified</human_result>
9136 </dkim>
9137 <spf>
9138 <domain>example.com</domain>
9139 <result>fail</result>
9140 </spf>
9141 </auth_results>
9142 </record>
9143 <record>
9144 <row>
9145 <source_ip>141.211.14.131</source_ip>
9146 <count>1</count>
9147 <policy_evaluated>
9148 <disposition>none</disposition>
9149 <dkim>pass</dkim>
9150 <spf>fail</spf>
9151 </policy_evaluated>
9152 </row>
9153 <identifiers>
9154 <header_from>example.com</header_from>
9155 </identifiers>
9156 <auth_results>
9157 <dkim>
9158 <domain>example.com</domain>
9159 <result>pass</result>
9160 <human_result>verify result: all signatures verified</human_result>
9161 </dkim>
9162 <spf>
9163 <domain>example.com</domain>
9164 <result>fail</result>
9165 </spf>
9166 </auth_results>
9167 </record>
9168 <record>
9169 <row>
9170 <source_ip>192.104.1.177</source_ip>
9171 <count>1</count>
9172 <policy_evaluated>
9173 <disposition>reject</disposition>
9174 <dkim>fail</dkim>
9175 <spf>fail</spf>
9176 </policy_evaluated>
9177 </row>
9178 <identifiers>
9179 <header_from>example.com</header_from>
9180 </identifiers>
9181 <auth_results>
9182 <dkim>
9183 <domain>example.com</domain>
9184 <result>neutral</result>
9185 <human_result>sigature verify error: message body does not hash to bh value</human_result>
9186 </dkim>
9187 <spf>
9188 <domain>example.com</domain>
9189 <result>fail</result>
9190 </spf>
9191 </auth_results>
9192 </record>
9193 <record>
9194 <row>
9195 <source_ip>209.85.160.51</source_ip>
9196 <count>3</count>
9197 <policy_evaluated>
9198 <disposition>none</disposition>
9199 <dkim>pass</dkim>
9200 <spf>pass</spf>
9201 </policy_evaluated>
9202 </row>
9203 <identifiers>
9204 <header_from>example.com</header_from>
9205 </identifiers>
9206 <auth_results>
9207 <dkim>
9208 <domain>example.com</domain>
9209 <result>pass</result>
9210 <human_result>verify result: all signatures verified</human_result>
9211 </dkim>
9212 <spf>
9213 <domain>gmail.com</domain>
9214 <result>pass</result>
9215 </spf>
9216 </auth_results>
9217 </record>
9218 <record>
9219 <row>
9220 <source_ip>220.181.12.74</source_ip>
9221 <count>6</count>
9222 <policy_evaluated>
9223 <disposition>none</disposition>
9224 <dkim>pass</dkim>
9225 <spf>pass</spf>
9226 </policy_evaluated>
9227 </row>
9228 <identifiers>
9229 <header_from>example.com</header_from>
9230 </identifiers>
9231 <auth_results>
9232 <dkim>
9233 <domain>example.com</domain>
9234 <result>pass</result>
9235 <human_result>verify result: all signatures verified</human_result>
9236 </dkim>
9237 <spf>
9238 <domain>163.com</domain>
9239 <result>pass</result>
9240 </spf>
9241 </auth_results>
9242 </record>
9243 <record>
9244 <row>
9245 <source_ip>61.67.219.130</source_ip>
9246 <count>1</count>
9247 <policy_evaluated>
9248 <disposition>none</disposition>
9249 <dkim>pass</dkim>
9250 <spf>fail</spf>
9251 </policy_evaluated>
9252 </row>
9253 <identifiers>
9254 <header_from>example.com</header_from>
9255 </identifiers>
9256 <auth_results>
9257 <dkim>
9258 <domain>example.com</domain>
9259 <result>pass</result>
9260 <human_result>verify result: all signatures verified</human_result>
9261 </dkim>
9262 <spf>
9263 <domain>example.com</domain>
9264 <result>fail</result>
9265 </spf>
9266 </auth_results>
9267 </record>
9268 <record>
9269 <row>
9270 <source_ip>209.85.160.50</source_ip>
9271 <count>5</count>
9272 <policy_evaluated>
9273 <disposition>none</disposition>
9274 <dkim>pass</dkim>
9275 <spf>pass</spf>
9276 </policy_evaluated>
9277 </row>
9278 <identifiers>
9279 <header_from>example.com</header_from>
9280 </identifiers>
9281 <auth_results>
9282 <dkim>
9283 <domain>example.com</domain>
9284 <result>pass</result>
9285 <human_result>verify result: all signatures verified</human_result>
9286 </dkim>
9287 <spf>
9288 <domain>gmail.com</domain>
9289 <result>pass</result>
9290 </spf>
9291 </auth_results>
9292 </record>
9293 <record>
9294 <row>
9295 <source_ip>123.125.51.76</source_ip>
9296 <count>2</count>
9297 <policy_evaluated>
9298 <disposition>none</disposition>
9299 <dkim>pass</dkim>
9300 <spf>fail</spf>
9301 </policy_evaluated>
9302 </row>
9303 <identifiers>
9304 <header_from>example.com</header_from>
9305 </identifiers>
9306 <auth_results>
9307 <dkim>
9308 <domain>example.com</domain>
9309 <result>pass</result>
9310 <human_result>verify result: all signatures verified</human_result>
9311 </dkim>
9312 <spf>
9313 <domain>anybeautyipl.cn</domain>
9314 <result>pass</result>
9315 </spf>
9316 </auth_results>
9317 </record>
9318 <record>
9319 <row>
9320 <source_ip>123.125.51.77</source_ip>
9321 <count>1</count>
9322 <policy_evaluated>
9323 <disposition>none</disposition>
9324 <dkim>pass</dkim>
9325 <spf>pass</spf>
9326 </policy_evaluated>
9327 </row>
9328 <identifiers>
9329 <header_from>example.com</header_from>
9330 </identifiers>
9331 <auth_results>
9332 <dkim>
9333 <domain>example.com</domain>
9334 <result>pass</result>
9335 <human_result>verify result: all signatures verified</human_result>
9336 </dkim>
9337 <spf>
9338 <domain>anybeautyipl.cn</domain>
9339 <result>pass</result>
9340 </spf>
9341 </auth_results>
9342 </record>
9343 <record>
9344 <row>
9345 <source_ip>209.85.160.52</source_ip>
9346 <count>2</count>
9347 <policy_evaluated>
9348 <disposition>none</disposition>
9349 <dkim>pass</dkim>
9350 <spf>pass</spf>
9351 </policy_evaluated>
9352 </row>
9353 <identifiers>
9354 <header_from>example.com</header_from>
9355 </identifiers>
9356 <auth_results>
9357 <dkim>
9358 <domain>example.com</domain>
9359 <result>pass</result>
9360 <human_result>verify result: all signatures verified</human_result>
9361 </dkim>
9362 <spf>
9363 <domain>gmail.com</domain>
9364 <result>pass</result>
9365 </spf>
9366 </auth_results>
9367 </record>
9368 <record>
9369 <row>
9370 <source_ip>183.63.35.90</source_ip>
9371 <count>16</count>
9372 <policy_evaluated>
9373 <disposition>reject</disposition>
9374 <dkim>fail</dkim>
9375 <spf>fail</spf>
9376 </policy_evaluated>
9377 </row>
9378 <identifiers>
9379 <header_from>example.com</header_from>
9380 </identifiers>
9381 <auth_results>
9382 <spf>
9383 <domain>example.com</domain>
9384 <result>fail</result>
9385 </spf>
9386 </auth_results>
9387 </record>
9388 <record>
9389 <row>
9390 <source_ip>182.173.77.90</source_ip>
9391 <count>1</count>
9392 <policy_evaluated>
9393 <disposition>none</disposition>
9394 <dkim>pass</dkim>
9395 <spf>fail</spf>
9396 </policy_evaluated>
9397 </row>
9398 <identifiers>
9399 <header_from>example.com</header_from>
9400 </identifiers>
9401 <auth_results>
9402 <dkim>
9403 <domain>example.com</domain>
9404 <result>pass</result>
9405 <human_result>verify result: all signatures verified</human_result>
9406 </dkim>
9407 <spf>
9408 <domain>caffcogg.cn</domain>
9409 <result>temperror</result>
9410 </spf>
9411 </auth_results>
9412 </record>
9413 <record>
9414 <row>
9415 <source_ip>220.181.12.53</source_ip>
9416 <count>5</count>
9417 <policy_evaluated>
9418 <disposition>none</disposition>
9419 <dkim>pass</dkim>
9420 <spf>pass</spf>
9421 </policy_evaluated>
9422 </row>
9423 <identifiers>
9424 <header_from>example.com</header_from>
9425 </identifiers>
9426 <auth_results>
9427 <dkim>
9428 <domain>example.com</domain>
9429 <result>pass</result>
9430 <human_result>verify result: all signatures verified</human_result>
9431 </dkim>
9432 <spf>
9433 <domain>163.com</domain>
9434 <result>pass</result>
9435 </spf>
9436 </auth_results>
9437 </record>
9438 <record>
9439 <row>
9440 <source_ip>113.111.117.86</source_ip>
9441 <count>6</count>
9442 <policy_evaluated>
9443 <disposition>reject</disposition>
9444 <dkim>fail</dkim>
9445 <spf>fail</spf>
9446 </policy_evaluated>
9447 </row>
9448 <identifiers>
9449 <header_from>example.com</header_from>
9450 </identifiers>
9451 <auth_results>
9452 <spf>
9453 <domain>example.com</domain>
9454 <result>fail</result>
9455 </spf>
9456 </auth_results>
9457 </record>
9458 <record>
9459 <row>
9460 <source_ip>209.85.160.54</source_ip>
9461 <count>5</count>
9462 <policy_evaluated>
9463 <disposition>none</disposition>
9464 <dkim>pass</dkim>
9465 <spf>pass</spf>
9466 </policy_evaluated>
9467 </row>
9468 <identifiers>
9469 <header_from>example.com</header_from>
9470 </identifiers>
9471 <auth_results>
9472 <dkim>
9473 <domain>example.com</domain>
9474 <result>pass</result>
9475 <human_result>verify result: all signatures verified</human_result>
9476 </dkim>
9477 <spf>
9478 <domain>gmail.com</domain>
9479 <result>pass</result>
9480 </spf>
9481 </auth_results>
9482 </record>
9483 <record>
9484 <row>
9485 <source_ip>220.181.12.77</source_ip>
9486 <count>2</count>
9487 <policy_evaluated>
9488 <disposition>none</disposition>
9489 <dkim>pass</dkim>
9490 <spf>pass</spf>
9491 </policy_evaluated>
9492 </row>
9493 <identifiers>
9494 <header_from>example.com</header_from>
9495 </identifiers>
9496 <auth_results>
9497 <dkim>
9498 <domain>example.com</domain>
9499 <result>pass</result>
9500 <human_result>verify result: all signatures verified</human_result>
9501 </dkim>
9502 <spf>
9503 <domain>163.com</domain>
9504 <result>pass</result>
9505 </spf>
9506 </auth_results>
9507 </record>
9508 <record>
9509 <row>
9510 <source_ip>79.101.184.83</source_ip>
9511 <count>1</count>
9512 <policy_evaluated>
9513 <disposition>reject</disposition>
9514 <dkim>fail</dkim>
9515 <spf>fail</spf>
9516 </policy_evaluated>
9517 </row>
9518 <identifiers>
9519 <header_from>example.com</header_from>
9520 </identifiers>
9521 <auth_results>
9522 <spf>
9523 <domain>example.com</domain>
9524 <result>fail</result>
9525 </spf>
9526 </auth_results>
9527 </record>
9528 <record>
9529 <row>
9530 <source_ip>58.60.186.1</source_ip>
9531 <count>6</count>
9532 <policy_evaluated>
9533 <disposition>reject</disposition>
9534 <dkim>fail</dkim>
9535 <spf>fail</spf>
9536 </policy_evaluated>
9537 </row>
9538 <identifiers>
9539 <header_from>example.com</header_from>
9540 </identifiers>
9541 <auth_results>
9542 <spf>
9543 <domain>example.com</domain>
9544 <result>fail</result>
9545 </spf>
9546 </auth_results>
9547 </record>
9548 <record>
9549 <row>
9550 <source_ip>113.108.13.49</source_ip>
9551 <count>2</count>
9552 <policy_evaluated>
9553 <disposition>none</disposition>
9554 <dkim>pass</dkim>
9555 <spf>pass</spf>
9556 </policy_evaluated>
9557 </row>
9558 <identifiers>
9559 <header_from>example.com</header_from>
9560 </identifiers>
9561 <auth_results>
9562 <dkim>
9563 <domain>example.com</domain>
9564 <result>pass</result>
9565 <human_result>verify result: all signatures verified</human_result>
9566 </dkim>
9567 <spf>
9568 <domain>qq.com</domain>
9569 <result>pass</result>
9570 </spf>
9571 </auth_results>
9572 </record>
9573 <record>
9574 <row>
9575 <source_ip>125.208.191.68</source_ip>
9576 <count>1</count>
9577 <policy_evaluated>
9578 <disposition>none</disposition>
9579 <dkim>pass</dkim>
9580 <spf>fail</spf>
9581 </policy_evaluated>
9582 </row>
9583 <identifiers>
9584 <header_from>example.com</header_from>
9585 </identifiers>
9586 <auth_results>
9587 <dkim>
9588 <domain>example.com</domain>
9589 <result>pass</result>
9590 <human_result>verify result: all signatures verified</human_result>
9591 </dkim>
9592 <spf>
9593 <domain>example.com</domain>
9594 <result>fail</result>
9595 </spf>
9596 </auth_results>
9597 </record>
9598 <record>
9599 <row>
9600 <source_ip>125.231.210.65</source_ip>
9601 <count>6</count>
9602 <policy_evaluated>
9603 <disposition>reject</disposition>
9604 <dkim>fail</dkim>
9605 <spf>fail</spf>
9606 </policy_evaluated>
9607 </row>
9608 <identifiers>
9609 <header_from>example.com</header_from>
9610 </identifiers>
9611 <auth_results>
9612 <spf>
9613 <domain>example.com</domain>
9614 <result>fail</result>
9615 </spf>
9616 </auth_results>
9617 </record>
9618 <record>
9619 <row>
9620 <source_ip>113.108.13.48</source_ip>
9621 <count>4</count>
9622 <policy_evaluated>
9623 <disposition>none</disposition>
9624 <dkim>pass</dkim>
9625 <spf>pass</spf>
9626 </policy_evaluated>
9627 </row>
9628 <identifiers>
9629 <header_from>example.com</header_from>
9630 </identifiers>
9631 <auth_results>
9632 <dkim>
9633 <domain>example.com</domain>
9634 <result>pass</result>
9635 <human_result>verify result: all signatures verified</human_result>
9636 </dkim>
9637 <spf>
9638 <domain>qq.com</domain>
9639 <result>pass</result>
9640 </spf>
9641 </auth_results>
9642 </record>
9643 <record>
9644 <row>
9645 <source_ip>194.167.122.27</source_ip>
9646 <count>1</count>
9647 <policy_evaluated>
9648 <disposition>none</disposition>
9649 <dkim>pass</dkim>
9650 <spf>fail</spf>
9651 </policy_evaluated>
9652 </row>
9653 <identifiers>
9654 <header_from>example.com</header_from>
9655 </identifiers>
9656 <auth_results>
9657 <dkim>
9658 <domain>example.com</domain>
9659 <result>pass</result>
9660 <human_result>verify result: all signatures verified</human_result>
9661 </dkim>
9662 <spf>
9663 <domain>example.com</domain>
9664 <result>fail</result>
9665 </spf>
9666 </auth_results>
9667 </record>
9668 <record>
9669 <row>
9670 <source_ip>183.4.113.245</source_ip>
9671 <count>3</count>
9672 <policy_evaluated>
9673 <disposition>reject</disposition>
9674 <dkim>fail</dkim>
9675 <spf>fail</spf>
9676 </policy_evaluated>
9677 </row>
9678 <identifiers>
9679 <header_from>example.com</header_from>
9680 </identifiers>
9681 <auth_results>
9682 <spf>
9683 <domain>example.com</domain>
9684 <result>fail</result>
9685 </spf>
9686 </auth_results>
9687 </record>
9688 <record>
9689 <row>
9690 <source_ip>117.6.176.74</source_ip>
9691 <count>2</count>
9692 <policy_evaluated>
9693 <disposition>reject</disposition>
9694 <dkim>fail</dkim>
9695 <spf>fail</spf>
9696 </policy_evaluated>
9697 </row>
9698 <identifiers>
9699 <header_from>example.com</header_from>
9700 </identifiers>
9701 <auth_results>
9702 <spf>
9703 <domain>example.com</domain>
9704 <result>fail</result>
9705 </spf>
9706 </auth_results>
9707 </record>
9708 <record>
9709 <row>
9710 <source_ip>69.171.232.159</source_ip>
9711 <count>3593</count>
9712 <policy_evaluated>
9713 <disposition>none</disposition>
9714 <dkim>pass</dkim>
9715 <spf>pass</spf>
9716 </policy_evaluated>
9717 </row>
9718 <identifiers>
9719 <header_from>example.com</header_from>
9720 </identifiers>
9721 <auth_results>
9722 <dkim>
9723 <domain>example.com</domain>
9724 <result>pass</result>
9725 <human_result>verify result: all signatures verified</human_result>
9726 </dkim>
9727 <spf>
9728 <domain>example.com</domain>
9729 <result>pass</result>
9730 </spf>
9731 </auth_results>
9732 </record>
9733 <record>
9734 <row>
9735 <source_ip>69.171.232.158</source_ip>
9736 <count>3694</count>
9737 <policy_evaluated>
9738 <disposition>none</disposition>
9739 <dkim>pass</dkim>
9740 <spf>pass</spf>
9741 </policy_evaluated>
9742 </row>
9743 <identifiers>
9744 <header_from>pages.example.com, example.com</header_from>
9745 </identifiers>
9746 <auth_results>
9747 <dkim>
9748 <domain>pages.example.com</domain>
9749 <result>pass</result>
9750 <human_result>verify result: all signatures verified</human_result>
9751 </dkim>
9752 <dkim>
9753 <domain>example.com</domain>
9754 <result>pass</result>
9755 <human_result>verify result: all signatures verified</human_result>
9756 </dkim>
9757 <spf>
9758 <domain>pages.example.com</domain>
9759 <result>pass</result>
9760 </spf>
9761 <spf>
9762 <domain>example.com</domain>
9763 <result>pass</result>
9764 </spf>
9765 </auth_results>
9766 </record>
9767 <record>
9768 <row>
9769 <source_ip>69.171.232.155</source_ip>
9770 <count>3548</count>
9771 <policy_evaluated>
9772 <disposition>none</disposition>
9773 <dkim>pass</dkim>
9774 <spf>pass</spf>
9775 </policy_evaluated>
9776 </row>
9777 <identifiers>
9778 <header_from>example.com</header_from>
9779 </identifiers>
9780 <auth_results>
9781 <dkim>
9782 <domain>example.com</domain>
9783 <result>pass</result>
9784 <human_result>verify result: all signatures verified</human_result>
9785 </dkim>
9786 <spf>
9787 <domain>example.com</domain>
9788 <result>pass</result>
9789 </spf>
9790 </auth_results>
9791 </record>
9792 <record>
9793 <row>
9794 <source_ip>69.171.232.154</source_ip>
9795 <count>3562</count>
9796 <policy_evaluated>
9797 <disposition>none</disposition>
9798 <dkim>pass</dkim>
9799 <spf>pass</spf>
9800 </policy_evaluated>
9801 </row>
9802 <identifiers>
9803 <header_from>pages.example.com, example.com</header_from>
9804 </identifiers>
9805 <auth_results>
9806 <dkim>
9807 <domain>pages.example.com</domain>
9808 <result>pass</result>
9809 <human_result>verify result: all signatures verified</human_result>
9810 </dkim>
9811 <dkim>
9812 <domain>example.com</domain>
9813 <result>pass</result>
9814 <human_result>verify result: all signatures verified</human_result>
9815 </dkim>
9816 <spf>
9817 <domain>pages.example.com</domain>
9818 <result>pass</result>
9819 </spf>
9820 <spf>
9821 <domain>example.com</domain>
9822 <result>pass</result>
9823 </spf>
9824 </auth_results>
9825 </record>
9826 <record>
9827 <row>
9828 <source_ip>69.171.232.157</source_ip>
9829 <count>3556</count>
9830 <policy_evaluated>
9831 <disposition>none</disposition>
9832 <dkim>pass</dkim>
9833 <spf>pass</spf>
9834 </policy_evaluated>
9835 </row>
9836 <identifiers>
9837 <header_from>example.com</header_from>
9838 </identifiers>
9839 <auth_results>
9840 <dkim>
9841 <domain>example.com</domain>
9842 <result>pass</result>
9843 <human_result>verify result: all signatures verified</human_result>
9844 </dkim>
9845 <spf>
9846 <domain>example.com</domain>
9847 <result>pass</result>
9848 </spf>
9849 </auth_results>
9850 </record>
9851 <record>
9852 <row>
9853 <source_ip>69.171.232.156</source_ip>
9854 <count>3625</count>
9855 <policy_evaluated>
9856 <disposition>none</disposition>
9857 <dkim>pass</dkim>
9858 <spf>pass</spf>
9859 </policy_evaluated>
9860 </row>
9861 <identifiers>
9862 <header_from>pages.example.com, example.com</header_from>
9863 </identifiers>
9864 <auth_results>
9865 <dkim>
9866 <domain>pages.example.com</domain>
9867 <result>pass</result>
9868 <human_result>verify result: all signatures verified</human_result>
9869 </dkim>
9870 <dkim>
9871 <domain>example.com</domain>
9872 <result>pass</result>
9873 <human_result>verify result: all signatures verified</human_result>
9874 </dkim>
9875 <spf>
9876 <domain>pages.example.com</domain>
9877 <result>neutral</result>
9878 </spf>
9879 <spf>
9880 <domain>example.com</domain>
9881 <result>pass</result>
9882 </spf>
9883 </auth_results>
9884 </record>
9885 <record>
9886 <row>
9887 <source_ip>69.171.232.151</source_ip>
9888 <count>3532</count>
9889 <policy_evaluated>
9890 <disposition>none</disposition>
9891 <dkim>pass</dkim>
9892 <spf>pass</spf>
9893 </policy_evaluated>
9894 </row>
9895 <identifiers>
9896 <header_from>pages.example.com, example.com</header_from>
9897 </identifiers>
9898 <auth_results>
9899 <dkim>
9900 <domain>pages.example.com</domain>
9901 <result>pass</result>
9902 <human_result>verify result: all signatures verified</human_result>
9903 </dkim>
9904 <dkim>
9905 <domain>example.com</domain>
9906 <result>pass</result>
9907 <human_result>verify result: all signatures verified</human_result>
9908 </dkim>
9909 <spf>
9910 <domain>pages.example.com</domain>
9911 <result>neutral</result>
9912 </spf>
9913 <spf>
9914 <domain>example.com</domain>
9915 <result>pass</result>
9916 </spf>
9917 </auth_results>
9918 </record>
9919 <record>
9920 <row>
9921 <source_ip>69.171.232.150</source_ip>
9922 <count>3570</count>
9923 <policy_evaluated>
9924 <disposition>none</disposition>
9925 <dkim>pass</dkim>
9926 <spf>pass</spf>
9927 </policy_evaluated>
9928 </row>
9929 <identifiers>
9930 <header_from>example.com</header_from>
9931 </identifiers>
9932 <auth_results>
9933 <dkim>
9934 <domain>example.com</domain>
9935 <result>pass</result>
9936 <human_result>verify result: all signatures verified</human_result>
9937 </dkim>
9938 <spf>
9939 <domain>example.com</domain>
9940 <result>pass</result>
9941 </spf>
9942 </auth_results>
9943 </record>
9944 <record>
9945 <row>
9946 <source_ip>69.171.232.153</source_ip>
9947 <count>3633</count>
9948 <policy_evaluated>
9949 <disposition>none</disposition>
9950 <dkim>pass</dkim>
9951 <spf>pass</spf>
9952 </policy_evaluated>
9953 </row>
9954 <identifiers>
9955 <header_from>example.com</header_from>
9956 </identifiers>
9957 <auth_results>
9958 <dkim>
9959 <domain>example.com</domain>
9960 <result>pass</result>
9961 <human_result>verify result: all signatures verified</human_result>
9962 </dkim>
9963 <spf>
9964 <domain>example.com</domain>
9965 <result>pass</result>
9966 </spf>
9967 </auth_results>
9968 </record>
9969 <record>
9970 <row>
9971 <source_ip>69.171.232.152</source_ip>
9972 <count>3572</count>
9973 <policy_evaluated>
9974 <disposition>none</disposition>
9975 <dkim>pass</dkim>
9976 <spf>pass</spf>
9977 </policy_evaluated>
9978 </row>
9979 <identifiers>
9980 <header_from>example.com</header_from>
9981 </identifiers>
9982 <auth_results>
9983 <dkim>
9984 <domain>example.com</domain>
9985 <result>pass</result>
9986 <human_result>verify result: all signatures verified</human_result>
9987 </dkim>
9988 <spf>
9989 <domain>example.com</domain>
9990 <result>pass</result>
9991 </spf>
9992 </auth_results>
9993 </record>
9994 <record>
9995 <row>
9996 <source_ip>183.60.61.210</source_ip>
9997 <count>1</count>
9998 <policy_evaluated>
9999 <disposition>none</disposition>
10000 <dkim>pass</dkim>
10001 <spf>pass</spf>
10002 </policy_evaluated>
10003 </row>
10004 <identifiers>
10005 <header_from>example.com</header_from>
10006 </identifiers>
10007 <auth_results>
10008 <dkim>
10009 <domain>example.com</domain>
10010 <result>pass</result>
10011 <human_result>verify result: all signatures verified</human_result>
10012 </dkim>
10013 <spf>
10014 <domain>qq.com</domain>
10015 <result>pass</result>
10016 </spf>
10017 </auth_results>
10018 </record>
10019 <record>
10020 <row>
10021 <source_ip>128.253.83.168</source_ip>
10022 <count>1</count>
10023 <policy_evaluated>
10024 <disposition>reject</disposition>
10025 <dkim>fail</dkim>
10026 <spf>fail</spf>
10027 </policy_evaluated>
10028 </row>
10029 <identifiers>
10030 <header_from>example.com</header_from>
10031 </identifiers>
10032 <auth_results>
10033 <dkim>
10034 <domain>example.com</domain>
10035 <result>neutral</result>
10036 <human_result>sigature verify error: message body does not hash to bh value</human_result>
10037 </dkim>
10038 <spf>
10039 <domain>example.com</domain>
10040 <result>fail</result>
10041 </spf>
10042 </auth_results>
10043 </record>
10044 <record>
10045 <row>
10046 <source_ip>128.253.83.165</source_ip>
10047 <count>3</count>
10048 <policy_evaluated>
10049 <disposition>reject</disposition>
10050 <dkim>fail</dkim>
10051 <spf>fail</spf>
10052 </policy_evaluated>
10053 </row>
10054 <identifiers>
10055 <header_from>example.com</header_from>
10056 </identifiers>
10057 <auth_results>
10058 <dkim>
10059 <domain>example.com</domain>
10060 <result>neutral</result>
10061 <human_result>sigature verify error: message body does not hash to bh value</human_result>
10062 </dkim>
10063 <spf>
10064 <domain>example.com</domain>
10065 <result>fail</result>
10066 </spf>
10067 </auth_results>
10068 </record>
10069 <record>
10070 <row>
10071 <source_ip>128.253.83.164</source_ip>
10072 <count>3</count>
10073 <policy_evaluated>
10074 <disposition>reject</disposition>
10075 <dkim>fail</dkim>
10076 <spf>fail</spf>
10077 </policy_evaluated>
10078 </row>
10079 <identifiers>
10080 <header_from>example.com</header_from>
10081 </identifiers>
10082 <auth_results>
10083 <dkim>
10084 <domain>example.com</domain>
10085 <result>neutral</result>
10086 <human_result>sigature verify error: message body does not hash to bh value</human_result>
10087 </dkim>
10088 <spf>
10089 <domain>example.com</domain>
10090 <result>fail</result>
10091 </spf>
10092 </auth_results>
10093 </record>
10094 <record>
10095 <row>
10096 <source_ip>219.129.174.200</source_ip>
10097 <count>12</count>
10098 <policy_evaluated>
10099 <disposition>reject</disposition>
10100 <dkim>fail</dkim>
10101 <spf>fail</spf>
10102 </policy_evaluated>
10103 </row>
10104 <identifiers>
10105 <header_from>example.com</header_from>
10106 </identifiers>
10107 <auth_results>
10108 <spf>
10109 <domain>example.com</domain>
10110 <result>fail</result>
10111 </spf>
10112 </auth_results>
10113 </record>
10114 <record>
10115 <row>
10116 <source_ip>209.85.214.180</source_ip>
10117 <count>4</count>
10118 <policy_evaluated>
10119 <disposition>none</disposition>
10120 <dkim>pass</dkim>
10121 <spf>pass</spf>
10122 </policy_evaluated>
10123 </row>
10124 <identifiers>
10125 <header_from>example.com</header_from>
10126 </identifiers>
10127 <auth_results>
10128 <dkim>
10129 <domain>example.com</domain>
10130 <result>pass</result>
10131 <human_result>verify result: all signatures verified</human_result>
10132 </dkim>
10133 <spf>
10134 <domain>gmail.com</domain>
10135 <result>pass</result>
10136 </spf>
10137 </auth_results>
10138 </record>
10139 <record>
10140 <row>
10141 <source_ip>209.85.214.181</source_ip>
10142 <count>10</count>
10143 <policy_evaluated>
10144 <disposition>none</disposition>
10145 <dkim>pass</dkim>
10146 <spf>pass</spf>
10147 </policy_evaluated>
10148 </row>
10149 <identifiers>
10150 <header_from>example.com</header_from>
10151 </identifiers>
10152 <auth_results>
10153 <dkim>
10154 <domain>example.com</domain>
10155 <result>pass</result>
10156 <human_result>verify result: all signatures verified</human_result>
10157 </dkim>
10158 <spf>
10159 <domain>gmail.com</domain>
10160 <result>pass</result>
10161 </spf>
10162 </auth_results>
10163 </record>
10164 <record>
10165 <row>
10166 <source_ip>209.85.214.182</source_ip>
10167 <count>10</count>
10168 <policy_evaluated>
10169 <disposition>none</disposition>
10170 <dkim>pass</dkim>
10171 <spf>pass</spf>
10172 </policy_evaluated>
10173 </row>
10174 <identifiers>
10175 <header_from>example.com</header_from>
10176 </identifiers>
10177 <auth_results>
10178 <dkim>
10179 <domain>example.com</domain>
10180 <result>pass</result>
10181 <human_result>verify result: all signatures verified</human_result>
10182 </dkim>
10183 <spf>
10184 <domain>gmail.com</domain>
10185 <result>pass</result>
10186 </spf>
10187 </auth_results>
10188 </record>
10189 <record>
10190 <row>
10191 <source_ip>220.181.12.79</source_ip>
10192 <count>6</count>
10193 <policy_evaluated>
10194 <disposition>none</disposition>
10195 <dkim>pass</dkim>
10196 <spf>pass</spf>
10197 </policy_evaluated>
10198 </row>
10199 <identifiers>
10200 <header_from>example.com</header_from>
10201 </identifiers>
10202 <auth_results>
10203 <dkim>
10204 <domain>example.com</domain>
10205 <result>pass</result>
10206 <human_result>verify result: all signatures verified</human_result>
10207 </dkim>
10208 <spf>
10209 <domain>163.com</domain>
10210 <result>pass</result>
10211 </spf>
10212 </auth_results>
10213 </record>
10214 <record>
10215 <row>
10216 <source_ip>125.92.249.10</source_ip>
10217 <count>5</count>
10218 <policy_evaluated>
10219 <disposition>reject</disposition>
10220 <dkim>fail</dkim>
10221 <spf>fail</spf>
10222 </policy_evaluated>
10223 </row>
10224 <identifiers>
10225 <header_from>example.com</header_from>
10226 </identifiers>
10227 <auth_results>
10228 <spf>
10229 <domain>example.com</domain>
10230 <result>fail</result>
10231 </spf>
10232 </auth_results>
10233 </record>
10234 <record>
10235 <row>
10236 <source_ip>221.224.213.66</source_ip>
10237 <count>153</count>
10238 <policy_evaluated>
10239 <disposition>reject</disposition>
10240 <dkim>fail</dkim>
10241 <spf>fail</spf>
10242 </policy_evaluated>
10243 </row>
10244 <identifiers>
10245 <header_from>example.com</header_from>
10246 </identifiers>
10247 <auth_results>
10248 <spf>
10249 <domain>example.com</domain>
10250 <result>fail</result>
10251 </spf>
10252 </auth_results>
10253 </record>
10254 <record>
10255 <row>
10256 <source_ip>66.220.144.139</source_ip>
10257 <count>2089</count>
10258 <policy_evaluated>
10259 <disposition>none</disposition>
10260 <dkim>pass</dkim>
10261 <spf>pass</spf>
10262 </policy_evaluated>
10263 </row>
10264 <identifiers>
10265 <header_from>pages.example.com, example.com</header_from>
10266 </identifiers>
10267 <auth_results>
10268 <dkim>
10269 <domain>pages.example.com</domain>
10270 <result>pass</result>
10271 <human_result>verify result: all signatures verified</human_result>
10272 </dkim>
10273 <dkim>
10274 <domain>example.com</domain>
10275 <result>pass</result>
10276 <human_result>verify result: all signatures verified</human_result>
10277 </dkim>
10278 <spf>
10279 <domain>pages.example.com</domain>
10280 <result>neutral</result>
10281 </spf>
10282 <spf>
10283 <domain>example.com</domain>
10284 <result>pass</result>
10285 </spf>
10286 </auth_results>
10287 </record>
10288 <record>
10289 <row>
10290 <source_ip>66.220.144.138</source_ip>
10291 <count>1924</count>
10292 <policy_evaluated>
10293 <disposition>none</disposition>
10294 <dkim>pass</dkim>
10295 <spf>pass</spf>
10296 </policy_evaluated>
10297 </row>
10298 <identifiers>
10299 <header_from>pages.example.com, example.com</header_from>
10300 </identifiers>
10301 <auth_results>
10302 <dkim>
10303 <domain>pages.example.com</domain>
10304 <result>pass</result>
10305 <human_result>verify result: all signatures verified</human_result>
10306 </dkim>
10307 <dkim>
10308 <domain>example.com</domain>
10309 <result>pass</result>
10310 <human_result>verify result: all signatures verified</human_result>
10311 </dkim>
10312 <spf>
10313 <domain>pages.example.com</domain>
10314 <result>pass</result>
10315 </spf>
10316 <spf>
10317 <domain>example.com</domain>
10318 <result>pass</result>
10319 </spf>
10320 </auth_results>
10321 </record>
10322 <record>
10323 <row>
10324 <source_ip>14.214.241.129</source_ip>
10325 <count>12</count>
10326 <policy_evaluated>
10327 <disposition>reject</disposition>
10328 <dkim>fail</dkim>
10329 <spf>fail</spf>
10330 </policy_evaluated>
10331 </row>
10332 <identifiers>
10333 <header_from>example.com</header_from>
10334 </identifiers>
10335 <auth_results>
10336 <spf>
10337 <domain>example.com</domain>
10338 <result>fail</result>
10339 </spf>
10340 </auth_results>
10341 </record>
10342 <record>
10343 <row>
10344 <source_ip>66.220.144.135</source_ip>
10345 <count>2175</count>
10346 <policy_evaluated>
10347 <disposition>none</disposition>
10348 <dkim>pass</dkim>
10349 <spf>pass</spf>
10350 </policy_evaluated>
10351 </row>
10352 <identifiers>
10353 <header_from>pages.example.com, example.com</header_from>
10354 </identifiers>
10355 <auth_results>
10356 <dkim>
10357 <domain>pages.example.com</domain>
10358 <result>pass</result>
10359 <human_result>verify result: all signatures verified</human_result>
10360 </dkim>
10361 <dkim>
10362 <domain>example.com</domain>
10363 <result>pass</result>
10364 <human_result>verify result: all signatures verified</human_result>
10365 </dkim>
10366 <spf>
10367 <domain>pages.example.com</domain>
10368 <result>pass</result>
10369 </spf>
10370 <spf>
10371 <domain>example.com</domain>
10372 <result>pass</result>
10373 </spf>
10374 </auth_results>
10375 </record>
10376 <record>
10377 <row>
10378 <source_ip>66.220.144.137</source_ip>
10379 <count>2082</count>
10380 <policy_evaluated>
10381 <disposition>none</disposition>
10382 <dkim>pass</dkim>
10383 <spf>pass</spf>
10384 </policy_evaluated>
10385 </row>
10386 <identifiers>
10387 <header_from>pages.example.com, example.com</header_from>
10388 </identifiers>
10389 <auth_results>
10390 <dkim>
10391 <domain>pages.example.com</domain>
10392 <result>pass</result>
10393 <human_result>verify result: all signatures verified</human_result>
10394 </dkim>
10395 <dkim>
10396 <domain>example.com</domain>
10397 <result>pass</result>
10398 <human_result>verify result: all signatures verified</human_result>
10399 </dkim>
10400 <spf>
10401 <domain>pages.example.com</domain>
10402 <result>neutral</result>
10403 </spf>
10404 <spf>
10405 <domain>example.com</domain>
10406 <result>pass</result>
10407 </spf>
10408 </auth_results>
10409 </record>
10410 <record>
10411 <row>
10412 <source_ip>66.220.144.136</source_ip>
10413 <count>2080</count>
10414 <policy_evaluated>
10415 <disposition>none</disposition>
10416 <dkim>pass</dkim>
10417 <spf>pass</spf>
10418 </policy_evaluated>
10419 </row>
10420 <identifiers>
10421 <header_from>pages.example.com, example.com</header_from>
10422 </identifiers>
10423 <auth_results>
10424 <dkim>
10425 <domain>pages.example.com</domain>
10426 <result>pass</result>
10427 <human_result>verify result: all signatures verified</human_result>
10428 </dkim>
10429 <dkim>
10430 <domain>example.com</domain>
10431 <result>pass</result>
10432 <human_result>verify result: all signatures verified</human_result>
10433 </dkim>
10434 <spf>
10435 <domain>pages.example.com</domain>
10436 <result>neutral</result>
10437 </spf>
10438 <spf>
10439 <domain>example.com</domain>
10440 <result>pass</result>
10441 </spf>
10442 </auth_results>
10443 </record>
10444 <record>
10445 <row>
10446 <source_ip>203.90.225.207</source_ip>
10447 <count>1</count>
10448 <policy_evaluated>
10449 <disposition>none</disposition>
10450 <dkim>pass</dkim>
10451 <spf>fail</spf>
10452 </policy_evaluated>
10453 </row>
10454 <identifiers>
10455 <header_from>example.com</header_from>
10456 </identifiers>
10457 <auth_results>
10458 <dkim>
10459 <domain>example.com</domain>
10460 <result>pass</result>
10461 <human_result>verify result: all signatures verified</human_result>
10462 </dkim>
10463 <spf>
10464 <domain>example.com</domain>
10465 <result>fail</result>
10466 </spf>
10467 </auth_results>
10468 </record>
10469 <record>
10470 <row>
10471 <source_ip>130.127.237.235</source_ip>
10472 <count>2</count>
10473 <policy_evaluated>
10474 <disposition>none</disposition>
10475 <dkim>pass</dkim>
10476 <spf>fail</spf>
10477 </policy_evaluated>
10478 </row>
10479 <identifiers>
10480 <header_from>example.com</header_from>
10481 </identifiers>
10482 <auth_results>
10483 <dkim>
10484 <domain>example.com</domain>
10485 <result>pass</result>
10486 <human_result>verify result: all signatures verified</human_result>
10487 </dkim>
10488 <spf>
10489 <domain>example.com</domain>
10490 <result>fail</result>
10491 </spf>
10492 </auth_results>
10493 </record>
10494 <record>
10495 <row>
10496 <source_ip>65.55.88.15</source_ip>
10497 <count>1</count>
10498 <policy_evaluated>
10499 <disposition>reject</disposition>
10500 <dkim>fail</dkim>
10501 <spf>pass</spf>
10502 </policy_evaluated>
10503 </row>
10504 <identifiers>
10505 <header_from>example.com</header_from>
10506 </identifiers>
10507 <auth_results>
10508 <dkim>
10509 <domain>example.com</domain>
10510 <result>neutral</result>
10511 <human_result>sigature verify error: message body does not hash to bh value</human_result>
10512 </dkim>
10513 <spf>
10514 <domain>connect.polyu.hk</domain>
10515 <result>pass</result>
10516 </spf>
10517 </auth_results>
10518 </record>
10519 <record>
10520 <row>
10521 <source_ip>209.85.212.179</source_ip>
10522 <count>2</count>
10523 <policy_evaluated>
10524 <disposition>none</disposition>
10525 <dkim>pass</dkim>
10526 <spf>pass</spf>
10527 </policy_evaluated>
10528 </row>
10529 <identifiers>
10530 <header_from>example.com</header_from>
10531 </identifiers>
10532 <auth_results>
10533 <dkim>
10534 <domain>example.com</domain>
10535 <result>pass</result>
10536 <human_result>verify result: all signatures verified</human_result>
10537 </dkim>
10538 <spf>
10539 <domain>gmail.com</domain>
10540 <result>pass</result>
10541 </spf>
10542 </auth_results>
10543 </record>
10544 <record>
10545 <row>
10546 <source_ip>209.85.212.178</source_ip>
10547 <count>5</count>
10548 <policy_evaluated>
10549 <disposition>none</disposition>
10550 <dkim>pass</dkim>
10551 <spf>pass</spf>
10552 </policy_evaluated>
10553 </row>
10554 <identifiers>
10555 <header_from>example.com</header_from>
10556 </identifiers>
10557 <auth_results>
10558 <dkim>
10559 <domain>example.com</domain>
10560 <result>pass</result>
10561 <human_result>verify result: all signatures verified</human_result>
10562 </dkim>
10563 <spf>
10564 <domain>gmail.com</domain>
10565 <result>pass</result>
10566 </spf>
10567 </auth_results>
10568 </record>
10569 <record>
10570 <row>
10571 <source_ip>209.85.212.173</source_ip>
10572 <count>3</count>
10573 <policy_evaluated>
10574 <disposition>none</disposition>
10575 <dkim>pass</dkim>
10576 <spf>pass</spf>
10577 </policy_evaluated>
10578 </row>
10579 <identifiers>
10580 <header_from>example.com</header_from>
10581 </identifiers>
10582 <auth_results>
10583 <dkim>
10584 <domain>example.com</domain>
10585 <result>pass</result>
10586 <human_result>verify result: all signatures verified</human_result>
10587 </dkim>
10588 <spf>
10589 <domain>gmail.com</domain>
10590 <result>pass</result>
10591 </spf>
10592 </auth_results>
10593 </record>
10594 <record>
10595 <row>
10596 <source_ip>209.85.212.172</source_ip>
10597 <count>2</count>
10598 <policy_evaluated>
10599 <disposition>none</disposition>
10600 <dkim>pass</dkim>
10601 <spf>pass</spf>
10602 </policy_evaluated>
10603 </row>
10604 <identifiers>
10605 <header_from>example.com</header_from>
10606 </identifiers>
10607 <auth_results>
10608 <dkim>
10609 <domain>example.com</domain>
10610 <result>pass</result>
10611 <human_result>verify result: all signatures verified</human_result>
10612 </dkim>
10613 <spf>
10614 <domain>gmail.com</domain>
10615 <result>pass</result>
10616 </spf>
10617 </auth_results>
10618 </record>
10619 <record>
10620 <row>
10621 <source_ip>209.85.212.171</source_ip>
10622 <count>1</count>
10623 <policy_evaluated>
10624 <disposition>none</disposition>
10625 <dkim>pass</dkim>
10626 <spf>pass</spf>
10627 </policy_evaluated>
10628 </row>
10629 <identifiers>
10630 <header_from>example.com</header_from>
10631 </identifiers>
10632 <auth_results>
10633 <dkim>
10634 <domain>example.com</domain>
10635 <result>pass</result>
10636 <human_result>verify result: all signatures verified</human_result>
10637 </dkim>
10638 <spf>
10639 <domain>gmail.com</domain>
10640 <result>pass</result>
10641 </spf>
10642 </auth_results>
10643 </record>
10644 <record>
10645 <row>
10646 <source_ip>209.85.212.170</source_ip>
10647 <count>2</count>
10648 <policy_evaluated>
10649 <disposition>none</disposition>
10650 <dkim>pass</dkim>
10651 <spf>pass</spf>
10652 </policy_evaluated>
10653 </row>
10654 <identifiers>
10655 <header_from>example.com</header_from>
10656 </identifiers>
10657 <auth_results>
10658 <dkim>
10659 <domain>example.com</domain>
10660 <result>pass</result>
10661 <human_result>verify result: all signatures verified</human_result>
10662 </dkim>
10663 <spf>
10664 <domain>gmail.com</domain>
10665 <result>pass</result>
10666 </spf>
10667 </auth_results>
10668 </record>
10669 <record>
10670 <row>
10671 <source_ip>209.85.212.177</source_ip>
10672 <count>4</count>
10673 <policy_evaluated>
10674 <disposition>none</disposition>
10675 <dkim>pass</dkim>
10676 <spf>pass</spf>
10677 </policy_evaluated>
10678 </row>
10679 <identifiers>
10680 <header_from>example.com</header_from>
10681 </identifiers>
10682 <auth_results>
10683 <dkim>
10684 <domain>example.com</domain>
10685 <result>pass</result>
10686 <human_result>verify result: all signatures verified</human_result>
10687 </dkim>
10688 <spf>
10689 <domain>gmail.com</domain>
10690 <result>pass</result>
10691 </spf>
10692 </auth_results>
10693 </record>
10694 <record>
10695 <row>
10696 <source_ip>209.85.212.176</source_ip>
10697 <count>1</count>
10698 <policy_evaluated>
10699 <disposition>none</disposition>
10700 <dkim>pass</dkim>
10701 <spf>pass</spf>
10702 </policy_evaluated>
10703 </row>
10704 <identifiers>
10705 <header_from>example.com</header_from>
10706 </identifiers>
10707 <auth_results>
10708 <dkim>
10709 <domain>example.com</domain>
10710 <result>pass</result>
10711 <human_result>verify result: all signatures verified</human_result>
10712 </dkim>
10713 <spf>
10714 <domain>gmail.com</domain>
10715 <result>pass</result>
10716 </spf>
10717 </auth_results>
10718 </record>
10719 <record>
10720 <row>
10721 <source_ip>209.85.212.175</source_ip>
10722 <count>4</count>
10723 <policy_evaluated>
10724 <disposition>none</disposition>
10725 <dkim>pass</dkim>
10726 <spf>pass</spf>
10727 </policy_evaluated>
10728 </row>
10729 <identifiers>
10730 <header_from>example.com</header_from>
10731 </identifiers>
10732 <auth_results>
10733 <dkim>
10734 <domain>example.com</domain>
10735 <result>pass</result>
10736 <human_result>verify result: all signatures verified</human_result>
10737 </dkim>
10738 <spf>
10739 <domain>identitydesign.com.sg</domain>
10740 <result>temperror</result>
10741 </spf>
10742 <spf>
10743 <domain>gmail.com</domain>
10744 <result>pass</result>
10745 </spf>
10746 </auth_results>
10747 </record>
10748 <record>
10749 <row>
10750 <source_ip>209.85.212.174</source_ip>
10751 <count>4</count>
10752 <policy_evaluated>
10753 <disposition>none</disposition>
10754 <dkim>pass</dkim>
10755 <spf>pass</spf>
10756 </policy_evaluated>
10757 </row>
10758 <identifiers>
10759 <header_from>example.com</header_from>
10760 </identifiers>
10761 <auth_results>
10762 <dkim>
10763 <domain>example.com</domain>
10764 <result>pass</result>
10765 <human_result>verify result: all signatures verified</human_result>
10766 </dkim>
10767 <spf>
10768 <domain>gmail.com</domain>
10769 <result>pass</result>
10770 </spf>
10771 </auth_results>
10772 </record>
10773 <record>
10774 <row>
10775 <source_ip>121.15.248.156</source_ip>
10776 <count>4</count>
10777 <policy_evaluated>
10778 <disposition>reject</disposition>
10779 <dkim>fail</dkim>
10780 <spf>fail</spf>
10781 </policy_evaluated>
10782 </row>
10783 <identifiers>
10784 <header_from>example.com</header_from>
10785 </identifiers>
10786 <auth_results>
10787 <spf>
10788 <domain>example.com</domain>
10789 <result>fail</result>
10790 </spf>
10791 </auth_results>
10792 </record>
10793 <record>
10794 <row>
10795 <source_ip>121.15.248.157</source_ip>
10796 <count>2</count>
10797 <policy_evaluated>
10798 <disposition>reject</disposition>
10799 <dkim>fail</dkim>
10800 <spf>fail</spf>
10801 </policy_evaluated>
10802 </row>
10803 <identifiers>
10804 <header_from>example.com</header_from>
10805 </identifiers>
10806 <auth_results>
10807 <spf>
10808 <domain>example.com</domain>
10809 <result>fail</result>
10810 </spf>
10811 </auth_results>
10812 </record>
10813 <record>
10814 <row>
10815 <source_ip>209.85.161.178</source_ip>
10816 <count>5</count>
10817 <policy_evaluated>
10818 <disposition>none</disposition>
10819 <dkim>pass</dkim>
10820 <spf>pass</spf>
10821 </policy_evaluated>
10822 </row>
10823 <identifiers>
10824 <header_from>example.com</header_from>
10825 </identifiers>
10826 <auth_results>
10827 <dkim>
10828 <domain>example.com</domain>
10829 <result>pass</result>
10830 <human_result>verify result: all signatures verified</human_result>
10831 </dkim>
10832 <spf>
10833 <domain>gmail.com</domain>
10834 <result>pass</result>
10835 </spf>
10836 </auth_results>
10837 </record>
10838 <record>
10839 <row>
10840 <source_ip>209.85.161.179</source_ip>
10841 <count>4</count>
10842 <policy_evaluated>
10843 <disposition>none</disposition>
10844 <dkim>pass</dkim>
10845 <spf>pass</spf>
10846 </policy_evaluated>
10847 </row>
10848 <identifiers>
10849 <header_from>example.com</header_from>
10850 </identifiers>
10851 <auth_results>
10852 <dkim>
10853 <domain>example.com</domain>
10854 <result>pass</result>
10855 <human_result>verify result: all signatures verified</human_result>
10856 </dkim>
10857 <spf>
10858 <domain>gmail.com</domain>
10859 <result>pass</result>
10860 </spf>
10861 </auth_results>
10862 </record>
10863 <record>
10864 <row>
10865 <source_ip>209.85.161.176</source_ip>
10866 <count>4</count>
10867 <policy_evaluated>
10868 <disposition>none</disposition>
10869 <dkim>pass</dkim>
10870 <spf>pass</spf>
10871 </policy_evaluated>
10872 </row>
10873 <identifiers>
10874 <header_from>example.com</header_from>
10875 </identifiers>
10876 <auth_results>
10877 <dkim>
10878 <domain>example.com</domain>
10879 <result>pass</result>
10880 <human_result>verify result: all signatures verified</human_result>
10881 </dkim>
10882 <spf>
10883 <domain>gmail.com</domain>
10884 <result>pass</result>
10885 </spf>
10886 </auth_results>
10887 </record>
10888 <record>
10889 <row>
10890 <source_ip>209.85.161.177</source_ip>
10891 <count>7</count>
10892 <policy_evaluated>
10893 <disposition>none</disposition>
10894 <dkim>pass</dkim>
10895 <spf>pass</spf>
10896 </policy_evaluated>
10897 </row>
10898 <identifiers>
10899 <header_from>example.com</header_from>
10900 </identifiers>
10901 <auth_results>
10902 <dkim>
10903 <domain>example.com</domain>
10904 <result>pass</result>
10905 <human_result>verify result: all signatures verified</human_result>
10906 </dkim>
10907 <spf>
10908 <domain>gmail.com</domain>
10909 <result>pass</result>
10910 </spf>
10911 </auth_results>
10912 </record>
10913 <record>
10914 <row>
10915 <source_ip>209.85.161.174</source_ip>
10916 <count>7</count>
10917 <policy_evaluated>
10918 <disposition>none</disposition>
10919 <dkim>pass</dkim>
10920 <spf>pass</spf>
10921 </policy_evaluated>
10922 </row>
10923 <identifiers>
10924 <header_from>example.com</header_from>
10925 </identifiers>
10926 <auth_results>
10927 <dkim>
10928 <domain>example.com</domain>
10929 <result>pass</result>
10930 <human_result>verify result: all signatures verified</human_result>
10931 </dkim>
10932 <spf>
10933 <domain>gmail.com</domain>
10934 <result>pass</result>
10935 </spf>
10936 </auth_results>
10937 </record>
10938 <record>
10939 <row>
10940 <source_ip>209.85.161.175</source_ip>
10941 <count>1</count>
10942 <policy_evaluated>
10943 <disposition>none</disposition>
10944 <dkim>pass</dkim>
10945 <spf>pass</spf>
10946 </policy_evaluated>
10947 </row>
10948 <identifiers>
10949 <header_from>example.com</header_from>
10950 </identifiers>
10951 <auth_results>
10952 <dkim>
10953 <domain>example.com</domain>
10954 <result>pass</result>
10955 <human_result>verify result: all signatures verified</human_result>
10956 </dkim>
10957 <spf>
10958 <domain>gmail.com</domain>
10959 <result>pass</result>
10960 </spf>
10961 </auth_results>
10962 </record>
10963 <record>
10964 <row>
10965 <source_ip>209.85.161.172</source_ip>
10966 <count>10</count>
10967 <policy_evaluated>
10968 <disposition>none</disposition>
10969 <dkim>pass</dkim>
10970 <spf>pass</spf>
10971 </policy_evaluated>
10972 </row>
10973 <identifiers>
10974 <header_from>example.com</header_from>
10975 </identifiers>
10976 <auth_results>
10977 <dkim>
10978 <domain>example.com</domain>
10979 <result>pass</result>
10980 <human_result>verify result: all signatures verified</human_result>
10981 </dkim>
10982 <spf>
10983 <domain>gmail.com</domain>
10984 <result>pass</result>
10985 </spf>
10986 </auth_results>
10987 </record>
10988 <record>
10989 <row>
10990 <source_ip>209.85.161.173</source_ip>
10991 <count>2</count>
10992 <policy_evaluated>
10993 <disposition>none</disposition>
10994 <dkim>pass</dkim>
10995 <spf>pass</spf>
10996 </policy_evaluated>
10997 </row>
10998 <identifiers>
10999 <header_from>example.com</header_from>
11000 </identifiers>
11001 <auth_results>
11002 <dkim>
11003 <domain>example.com</domain>
11004 <result>pass</result>
11005 <human_result>verify result: all signatures verified</human_result>
11006 </dkim>
11007 <spf>
11008 <domain>gmail.com</domain>
11009 <result>pass</result>
11010 </spf>
11011 </auth_results>
11012 </record>
11013 <record>
11014 <row>
11015 <source_ip>209.85.161.170</source_ip>
11016 <count>8</count>
11017 <policy_evaluated>
11018 <disposition>none</disposition>
11019 <dkim>pass</dkim>
11020 <spf>pass</spf>
11021 </policy_evaluated>
11022 </row>
11023 <identifiers>
11024 <header_from>example.com</header_from>
11025 </identifiers>
11026 <auth_results>
11027 <dkim>
11028 <domain>example.com</domain>
11029 <result>pass</result>
11030 <human_result>verify result: all signatures verified</human_result>
11031 </dkim>
11032 <spf>
11033 <domain>gmail.com</domain>
11034 <result>pass</result>
11035 </spf>
11036 </auth_results>
11037 </record>
11038 <record>
11039 <row>
11040 <source_ip>209.85.161.171</source_ip>
11041 <count>8</count>
11042 <policy_evaluated>
11043 <disposition>none</disposition>
11044 <dkim>pass</dkim>
11045 <spf>pass</spf>
11046 </policy_evaluated>
11047 </row>
11048 <identifiers>
11049 <header_from>example.com</header_from>
11050 </identifiers>
11051 <auth_results>
11052 <dkim>
11053 <domain>example.com</domain>
11054 <result>pass</result>
11055 <human_result>verify result: all signatures verified</human_result>
11056 </dkim>
11057 <spf>
11058 <domain>gmail.com</domain>
11059 <result>pass</result>
11060 </spf>
11061 </auth_results>
11062 </record>
11063 <record>
11064 <row>
11065 <source_ip>209.85.210.48</source_ip>
11066 <count>3</count>
11067 <policy_evaluated>
11068 <disposition>none</disposition>
11069 <dkim>pass</dkim>
11070 <spf>pass</spf>
11071 </policy_evaluated>
11072 </row>
11073 <identifiers>
11074 <header_from>example.com</header_from>
11075 </identifiers>
11076 <auth_results>
11077 <dkim>
11078 <domain>example.com</domain>
11079 <result>pass</result>
11080 <human_result>verify result: all signatures verified</human_result>
11081 </dkim>
11082 <spf>
11083 <domain>gmail.com</domain>
11084 <result>pass</result>
11085 </spf>
11086 </auth_results>
11087 </record>
11088 <record>
11089 <row>
11090 <source_ip>209.85.210.49</source_ip>
11091 <count>3</count>
11092 <policy_evaluated>
11093 <disposition>none</disposition>
11094 <dkim>pass</dkim>
11095 <spf>pass</spf>
11096 </policy_evaluated>
11097 </row>
11098 <identifiers>
11099 <header_from>example.com</header_from>
11100 </identifiers>
11101 <auth_results>
11102 <dkim>
11103 <domain>example.com</domain>
11104 <result>pass</result>
11105 <human_result>verify result: all signatures verified</human_result>
11106 </dkim>
11107 <spf>
11108 <domain>gmail.com</domain>
11109 <result>pass</result>
11110 </spf>
11111 </auth_results>
11112 </record>
11113 <record>
11114 <row>
11115 <source_ip>220.181.12.90</source_ip>
11116 <count>2</count>
11117 <policy_evaluated>
11118 <disposition>none</disposition>
11119 <dkim>pass</dkim>
11120 <spf>pass</spf>
11121 </policy_evaluated>
11122 </row>
11123 <identifiers>
11124 <header_from>example.com</header_from>
11125 </identifiers>
11126 <auth_results>
11127 <dkim>
11128 <domain>example.com</domain>
11129 <result>pass</result>
11130 <human_result>verify result: all signatures verified</human_result>
11131 </dkim>
11132 <spf>
11133 <domain>163.com</domain>
11134 <result>pass</result>
11135 </spf>
11136 </auth_results>
11137 </record>
11138 <record>
11139 <row>
11140 <source_ip>121.12.158.153</source_ip>
11141 <count>6</count>
11142 <policy_evaluated>
11143 <disposition>reject</disposition>
11144 <dkim>fail</dkim>
11145 <spf>fail</spf>
11146 </policy_evaluated>
11147 </row>
11148 <identifiers>
11149 <header_from>example.com</header_from>
11150 </identifiers>
11151 <auth_results>
11152 <spf>
11153 <domain>example.com</domain>
11154 <result>fail</result>
11155 </spf>
11156 </auth_results>
11157 </record>
11158 <record>
11159 <row>
11160 <source_ip>162.105.129.21</source_ip>
11161 <count>2</count>
11162 <policy_evaluated>
11163 <disposition>none</disposition>
11164 <dkim>pass</dkim>
11165 <spf>fail</spf>
11166 </policy_evaluated>
11167 </row>
11168 <identifiers>
11169 <header_from>example.com</header_from>
11170 </identifiers>
11171 <auth_results>
11172 <dkim>
11173 <domain>example.com</domain>
11174 <result>pass</result>
11175 <human_result>verify result: all signatures verified</human_result>
11176 </dkim>
11177 <spf>
11178 <domain>example.com</domain>
11179 <result>fail</result>
11180 </spf>
11181 </auth_results>
11182 </record>
11183 <record>
11184 <row>
11185 <source_ip>209.85.210.41</source_ip>
11186 <count>4</count>
11187 <policy_evaluated>
11188 <disposition>none</disposition>
11189 <dkim>pass</dkim>
11190 <spf>pass</spf>
11191 </policy_evaluated>
11192 </row>
11193 <identifiers>
11194 <header_from>example.com</header_from>
11195 </identifiers>
11196 <auth_results>
11197 <dkim>
11198 <domain>example.com</domain>
11199 <result>pass</result>
11200 <human_result>verify result: all signatures verified</human_result>
11201 </dkim>
11202 <spf>
11203 <domain>gmail.com</domain>
11204 <result>pass</result>
11205 </spf>
11206 </auth_results>
11207 </record>
11208 <record>
11209 <row>
11210 <source_ip>209.85.210.42</source_ip>
11211 <count>2</count>
11212 <policy_evaluated>
11213 <disposition>none</disposition>
11214 <dkim>pass</dkim>
11215 <spf>pass</spf>
11216 </policy_evaluated>
11217 </row>
11218 <identifiers>
11219 <header_from>example.com</header_from>
11220 </identifiers>
11221 <auth_results>
11222 <dkim>
11223 <domain>example.com</domain>
11224 <result>pass</result>
11225 <human_result>verify result: all signatures verified</human_result>
11226 </dkim>
11227 <spf>
11228 <domain>gmail.com</domain>
11229 <result>pass</result>
11230 </spf>
11231 </auth_results>
11232 </record>
11233 <record>
11234 <row>
11235 <source_ip>209.85.210.43</source_ip>
11236 <count>4</count>
11237 <policy_evaluated>
11238 <disposition>none</disposition>
11239 <dkim>pass</dkim>
11240 <spf>pass</spf>
11241 </policy_evaluated>
11242 </row>
11243 <identifiers>
11244 <header_from>example.com</header_from>
11245 </identifiers>
11246 <auth_results>
11247 <dkim>
11248 <domain>example.com</domain>
11249 <result>pass</result>
11250 <human_result>verify result: all signatures verified</human_result>
11251 </dkim>
11252 <spf>
11253 <domain>gmail.com</domain>
11254 <result>pass</result>
11255 </spf>
11256 </auth_results>
11257 </record>
11258 <record>
11259 <row>
11260 <source_ip>209.85.210.44</source_ip>
11261 <count>4</count>
11262 <policy_evaluated>
11263 <disposition>none</disposition>
11264 <dkim>pass</dkim>
11265 <spf>pass</spf>
11266 </policy_evaluated>
11267 </row>
11268 <identifiers>
11269 <header_from>example.com</header_from>
11270 </identifiers>
11271 <auth_results>
11272 <dkim>
11273 <domain>example.com</domain>
11274 <result>pass</result>
11275 <human_result>verify result: all signatures verified</human_result>
11276 </dkim>
11277 <spf>
11278 <domain>gmail.com</domain>
11279 <result>pass</result>
11280 </spf>
11281 </auth_results>
11282 </record>
11283 <record>
11284 <row>
11285 <source_ip>209.85.210.45</source_ip>
11286 <count>2</count>
11287 <policy_evaluated>
11288 <disposition>none</disposition>
11289 <dkim>pass</dkim>
11290 <spf>pass</spf>
11291 </policy_evaluated>
11292 </row>
11293 <identifiers>
11294 <header_from>example.com</header_from>
11295 </identifiers>
11296 <auth_results>
11297 <dkim>
11298 <domain>example.com</domain>
11299 <result>pass</result>
11300 <human_result>verify result: all signatures verified</human_result>
11301 </dkim>
11302 <spf>
11303 <domain>gmail.com</domain>
11304 <result>pass</result>
11305 </spf>
11306 </auth_results>
11307 </record>
11308 <record>
11309 <row>
11310 <source_ip>209.85.210.46</source_ip>
11311 <count>5</count>
11312 <policy_evaluated>
11313 <disposition>none</disposition>
11314 <dkim>pass</dkim>
11315 <spf>pass</spf>
11316 </policy_evaluated>
11317 </row>
11318 <identifiers>
11319 <header_from>example.com</header_from>
11320 </identifiers>
11321 <auth_results>
11322 <dkim>
11323 <domain>example.com</domain>
11324 <result>pass</result>
11325 <human_result>verify result: all signatures verified</human_result>
11326 </dkim>
11327 <spf>
11328 <domain>gmail.com</domain>
11329 <result>pass</result>
11330 </spf>
11331 </auth_results>
11332 </record>
11333 <record>
11334 <row>
11335 <source_ip>209.85.210.47</source_ip>
11336 <count>2</count>
11337 <policy_evaluated>
11338 <disposition>none</disposition>
11339 <dkim>pass</dkim>
11340 <spf>pass</spf>
11341 </policy_evaluated>
11342 </row>
11343 <identifiers>
11344 <header_from>example.com</header_from>
11345 </identifiers>
11346 <auth_results>
11347 <dkim>
11348 <domain>example.com</domain>
11349 <result>pass</result>
11350 <human_result>verify result: all signatures verified</human_result>
11351 </dkim>
11352 <spf>
11353 <domain>gmail.com</domain>
11354 <result>pass</result>
11355 </spf>
11356 </auth_results>
11357 </record>
11358 <record>
11359 <row>
11360 <source_ip>61.132.137.212</source_ip>
11361 <count>3</count>
11362 <policy_evaluated>
11363 <disposition>reject</disposition>
11364 <dkim>fail</dkim>
11365 <spf>fail</spf>
11366 </policy_evaluated>
11367 </row>
11368 <identifiers>
11369 <header_from>example.com</header_from>
11370 </identifiers>
11371 <auth_results>
11372 <spf>
11373 <domain>example.com</domain>
11374 <result>fail</result>
11375 </spf>
11376 </auth_results>
11377 </record>
11378 <record>
11379 <row>
11380 <source_ip>221.181.85.6</source_ip>
11381 <count>3</count>
11382 <policy_evaluated>
11383 <disposition>reject</disposition>
11384 <dkim>fail</dkim>
11385 <spf>fail</spf>
11386 </policy_evaluated>
11387 </row>
11388 <identifiers>
11389 <header_from>example.com</header_from>
11390 </identifiers>
11391 <auth_results>
11392 <spf>
11393 <domain>example.com</domain>
11394 <result>fail</result>
11395 </spf>
11396 </auth_results>
11397 </record>
11398 <record>
11399 <row>
11400 <source_ip>65.55.90.206</source_ip>
11401 <count>5</count>
11402 <policy_evaluated>
11403 <disposition>none</disposition>
11404 <dkim>pass</dkim>
11405 <spf>pass</spf>
11406 </policy_evaluated>
11407 </row>
11408 <identifiers>
11409 <header_from>example.com</header_from>
11410 </identifiers>
11411 <auth_results>
11412 <dkim>
11413 <domain>example.com</domain>
11414 <result>pass</result>
11415 <human_result>verify result: all signatures verified</human_result>
11416 </dkim>
11417 <spf>
11418 <domain>hotmail.it</domain>
11419 <result>pass</result>
11420 </spf>
11421 <spf>
11422 <domain>hotmail.com</domain>
11423 <result>pass</result>
11424 </spf>
11425 </auth_results>
11426 </record>
11427 <record>
11428 <row>
11429 <source_ip>65.55.90.207</source_ip>
11430 <count>11</count>
11431 <policy_evaluated>
11432 <disposition>none</disposition>
11433 <dkim>pass</dkim>
11434 <spf>pass</spf>
11435 </policy_evaluated>
11436 </row>
11437 <identifiers>
11438 <header_from>example.com</header_from>
11439 </identifiers>
11440 <auth_results>
11441 <dkim>
11442 <domain>example.com</domain>
11443 <result>pass</result>
11444 <human_result>verify result: all signatures verified</human_result>
11445 </dkim>
11446 <spf>
11447 <domain>hotmail.de</domain>
11448 <result>pass</result>
11449 </spf>
11450 <spf>
11451 <domain>hotmail.it</domain>
11452 <result>pass</result>
11453 </spf>
11454 <spf>
11455 <domain>hotmail.com</domain>
11456 <result>pass</result>
11457 </spf>
11458 </auth_results>
11459 </record>
11460 <record>
11461 <row>
11462 <source_ip>65.55.90.204</source_ip>
11463 <count>3</count>
11464 <policy_evaluated>
11465 <disposition>none</disposition>
11466 <dkim>pass</dkim>
11467 <spf>pass</spf>
11468 </policy_evaluated>
11469 </row>
11470 <identifiers>
11471 <header_from>example.com</header_from>
11472 </identifiers>
11473 <auth_results>
11474 <dkim>
11475 <domain>example.com</domain>
11476 <result>pass</result>
11477 <human_result>verify result: all signatures verified</human_result>
11478 </dkim>
11479 <spf>
11480 <domain>hotmail.it</domain>
11481 <result>pass</result>
11482 </spf>
11483 <spf>
11484 <domain>hotmail.com</domain>
11485 <result>pass</result>
11486 </spf>
11487 </auth_results>
11488 </record>
11489 <record>
11490 <row>
11491 <source_ip>65.55.90.205</source_ip>
11492 <count>9</count>
11493 <policy_evaluated>
11494 <disposition>none</disposition>
11495 <dkim>pass</dkim>
11496 <spf>pass</spf>
11497 </policy_evaluated>
11498 </row>
11499 <identifiers>
11500 <header_from>example.com</header_from>
11501 </identifiers>
11502 <auth_results>
11503 <dkim>
11504 <domain>example.com</domain>
11505 <result>pass</result>
11506 <human_result>verify result: all signatures verified</human_result>
11507 </dkim>
11508 <spf>
11509 <domain>hotmail.de</domain>
11510 <result>pass</result>
11511 </spf>
11512 <spf>
11513 <domain>hotmail.it</domain>
11514 <result>pass</result>
11515 </spf>
11516 <spf>
11517 <domain>hotmail.com</domain>
11518 <result>pass</result>
11519 </spf>
11520 </auth_results>
11521 </record>
11522 <record>
11523 <row>
11524 <source_ip>112.186.185.159</source_ip>
11525 <count>1</count>
11526 <policy_evaluated>
11527 <disposition>reject</disposition>
11528 <dkim>fail</dkim>
11529 <spf>fail</spf>
11530 </policy_evaluated>
11531 </row>
11532 <identifiers>
11533 <header_from>example.com</header_from>
11534 </identifiers>
11535 <auth_results>
11536 <spf>
11537 <domain>example.com</domain>
11538 <result>fail</result>
11539 </spf>
11540 </auth_results>
11541 </record>
11542 <record>
11543 <row>
11544 <source_ip>209.85.216.179</source_ip>
11545 <count>4</count>
11546 <policy_evaluated>
11547 <disposition>none</disposition>
11548 <dkim>pass</dkim>
11549 <spf>pass</spf>
11550 </policy_evaluated>
11551 </row>
11552 <identifiers>
11553 <header_from>example.com</header_from>
11554 </identifiers>
11555 <auth_results>
11556 <dkim>
11557 <domain>example.com</domain>
11558 <result>pass</result>
11559 <human_result>verify result: all signatures verified</human_result>
11560 </dkim>
11561 <spf>
11562 <domain>gmail.com</domain>
11563 <result>pass</result>
11564 </spf>
11565 </auth_results>
11566 </record>
11567 <record>
11568 <row>
11569 <source_ip>209.85.216.178</source_ip>
11570 <count>5</count>
11571 <policy_evaluated>
11572 <disposition>none</disposition>
11573 <dkim>pass</dkim>
11574 <spf>pass</spf>
11575 </policy_evaluated>
11576 </row>
11577 <identifiers>
11578 <header_from>example.com</header_from>
11579 </identifiers>
11580 <auth_results>
11581 <dkim>
11582 <domain>example.com</domain>
11583 <result>pass</result>
11584 <human_result>verify result: all signatures verified</human_result>
11585 </dkim>
11586 <spf>
11587 <domain>gmail.com</domain>
11588 <result>pass</result>
11589 </spf>
11590 </auth_results>
11591 </record>
11592 <record>
11593 <row>
11594 <source_ip>209.85.216.177</source_ip>
11595 <count>1</count>
11596 <policy_evaluated>
11597 <disposition>none</disposition>
11598 <dkim>pass</dkim>
11599 <spf>pass</spf>
11600 </policy_evaluated>
11601 </row>
11602 <identifiers>
11603 <header_from>example.com</header_from>
11604 </identifiers>
11605 <auth_results>
11606 <dkim>
11607 <domain>example.com</domain>
11608 <result>pass</result>
11609 <human_result>verify result: all signatures verified</human_result>
11610 </dkim>
11611 <spf>
11612 <domain>gmail.com</domain>
11613 <result>pass</result>
11614 </spf>
11615 </auth_results>
11616 </record>
11617 <record>
11618 <row>
11619 <source_ip>209.85.216.176</source_ip>
11620 <count>1</count>
11621 <policy_evaluated>
11622 <disposition>none</disposition>
11623 <dkim>pass</dkim>
11624 <spf>pass</spf>
11625 </policy_evaluated>
11626 </row>
11627 <identifiers>
11628 <header_from>example.com</header_from>
11629 </identifiers>
11630 <auth_results>
11631 <dkim>
11632 <domain>example.com</domain>
11633 <result>pass</result>
11634 <human_result>verify result: all signatures verified</human_result>
11635 </dkim>
11636 <spf>
11637 <domain>gmail.com</domain>
11638 <result>pass</result>
11639 </spf>
11640 </auth_results>
11641 </record>
11642 <record>
11643 <row>
11644 <source_ip>209.85.216.175</source_ip>
11645 <count>2</count>
11646 <policy_evaluated>
11647 <disposition>none</disposition>
11648 <dkim>pass</dkim>
11649 <spf>pass</spf>
11650 </policy_evaluated>
11651 </row>
11652 <identifiers>
11653 <header_from>example.com</header_from>
11654 </identifiers>
11655 <auth_results>
11656 <dkim>
11657 <domain>example.com</domain>
11658 <result>pass</result>
11659 <human_result>verify result: all signatures verified</human_result>
11660 </dkim>
11661 <spf>
11662 <domain>gmail.com</domain>
11663 <result>pass</result>
11664 </spf>
11665 </auth_results>
11666 </record>
11667 <record>
11668 <row>
11669 <source_ip>209.85.216.174</source_ip>
11670 <count>4</count>
11671 <policy_evaluated>
11672 <disposition>none</disposition>
11673 <dkim>pass</dkim>
11674 <spf>pass</spf>
11675 </policy_evaluated>
11676 </row>
11677 <identifiers>
11678 <header_from>example.com</header_from>
11679 </identifiers>
11680 <auth_results>
11681 <dkim>
11682 <domain>example.com</domain>
11683 <result>pass</result>
11684 <human_result>verify result: all signatures verified</human_result>
11685 </dkim>
11686 <spf>
11687 <domain>gmail.com</domain>
11688 <result>pass</result>
11689 </spf>
11690 </auth_results>
11691 </record>
11692 <record>
11693 <row>
11694 <source_ip>106.10.151.247</source_ip>
11695 <count>1</count>
11696 <policy_evaluated>
11697 <disposition>none</disposition>
11698 <dkim>pass</dkim>
11699 <spf>fail</spf>
11700 </policy_evaluated>
11701 </row>
11702 <identifiers>
11703 <header_from>example.com</header_from>
11704 </identifiers>
11705 <auth_results>
11706 <dkim>
11707 <domain>example.com</domain>
11708 <result>pass</result>
11709 <human_result>verify result: all signatures verified</human_result>
11710 </dkim>
11711 <spf>
11712 <domain>example.com</domain>
11713 <result>fail</result>
11714 </spf>
11715 </auth_results>
11716 </record>
11717 <record>
11718 <row>
11719 <source_ip>209.85.216.172</source_ip>
11720 <count>2</count>
11721 <policy_evaluated>
11722 <disposition>none</disposition>
11723 <dkim>pass</dkim>
11724 <spf>pass</spf>
11725 </policy_evaluated>
11726 </row>
11727 <identifiers>
11728 <header_from>example.com</header_from>
11729 </identifiers>
11730 <auth_results>
11731 <dkim>
11732 <domain>example.com</domain>
11733 <result>pass</result>
11734 <human_result>verify result: all signatures verified</human_result>
11735 </dkim>
11736 <spf>
11737 <domain>gmail.com</domain>
11738 <result>pass</result>
11739 </spf>
11740 </auth_results>
11741 </record>
11742 <record>
11743 <row>
11744 <source_ip>65.55.90.208</source_ip>
11745 <count>1</count>
11746 <policy_evaluated>
11747 <disposition>none</disposition>
11748 <dkim>pass</dkim>
11749 <spf>pass</spf>
11750 </policy_evaluated>
11751 </row>
11752 <identifiers>
11753 <header_from>example.com</header_from>
11754 </identifiers>
11755 <auth_results>
11756 <dkim>
11757 <domain>example.com</domain>
11758 <result>pass</result>
11759 <human_result>verify result: all signatures verified</human_result>
11760 </dkim>
11761 <spf>
11762 <domain>hotmail.com</domain>
11763 <result>pass</result>
11764 </spf>
11765 </auth_results>
11766 </record>
11767 <record>
11768 <row>
11769 <source_ip>209.85.216.170</source_ip>
11770 <count>2</count>
11771 <policy_evaluated>
11772 <disposition>none</disposition>
11773 <dkim>pass</dkim>
11774 <spf>pass</spf>
11775 </policy_evaluated>
11776 </row>
11777 <identifiers>
11778 <header_from>example.com</header_from>
11779 </identifiers>
11780 <auth_results>
11781 <dkim>
11782 <domain>example.com</domain>
11783 <result>pass</result>
11784 <human_result>verify result: all signatures verified</human_result>
11785 </dkim>
11786 <spf>
11787 <domain>gmail.com</domain>
11788 <result>pass</result>
11789 </spf>
11790 </auth_results>
11791 </record>
11792 <record>
11793 <row>
11794 <source_ip>106.10.151.127</source_ip>
11795 <count>2</count>
11796 <policy_evaluated>
11797 <disposition>none</disposition>
11798 <dkim>pass</dkim>
11799 <spf>fail</spf>
11800 </policy_evaluated>
11801 </row>
11802 <identifiers>
11803 <header_from>example.com</header_from>
11804 </identifiers>
11805 <auth_results>
11806 <dkim>
11807 <domain>example.com</domain>
11808 <result>pass</result>
11809 <human_result>verify result: all signatures verified</human_result>
11810 </dkim>
11811 <spf>
11812 <domain>example.com</domain>
11813 <result>fail</result>
11814 </spf>
11815 </auth_results>
11816 </record>
11817 <record>
11818 <row>
11819 <source_ip>110.75.172.193</source_ip>
11820 <count>3</count>
11821 <policy_evaluated>
11822 <disposition>none</disposition>
11823 <dkim>pass</dkim>
11824 <spf>pass</spf>
11825 </policy_evaluated>
11826 </row>
11827 <identifiers>
11828 <header_from>example.com</header_from>
11829 </identifiers>
11830 <auth_results>
11831 <dkim>
11832 <domain>example.com</domain>
11833 <result>pass</result>
11834 <human_result>verify result: all signatures verified</human_result>
11835 </dkim>
11836 <spf>
11837 <domain>cddance.cn</domain>
11838 <result>pass</result>
11839 </spf>
11840 </auth_results>
11841 </record>
11842 <record>
11843 <row>
11844 <source_ip>123.58.178.51</source_ip>
11845 <count>1</count>
11846 <policy_evaluated>
11847 <disposition>none</disposition>
11848 <dkim>pass</dkim>
11849 <spf>fail</spf>
11850 </policy_evaluated>
11851 </row>
11852 <identifiers>
11853 <header_from>example.com</header_from>
11854 </identifiers>
11855 <auth_results>
11856 <dkim>
11857 <domain>example.com</domain>
11858 <result>pass</result>
11859 <human_result>verify result: all signatures verified</human_result>
11860 </dkim>
11861 <spf>
11862 <domain>medicalsystem.cn</domain>
11863 <result>none</result>
11864 </spf>
11865 </auth_results>
11866 </record>
11867 <record>
11868 <row>
11869 <source_ip>123.58.178.52</source_ip>
11870 <count>1</count>
11871 <policy_evaluated>
11872 <disposition>none</disposition>
11873 <dkim>pass</dkim>
11874 <spf>pass</spf>
11875 </policy_evaluated>
11876 </row>
11877 <identifiers>
11878 <header_from>example.com</header_from>
11879 </identifiers>
11880 <auth_results>
11881 <dkim>
11882 <domain>example.com</domain>
11883 <result>pass</result>
11884 <human_result>verify result: all signatures verified</human_result>
11885 </dkim>
11886 <spf>
11887 <domain>leontica.com</domain>
11888 <result>pass</result>
11889 </spf>
11890 </auth_results>
11891 </record>
11892 <record>
11893 <row>
11894 <source_ip>113.108.12.95</source_ip>
11895 <count>1</count>
11896 <policy_evaluated>
11897 <disposition>none</disposition>
11898 <dkim>pass</dkim>
11899 <spf>pass</spf>
11900 </policy_evaluated>
11901 </row>
11902 <identifiers>
11903 <header_from>example.com</header_from>
11904 </identifiers>
11905 <auth_results>
11906 <dkim>
11907 <domain>example.com</domain>
11908 <result>pass</result>
11909 <human_result>verify result: all signatures verified</human_result>
11910 </dkim>
11911 <spf>
11912 <domain>qq.com</domain>
11913 <result>pass</result>
11914 </spf>
11915 </auth_results>
11916 </record>
11917 <record>
11918 <row>
11919 <source_ip>113.108.12.94</source_ip>
11920 <count>2</count>
11921 <policy_evaluated>
11922 <disposition>none</disposition>
11923 <dkim>pass</dkim>
11924 <spf>pass</spf>
11925 </policy_evaluated>
11926 </row>
11927 <identifiers>
11928 <header_from>example.com</header_from>
11929 </identifiers>
11930 <auth_results>
11931 <dkim>
11932 <domain>example.com</domain>
11933 <result>pass</result>
11934 <human_result>verify result: all signatures verified</human_result>
11935 </dkim>
11936 <spf>
11937 <domain>qq.com</domain>
11938 <result>pass</result>
11939 </spf>
11940 </auth_results>
11941 </record>
11942 <record>
11943 <row>
11944 <source_ip>113.108.12.93</source_ip>
11945 <count>1</count>
11946 <policy_evaluated>
11947 <disposition>none</disposition>
11948 <dkim>pass</dkim>
11949 <spf>pass</spf>
11950 </policy_evaluated>
11951 </row>
11952 <identifiers>
11953 <header_from>example.com</header_from>
11954 </identifiers>
11955 <auth_results>
11956 <dkim>
11957 <domain>example.com</domain>
11958 <result>pass</result>
11959 <human_result>verify result: all signatures verified</human_result>
11960 </dkim>
11961 <spf>
11962 <domain>qq.com</domain>
11963 <result>pass</result>
11964 </spf>
11965 </auth_results>
11966 </record>
11967 <record>
11968 <row>
11969 <source_ip>113.108.12.92</source_ip>
11970 <count>4</count>
11971 <policy_evaluated>
11972 <disposition>none</disposition>
11973 <dkim>pass</dkim>
11974 <spf>pass</spf>
11975 </policy_evaluated>
11976 </row>
11977 <identifiers>
11978 <header_from>example.com</header_from>
11979 </identifiers>
11980 <auth_results>
11981 <dkim>
11982 <domain>example.com</domain>
11983 <result>pass</result>
11984 <human_result>verify result: all signatures verified</human_result>
11985 </dkim>
11986 <spf>
11987 <domain>qq.com</domain>
11988 <result>pass</result>
11989 </spf>
11990 </auth_results>
11991 </record>
11992 <record>
11993 <row>
11994 <source_ip>113.108.12.91</source_ip>
11995 <count>1</count>
11996 <policy_evaluated>
11997 <disposition>none</disposition>
11998 <dkim>pass</dkim>
11999 <spf>pass</spf>
12000 </policy_evaluated>
12001 </row>
12002 <identifiers>
12003 <header_from>example.com</header_from>
12004 </identifiers>
12005 <auth_results>
12006 <dkim>
12007 <domain>example.com</domain>
12008 <result>pass</result>
12009 <human_result>verify result: all signatures verified</human_result>
12010 </dkim>
12011 <spf>
12012 <domain>qq.com</domain>
12013 <result>pass</result>
12014 </spf>
12015 </auth_results>
12016 </record>
12017 <record>
12018 <row>
12019 <source_ip>113.108.12.90</source_ip>
12020 <count>2</count>
12021 <policy_evaluated>
12022 <disposition>none</disposition>
12023 <dkim>pass</dkim>
12024 <spf>pass</spf>
12025 </policy_evaluated>
12026 </row>
12027 <identifiers>
12028 <header_from>example.com</header_from>
12029 </identifiers>
12030 <auth_results>
12031 <dkim>
12032 <domain>example.com</domain>
12033 <result>pass</result>
12034 <human_result>verify result: all signatures verified</human_result>
12035 </dkim>
12036 <spf>
12037 <domain>qq.com</domain>
12038 <result>pass</result>
12039 </spf>
12040 </auth_results>
12041 </record>
12042 <record>
12043 <row>
12044 <source_ip>114.42.70.22</source_ip>
12045 <count>7</count>
12046 <policy_evaluated>
12047 <disposition>reject</disposition>
12048 <dkim>fail</dkim>
12049 <spf>fail</spf>
12050 </policy_evaluated>
12051 </row>
12052 <identifiers>
12053 <header_from>example.com</header_from>
12054 </identifiers>
12055 <auth_results>
12056 <spf>
12057 <domain>example.com</domain>
12058 <result>fail</result>
12059 </spf>
12060 </auth_results>
12061 </record>
12062 <record>
12063 <row>
12064 <source_ip>220.189.216.68</source_ip>
12065 <count>2</count>
12066 <policy_evaluated>
12067 <disposition>reject</disposition>
12068 <dkim>fail</dkim>
12069 <spf>fail</spf>
12070 </policy_evaluated>
12071 </row>
12072 <identifiers>
12073 <header_from>example.com</header_from>
12074 </identifiers>
12075 <auth_results>
12076 <spf>
12077 <domain>example.com</domain>
12078 <result>fail</result>
12079 </spf>
12080 </auth_results>
12081 </record>
12082 <record>
12083 <row>
12084 <source_ip>116.3.5.192</source_ip>
12085 <count>1</count>
12086 <policy_evaluated>
12087 <disposition>reject</disposition>
12088 <dkim>fail</dkim>
12089 <spf>fail</spf>
12090 </policy_evaluated>
12091 </row>
12092 <identifiers>
12093 <header_from>example.com</header_from>
12094 </identifiers>
12095 <auth_results>
12096 <spf>
12097 <domain>example.com</domain>
12098 <result>fail</result>
12099 </spf>
12100 </auth_results>
12101 </record>
12102 <record>
12103 <row>
12104 <source_ip>125.115.175.40</source_ip>
12105 <count>15</count>
12106 <policy_evaluated>
12107 <disposition>reject</disposition>
12108 <dkim>fail</dkim>
12109 <spf>fail</spf>
12110 </policy_evaluated>
12111 </row>
12112 <identifiers>
12113 <header_from>example.com</header_from>
12114 </identifiers>
12115 <auth_results>
12116 <spf>
12117 <domain>example.com</domain>
12118 <result>fail</result>
12119 </spf>
12120 </auth_results>
12121 </record>
12122 <record>
12123 <row>
12124 <source_ip>193.108.36.201</source_ip>
12125 <count>1</count>
12126 <policy_evaluated>
12127 <disposition>none</disposition>
12128 <dkim>pass</dkim>
12129 <spf>fail</spf>
12130 </policy_evaluated>
12131 </row>
12132 <identifiers>
12133 <header_from>example.com</header_from>
12134 </identifiers>
12135 <auth_results>
12136 <dkim>
12137 <domain>example.com</domain>
12138 <result>pass</result>
12139 <human_result>verify result: all signatures verified</human_result>
12140 </dkim>
12141 <spf>
12142 <domain>example.com</domain>
12143 <result>fail</result>
12144 </spf>
12145 </auth_results>
12146 </record>
12147 <record>
12148 <row>
12149 <source_ip>74.125.82.179</source_ip>
12150 <count>2</count>
12151 <policy_evaluated>
12152 <disposition>none</disposition>
12153 <dkim>pass</dkim>
12154 <spf>fail</spf>
12155 </policy_evaluated>
12156 </row>
12157 <identifiers>
12158 <header_from>example.com</header_from>
12159 </identifiers>
12160 <auth_results>
12161 <dkim>
12162 <domain>example.com</domain>
12163 <result>pass</result>
12164 <human_result>verify result: all signatures verified</human_result>
12165 </dkim>
12166 <spf>
12167 <domain>burgeon.org</domain>
12168 <result>none</result>
12169 </spf>
12170 <spf>
12171 <domain>gmail.com</domain>
12172 <result>pass</result>
12173 </spf>
12174 </auth_results>
12175 </record>
12176 <record>
12177 <row>
12178 <source_ip>74.125.82.174</source_ip>
12179 <count>5</count>
12180 <policy_evaluated>
12181 <disposition>none</disposition>
12182 <dkim>pass</dkim>
12183 <spf>pass</spf>
12184 </policy_evaluated>
12185 </row>
12186 <identifiers>
12187 <header_from>example.com</header_from>
12188 </identifiers>
12189 <auth_results>
12190 <dkim>
12191 <domain>example.com</domain>
12192 <result>pass</result>
12193 <human_result>verify result: all signatures verified</human_result>
12194 </dkim>
12195 <spf>
12196 <domain>identitydesign.com.sg</domain>
12197 <result>temperror</result>
12198 </spf>
12199 <spf>
12200 <domain>gmail.com</domain>
12201 <result>pass</result>
12202 </spf>
12203 </auth_results>
12204 </record>
12205 <record>
12206 <row>
12207 <source_ip>74.125.82.175</source_ip>
12208 <count>2</count>
12209 <policy_evaluated>
12210 <disposition>none</disposition>
12211 <dkim>pass</dkim>
12212 <spf>pass</spf>
12213 </policy_evaluated>
12214 </row>
12215 <identifiers>
12216 <header_from>example.com</header_from>
12217 </identifiers>
12218 <auth_results>
12219 <dkim>
12220 <domain>example.com</domain>
12221 <result>pass</result>
12222 <human_result>verify result: all signatures verified</human_result>
12223 </dkim>
12224 <spf>
12225 <domain>gmail.com</domain>
12226 <result>pass</result>
12227 </spf>
12228 </auth_results>
12229 </record>
12230 <record>
12231 <row>
12232 <source_ip>74.125.82.177</source_ip>
12233 <count>3</count>
12234 <policy_evaluated>
12235 <disposition>none</disposition>
12236 <dkim>pass</dkim>
12237 <spf>pass</spf>
12238 </policy_evaluated>
12239 </row>
12240 <identifiers>
12241 <header_from>example.com</header_from>
12242 </identifiers>
12243 <auth_results>
12244 <dkim>
12245 <domain>example.com</domain>
12246 <result>pass</result>
12247 <human_result>verify result: all signatures verified</human_result>
12248 </dkim>
12249 <spf>
12250 <domain>gmail.com</domain>
12251 <result>pass</result>
12252 </spf>
12253 </auth_results>
12254 </record>
12255 <record>
12256 <row>
12257 <source_ip>74.125.82.170</source_ip>
12258 <count>5</count>
12259 <policy_evaluated>
12260 <disposition>none</disposition>
12261 <dkim>pass</dkim>
12262 <spf>pass</spf>
12263 </policy_evaluated>
12264 </row>
12265 <identifiers>
12266 <header_from>example.com</header_from>
12267 </identifiers>
12268 <auth_results>
12269 <dkim>
12270 <domain>example.com</domain>
12271 <result>pass</result>
12272 <human_result>verify result: all signatures verified</human_result>
12273 </dkim>
12274 <spf>
12275 <domain>gmail.com</domain>
12276 <result>pass</result>
12277 </spf>
12278 </auth_results>
12279 </record>
12280 <record>
12281 <row>
12282 <source_ip>74.125.82.171</source_ip>
12283 <count>2</count>
12284 <policy_evaluated>
12285 <disposition>none</disposition>
12286 <dkim>pass</dkim>
12287 <spf>pass</spf>
12288 </policy_evaluated>
12289 </row>
12290 <identifiers>
12291 <header_from>example.com</header_from>
12292 </identifiers>
12293 <auth_results>
12294 <dkim>
12295 <domain>example.com</domain>
12296 <result>pass</result>
12297 <human_result>verify result: all signatures verified</human_result>
12298 </dkim>
12299 <spf>
12300 <domain>gmail.com</domain>
12301 <result>pass</result>
12302 </spf>
12303 </auth_results>
12304 </record>
12305 <record>
12306 <row>
12307 <source_ip>74.125.82.172</source_ip>
12308 <count>2</count>
12309 <policy_evaluated>
12310 <disposition>none</disposition>
12311 <dkim>pass</dkim>
12312 <spf>pass</spf>
12313 </policy_evaluated>
12314 </row>
12315 <identifiers>
12316 <header_from>example.com</header_from>
12317 </identifiers>
12318 <auth_results>
12319 <dkim>
12320 <domain>example.com</domain>
12321 <result>pass</result>
12322 <human_result>verify result: all signatures verified</human_result>
12323 </dkim>
12324 <spf>
12325 <domain>gmail.com</domain>
12326 <result>pass</result>
12327 </spf>
12328 </auth_results>
12329 </record>
12330 <record>
12331 <row>
12332 <source_ip>74.125.82.173</source_ip>
12333 <count>3</count>
12334 <policy_evaluated>
12335 <disposition>none</disposition>
12336 <dkim>pass</dkim>
12337 <spf>pass</spf>
12338 </policy_evaluated>
12339 </row>
12340 <identifiers>
12341 <header_from>example.com</header_from>
12342 </identifiers>
12343 <auth_results>
12344 <dkim>
12345 <domain>example.com</domain>
12346 <result>pass</result>
12347 <human_result>verify result: all signatures verified</human_result>
12348 </dkim>
12349 <spf>
12350 <domain>gmail.com</domain>
12351 <result>pass</result>
12352 </spf>
12353 </auth_results>
12354 </record>
12355 <record>
12356 <row>
12357 <source_ip>65.55.34.217</source_ip>
12358 <count>23</count>
12359 <policy_evaluated>
12360 <disposition>none</disposition>
12361 <dkim>pass</dkim>
12362 <spf>pass</spf>
12363 </policy_evaluated>
12364 </row>
12365 <identifiers>
12366 <header_from>example.com</header_from>
12367 </identifiers>
12368 <auth_results>
12369 <dkim>
12370 <domain>example.com</domain>
12371 <result>pass</result>
12372 <human_result>verify result: all signatures verified</human_result>
12373 </dkim>
12374 <spf>
12375 <domain>hotmail.de</domain>
12376 <result>pass</result>
12377 </spf>
12378 <spf>
12379 <domain>hotmail.it</domain>
12380 <result>pass</result>
12381 </spf>
12382 <spf>
12383 <domain>hotmail.com</domain>
12384 <result>pass</result>
12385 </spf>
12386 </auth_results>
12387 </record>
12388 <record>
12389 <row>
12390 <source_ip>65.55.34.216</source_ip>
12391 <count>24</count>
12392 <policy_evaluated>
12393 <disposition>none</disposition>
12394 <dkim>pass</dkim>
12395 <spf>pass</spf>
12396 </policy_evaluated>
12397 </row>
12398 <identifiers>
12399 <header_from>example.com</header_from>
12400 </identifiers>
12401 <auth_results>
12402 <dkim>
12403 <domain>example.com</domain>
12404 <result>pass</result>
12405 <human_result>verify result: all signatures verified</human_result>
12406 </dkim>
12407 <spf>
12408 <domain>hotmail.it</domain>
12409 <result>pass</result>
12410 </spf>
12411 <spf>
12412 <domain>hotmail.com</domain>
12413 <result>pass</result>
12414 </spf>
12415 </auth_results>
12416 </record>
12417 <record>
12418 <row>
12419 <source_ip>65.55.34.215</source_ip>
12420 <count>20</count>
12421 <policy_evaluated>
12422 <disposition>none</disposition>
12423 <dkim>pass</dkim>
12424 <spf>pass</spf>
12425 </policy_evaluated>
12426 </row>
12427 <identifiers>
12428 <header_from>example.com</header_from>
12429 </identifiers>
12430 <auth_results>
12431 <dkim>
12432 <domain>example.com</domain>
12433 <result>pass</result>
12434 <human_result>verify result: all signatures verified</human_result>
12435 </dkim>
12436 <spf>
12437 <domain>hotmail.de</domain>
12438 <result>pass</result>
12439 </spf>
12440 <spf>
12441 <domain>hotmail.it</domain>
12442 <result>pass</result>
12443 </spf>
12444 <spf>
12445 <domain>hotmail.com</domain>
12446 <result>pass</result>
12447 </spf>
12448 </auth_results>
12449 </record>
12450 <record>
12451 <row>
12452 <source_ip>65.55.34.214</source_ip>
12453 <count>16</count>
12454 <policy_evaluated>
12455 <disposition>none</disposition>
12456 <dkim>pass</dkim>
12457 <spf>pass</spf>
12458 </policy_evaluated>
12459 </row>
12460 <identifiers>
12461 <header_from>example.com</header_from>
12462 </identifiers>
12463 <auth_results>
12464 <dkim>
12465 <domain>example.com</domain>
12466 <result>pass</result>
12467 <human_result>verify result: all signatures verified</human_result>
12468 </dkim>
12469 <spf>
12470 <domain>hotmail.com</domain>
12471 <result>pass</result>
12472 </spf>
12473 </auth_results>
12474 </record>
12475 <record>
12476 <row>
12477 <source_ip>65.55.34.213</source_ip>
12478 <count>28</count>
12479 <policy_evaluated>
12480 <disposition>none</disposition>
12481 <dkim>pass</dkim>
12482 <spf>pass</spf>
12483 </policy_evaluated>
12484 </row>
12485 <identifiers>
12486 <header_from>example.com</header_from>
12487 </identifiers>
12488 <auth_results>
12489 <dkim>
12490 <domain>example.com</domain>
12491 <result>pass</result>
12492 <human_result>verify result: all signatures verified</human_result>
12493 </dkim>
12494 <spf>
12495 <domain>hotmail.de</domain>
12496 <result>pass</result>
12497 </spf>
12498 <spf>
12499 <domain>hotmail.it</domain>
12500 <result>pass</result>
12501 </spf>
12502 <spf>
12503 <domain>hotmail.com</domain>
12504 <result>pass</result>
12505 </spf>
12506 </auth_results>
12507 </record>
12508 <record>
12509 <row>
12510 <source_ip>65.55.34.212</source_ip>
12511 <count>18</count>
12512 <policy_evaluated>
12513 <disposition>none</disposition>
12514 <dkim>pass</dkim>
12515 <spf>pass</spf>
12516 </policy_evaluated>
12517 </row>
12518 <identifiers>
12519 <header_from>example.com</header_from>
12520 </identifiers>
12521 <auth_results>
12522 <dkim>
12523 <domain>example.com</domain>
12524 <result>pass</result>
12525 <human_result>verify result: all signatures verified</human_result>
12526 </dkim>
12527 <spf>
12528 <domain>hotmail.fr</domain>
12529 <result>pass</result>
12530 </spf>
12531 <spf>
12532 <domain>hotmail.de</domain>
12533 <result>pass</result>
12534 </spf>
12535 <spf>
12536 <domain>hotmail.com</domain>
12537 <result>pass</result>
12538 </spf>
12539 </auth_results>
12540 </record>
12541 <record>
12542 <row>
12543 <source_ip>65.55.34.211</source_ip>
12544 <count>26</count>
12545 <policy_evaluated>
12546 <disposition>none</disposition>
12547 <dkim>pass</dkim>
12548 <spf>pass</spf>
12549 </policy_evaluated>
12550 </row>
12551 <identifiers>
12552 <header_from>example.com</header_from>
12553 </identifiers>
12554 <auth_results>
12555 <dkim>
12556 <domain>example.com</domain>
12557 <result>pass</result>
12558 <human_result>verify result: all signatures verified</human_result>
12559 </dkim>
12560 <spf>
12561 <domain>hotmail.de</domain>
12562 <result>pass</result>
12563 </spf>
12564 <spf>
12565 <domain>hotmail.it</domain>
12566 <result>pass</result>
12567 </spf>
12568 <spf>
12569 <domain>hotmail.com</domain>
12570 <result>pass</result>
12571 </spf>
12572 </auth_results>
12573 </record>
12574 <record>
12575 <row>
12576 <source_ip>65.55.34.210</source_ip>
12577 <count>24</count>
12578 <policy_evaluated>
12579 <disposition>none</disposition>
12580 <dkim>pass</dkim>
12581 <spf>pass</spf>
12582 </policy_evaluated>
12583 </row>
12584 <identifiers>
12585 <header_from>example.com</header_from>
12586 </identifiers>
12587 <auth_results>
12588 <dkim>
12589 <domain>example.com</domain>
12590 <result>pass</result>
12591 <human_result>verify result: all signatures verified</human_result>
12592 </dkim>
12593 <spf>
12594 <domain>hotmail.de</domain>
12595 <result>pass</result>
12596 </spf>
12597 <spf>
12598 <domain>hotmail.it</domain>
12599 <result>pass</result>
12600 </spf>
12601 <spf>
12602 <domain>hotmail.com</domain>
12603 <result>pass</result>
12604 </spf>
12605 </auth_results>
12606 </record>
12607 <record>
12608 <row>
12609 <source_ip>116.28.112.194</source_ip>
12610 <count>9</count>
12611 <policy_evaluated>
12612 <disposition>reject</disposition>
12613 <dkim>fail</dkim>
12614 <spf>fail</spf>
12615 </policy_evaluated>
12616 </row>
12617 <identifiers>
12618 <header_from>example.com</header_from>
12619 </identifiers>
12620 <auth_results>
12621 <spf>
12622 <domain>example.com</domain>
12623 <result>fail</result>
12624 </spf>
12625 </auth_results>
12626 </record>
12627 <record>
12628 <row>
12629 <source_ip>65.55.34.218</source_ip>
12630 <count>18</count>
12631 <policy_evaluated>
12632 <disposition>none</disposition>
12633 <dkim>pass</dkim>
12634 <spf>pass</spf>
12635 </policy_evaluated>
12636 </row>
12637 <identifiers>
12638 <header_from>example.com</header_from>
12639 </identifiers>
12640 <auth_results>
12641 <dkim>
12642 <domain>example.com</domain>
12643 <result>pass</result>
12644 <human_result>verify result: all signatures verified</human_result>
12645 </dkim>
12646 <spf>
12647 <domain>hotmail.de</domain>
12648 <result>pass</result>
12649 </spf>
12650 <spf>
12651 <domain>hotmail.it</domain>
12652 <result>pass</result>
12653 </spf>
12654 <spf>
12655 <domain>hotmail.com</domain>
12656 <result>pass</result>
12657 </spf>
12658 </auth_results>
12659 </record>
12660 <record>
12661 <row>
12662 <source_ip>209.85.216.182</source_ip>
12663 <count>4</count>
12664 <policy_evaluated>
12665 <disposition>none</disposition>
12666 <dkim>pass</dkim>
12667 <spf>pass</spf>
12668 </policy_evaluated>
12669 </row>
12670 <identifiers>
12671 <header_from>example.com</header_from>
12672 </identifiers>
12673 <auth_results>
12674 <dkim>
12675 <domain>example.com</domain>
12676 <result>pass</result>
12677 <human_result>verify result: all signatures verified</human_result>
12678 </dkim>
12679 <spf>
12680 <domain>gmail.com</domain>
12681 <result>pass</result>
12682 </spf>
12683 </auth_results>
12684 </record>
12685 <record>
12686 <row>
12687 <source_ip>209.85.216.180</source_ip>
12688 <count>2</count>
12689 <policy_evaluated>
12690 <disposition>none</disposition>
12691 <dkim>pass</dkim>
12692 <spf>pass</spf>
12693 </policy_evaluated>
12694 </row>
12695 <identifiers>
12696 <header_from>example.com</header_from>
12697 </identifiers>
12698 <auth_results>
12699 <dkim>
12700 <domain>example.com</domain>
12701 <result>pass</result>
12702 <human_result>verify result: all signatures verified</human_result>
12703 </dkim>
12704 <spf>
12705 <domain>gmail.com</domain>
12706 <result>pass</result>
12707 </spf>
12708 </auth_results>
12709 </record>
12710 <record>
12711 <row>
12712 <source_ip>209.85.216.181</source_ip>
12713 <count>2</count>
12714 <policy_evaluated>
12715 <disposition>none</disposition>
12716 <dkim>pass</dkim>
12717 <spf>pass</spf>
12718 </policy_evaluated>
12719 </row>
12720 <identifiers>
12721 <header_from>example.com</header_from>
12722 </identifiers>
12723 <auth_results>
12724 <dkim>
12725 <domain>example.com</domain>
12726 <result>pass</result>
12727 <human_result>verify result: all signatures verified</human_result>
12728 </dkim>
12729 <spf>
12730 <domain>gmail.com</domain>
12731 <result>pass</result>
12732 </spf>
12733 </auth_results>
12734 </record>
12735 <record>
12736 <row>
12737 <source_ip>183.22.52.62</source_ip>
12738 <count>1</count>
12739 <policy_evaluated>
12740 <disposition>reject</disposition>
12741 <dkim>fail</dkim>
12742 <spf>fail</spf>
12743 </policy_evaluated>
12744 </row>
12745 <identifiers>
12746 <header_from>example.com</header_from>
12747 </identifiers>
12748 <auth_results>
12749 <spf>
12750 <domain>example.com</domain>
12751 <result>fail</result>
12752 </spf>
12753 </auth_results>
12754 </record>
12755 <record>
12756 <row>
12757 <source_ip>58.50.28.231</source_ip>
12758 <count>14</count>
12759 <policy_evaluated>
12760 <disposition>reject</disposition>
12761 <dkim>fail</dkim>
12762 <spf>fail</spf>
12763 </policy_evaluated>
12764 </row>
12765 <identifiers>
12766 <header_from>example.com</header_from>
12767 </identifiers>
12768 <auth_results>
12769 <spf>
12770 <domain>example.com</domain>
12771 <result>fail</result>
12772 </spf>
12773 </auth_results>
12774 </record>
12775 <record>
12776 <row>
12777 <source_ip>74.125.82.178</source_ip>
12778 <count>2</count>
12779 <policy_evaluated>
12780 <disposition>none</disposition>
12781 <dkim>pass</dkim>
12782 <spf>pass</spf>
12783 </policy_evaluated>
12784 </row>
12785 <identifiers>
12786 <header_from>example.com</header_from>
12787 </identifiers>
12788 <auth_results>
12789 <dkim>
12790 <domain>example.com</domain>
12791 <result>pass</result>
12792 <human_result>verify result: all signatures verified</human_result>
12793 </dkim>
12794 <spf>
12795 <domain>gmail.com</domain>
12796 <result>pass</result>
12797 </spf>
12798 </auth_results>
12799 </record>
12800 <record>
12801 <row>
12802 <source_ip>202.118.224.232</source_ip>
12803 <count>1</count>
12804 <policy_evaluated>
12805 <disposition>none</disposition>
12806 <dkim>pass</dkim>
12807 <spf>pass</spf>
12808 </policy_evaluated>
12809 </row>
12810 <identifiers>
12811 <header_from>example.com</header_from>
12812 </identifiers>
12813 <auth_results>
12814 <dkim>
12815 <domain>example.com</domain>
12816 <result>pass</result>
12817 <human_result>verify result: all signatures verified</human_result>
12818 </dkim>
12819 <spf>
12820 <domain>hope.hit.edu.cn</domain>
12821 <result>pass</result>
12822 </spf>
12823 </auth_results>
12824 </record>
12825 <record>
12826 <row>
12827 <source_ip>106.10.149.71</source_ip>
12828 <count>1</count>
12829 <policy_evaluated>
12830 <disposition>none</disposition>
12831 <dkim>pass</dkim>
12832 <spf>fail</spf>
12833 </policy_evaluated>
12834 </row>
12835 <identifiers>
12836 <header_from>example.com</header_from>
12837 </identifiers>
12838 <auth_results>
12839 <dkim>
12840 <domain>example.com</domain>
12841 <result>pass</result>
12842 <human_result>verify result: all signatures verified</human_result>
12843 </dkim>
12844 <spf>
12845 <domain>example.com</domain>
12846 <result>fail</result>
12847 </spf>
12848 </auth_results>
12849 </record>
12850 <record>
12851 <row>
12852 <source_ip>112.93.251.60</source_ip>
12853 <count>7</count>
12854 <policy_evaluated>
12855 <disposition>reject</disposition>
12856 <dkim>fail</dkim>
12857 <spf>fail</spf>
12858 </policy_evaluated>
12859 </row>
12860 <identifiers>
12861 <header_from>example.com</header_from>
12862 </identifiers>
12863 <auth_results>
12864 <spf>
12865 <domain>example.com</domain>
12866 <result>fail</result>
12867 </spf>
12868 </auth_results>
12869 </record>
12870 <record>
12871 <row>
12872 <source_ip>61.145.126.68</source_ip>
12873 <count>1</count>
12874 <policy_evaluated>
12875 <disposition>none</disposition>
12876 <dkim>pass</dkim>
12877 <spf>fail</spf>
12878 </policy_evaluated>
12879 </row>
12880 <identifiers>
12881 <header_from>example.com</header_from>
12882 </identifiers>
12883 <auth_results>
12884 <dkim>
12885 <domain>example.com</domain>
12886 <result>pass</result>
12887 <human_result>verify result: all signatures verified</human_result>
12888 </dkim>
12889 <spf>
12890 <domain>gzsuihui.com</domain>
12891 <result>none</result>
12892 </spf>
12893 </auth_results>
12894 </record>
12895 <record>
12896 <row>
12897 <source_ip>209.85.220.170</source_ip>
12898 <count>1</count>
12899 <policy_evaluated>
12900 <disposition>none</disposition>
12901 <dkim>pass</dkim>
12902 <spf>fail</spf>
12903 </policy_evaluated>
12904 </row>
12905 <identifiers>
12906 <header_from>example.com</header_from>
12907 </identifiers>
12908 <auth_results>
12909 <dkim>
12910 <domain>example.com</domain>
12911 <result>pass</result>
12912 <human_result>verify result: all signatures verified</human_result>
12913 </dkim>
12914 <spf>
12915 <domain>hanhetong.com</domain>
12916 <result>none</result>
12917 </spf>
12918 </auth_results>
12919 </record>
12920 <record>
12921 <row>
12922 <source_ip>221.192.247.78</source_ip>
12923 <count>14</count>
12924 <policy_evaluated>
12925 <disposition>reject</disposition>
12926 <dkim>fail</dkim>
12927 <spf>fail</spf>
12928 </policy_evaluated>
12929 </row>
12930 <identifiers>
12931 <header_from>example.com</header_from>
12932 </identifiers>
12933 <auth_results>
12934 <spf>
12935 <domain>example.com</domain>
12936 <result>fail</result>
12937 </spf>
12938 </auth_results>
12939 </record>
12940 <record>
12941 <row>
12942 <source_ip>209.85.220.173</source_ip>
12943 <count>2</count>
12944 <policy_evaluated>
12945 <disposition>none</disposition>
12946 <dkim>pass</dkim>
12947 <spf>fail</spf>
12948 </policy_evaluated>
12949 </row>
12950 <identifiers>
12951 <header_from>example.com</header_from>
12952 </identifiers>
12953 <auth_results>
12954 <dkim>
12955 <domain>example.com</domain>
12956 <result>pass</result>
12957 <human_result>verify result: all signatures verified</human_result>
12958 </dkim>
12959 <spf>
12960 <domain>gmail.com</domain>
12961 <result>pass</result>
12962 </spf>
12963 <spf>
12964 <domain>paxex.com.hk</domain>
12965 <result>none</result>
12966 </spf>
12967 </auth_results>
12968 </record>
12969 <record>
12970 <row>
12971 <source_ip>209.85.220.174</source_ip>
12972 <count>2</count>
12973 <policy_evaluated>
12974 <disposition>none</disposition>
12975 <dkim>pass</dkim>
12976 <spf>pass</spf>
12977 </policy_evaluated>
12978 </row>
12979 <identifiers>
12980 <header_from>example.com</header_from>
12981 </identifiers>
12982 <auth_results>
12983 <dkim>
12984 <domain>example.com</domain>
12985 <result>pass</result>
12986 <human_result>verify result: all signatures verified</human_result>
12987 </dkim>
12988 <spf>
12989 <domain>paxex.com.hk</domain>
12990 <result>none</result>
12991 </spf>
12992 <spf>
12993 <domain>gmail.com</domain>
12994 <result>pass</result>
12995 </spf>
12996 </auth_results>
12997 </record>
12998 <record>
12999 <row>
13000 <source_ip>209.85.220.175</source_ip>
13001 <count>2</count>
13002 <policy_evaluated>
13003 <disposition>none</disposition>
13004 <dkim>pass</dkim>
13005 <spf>pass</spf>
13006 </policy_evaluated>
13007 </row>
13008 <identifiers>
13009 <header_from>example.com</header_from>
13010 </identifiers>
13011 <auth_results>
13012 <dkim>
13013 <domain>example.com</domain>
13014 <result>pass</result>
13015 <human_result>verify result: all signatures verified</human_result>
13016 </dkim>
13017 <spf>
13018 <domain>gmail.com</domain>
13019 <result>pass</result>
13020 </spf>
13021 </auth_results>
13022 </record>
13023 <record>
13024 <row>
13025 <source_ip>209.85.220.176</source_ip>
13026 <count>1</count>
13027 <policy_evaluated>
13028 <disposition>none</disposition>
13029 <dkim>pass</dkim>
13030 <spf>pass</spf>
13031 </policy_evaluated>
13032 </row>
13033 <identifiers>
13034 <header_from>example.com</header_from>
13035 </identifiers>
13036 <auth_results>
13037 <dkim>
13038 <domain>example.com</domain>
13039 <result>pass</result>
13040 <human_result>verify result: all signatures verified</human_result>
13041 </dkim>
13042 <spf>
13043 <domain>gmail.com</domain>
13044 <result>pass</result>
13045 </spf>
13046 </auth_results>
13047 </record>
13048 <record>
13049 <row>
13050 <source_ip>209.85.220.179</source_ip>
13051 <count>2</count>
13052 <policy_evaluated>
13053 <disposition>none</disposition>
13054 <dkim>pass</dkim>
13055 <spf>fail</spf>
13056 </policy_evaluated>
13057 </row>
13058 <identifiers>
13059 <header_from>example.com</header_from>
13060 </identifiers>
13061 <auth_results>
13062 <dkim>
13063 <domain>example.com</domain>
13064 <result>pass</result>
13065 <human_result>verify result: all signatures verified</human_result>
13066 </dkim>
13067 <spf>
13068 <domain>gmail.com</domain>
13069 <result>pass</result>
13070 </spf>
13071 <spf>
13072 <domain>paxex.com.hk</domain>
13073 <result>none</result>
13074 </spf>
13075 </auth_results>
13076 </record>
13077 <record>
13078 <row>
13079 <source_ip>68.181.178.3</source_ip>
13080 <count>2</count>
13081 <policy_evaluated>
13082 <disposition>none</disposition>
13083 <dkim>pass</dkim>
13084 <spf>fail</spf>
13085 </policy_evaluated>
13086 </row>
13087 <identifiers>
13088 <header_from>example.com</header_from>
13089 </identifiers>
13090 <auth_results>
13091 <dkim>
13092 <domain>example.com</domain>
13093 <result>pass</result>
13094 <human_result>verify result: all signatures verified</human_result>
13095 </dkim>
13096 <spf>
13097 <domain>example.com</domain>
13098 <result>fail</result>
13099 </spf>
13100 </auth_results>
13101 </record>
13102 <record>
13103 <row>
13104 <source_ip>14.151.6.13</source_ip>
13105 <count>5</count>
13106 <policy_evaluated>
13107 <disposition>reject</disposition>
13108 <dkim>fail</dkim>
13109 <spf>fail</spf>
13110 </policy_evaluated>
13111 </row>
13112 <identifiers>
13113 <header_from>example.com</header_from>
13114 </identifiers>
13115 <auth_results>
13116 <spf>
13117 <domain>example.com</domain>
13118 <result>fail</result>
13119 </spf>
13120 </auth_results>
13121 </record>
13122 <record>
13123 <row>
13124 <source_ip>183.60.228.136</source_ip>
13125 <count>2</count>
13126 <policy_evaluated>
13127 <disposition>reject</disposition>
13128 <dkim>fail</dkim>
13129 <spf>fail</spf>
13130 </policy_evaluated>
13131 </row>
13132 <identifiers>
13133 <header_from>example.com</header_from>
13134 </identifiers>
13135 <auth_results>
13136 <spf>
13137 <domain>example.com</domain>
13138 <result>fail</result>
13139 </spf>
13140 </auth_results>
13141 </record>
13142 <record>
13143 <row>
13144 <source_ip>74.125.82.181</source_ip>
13145 <count>2</count>
13146 <policy_evaluated>
13147 <disposition>none</disposition>
13148 <dkim>pass</dkim>
13149 <spf>pass</spf>
13150 </policy_evaluated>
13151 </row>
13152 <identifiers>
13153 <header_from>example.com</header_from>
13154 </identifiers>
13155 <auth_results>
13156 <dkim>
13157 <domain>example.com</domain>
13158 <result>pass</result>
13159 <human_result>verify result: all signatures verified</human_result>
13160 </dkim>
13161 <spf>
13162 <domain>gmail.com</domain>
13163 <result>pass</result>
13164 </spf>
13165 </auth_results>
13166 </record>
13167 <record>
13168 <row>
13169 <source_ip>74.125.82.180</source_ip>
13170 <count>3</count>
13171 <policy_evaluated>
13172 <disposition>none</disposition>
13173 <dkim>pass</dkim>
13174 <spf>pass</spf>
13175 </policy_evaluated>
13176 </row>
13177 <identifiers>
13178 <header_from>example.com</header_from>
13179 </identifiers>
13180 <auth_results>
13181 <dkim>
13182 <domain>example.com</domain>
13183 <result>pass</result>
13184 <human_result>verify result: all signatures verified</human_result>
13185 </dkim>
13186 <spf>
13187 <domain>gmail.com</domain>
13188 <result>pass</result>
13189 </spf>
13190 </auth_results>
13191 </record>
13192 <record>
13193 <row>
13194 <source_ip>74.125.82.182</source_ip>
13195 <count>5</count>
13196 <policy_evaluated>
13197 <disposition>none</disposition>
13198 <dkim>pass</dkim>
13199 <spf>pass</spf>
13200 </policy_evaluated>
13201 </row>
13202 <identifiers>
13203 <header_from>example.com</header_from>
13204 </identifiers>
13205 <auth_results>
13206 <dkim>
13207 <domain>example.com</domain>
13208 <result>pass</result>
13209 <human_result>verify result: all signatures verified</human_result>
13210 </dkim>
13211 <spf>
13212 <domain>paxex.com.hk</domain>
13213 <result>none</result>
13214 </spf>
13215 <spf>
13216 <domain>gmail.com</domain>
13217 <result>pass</result>
13218 </spf>
13219 </auth_results>
13220 </record>
13221 <record>
13222 <row>
13223 <source_ip>61.82.124.95</source_ip>
13224 <count>1</count>
13225 <policy_evaluated>
13226 <disposition>reject</disposition>
13227 <dkim>fail</dkim>
13228 <spf>fail</spf>
13229 </policy_evaluated>
13230 </row>
13231 <identifiers>
13232 <header_from>example.com</header_from>
13233 </identifiers>
13234 <auth_results>
13235 <spf>
13236 <domain>example.com</domain>
13237 <result>fail</result>
13238 </spf>
13239 </auth_results>
13240 </record>
13241 <record>
13242 <row>
13243 <source_ip>41.162.184.50</source_ip>
13244 <count>1</count>
13245 <policy_evaluated>
13246 <disposition>reject</disposition>
13247 <dkim>fail</dkim>
13248 <spf>fail</spf>
13249 </policy_evaluated>
13250 </row>
13251 <identifiers>
13252 <header_from>example.com</header_from>
13253 </identifiers>
13254 <auth_results>
13255 <spf>
13256 <domain>example.com</domain>
13257 <result>fail</result>
13258 </spf>
13259 </auth_results>
13260 </record>
13261 <record>
13262 <row>
13263 <source_ip>209.85.217.178</source_ip>
13264 <count>4</count>
13265 <policy_evaluated>
13266 <disposition>none</disposition>
13267 <dkim>pass</dkim>
13268 <spf>pass</spf>
13269 </policy_evaluated>
13270 </row>
13271 <identifiers>
13272 <header_from>example.com</header_from>
13273 </identifiers>
13274 <auth_results>
13275 <dkim>
13276 <domain>example.com</domain>
13277 <result>pass</result>
13278 <human_result>verify result: all signatures verified</human_result>
13279 </dkim>
13280 <spf>
13281 <domain>gmail.com</domain>
13282 <result>pass</result>
13283 </spf>
13284 </auth_results>
13285 </record>
13286 <record>
13287 <row>
13288 <source_ip>209.85.217.179</source_ip>
13289 <count>2</count>
13290 <policy_evaluated>
13291 <disposition>none</disposition>
13292 <dkim>pass</dkim>
13293 <spf>pass</spf>
13294 </policy_evaluated>
13295 </row>
13296 <identifiers>
13297 <header_from>example.com</header_from>
13298 </identifiers>
13299 <auth_results>
13300 <dkim>
13301 <domain>example.com</domain>
13302 <result>pass</result>
13303 <human_result>verify result: all signatures verified</human_result>
13304 </dkim>
13305 <spf>
13306 <domain>gmail.com</domain>
13307 <result>pass</result>
13308 </spf>
13309 </auth_results>
13310 </record>
13311 <record>
13312 <row>
13313 <source_ip>74.125.82.49</source_ip>
13314 <count>4</count>
13315 <policy_evaluated>
13316 <disposition>none</disposition>
13317 <dkim>pass</dkim>
13318 <spf>pass</spf>
13319 </policy_evaluated>
13320 </row>
13321 <identifiers>
13322 <header_from>example.com</header_from>
13323 </identifiers>
13324 <auth_results>
13325 <dkim>
13326 <domain>example.com</domain>
13327 <result>pass</result>
13328 <human_result>verify result: all signatures verified</human_result>
13329 </dkim>
13330 <spf>
13331 <domain>gmail.com</domain>
13332 <result>pass</result>
13333 </spf>
13334 </auth_results>
13335 </record>
13336 <record>
13337 <row>
13338 <source_ip>74.125.82.48</source_ip>
13339 <count>1</count>
13340 <policy_evaluated>
13341 <disposition>none</disposition>
13342 <dkim>pass</dkim>
13343 <spf>pass</spf>
13344 </policy_evaluated>
13345 </row>
13346 <identifiers>
13347 <header_from>example.com</header_from>
13348 </identifiers>
13349 <auth_results>
13350 <dkim>
13351 <domain>example.com</domain>
13352 <result>pass</result>
13353 <human_result>verify result: all signatures verified</human_result>
13354 </dkim>
13355 <spf>
13356 <domain>gmail.com</domain>
13357 <result>pass</result>
13358 </spf>
13359 </auth_results>
13360 </record>
13361 <record>
13362 <row>
13363 <source_ip>74.125.82.47</source_ip>
13364 <count>5</count>
13365 <policy_evaluated>
13366 <disposition>none</disposition>
13367 <dkim>pass</dkim>
13368 <spf>pass</spf>
13369 </policy_evaluated>
13370 </row>
13371 <identifiers>
13372 <header_from>example.com</header_from>
13373 </identifiers>
13374 <auth_results>
13375 <dkim>
13376 <domain>example.com</domain>
13377 <result>pass</result>
13378 <human_result>verify result: all signatures verified</human_result>
13379 </dkim>
13380 <spf>
13381 <domain>gmail.com</domain>
13382 <result>pass</result>
13383 </spf>
13384 </auth_results>
13385 </record>
13386 <record>
13387 <row>
13388 <source_ip>74.125.82.46</source_ip>
13389 <count>5</count>
13390 <policy_evaluated>
13391 <disposition>none</disposition>
13392 <dkim>pass</dkim>
13393 <spf>pass</spf>
13394 </policy_evaluated>
13395 </row>
13396 <identifiers>
13397 <header_from>example.com</header_from>
13398 </identifiers>
13399 <auth_results>
13400 <dkim>
13401 <domain>example.com</domain>
13402 <result>pass</result>
13403 <human_result>verify result: all signatures verified</human_result>
13404 </dkim>
13405 <spf>
13406 <domain>gmail.com</domain>
13407 <result>pass</result>
13408 </spf>
13409 </auth_results>
13410 </record>
13411 <record>
13412 <row>
13413 <source_ip>74.125.82.45</source_ip>
13414 <count>2</count>
13415 <policy_evaluated>
13416 <disposition>none</disposition>
13417 <dkim>pass</dkim>
13418 <spf>pass</spf>
13419 </policy_evaluated>
13420 </row>
13421 <identifiers>
13422 <header_from>example.com</header_from>
13423 </identifiers>
13424 <auth_results>
13425 <dkim>
13426 <domain>example.com</domain>
13427 <result>pass</result>
13428 <human_result>verify result: all signatures verified</human_result>
13429 </dkim>
13430 <spf>
13431 <domain>engagerc.com</domain>
13432 <result>neutral</result>
13433 </spf>
13434 <spf>
13435 <domain>gmail.com</domain>
13436 <result>pass</result>
13437 </spf>
13438 </auth_results>
13439 </record>
13440 <record>
13441 <row>
13442 <source_ip>209.85.217.171</source_ip>
13443 <count>6</count>
13444 <policy_evaluated>
13445 <disposition>none</disposition>
13446 <dkim>pass</dkim>
13447 <spf>fail</spf>
13448 </policy_evaluated>
13449 </row>
13450 <identifiers>
13451 <header_from>example.com</header_from>
13452 </identifiers>
13453 <auth_results>
13454 <dkim>
13455 <domain>example.com</domain>
13456 <result>pass</result>
13457 <human_result>verify result: all signatures verified</human_result>
13458 </dkim>
13459 <spf>
13460 <domain>brandeis.edu</domain>
13461 <result>pass</result>
13462 </spf>
13463 <spf>
13464 <domain>gmail.com</domain>
13465 <result>pass</result>
13466 </spf>
13467 </auth_results>
13468 </record>
13469 <record>
13470 <row>
13471 <source_ip>74.125.82.43</source_ip>
13472 <count>2</count>
13473 <policy_evaluated>
13474 <disposition>none</disposition>
13475 <dkim>pass</dkim>
13476 <spf>pass</spf>
13477 </policy_evaluated>
13478 </row>
13479 <identifiers>
13480 <header_from>example.com</header_from>
13481 </identifiers>
13482 <auth_results>
13483 <dkim>
13484 <domain>example.com</domain>
13485 <result>pass</result>
13486 <human_result>verify result: all signatures verified</human_result>
13487 </dkim>
13488 <spf>
13489 <domain>gmail.com</domain>
13490 <result>pass</result>
13491 </spf>
13492 </auth_results>
13493 </record>
13494 <record>
13495 <row>
13496 <source_ip>209.85.217.177</source_ip>
13497 <count>1</count>
13498 <policy_evaluated>
13499 <disposition>none</disposition>
13500 <dkim>pass</dkim>
13501 <spf>pass</spf>
13502 </policy_evaluated>
13503 </row>
13504 <identifiers>
13505 <header_from>example.com</header_from>
13506 </identifiers>
13507 <auth_results>
13508 <dkim>
13509 <domain>example.com</domain>
13510 <result>pass</result>
13511 <human_result>verify result: all signatures verified</human_result>
13512 </dkim>
13513 <spf>
13514 <domain>gmail.com</domain>
13515 <result>pass</result>
13516 </spf>
13517 </auth_results>
13518 </record>
13519 <record>
13520 <row>
13521 <source_ip>74.125.82.41</source_ip>
13522 <count>2</count>
13523 <policy_evaluated>
13524 <disposition>none</disposition>
13525 <dkim>pass</dkim>
13526 <spf>pass</spf>
13527 </policy_evaluated>
13528 </row>
13529 <identifiers>
13530 <header_from>example.com</header_from>
13531 </identifiers>
13532 <auth_results>
13533 <dkim>
13534 <domain>example.com</domain>
13535 <result>pass</result>
13536 <human_result>verify result: all signatures verified</human_result>
13537 </dkim>
13538 <spf>
13539 <domain>gmail.com</domain>
13540 <result>pass</result>
13541 </spf>
13542 </auth_results>
13543 </record>
13544 <record>
13545 <row>
13546 <source_ip>211.150.74.27</source_ip>
13547 <count>1</count>
13548 <policy_evaluated>
13549 <disposition>none</disposition>
13550 <dkim>pass</dkim>
13551 <spf>fail</spf>
13552 </policy_evaluated>
13553 </row>
13554 <identifiers>
13555 <header_from>example.com</header_from>
13556 </identifiers>
13557 <auth_results>
13558 <dkim>
13559 <domain>example.com</domain>
13560 <result>pass</result>
13561 <human_result>verify result: all signatures verified</human_result>
13562 </dkim>
13563 <spf>
13564 <domain>yong-qi.com</domain>
13565 <result>none</result>
13566 </spf>
13567 </auth_results>
13568 </record>
13569 <record>
13570 <row>
13571 <source_ip>209.85.213.50</source_ip>
13572 <count>6</count>
13573 <policy_evaluated>
13574 <disposition>none</disposition>
13575 <dkim>pass</dkim>
13576 <spf>pass</spf>
13577 </policy_evaluated>
13578 </row>
13579 <identifiers>
13580 <header_from>example.com</header_from>
13581 </identifiers>
13582 <auth_results>
13583 <dkim>
13584 <domain>example.com</domain>
13585 <result>pass</result>
13586 <human_result>verify result: all signatures verified</human_result>
13587 </dkim>
13588 <spf>
13589 <domain>gmail.com</domain>
13590 <result>pass</result>
13591 </spf>
13592 </auth_results>
13593 </record>
13594 <record>
13595 <row>
13596 <source_ip>220.181.12.67</source_ip>
13597 <count>1</count>
13598 <policy_evaluated>
13599 <disposition>none</disposition>
13600 <dkim>pass</dkim>
13601 <spf>pass</spf>
13602 </policy_evaluated>
13603 </row>
13604 <identifiers>
13605 <header_from>example.com</header_from>
13606 </identifiers>
13607 <auth_results>
13608 <dkim>
13609 <domain>example.com</domain>
13610 <result>pass</result>
13611 <human_result>verify result: all signatures verified</human_result>
13612 </dkim>
13613 <spf>
13614 <domain>163.com</domain>
13615 <result>pass</result>
13616 </spf>
13617 </auth_results>
13618 </record>
13619 <record>
13620 <row>
13621 <source_ip>168.95.4.104</source_ip>
13622 <count>2</count>
13623 <policy_evaluated>
13624 <disposition>reject</disposition>
13625 <dkim>fail</dkim>
13626 <spf>fail</spf>
13627 </policy_evaluated>
13628 </row>
13629 <identifiers>
13630 <header_from>example.com</header_from>
13631 </identifiers>
13632 <auth_results>
13633 <spf>
13634 <domain>example.com</domain>
13635 <result>fail</result>
13636 </spf>
13637 </auth_results>
13638 </record>
13639 <record>
13640 <row>
13641 <source_ip>168.95.4.105</source_ip>
13642 <count>1</count>
13643 <policy_evaluated>
13644 <disposition>reject</disposition>
13645 <dkim>fail</dkim>
13646 <spf>fail</spf>
13647 </policy_evaluated>
13648 </row>
13649 <identifiers>
13650 <header_from>example.com</header_from>
13651 </identifiers>
13652 <auth_results>
13653 <spf>
13654 <domain>example.com</domain>
13655 <result>fail</result>
13656 </spf>
13657 </auth_results>
13658 </record>
13659 <record>
13660 <row>
13661 <source_ip>168.95.4.106</source_ip>
13662 <count>1</count>
13663 <policy_evaluated>
13664 <disposition>reject</disposition>
13665 <dkim>fail</dkim>
13666 <spf>fail</spf>
13667 </policy_evaluated>
13668 </row>
13669 <identifiers>
13670 <header_from>example.com</header_from>
13671 </identifiers>
13672 <auth_results>
13673 <spf>
13674 <domain>example.com</domain>
13675 <result>fail</result>
13676 </spf>
13677 </auth_results>
13678 </record>
13679 <record>
13680 <row>
13681 <source_ip>113.108.12.79</source_ip>
13682 <count>1</count>
13683 <policy_evaluated>
13684 <disposition>none</disposition>
13685 <dkim>pass</dkim>
13686 <spf>pass</spf>
13687 </policy_evaluated>
13688 </row>
13689 <identifiers>
13690 <header_from>example.com</header_from>
13691 </identifiers>
13692 <auth_results>
13693 <dkim>
13694 <domain>example.com</domain>
13695 <result>pass</result>
13696 <human_result>verify result: all signatures verified</human_result>
13697 </dkim>
13698 <spf>
13699 <domain>qq.com</domain>
13700 <result>pass</result>
13701 </spf>
13702 </auth_results>
13703 </record>
13704 <record>
13705 <row>
13706 <source_ip>113.108.12.78</source_ip>
13707 <count>2</count>
13708 <policy_evaluated>
13709 <disposition>none</disposition>
13710 <dkim>pass</dkim>
13711 <spf>pass</spf>
13712 </policy_evaluated>
13713 </row>
13714 <identifiers>
13715 <header_from>example.com</header_from>
13716 </identifiers>
13717 <auth_results>
13718 <dkim>
13719 <domain>example.com</domain>
13720 <result>pass</result>
13721 <human_result>verify result: all signatures verified</human_result>
13722 </dkim>
13723 <spf>
13724 <domain>qq.com</domain>
13725 <result>pass</result>
13726 </spf>
13727 </auth_results>
13728 </record>
13729 <record>
13730 <row>
13731 <source_ip>168.95.4.102</source_ip>
13732 <count>1</count>
13733 <policy_evaluated>
13734 <disposition>reject</disposition>
13735 <dkim>fail</dkim>
13736 <spf>fail</spf>
13737 </policy_evaluated>
13738 </row>
13739 <identifiers>
13740 <header_from>example.com</header_from>
13741 </identifiers>
13742 <auth_results>
13743 <spf>
13744 <domain>example.com</domain>
13745 <result>fail</result>
13746 </spf>
13747 </auth_results>
13748 </record>
13749 <record>
13750 <row>
13751 <source_ip>168.95.4.103</source_ip>
13752 <count>1</count>
13753 <policy_evaluated>
13754 <disposition>reject</disposition>
13755 <dkim>fail</dkim>
13756 <spf>fail</spf>
13757 </policy_evaluated>
13758 </row>
13759 <identifiers>
13760 <header_from>example.com</header_from>
13761 </identifiers>
13762 <auth_results>
13763 <spf>
13764 <domain>example.com</domain>
13765 <result>fail</result>
13766 </spf>
13767 </auth_results>
13768 </record>
13769 <record>
13770 <row>
13771 <source_ip>209.85.213.182</source_ip>
13772 <count>7</count>
13773 <policy_evaluated>
13774 <disposition>none</disposition>
13775 <dkim>pass</dkim>
13776 <spf>pass</spf>
13777 </policy_evaluated>
13778 </row>
13779 <identifiers>
13780 <header_from>example.com</header_from>
13781 </identifiers>
13782 <auth_results>
13783 <dkim>
13784 <domain>example.com</domain>
13785 <result>pass</result>
13786 <human_result>verify result: all signatures verified</human_result>
13787 </dkim>
13788 <spf>
13789 <domain>gmail.com</domain>
13790 <result>pass</result>
13791 </spf>
13792 </auth_results>
13793 </record>
13794 <record>
13795 <row>
13796 <source_ip>209.85.213.181</source_ip>
13797 <count>6</count>
13798 <policy_evaluated>
13799 <disposition>none</disposition>
13800 <dkim>pass</dkim>
13801 <spf>pass</spf>
13802 </policy_evaluated>
13803 </row>
13804 <identifiers>
13805 <header_from>example.com</header_from>
13806 </identifiers>
13807 <auth_results>
13808 <dkim>
13809 <domain>example.com</domain>
13810 <result>pass</result>
13811 <human_result>verify result: all signatures verified</human_result>
13812 </dkim>
13813 <spf>
13814 <domain>gmail.com</domain>
13815 <result>pass</result>
13816 </spf>
13817 </auth_results>
13818 </record>
13819 <record>
13820 <row>
13821 <source_ip>128.248.155.38</source_ip>
13822 <count>3</count>
13823 <policy_evaluated>
13824 <disposition>none</disposition>
13825 <dkim>pass</dkim>
13826 <spf>fail</spf>
13827 </policy_evaluated>
13828 </row>
13829 <identifiers>
13830 <header_from>example.com</header_from>
13831 </identifiers>
13832 <auth_results>
13833 <dkim>
13834 <domain>example.com</domain>
13835 <result>pass</result>
13836 <human_result>verify result: all signatures verified</human_result>
13837 </dkim>
13838 <spf>
13839 <domain>example.com</domain>
13840 <result>fail</result>
13841 </spf>
13842 </auth_results>
13843 </record>
13844 <record>
13845 <row>
13846 <source_ip>168.95.4.109</source_ip>
13847 <count>1</count>
13848 <policy_evaluated>
13849 <disposition>reject</disposition>
13850 <dkim>fail</dkim>
13851 <spf>fail</spf>
13852 </policy_evaluated>
13853 </row>
13854 <identifiers>
13855 <header_from>example.com</header_from>
13856 </identifiers>
13857 <auth_results>
13858 <spf>
13859 <domain>example.com</domain>
13860 <result>fail</result>
13861 </spf>
13862 </auth_results>
13863 </record>
13864 <record>
13865 <row>
13866 <source_ip>113.66.109.204</source_ip>
13867 <count>1</count>
13868 <policy_evaluated>
13869 <disposition>reject</disposition>
13870 <dkim>fail</dkim>
13871 <spf>fail</spf>
13872 </policy_evaluated>
13873 </row>
13874 <identifiers>
13875 <header_from>example.com</header_from>
13876 </identifiers>
13877 <auth_results>
13878 <spf>
13879 <domain>example.com</domain>
13880 <result>fail</result>
13881 </spf>
13882 </auth_results>
13883 </record>
13884 <record>
13885 <row>
13886 <source_ip>202.106.46.67</source_ip>
13887 <count>1</count>
13888 <policy_evaluated>
13889 <disposition>none</disposition>
13890 <dkim>pass</dkim>
13891 <spf>pass</spf>
13892 </policy_evaluated>
13893 </row>
13894 <identifiers>
13895 <header_from>example.com</header_from>
13896 </identifiers>
13897 <auth_results>
13898 <dkim>
13899 <domain>example.com</domain>
13900 <result>pass</result>
13901 <human_result>verify result: all signatures verified</human_result>
13902 </dkim>
13903 <spf>
13904 <domain>btamail.net.cn</domain>
13905 <result>pass</result>
13906 </spf>
13907 </auth_results>
13908 </record>
13909 <record>
13910 <row>
13911 <source_ip>202.67.202.32</source_ip>
13912 <count>9</count>
13913 <policy_evaluated>
13914 <disposition>reject</disposition>
13915 <dkim>fail</dkim>
13916 <spf>fail</spf>
13917 </policy_evaluated>
13918 </row>
13919 <identifiers>
13920 <header_from>example.com</header_from>
13921 </identifiers>
13922 <auth_results>
13923 <spf>
13924 <domain>example.com</domain>
13925 <result>fail</result>
13926 </spf>
13927 </auth_results>
13928 </record>
13929 <record>
13930 <row>
13931 <source_ip>65.55.111.176</source_ip>
13932 <count>20</count>
13933 <policy_evaluated>
13934 <disposition>none</disposition>
13935 <dkim>pass</dkim>
13936 <spf>pass</spf>
13937 </policy_evaluated>
13938 </row>
13939 <identifiers>
13940 <header_from>example.com</header_from>
13941 </identifiers>
13942 <auth_results>
13943 <dkim>
13944 <domain>example.com</domain>
13945 <result>pass</result>
13946 <human_result>verify result: all signatures verified</human_result>
13947 </dkim>
13948 <spf>
13949 <domain>hotmail.de</domain>
13950 <result>pass</result>
13951 </spf>
13952 <spf>
13953 <domain>hotmail.it</domain>
13954 <result>pass</result>
13955 </spf>
13956 <spf>
13957 <domain>hotmail.com</domain>
13958 <result>pass</result>
13959 </spf>
13960 </auth_results>
13961 </record>
13962 <record>
13963 <row>
13964 <source_ip>65.55.111.175</source_ip>
13965 <count>16</count>
13966 <policy_evaluated>
13967 <disposition>none</disposition>
13968 <dkim>pass</dkim>
13969 <spf>pass</spf>
13970 </policy_evaluated>
13971 </row>
13972 <identifiers>
13973 <header_from>example.com</header_from>
13974 </identifiers>
13975 <auth_results>
13976 <dkim>
13977 <domain>example.com</domain>
13978 <result>pass</result>
13979 <human_result>verify result: all signatures verified</human_result>
13980 </dkim>
13981 <spf>
13982 <domain>hotmail.it</domain>
13983 <result>pass</result>
13984 </spf>
13985 <spf>
13986 <domain>hotmail.com</domain>
13987 <result>pass</result>
13988 </spf>
13989 </auth_results>
13990 </record>
13991 <record>
13992 <row>
13993 <source_ip>65.55.111.174</source_ip>
13994 <count>14</count>
13995 <policy_evaluated>
13996 <disposition>none</disposition>
13997 <dkim>pass</dkim>
13998 <spf>pass</spf>
13999 </policy_evaluated>
14000 </row>
14001 <identifiers>
14002 <header_from>example.com</header_from>
14003 </identifiers>
14004 <auth_results>
14005 <dkim>
14006 <domain>example.com</domain>
14007 <result>pass</result>
14008 <human_result>verify result: all signatures verified</human_result>
14009 </dkim>
14010 <spf>
14011 <domain>hotmail.it</domain>
14012 <result>pass</result>
14013 </spf>
14014 <spf>
14015 <domain>hotmail.com</domain>
14016 <result>pass</result>
14017 </spf>
14018 </auth_results>
14019 </record>
14020 <record>
14021 <row>
14022 <source_ip>65.55.111.173</source_ip>
14023 <count>10</count>
14024 <policy_evaluated>
14025 <disposition>none</disposition>
14026 <dkim>pass</dkim>
14027 <spf>pass</spf>
14028 </policy_evaluated>
14029 </row>
14030 <identifiers>
14031 <header_from>example.com</header_from>
14032 </identifiers>
14033 <auth_results>
14034 <dkim>
14035 <domain>example.com</domain>
14036 <result>pass</result>
14037 <human_result>verify result: all signatures verified</human_result>
14038 </dkim>
14039 <spf>
14040 <domain>hotmail.de</domain>
14041 <result>pass</result>
14042 </spf>
14043 <spf>
14044 <domain>hotmail.it</domain>
14045 <result>pass</result>
14046 </spf>
14047 <spf>
14048 <domain>hotmail.com</domain>
14049 <result>pass</result>
14050 </spf>
14051 </auth_results>
14052 </record>
14053 <record>
14054 <row>
14055 <source_ip>65.55.111.172</source_ip>
14056 <count>13</count>
14057 <policy_evaluated>
14058 <disposition>none</disposition>
14059 <dkim>pass</dkim>
14060 <spf>pass</spf>
14061 </policy_evaluated>
14062 </row>
14063 <identifiers>
14064 <header_from>example.com</header_from>
14065 </identifiers>
14066 <auth_results>
14067 <dkim>
14068 <domain>example.com</domain>
14069 <result>pass</result>
14070 <human_result>verify result: all signatures verified</human_result>
14071 </dkim>
14072 <spf>
14073 <domain>live.com</domain>
14074 <result>pass</result>
14075 </spf>
14076 <spf>
14077 <domain>hotmail.de</domain>
14078 <result>pass</result>
14079 </spf>
14080 <spf>
14081 <domain>hotmail.it</domain>
14082 <result>pass</result>
14083 </spf>
14084 <spf>
14085 <domain>hotmail.com</domain>
14086 <result>pass</result>
14087 </spf>
14088 </auth_results>
14089 </record>
14090 <record>
14091 <row>
14092 <source_ip>65.55.111.171</source_ip>
14093 <count>15</count>
14094 <policy_evaluated>
14095 <disposition>none</disposition>
14096 <dkim>pass</dkim>
14097 <spf>pass</spf>
14098 </policy_evaluated>
14099 </row>
14100 <identifiers>
14101 <header_from>example.com</header_from>
14102 </identifiers>
14103 <auth_results>
14104 <dkim>
14105 <domain>example.com</domain>
14106 <result>pass</result>
14107 <human_result>verify result: all signatures verified</human_result>
14108 </dkim>
14109 <spf>
14110 <domain>hotmail.it</domain>
14111 <result>pass</result>
14112 </spf>
14113 <spf>
14114 <domain>hotmail.com</domain>
14115 <result>pass</result>
14116 </spf>
14117 </auth_results>
14118 </record>
14119 <record>
14120 <row>
14121 <source_ip>65.55.111.170</source_ip>
14122 <count>13</count>
14123 <policy_evaluated>
14124 <disposition>none</disposition>
14125 <dkim>pass</dkim>
14126 <spf>pass</spf>
14127 </policy_evaluated>
14128 </row>
14129 <identifiers>
14130 <header_from>example.com</header_from>
14131 </identifiers>
14132 <auth_results>
14133 <dkim>
14134 <domain>example.com</domain>
14135 <result>pass</result>
14136 <human_result>verify result: all signatures verified</human_result>
14137 </dkim>
14138 <spf>
14139 <domain>hotmail.de</domain>
14140 <result>pass</result>
14141 </spf>
14142 <spf>
14143 <domain>hotmail.it</domain>
14144 <result>pass</result>
14145 </spf>
14146 <spf>
14147 <domain>hotmail.com</domain>
14148 <result>pass</result>
14149 </spf>
14150 </auth_results>
14151 </record>
14152 <record>
14153 <row>
14154 <source_ip>202.136.223.243</source_ip>
14155 <count>3</count>
14156 <policy_evaluated>
14157 <disposition>reject</disposition>
14158 <dkim>fail</dkim>
14159 <spf>fail</spf>
14160 </policy_evaluated>
14161 </row>
14162 <identifiers>
14163 <header_from>example.com</header_from>
14164 </identifiers>
14165 <auth_results>
14166 <spf>
14167 <domain>example.com</domain>
14168 <result>fail</result>
14169 </spf>
14170 </auth_results>
14171 </record>
14172 <record>
14173 <row>
14174 <source_ip>119.141.5.83</source_ip>
14175 <count>6</count>
14176 <policy_evaluated>
14177 <disposition>reject</disposition>
14178 <dkim>fail</dkim>
14179 <spf>fail</spf>
14180 </policy_evaluated>
14181 </row>
14182 <identifiers>
14183 <header_from>example.com</header_from>
14184 </identifiers>
14185 <auth_results>
14186 <spf>
14187 <domain>example.com</domain>
14188 <result>fail</result>
14189 </spf>
14190 </auth_results>
14191 </record>
14192 <record>
14193 <row>
14194 <source_ip>66.220.155.151</source_ip>
14195 <count>1472</count>
14196 <policy_evaluated>
14197 <disposition>none</disposition>
14198 <dkim>pass</dkim>
14199 <spf>pass</spf>
14200 </policy_evaluated>
14201 </row>
14202 <identifiers>
14203 <header_from>pages.example.com, example.com</header_from>
14204 </identifiers>
14205 <auth_results>
14206 <dkim>
14207 <domain>pages.example.com</domain>
14208 <result>pass</result>
14209 <human_result>verify result: all signatures verified</human_result>
14210 </dkim>
14211 <dkim>
14212 <domain>example.com</domain>
14213 <result>pass</result>
14214 <human_result>verify result: all signatures verified</human_result>
14215 </dkim>
14216 <spf>
14217 <domain>pages.example.com</domain>
14218 <result>neutral</result>
14219 </spf>
14220 <spf>
14221 <domain>example.com</domain>
14222 <result>pass</result>
14223 </spf>
14224 </auth_results>
14225 </record>
14226 <record>
14227 <row>
14228 <source_ip>66.220.155.150</source_ip>
14229 <count>1119</count>
14230 <policy_evaluated>
14231 <disposition>none</disposition>
14232 <dkim>pass</dkim>
14233 <spf>pass</spf>
14234 </policy_evaluated>
14235 </row>
14236 <identifiers>
14237 <header_from>pages.example.com, example.com</header_from>
14238 </identifiers>
14239 <auth_results>
14240 <dkim>
14241 <domain>pages.example.com</domain>
14242 <result>pass</result>
14243 <human_result>verify result: all signatures verified</human_result>
14244 </dkim>
14245 <dkim>
14246 <domain>example.com</domain>
14247 <result>pass</result>
14248 <human_result>verify result: all signatures verified</human_result>
14249 </dkim>
14250 <spf>
14251 <domain>pages.example.com</domain>
14252 <result>pass</result>
14253 </spf>
14254 <spf>
14255 <domain>example.com</domain>
14256 <result>pass</result>
14257 </spf>
14258 </auth_results>
14259 </record>
14260 <record>
14261 <row>
14262 <source_ip>66.220.155.153</source_ip>
14263 <count>1548</count>
14264 <policy_evaluated>
14265 <disposition>none</disposition>
14266 <dkim>pass</dkim>
14267 <spf>pass</spf>
14268 </policy_evaluated>
14269 </row>
14270 <identifiers>
14271 <header_from>pages.example.com, example.com</header_from>
14272 </identifiers>
14273 <auth_results>
14274 <dkim>
14275 <domain>pages.example.com</domain>
14276 <result>pass</result>
14277 <human_result>verify result: all signatures verified</human_result>
14278 </dkim>
14279 <dkim>
14280 <domain>example.com</domain>
14281 <result>pass</result>
14282 <human_result>verify result: all signatures verified</human_result>
14283 </dkim>
14284 <spf>
14285 <domain>pages.example.com</domain>
14286 <result>neutral</result>
14287 </spf>
14288 <spf>
14289 <domain>example.com</domain>
14290 <result>pass</result>
14291 </spf>
14292 </auth_results>
14293 </record>
14294 <record>
14295 <row>
14296 <source_ip>66.220.155.152</source_ip>
14297 <count>1509</count>
14298 <policy_evaluated>
14299 <disposition>none</disposition>
14300 <dkim>pass</dkim>
14301 <spf>pass</spf>
14302 </policy_evaluated>
14303 </row>
14304 <identifiers>
14305 <header_from>pages.example.com, example.com</header_from>
14306 </identifiers>
14307 <auth_results>
14308 <dkim>
14309 <domain>pages.example.com</domain>
14310 <result>pass</result>
14311 <human_result>verify result: all signatures verified</human_result>
14312 </dkim>
14313 <dkim>
14314 <domain>example.com</domain>
14315 <result>pass</result>
14316 <human_result>verify result: all signatures verified</human_result>
14317 </dkim>
14318 <spf>
14319 <domain>pages.example.com</domain>
14320 <result>neutral</result>
14321 </spf>
14322 <spf>
14323 <domain>example.com</domain>
14324 <result>pass</result>
14325 </spf>
14326 </auth_results>
14327 </record>
14328 <record>
14329 <row>
14330 <source_ip>66.220.155.155</source_ip>
14331 <count>1665</count>
14332 <policy_evaluated>
14333 <disposition>none</disposition>
14334 <dkim>pass</dkim>
14335 <spf>pass</spf>
14336 </policy_evaluated>
14337 </row>
14338 <identifiers>
14339 <header_from>pages.example.com, example.com</header_from>
14340 </identifiers>
14341 <auth_results>
14342 <dkim>
14343 <domain>pages.example.com</domain>
14344 <result>pass</result>
14345 <human_result>verify result: all signatures verified</human_result>
14346 </dkim>
14347 <dkim>
14348 <domain>example.com</domain>
14349 <result>pass</result>
14350 <human_result>verify result: all signatures verified</human_result>
14351 </dkim>
14352 <spf>
14353 <domain>pages.example.com</domain>
14354 <result>pass</result>
14355 </spf>
14356 <spf>
14357 <domain>example.com</domain>
14358 <result>pass</result>
14359 </spf>
14360 </auth_results>
14361 </record>
14362 <record>
14363 <row>
14364 <source_ip>66.220.155.154</source_ip>
14365 <count>1614</count>
14366 <policy_evaluated>
14367 <disposition>none</disposition>
14368 <dkim>pass</dkim>
14369 <spf>pass</spf>
14370 </policy_evaluated>
14371 </row>
14372 <identifiers>
14373 <header_from>pages.example.com, example.com</header_from>
14374 </identifiers>
14375 <auth_results>
14376 <dkim>
14377 <domain>pages.example.com</domain>
14378 <result>pass</result>
14379 <human_result>verify result: all signatures verified</human_result>
14380 </dkim>
14381 <dkim>
14382 <domain>example.com</domain>
14383 <result>pass</result>
14384 <human_result>verify result: all signatures verified</human_result>
14385 </dkim>
14386 <spf>
14387 <domain>pages.example.com</domain>
14388 <result>neutral</result>
14389 </spf>
14390 <spf>
14391 <domain>example.com</domain>
14392 <result>pass</result>
14393 </spf>
14394 </auth_results>
14395 </record>
14396 <record>
14397 <row>
14398 <source_ip>66.220.155.157</source_ip>
14399 <count>1288</count>
14400 <policy_evaluated>
14401 <disposition>none</disposition>
14402 <dkim>pass</dkim>
14403 <spf>pass</spf>
14404 </policy_evaluated>
14405 </row>
14406 <identifiers>
14407 <header_from>pages.example.com, example.com</header_from>
14408 </identifiers>
14409 <auth_results>
14410 <dkim>
14411 <domain>pages.example.com</domain>
14412 <result>pass</result>
14413 <human_result>verify result: all signatures verified</human_result>
14414 </dkim>
14415 <dkim>
14416 <domain>example.com</domain>
14417 <result>pass</result>
14418 <human_result>verify result: all signatures verified</human_result>
14419 </dkim>
14420 <spf>
14421 <domain>pages.example.com</domain>
14422 <result>pass</result>
14423 </spf>
14424 <spf>
14425 <domain>example.com</domain>
14426 <result>pass</result>
14427 </spf>
14428 </auth_results>
14429 </record>
14430 <record>
14431 <row>
14432 <source_ip>66.220.155.156</source_ip>
14433 <count>1544</count>
14434 <policy_evaluated>
14435 <disposition>none</disposition>
14436 <dkim>pass</dkim>
14437 <spf>pass</spf>
14438 </policy_evaluated>
14439 </row>
14440 <identifiers>
14441 <header_from>pages.example.com, example.com</header_from>
14442 </identifiers>
14443 <auth_results>
14444 <dkim>
14445 <domain>pages.example.com</domain>
14446 <result>pass</result>
14447 <human_result>verify result: all signatures verified</human_result>
14448 </dkim>
14449 <dkim>
14450 <domain>example.com</domain>
14451 <result>pass</result>
14452 <human_result>verify result: all signatures verified</human_result>
14453 </dkim>
14454 <spf>
14455 <domain>pages.example.com</domain>
14456 <result>neutral</result>
14457 </spf>
14458 <spf>
14459 <domain>example.com</domain>
14460 <result>pass</result>
14461 </spf>
14462 </auth_results>
14463 </record>
14464 <record>
14465 <row>
14466 <source_ip>66.220.155.159</source_ip>
14467 <count>1280</count>
14468 <policy_evaluated>
14469 <disposition>none</disposition>
14470 <dkim>pass</dkim>
14471 <spf>pass</spf>
14472 </policy_evaluated>
14473 </row>
14474 <identifiers>
14475 <header_from>pages.example.com, example.com</header_from>
14476 </identifiers>
14477 <auth_results>
14478 <dkim>
14479 <domain>pages.example.com</domain>
14480 <result>pass</result>
14481 <human_result>verify result: all signatures verified</human_result>
14482 </dkim>
14483 <dkim>
14484 <domain>example.com</domain>
14485 <result>pass</result>
14486 <human_result>verify result: all signatures verified</human_result>
14487 </dkim>
14488 <spf>
14489 <domain>pages.example.com</domain>
14490 <result>neutral</result>
14491 </spf>
14492 <spf>
14493 <domain>example.com</domain>
14494 <result>pass</result>
14495 </spf>
14496 </auth_results>
14497 </record>
14498 <record>
14499 <row>
14500 <source_ip>66.220.155.158</source_ip>
14501 <count>1198</count>
14502 <policy_evaluated>
14503 <disposition>none</disposition>
14504 <dkim>pass</dkim>
14505 <spf>pass</spf>
14506 </policy_evaluated>
14507 </row>
14508 <identifiers>
14509 <header_from>pages.example.com, example.com</header_from>
14510 </identifiers>
14511 <auth_results>
14512 <dkim>
14513 <domain>pages.example.com</domain>
14514 <result>pass</result>
14515 <human_result>verify result: all signatures verified</human_result>
14516 </dkim>
14517 <dkim>
14518 <domain>example.com</domain>
14519 <result>pass</result>
14520 <human_result>verify result: all signatures verified</human_result>
14521 </dkim>
14522 <spf>
14523 <domain>pages.example.com</domain>
14524 <result>pass</result>
14525 </spf>
14526 <spf>
14527 <domain>example.com</domain>
14528 <result>pass</result>
14529 </spf>
14530 </auth_results>
14531 </record>
14532 <record>
14533 <row>
14534 <source_ip>162.105.129.60</source_ip>
14535 <count>3</count>
14536 <policy_evaluated>
14537 <disposition>none</disposition>
14538 <dkim>pass</dkim>
14539 <spf>fail</spf>
14540 </policy_evaluated>
14541 </row>
14542 <identifiers>
14543 <header_from>example.com</header_from>
14544 </identifiers>
14545 <auth_results>
14546 <dkim>
14547 <domain>example.com</domain>
14548 <result>pass</result>
14549 <human_result>verify result: all signatures verified</human_result>
14550 </dkim>
14551 <spf>
14552 <domain>example.com</domain>
14553 <result>fail</result>
14554 </spf>
14555 </auth_results>
14556 </record>
14557 <record>
14558 <row>
14559 <source_ip>221.176.9.70</source_ip>
14560 <count>1</count>
14561 <policy_evaluated>
14562 <disposition>none</disposition>
14563 <dkim>pass</dkim>
14564 <spf>pass</spf>
14565 </policy_evaluated>
14566 </row>
14567 <identifiers>
14568 <header_from>example.com</header_from>
14569 </identifiers>
14570 <auth_results>
14571 <dkim>
14572 <domain>example.com</domain>
14573 <result>pass</result>
14574 <human_result>verify result: all signatures verified</human_result>
14575 </dkim>
14576 <spf>
14577 <domain>139.com</domain>
14578 <result>pass</result>
14579 </spf>
14580 </auth_results>
14581 </record>
14582 <record>
14583 <row>
14584 <source_ip>168.95.4.115</source_ip>
14585 <count>3</count>
14586 <policy_evaluated>
14587 <disposition>reject</disposition>
14588 <dkim>fail</dkim>
14589 <spf>fail</spf>
14590 </policy_evaluated>
14591 </row>
14592 <identifiers>
14593 <header_from>example.com</header_from>
14594 </identifiers>
14595 <auth_results>
14596 <spf>
14597 <domain>example.com</domain>
14598 <result>fail</result>
14599 </spf>
14600 </auth_results>
14601 </record>
14602 <record>
14603 <row>
14604 <source_ip>65.54.51.96</source_ip>
14605 <count>6</count>
14606 <policy_evaluated>
14607 <disposition>none</disposition>
14608 <dkim>pass</dkim>
14609 <spf>pass</spf>
14610 </policy_evaluated>
14611 </row>
14612 <identifiers>
14613 <header_from>example.com</header_from>
14614 </identifiers>
14615 <auth_results>
14616 <dkim>
14617 <domain>example.com</domain>
14618 <result>pass</result>
14619 <human_result>verify result: all signatures verified</human_result>
14620 </dkim>
14621 <spf>
14622 <domain>hotmail.it</domain>
14623 <result>pass</result>
14624 </spf>
14625 <spf>
14626 <domain>hotmail.com</domain>
14627 <result>pass</result>
14628 </spf>
14629 </auth_results>
14630 </record>
14631 <record>
14632 <row>
14633 <source_ip>65.54.51.97</source_ip>
14634 <count>8</count>
14635 <policy_evaluated>
14636 <disposition>none</disposition>
14637 <dkim>pass</dkim>
14638 <spf>pass</spf>
14639 </policy_evaluated>
14640 </row>
14641 <identifiers>
14642 <header_from>example.com</header_from>
14643 </identifiers>
14644 <auth_results>
14645 <dkim>
14646 <domain>example.com</domain>
14647 <result>pass</result>
14648 <human_result>verify result: all signatures verified</human_result>
14649 </dkim>
14650 <spf>
14651 <domain>hotmail.de</domain>
14652 <result>pass</result>
14653 </spf>
14654 <spf>
14655 <domain>hotmail.com</domain>
14656 <result>pass</result>
14657 </spf>
14658 </auth_results>
14659 </record>
14660 <record>
14661 <row>
14662 <source_ip>65.54.51.94</source_ip>
14663 <count>6</count>
14664 <policy_evaluated>
14665 <disposition>none</disposition>
14666 <dkim>pass</dkim>
14667 <spf>pass</spf>
14668 </policy_evaluated>
14669 </row>
14670 <identifiers>
14671 <header_from>pages.example.com, example.com</header_from>
14672 </identifiers>
14673 <auth_results>
14674 <dkim>
14675 <domain>pages.example.com</domain>
14676 <result>pass</result>
14677 <human_result>verify result: all signatures verified</human_result>
14678 </dkim>
14679 <dkim>
14680 <domain>example.com</domain>
14681 <result>pass</result>
14682 <human_result>verify result: all signatures verified</human_result>
14683 </dkim>
14684 <spf>
14685 <domain>hotmail.de</domain>
14686 <result>pass</result>
14687 </spf>
14688 <spf>
14689 <domain>hotmail.it</domain>
14690 <result>pass</result>
14691 </spf>
14692 <spf>
14693 <domain>hotmail.com</domain>
14694 <result>pass</result>
14695 </spf>
14696 </auth_results>
14697 </record>
14698 <record>
14699 <row>
14700 <source_ip>65.54.51.95</source_ip>
14701 <count>5</count>
14702 <policy_evaluated>
14703 <disposition>none</disposition>
14704 <dkim>pass</dkim>
14705 <spf>pass</spf>
14706 </policy_evaluated>
14707 </row>
14708 <identifiers>
14709 <header_from>example.com</header_from>
14710 </identifiers>
14711 <auth_results>
14712 <dkim>
14713 <domain>example.com</domain>
14714 <result>pass</result>
14715 <human_result>verify result: all signatures verified</human_result>
14716 </dkim>
14717 <spf>
14718 <domain>live.com</domain>
14719 <result>pass</result>
14720 </spf>
14721 <spf>
14722 <domain>hotmail.com</domain>
14723 <result>pass</result>
14724 </spf>
14725 </auth_results>
14726 </record>
14727 <record>
14728 <row>
14729 <source_ip>65.54.51.92</source_ip>
14730 <count>6</count>
14731 <policy_evaluated>
14732 <disposition>none</disposition>
14733 <dkim>pass</dkim>
14734 <spf>pass</spf>
14735 </policy_evaluated>
14736 </row>
14737 <identifiers>
14738 <header_from>example.com</header_from>
14739 </identifiers>
14740 <auth_results>
14741 <dkim>
14742 <domain>example.com</domain>
14743 <result>pass</result>
14744 <human_result>verify result: all signatures verified</human_result>
14745 </dkim>
14746 <spf>
14747 <domain>hotmail.it</domain>
14748 <result>pass</result>
14749 </spf>
14750 <spf>
14751 <domain>hotmail.com</domain>
14752 <result>pass</result>
14753 </spf>
14754 </auth_results>
14755 </record>
14756 <record>
14757 <row>
14758 <source_ip>65.54.51.93</source_ip>
14759 <count>8</count>
14760 <policy_evaluated>
14761 <disposition>none</disposition>
14762 <dkim>pass</dkim>
14763 <spf>pass</spf>
14764 </policy_evaluated>
14765 </row>
14766 <identifiers>
14767 <header_from>example.com</header_from>
14768 </identifiers>
14769 <auth_results>
14770 <dkim>
14771 <domain>example.com</domain>
14772 <result>pass</result>
14773 <human_result>verify result: all signatures verified</human_result>
14774 </dkim>
14775 <spf>
14776 <domain>hotmail.com</domain>
14777 <result>pass</result>
14778 </spf>
14779 </auth_results>
14780 </record>
14781 <record>
14782 <row>
14783 <source_ip>65.54.51.90</source_ip>
14784 <count>3</count>
14785 <policy_evaluated>
14786 <disposition>none</disposition>
14787 <dkim>pass</dkim>
14788 <spf>pass</spf>
14789 </policy_evaluated>
14790 </row>
14791 <identifiers>
14792 <header_from>example.com</header_from>
14793 </identifiers>
14794 <auth_results>
14795 <dkim>
14796 <domain>example.com</domain>
14797 <result>pass</result>
14798 <human_result>verify result: all signatures verified</human_result>
14799 </dkim>
14800 <spf>
14801 <domain>hotmail.de</domain>
14802 <result>pass</result>
14803 </spf>
14804 <spf>
14805 <domain>hotmail.com</domain>
14806 <result>pass</result>
14807 </spf>
14808 </auth_results>
14809 </record>
14810 <record>
14811 <row>
14812 <source_ip>113.108.23.41</source_ip>
14813 <count>5</count>
14814 <policy_evaluated>
14815 <disposition>none</disposition>
14816 <dkim>pass</dkim>
14817 <spf>pass</spf>
14818 </policy_evaluated>
14819 </row>
14820 <identifiers>
14821 <header_from>example.com</header_from>
14822 </identifiers>
14823 <auth_results>
14824 <dkim>
14825 <domain>example.com</domain>
14826 <result>pass</result>
14827 <human_result>verify result: all signatures verified</human_result>
14828 </dkim>
14829 <spf>
14830 <domain>qq.com</domain>
14831 <result>pass</result>
14832 </spf>
14833 </auth_results>
14834 </record>
14835 <record>
14836 <row>
14837 <source_ip>113.108.23.42</source_ip>
14838 <count>3</count>
14839 <policy_evaluated>
14840 <disposition>none</disposition>
14841 <dkim>pass</dkim>
14842 <spf>pass</spf>
14843 </policy_evaluated>
14844 </row>
14845 <identifiers>
14846 <header_from>example.com</header_from>
14847 </identifiers>
14848 <auth_results>
14849 <dkim>
14850 <domain>example.com</domain>
14851 <result>pass</result>
14852 <human_result>verify result: all signatures verified</human_result>
14853 </dkim>
14854 <spf>
14855 <domain>qq.com</domain>
14856 <result>pass</result>
14857 </spf>
14858 </auth_results>
14859 </record>
14860 <record>
14861 <row>
14862 <source_ip>65.54.51.98</source_ip>
14863 <count>6</count>
14864 <policy_evaluated>
14865 <disposition>none</disposition>
14866 <dkim>pass</dkim>
14867 <spf>pass</spf>
14868 </policy_evaluated>
14869 </row>
14870 <identifiers>
14871 <header_from>example.com</header_from>
14872 </identifiers>
14873 <auth_results>
14874 <dkim>
14875 <domain>example.com</domain>
14876 <result>pass</result>
14877 <human_result>verify result: all signatures verified</human_result>
14878 </dkim>
14879 <spf>
14880 <domain>hotmail.it</domain>
14881 <result>pass</result>
14882 </spf>
14883 <spf>
14884 <domain>hotmail.com</domain>
14885 <result>pass</result>
14886 </spf>
14887 </auth_results>
14888 </record>
14889 <record>
14890 <row>
14891 <source_ip>65.54.51.99</source_ip>
14892 <count>4</count>
14893 <policy_evaluated>
14894 <disposition>none</disposition>
14895 <dkim>pass</dkim>
14896 <spf>pass</spf>
14897 </policy_evaluated>
14898 </row>
14899 <identifiers>
14900 <header_from>example.com</header_from>
14901 </identifiers>
14902 <auth_results>
14903 <dkim>
14904 <domain>example.com</domain>
14905 <result>pass</result>
14906 <human_result>verify result: all signatures verified</human_result>
14907 </dkim>
14908 <spf>
14909 <domain>hotmail.it</domain>
14910 <result>pass</result>
14911 </spf>
14912 <spf>
14913 <domain>hotmail.com</domain>
14914 <result>pass</result>
14915 </spf>
14916 </auth_results>
14917 </record>
14918 <record>
14919 <row>
14920 <source_ip>113.66.111.125</source_ip>
14921 <count>1</count>
14922 <policy_evaluated>
14923 <disposition>reject</disposition>
14924 <dkim>fail</dkim>
14925 <spf>fail</spf>
14926 </policy_evaluated>
14927 </row>
14928 <identifiers>
14929 <header_from>example.com</header_from>
14930 </identifiers>
14931 <auth_results>
14932 <spf>
14933 <domain>example.com</domain>
14934 <result>fail</result>
14935 </spf>
14936 </auth_results>
14937 </record>
14938 <record>
14939 <row>
14940 <source_ip>113.108.23.43</source_ip>
14941 <count>2</count>
14942 <policy_evaluated>
14943 <disposition>none</disposition>
14944 <dkim>pass</dkim>
14945 <spf>pass</spf>
14946 </policy_evaluated>
14947 </row>
14948 <identifiers>
14949 <header_from>example.com</header_from>
14950 </identifiers>
14951 <auth_results>
14952 <dkim>
14953 <domain>example.com</domain>
14954 <result>pass</result>
14955 <human_result>verify result: all signatures verified</human_result>
14956 </dkim>
14957 <spf>
14958 <domain>foxmail.com</domain>
14959 <result>pass</result>
14960 </spf>
14961 </auth_results>
14962 </record>
14963 <record>
14964 <row>
14965 <source_ip>221.204.184.200</source_ip>
14966 <count>4</count>
14967 <policy_evaluated>
14968 <disposition>reject</disposition>
14969 <dkim>fail</dkim>
14970 <spf>fail</spf>
14971 </policy_evaluated>
14972 </row>
14973 <identifiers>
14974 <header_from>example.com</header_from>
14975 </identifiers>
14976 <auth_results>
14977 <spf>
14978 <domain>example.com</domain>
14979 <result>fail</result>
14980 </spf>
14981 </auth_results>
14982 </record>
14983 <record>
14984 <row>
14985 <source_ip>209.85.215.45</source_ip>
14986 <count>2</count>
14987 <policy_evaluated>
14988 <disposition>none</disposition>
14989 <dkim>pass</dkim>
14990 <spf>pass</spf>
14991 </policy_evaluated>
14992 </row>
14993 <identifiers>
14994 <header_from>example.com</header_from>
14995 </identifiers>
14996 <auth_results>
14997 <dkim>
14998 <domain>example.com</domain>
14999 <result>pass</result>
15000 <human_result>verify result: all signatures verified</human_result>
15001 </dkim>
15002 <spf>
15003 <domain>gmail.com</domain>
15004 <result>pass</result>
15005 </spf>
15006 </auth_results>
15007 </record>
15008 <record>
15009 <row>
15010 <source_ip>14.156.34.194</source_ip>
15011 <count>3</count>
15012 <policy_evaluated>
15013 <disposition>reject</disposition>
15014 <dkim>fail</dkim>
15015 <spf>fail</spf>
15016 </policy_evaluated>
15017 </row>
15018 <identifiers>
15019 <header_from>example.com</header_from>
15020 </identifiers>
15021 <auth_results>
15022 <spf>
15023 <domain>example.com</domain>
15024 <result>fail</result>
15025 </spf>
15026 </auth_results>
15027 </record>
15028 <record>
15029 <row>
15030 <source_ip>209.85.215.44</source_ip>
15031 <count>3</count>
15032 <policy_evaluated>
15033 <disposition>none</disposition>
15034 <dkim>pass</dkim>
15035 <spf>pass</spf>
15036 </policy_evaluated>
15037 </row>
15038 <identifiers>
15039 <header_from>example.com</header_from>
15040 </identifiers>
15041 <auth_results>
15042 <dkim>
15043 <domain>example.com</domain>
15044 <result>pass</result>
15045 <human_result>verify result: all signatures verified</human_result>
15046 </dkim>
15047 <spf>
15048 <domain>gmail.com</domain>
15049 <result>pass</result>
15050 </spf>
15051 </auth_results>
15052 </record>
15053 <record>
15054 <row>
15055 <source_ip>141.211.176.135</source_ip>
15056 <count>2</count>
15057 <policy_evaluated>
15058 <disposition>none</disposition>
15059 <dkim>pass</dkim>
15060 <spf>fail</spf>
15061 </policy_evaluated>
15062 </row>
15063 <identifiers>
15064 <header_from>example.com</header_from>
15065 </identifiers>
15066 <auth_results>
15067 <dkim>
15068 <domain>example.com</domain>
15069 <result>pass</result>
15070 <human_result>verify result: all signatures verified</human_result>
15071 </dkim>
15072 <spf>
15073 <domain>example.com</domain>
15074 <result>fail</result>
15075 </spf>
15076 </auth_results>
15077 </record>
15078 <record>
15079 <row>
15080 <source_ip>141.211.176.134</source_ip>
15081 <count>1</count>
15082 <policy_evaluated>
15083 <disposition>none</disposition>
15084 <dkim>pass</dkim>
15085 <spf>fail</spf>
15086 </policy_evaluated>
15087 </row>
15088 <identifiers>
15089 <header_from>example.com</header_from>
15090 </identifiers>
15091 <auth_results>
15092 <dkim>
15093 <domain>example.com</domain>
15094 <result>pass</result>
15095 <human_result>verify result: all signatures verified</human_result>
15096 </dkim>
15097 <spf>
15098 <domain>example.com</domain>
15099 <result>fail</result>
15100 </spf>
15101 </auth_results>
15102 </record>
15103 <record>
15104 <row>
15105 <source_ip>209.85.214.54</source_ip>
15106 <count>5</count>
15107 <policy_evaluated>
15108 <disposition>none</disposition>
15109 <dkim>pass</dkim>
15110 <spf>pass</spf>
15111 </policy_evaluated>
15112 </row>
15113 <identifiers>
15114 <header_from>example.com</header_from>
15115 </identifiers>
15116 <auth_results>
15117 <dkim>
15118 <domain>example.com</domain>
15119 <result>pass</result>
15120 <human_result>verify result: all signatures verified</human_result>
15121 </dkim>
15122 <spf>
15123 <domain>gmail.com</domain>
15124 <result>pass</result>
15125 </spf>
15126 <spf>
15127 <domain>googlemail.com</domain>
15128 <result>pass</result>
15129 </spf>
15130 </auth_results>
15131 </record>
15132 <record>
15133 <row>
15134 <source_ip>98.139.213.132</source_ip>
15135 <count>1</count>
15136 <policy_evaluated>
15137 <disposition>none</disposition>
15138 <dkim>pass</dkim>
15139 <spf>fail</spf>
15140 </policy_evaluated>
15141 </row>
15142 <identifiers>
15143 <header_from>example.com</header_from>
15144 </identifiers>
15145 <auth_results>
15146 <dkim>
15147 <domain>example.com</domain>
15148 <result>pass</result>
15149 <human_result>verify result: all signatures verified</human_result>
15150 </dkim>
15151 <spf>
15152 <domain>example.com</domain>
15153 <result>fail</result>
15154 </spf>
15155 </auth_results>
15156 </record>
15157 <record>
15158 <row>
15159 <source_ip>58.56.132.206</source_ip>
15160 <count>18</count>
15161 <policy_evaluated>
15162 <disposition>reject</disposition>
15163 <dkim>fail</dkim>
15164 <spf>fail</spf>
15165 </policy_evaluated>
15166 </row>
15167 <identifiers>
15168 <header_from>example.com</header_from>
15169 </identifiers>
15170 <auth_results>
15171 <spf>
15172 <domain>example.com</domain>
15173 <result>fail</result>
15174 </spf>
15175 </auth_results>
15176 </record>
15177 <record>
15178 <row>
15179 <source_ip>113.97.31.3</source_ip>
15180 <count>3</count>
15181 <policy_evaluated>
15182 <disposition>reject</disposition>
15183 <dkim>fail</dkim>
15184 <spf>fail</spf>
15185 </policy_evaluated>
15186 </row>
15187 <identifiers>
15188 <header_from>example.com</header_from>
15189 </identifiers>
15190 <auth_results>
15191 <spf>
15192 <domain>example.com</domain>
15193 <result>fail</result>
15194 </spf>
15195 </auth_results>
15196 </record>
15197 <record>
15198 <row>
15199 <source_ip>218.17.156.60</source_ip>
15200 <count>6</count>
15201 <policy_evaluated>
15202 <disposition>reject</disposition>
15203 <dkim>fail</dkim>
15204 <spf>fail</spf>
15205 </policy_evaluated>
15206 </row>
15207 <identifiers>
15208 <header_from>example.com</header_from>
15209 </identifiers>
15210 <auth_results>
15211 <spf>
15212 <domain>example.com</domain>
15213 <result>fail</result>
15214 </spf>
15215 </auth_results>
15216 </record>
15217 <record>
15218 <row>
15219 <source_ip>183.62.139.238</source_ip>
15220 <count>50</count>
15221 <policy_evaluated>
15222 <disposition>reject</disposition>
15223 <dkim>fail</dkim>
15224 <spf>fail</spf>
15225 </policy_evaluated>
15226 </row>
15227 <identifiers>
15228 <header_from>example.com</header_from>
15229 </identifiers>
15230 <auth_results>
15231 <spf>
15232 <domain>example.com</domain>
15233 <result>fail</result>
15234 </spf>
15235 </auth_results>
15236 </record>
15237 <record>
15238 <row>
15239 <source_ip>58.253.172.254</source_ip>
15240 <count>20</count>
15241 <policy_evaluated>
15242 <disposition>reject</disposition>
15243 <dkim>fail</dkim>
15244 <spf>fail</spf>
15245 </policy_evaluated>
15246 </row>
15247 <identifiers>
15248 <header_from>example.com</header_from>
15249 </identifiers>
15250 <auth_results>
15251 <spf>
15252 <domain>example.com</domain>
15253 <result>fail</result>
15254 </spf>
15255 </auth_results>
15256 </record>
15257 <record>
15258 <row>
15259 <source_ip>128.210.5.173</source_ip>
15260 <count>1</count>
15261 <policy_evaluated>
15262 <disposition>none</disposition>
15263 <dkim>pass</dkim>
15264 <spf>fail</spf>
15265 </policy_evaluated>
15266 </row>
15267 <identifiers>
15268 <header_from>example.com</header_from>
15269 </identifiers>
15270 <auth_results>
15271 <dkim>
15272 <domain>example.com</domain>
15273 <result>pass</result>
15274 <human_result>verify result: all signatures verified</human_result>
15275 </dkim>
15276 <spf>
15277 <domain>example.com</domain>
15278 <result>fail</result>
15279 </spf>
15280 </auth_results>
15281 </record>
15282 <record>
15283 <row>
15284 <source_ip>69.171.232.168</source_ip>
15285 <count>284</count>
15286 <policy_evaluated>
15287 <disposition>none</disposition>
15288 <dkim>pass</dkim>
15289 <spf>pass</spf>
15290 </policy_evaluated>
15291 </row>
15292 <identifiers>
15293 <header_from>pages.example.com, example.com</header_from>
15294 </identifiers>
15295 <auth_results>
15296 <dkim>
15297 <domain>pages.example.com</domain>
15298 <result>pass</result>
15299 <human_result>verify result: all signatures verified</human_result>
15300 </dkim>
15301 <dkim>
15302 <domain>example.com</domain>
15303 <result>pass</result>
15304 <human_result>verify result: all signatures verified</human_result>
15305 </dkim>
15306 <spf>
15307 <domain>pages.example.com</domain>
15308 <result>neutral</result>
15309 </spf>
15310 <spf>
15311 <domain>example.com</domain>
15312 <result>pass</result>
15313 </spf>
15314 </auth_results>
15315 </record>
15316 <record>
15317 <row>
15318 <source_ip>69.171.232.169</source_ip>
15319 <count>305</count>
15320 <policy_evaluated>
15321 <disposition>none</disposition>
15322 <dkim>pass</dkim>
15323 <spf>pass</spf>
15324 </policy_evaluated>
15325 </row>
15326 <identifiers>
15327 <header_from>pages.example.com, example.com</header_from>
15328 </identifiers>
15329 <auth_results>
15330 <dkim>
15331 <domain>pages.example.com</domain>
15332 <result>pass</result>
15333 <human_result>verify result: all signatures verified</human_result>
15334 </dkim>
15335 <dkim>
15336 <domain>example.com</domain>
15337 <result>pass</result>
15338 <human_result>verify result: all signatures verified</human_result>
15339 </dkim>
15340 <spf>
15341 <domain>pages.example.com</domain>
15342 <result>neutral</result>
15343 </spf>
15344 <spf>
15345 <domain>example.com</domain>
15346 <result>pass</result>
15347 </spf>
15348 </auth_results>
15349 </record>
15350 <record>
15351 <row>
15352 <source_ip>69.171.232.160</source_ip>
15353 <count>33</count>
15354 <policy_evaluated>
15355 <disposition>none</disposition>
15356 <dkim>pass</dkim>
15357 <spf>pass</spf>
15358 </policy_evaluated>
15359 </row>
15360 <identifiers>
15361 <header_from>example.com</header_from>
15362 </identifiers>
15363 <auth_results>
15364 <dkim>
15365 <domain>example.com</domain>
15366 <result>pass</result>
15367 <human_result>verify result: all signatures verified</human_result>
15368 </dkim>
15369 <spf>
15370 <domain>example.com</domain>
15371 <result>pass</result>
15372 </spf>
15373 </auth_results>
15374 </record>
15375 <record>
15376 <row>
15377 <source_ip>69.171.232.161</source_ip>
15378 <count>37</count>
15379 <policy_evaluated>
15380 <disposition>none</disposition>
15381 <dkim>pass</dkim>
15382 <spf>pass</spf>
15383 </policy_evaluated>
15384 </row>
15385 <identifiers>
15386 <header_from>example.com</header_from>
15387 </identifiers>
15388 <auth_results>
15389 <dkim>
15390 <domain>example.com</domain>
15391 <result>pass</result>
15392 <human_result>verify result: all signatures verified</human_result>
15393 </dkim>
15394 <spf>
15395 <domain>example.com</domain>
15396 <result>pass</result>
15397 </spf>
15398 </auth_results>
15399 </record>
15400 <record>
15401 <row>
15402 <source_ip>69.171.232.162</source_ip>
15403 <count>35</count>
15404 <policy_evaluated>
15405 <disposition>none</disposition>
15406 <dkim>pass</dkim>
15407 <spf>pass</spf>
15408 </policy_evaluated>
15409 </row>
15410 <identifiers>
15411 <header_from>example.com</header_from>
15412 </identifiers>
15413 <auth_results>
15414 <dkim>
15415 <domain>example.com</domain>
15416 <result>pass</result>
15417 <human_result>verify result: all signatures verified</human_result>
15418 </dkim>
15419 <spf>
15420 <domain>example.com</domain>
15421 <result>pass</result>
15422 </spf>
15423 </auth_results>
15424 </record>
15425 <record>
15426 <row>
15427 <source_ip>69.171.232.163</source_ip>
15428 <count>32</count>
15429 <policy_evaluated>
15430 <disposition>none</disposition>
15431 <dkim>pass</dkim>
15432 <spf>pass</spf>
15433 </policy_evaluated>
15434 </row>
15435 <identifiers>
15436 <header_from>example.com</header_from>
15437 </identifiers>
15438 <auth_results>
15439 <dkim>
15440 <domain>example.com</domain>
15441 <result>pass</result>
15442 <human_result>verify result: all signatures verified</human_result>
15443 </dkim>
15444 <spf>
15445 <domain>example.com</domain>
15446 <result>pass</result>
15447 </spf>
15448 </auth_results>
15449 </record>
15450 <record>
15451 <row>
15452 <source_ip>69.171.232.164</source_ip>
15453 <count>37</count>
15454 <policy_evaluated>
15455 <disposition>none</disposition>
15456 <dkim>pass</dkim>
15457 <spf>pass</spf>
15458 </policy_evaluated>
15459 </row>
15460 <identifiers>
15461 <header_from>example.com</header_from>
15462 </identifiers>
15463 <auth_results>
15464 <dkim>
15465 <domain>example.com</domain>
15466 <result>pass</result>
15467 <human_result>verify result: all signatures verified</human_result>
15468 </dkim>
15469 <spf>
15470 <domain>example.com</domain>
15471 <result>pass</result>
15472 </spf>
15473 </auth_results>
15474 </record>
15475 <record>
15476 <row>
15477 <source_ip>69.171.232.165</source_ip>
15478 <count>35</count>
15479 <policy_evaluated>
15480 <disposition>none</disposition>
15481 <dkim>pass</dkim>
15482 <spf>pass</spf>
15483 </policy_evaluated>
15484 </row>
15485 <identifiers>
15486 <header_from>example.com</header_from>
15487 </identifiers>
15488 <auth_results>
15489 <dkim>
15490 <domain>example.com</domain>
15491 <result>pass</result>
15492 <human_result>verify result: all signatures verified</human_result>
15493 </dkim>
15494 <spf>
15495 <domain>example.com</domain>
15496 <result>pass</result>
15497 </spf>
15498 </auth_results>
15499 </record>
15500 <record>
15501 <row>
15502 <source_ip>69.171.232.166</source_ip>
15503 <count>40</count>
15504 <policy_evaluated>
15505 <disposition>none</disposition>
15506 <dkim>pass</dkim>
15507 <spf>pass</spf>
15508 </policy_evaluated>
15509 </row>
15510 <identifiers>
15511 <header_from>example.com</header_from>
15512 </identifiers>
15513 <auth_results>
15514 <dkim>
15515 <domain>example.com</domain>
15516 <result>pass</result>
15517 <human_result>verify result: all signatures verified</human_result>
15518 </dkim>
15519 <spf>
15520 <domain>example.com</domain>
15521 <result>pass</result>
15522 </spf>
15523 </auth_results>
15524 </record>
15525 <record>
15526 <row>
15527 <source_ip>69.171.232.167</source_ip>
15528 <count>27</count>
15529 <policy_evaluated>
15530 <disposition>none</disposition>
15531 <dkim>pass</dkim>
15532 <spf>pass</spf>
15533 </policy_evaluated>
15534 </row>
15535 <identifiers>
15536 <header_from>example.com</header_from>
15537 </identifiers>
15538 <auth_results>
15539 <dkim>
15540 <domain>example.com</domain>
15541 <result>pass</result>
15542 <human_result>verify result: all signatures verified</human_result>
15543 </dkim>
15544 <spf>
15545 <domain>example.com</domain>
15546 <result>pass</result>
15547 </spf>
15548 </auth_results>
15549 </record>
15550 <record>
15551 <row>
15552 <source_ip>58.211.51.26</source_ip>
15553 <count>3</count>
15554 <policy_evaluated>
15555 <disposition>reject</disposition>
15556 <dkim>fail</dkim>
15557 <spf>fail</spf>
15558 </policy_evaluated>
15559 </row>
15560 <identifiers>
15561 <header_from>example.com</header_from>
15562 </identifiers>
15563 <auth_results>
15564 <spf>
15565 <domain>example.com</domain>
15566 <result>fail</result>
15567 </spf>
15568 </auth_results>
15569 </record>
15570 <record>
15571 <row>
15572 <source_ip>116.6.43.215</source_ip>
15573 <count>15</count>
15574 <policy_evaluated>
15575 <disposition>reject</disposition>
15576 <dkim>fail</dkim>
15577 <spf>fail</spf>
15578 </policy_evaluated>
15579 </row>
15580 <identifiers>
15581 <header_from>example.com</header_from>
15582 </identifiers>
15583 <auth_results>
15584 <spf>
15585 <domain>example.com</domain>
15586 <result>fail</result>
15587 </spf>
15588 </auth_results>
15589 </record>
15590 <record>
15591 <row>
15592 <source_ip>209.85.215.47</source_ip>
15593 <count>6</count>
15594 <policy_evaluated>
15595 <disposition>none</disposition>
15596 <dkim>pass</dkim>
15597 <spf>pass</spf>
15598 </policy_evaluated>
15599 </row>
15600 <identifiers>
15601 <header_from>pages.example.com, example.com</header_from>
15602 </identifiers>
15603 <auth_results>
15604 <dkim>
15605 <domain>pages.example.com</domain>
15606 <result>pass</result>
15607 <human_result>verify result: all signatures verified</human_result>
15608 </dkim>
15609 <dkim>
15610 <domain>example.com</domain>
15611 <result>pass</result>
15612 <human_result>verify result: all signatures verified</human_result>
15613 </dkim>
15614 <spf>
15615 <domain>gmail.com</domain>
15616 <result>pass</result>
15617 </spf>
15618 </auth_results>
15619 </record>
15620 <record>
15621 <row>
15622 <source_ip>209.85.215.46</source_ip>
15623 <count>2</count>
15624 <policy_evaluated>
15625 <disposition>none</disposition>
15626 <dkim>pass</dkim>
15627 <spf>pass</spf>
15628 </policy_evaluated>
15629 </row>
15630 <identifiers>
15631 <header_from>example.com</header_from>
15632 </identifiers>
15633 <auth_results>
15634 <dkim>
15635 <domain>example.com</domain>
15636 <result>pass</result>
15637 <human_result>verify result: all signatures verified</human_result>
15638 </dkim>
15639 <spf>
15640 <domain>gmail.com</domain>
15641 <result>pass</result>
15642 </spf>
15643 </auth_results>
15644 </record>
15645 <record>
15646 <row>
15647 <source_ip>128.135.165.68</source_ip>
15648 <count>1</count>
15649 <policy_evaluated>
15650 <disposition>none</disposition>
15651 <dkim>pass</dkim>
15652 <spf>fail</spf>
15653 </policy_evaluated>
15654 </row>
15655 <identifiers>
15656 <header_from>example.com</header_from>
15657 </identifiers>
15658 <auth_results>
15659 <dkim>
15660 <domain>example.com</domain>
15661 <result>pass</result>
15662 <human_result>verify result: all signatures verified</human_result>
15663 </dkim>
15664 <spf>
15665 <domain>example.com</domain>
15666 <result>fail</result>
15667 </spf>
15668 </auth_results>
15669 </record>
15670 <record>
15671 <row>
15672 <source_ip>128.135.165.69</source_ip>
15673 <count>4</count>
15674 <policy_evaluated>
15675 <disposition>none</disposition>
15676 <dkim>pass</dkim>
15677 <spf>fail</spf>
15678 </policy_evaluated>
15679 </row>
15680 <identifiers>
15681 <header_from>example.com</header_from>
15682 </identifiers>
15683 <auth_results>
15684 <dkim>
15685 <domain>example.com</domain>
15686 <result>pass</result>
15687 <human_result>verify result: all signatures verified</human_result>
15688 </dkim>
15689 <spf>
15690 <domain>example.com</domain>
15691 <result>fail</result>
15692 </spf>
15693 </auth_results>
15694 </record>
15695 <record>
15696 <row>
15697 <source_ip>209.85.215.43</source_ip>
15698 <count>3</count>
15699 <policy_evaluated>
15700 <disposition>none</disposition>
15701 <dkim>pass</dkim>
15702 <spf>pass</spf>
15703 </policy_evaluated>
15704 </row>
15705 <identifiers>
15706 <header_from>example.com</header_from>
15707 </identifiers>
15708 <auth_results>
15709 <dkim>
15710 <domain>example.com</domain>
15711 <result>pass</result>
15712 <human_result>verify result: all signatures verified</human_result>
15713 </dkim>
15714 <spf>
15715 <domain>gmail.com</domain>
15716 <result>pass</result>
15717 </spf>
15718 </auth_results>
15719 </record>
15720 <record>
15721 <row>
15722 <source_ip>209.85.215.42</source_ip>
15723 <count>5</count>
15724 <policy_evaluated>
15725 <disposition>none</disposition>
15726 <dkim>pass</dkim>
15727 <spf>pass</spf>
15728 </policy_evaluated>
15729 </row>
15730 <identifiers>
15731 <header_from>example.com</header_from>
15732 </identifiers>
15733 <auth_results>
15734 <dkim>
15735 <domain>example.com</domain>
15736 <result>pass</result>
15737 <human_result>verify result: all signatures verified</human_result>
15738 </dkim>
15739 <spf>
15740 <domain>gmail.com</domain>
15741 <result>pass</result>
15742 </spf>
15743 </auth_results>
15744 </record>
15745 <record>
15746 <row>
15747 <source_ip>209.85.215.41</source_ip>
15748 <count>3</count>
15749 <policy_evaluated>
15750 <disposition>none</disposition>
15751 <dkim>pass</dkim>
15752 <spf>pass</spf>
15753 </policy_evaluated>
15754 </row>
15755 <identifiers>
15756 <header_from>example.com</header_from>
15757 </identifiers>
15758 <auth_results>
15759 <dkim>
15760 <domain>example.com</domain>
15761 <result>pass</result>
15762 <human_result>verify result: all signatures verified</human_result>
15763 </dkim>
15764 <spf>
15765 <domain>brandeis.edu</domain>
15766 <result>pass</result>
15767 </spf>
15768 <spf>
15769 <domain>gmail.com</domain>
15770 <result>pass</result>
15771 </spf>
15772 </auth_results>
15773 </record>
15774 <record>
15775 <row>
15776 <source_ip>209.85.215.49</source_ip>
15777 <count>3</count>
15778 <policy_evaluated>
15779 <disposition>none</disposition>
15780 <dkim>pass</dkim>
15781 <spf>pass</spf>
15782 </policy_evaluated>
15783 </row>
15784 <identifiers>
15785 <header_from>pages.example.com, example.com</header_from>
15786 </identifiers>
15787 <auth_results>
15788 <dkim>
15789 <domain>pages.example.com</domain>
15790 <result>pass</result>
15791 <human_result>verify result: all signatures verified</human_result>
15792 </dkim>
15793 <dkim>
15794 <domain>example.com</domain>
15795 <result>pass</result>
15796 <human_result>verify result: all signatures verified</human_result>
15797 </dkim>
15798 <spf>
15799 <domain>gmail.com</domain>
15800 <result>pass</result>
15801 </spf>
15802 </auth_results>
15803 </record>
15804 <record>
15805 <row>
15806 <source_ip>209.85.215.48</source_ip>
15807 <count>2</count>
15808 <policy_evaluated>
15809 <disposition>none</disposition>
15810 <dkim>pass</dkim>
15811 <spf>pass</spf>
15812 </policy_evaluated>
15813 </row>
15814 <identifiers>
15815 <header_from>example.com</header_from>
15816 </identifiers>
15817 <auth_results>
15818 <dkim>
15819 <domain>example.com</domain>
15820 <result>pass</result>
15821 <human_result>verify result: all signatures verified</human_result>
15822 </dkim>
15823 <spf>
15824 <domain>gmail.com</domain>
15825 <result>pass</result>
15826 </spf>
15827 </auth_results>
15828 </record>
15829 <record>
15830 <row>
15831 <source_ip>112.95.195.149</source_ip>
15832 <count>1</count>
15833 <policy_evaluated>
15834 <disposition>reject</disposition>
15835 <dkim>fail</dkim>
15836 <spf>fail</spf>
15837 </policy_evaluated>
15838 </row>
15839 <identifiers>
15840 <header_from>example.com</header_from>
15841 </identifiers>
15842 <auth_results>
15843 <spf>
15844 <domain>example.com</domain>
15845 <result>fail</result>
15846 </spf>
15847 </auth_results>
15848 </record>
15849 <record>
15850 <row>
15851 <source_ip>58.251.15.134</source_ip>
15852 <count>24</count>
15853 <policy_evaluated>
15854 <disposition>reject</disposition>
15855 <dkim>fail</dkim>
15856 <spf>fail</spf>
15857 </policy_evaluated>
15858 </row>
15859 <identifiers>
15860 <header_from>example.com</header_from>
15861 </identifiers>
15862 <auth_results>
15863 <spf>
15864 <domain>example.com</domain>
15865 <result>fail</result>
15866 </spf>
15867 </auth_results>
15868 </record>
15869 <record>
15870 <row>
15871 <source_ip>209.85.212.180</source_ip>
15872 <count>3</count>
15873 <policy_evaluated>
15874 <disposition>none</disposition>
15875 <dkim>pass</dkim>
15876 <spf>pass</spf>
15877 </policy_evaluated>
15878 </row>
15879 <identifiers>
15880 <header_from>example.com</header_from>
15881 </identifiers>
15882 <auth_results>
15883 <dkim>
15884 <domain>example.com</domain>
15885 <result>pass</result>
15886 <human_result>verify result: all signatures verified</human_result>
15887 </dkim>
15888 <spf>
15889 <domain>gmail.com</domain>
15890 <result>pass</result>
15891 </spf>
15892 </auth_results>
15893 </record>
15894 <record>
15895 <row>
15896 <source_ip>213.199.154.144</source_ip>
15897 <count>1</count>
15898 <policy_evaluated>
15899 <disposition>reject</disposition>
15900 <dkim>fail</dkim>
15901 <spf>pass</spf>
15902 </policy_evaluated>
15903 </row>
15904 <identifiers>
15905 <header_from>example.com</header_from>
15906 </identifiers>
15907 <auth_results>
15908 <dkim>
15909 <domain>example.com</domain>
15910 <result>neutral</result>
15911 <human_result>sigature verify error: message body does not hash to bh value</human_result>
15912 </dkim>
15913 <spf>
15914 <domain>ku.edu</domain>
15915 <result>pass</result>
15916 </spf>
15917 </auth_results>
15918 </record>
15919 <record>
15920 <row>
15921 <source_ip>209.85.212.181</source_ip>
15922 <count>4</count>
15923 <policy_evaluated>
15924 <disposition>none</disposition>
15925 <dkim>pass</dkim>
15926 <spf>pass</spf>
15927 </policy_evaluated>
15928 </row>
15929 <identifiers>
15930 <header_from>example.com</header_from>
15931 </identifiers>
15932 <auth_results>
15933 <dkim>
15934 <domain>example.com</domain>
15935 <result>pass</result>
15936 <human_result>verify result: all signatures verified</human_result>
15937 </dkim>
15938 <spf>
15939 <domain>gmail.com</domain>
15940 <result>pass</result>
15941 </spf>
15942 </auth_results>
15943 </record>
15944 <record>
15945 <row>
15946 <source_ip>220.181.12.60</source_ip>
15947 <count>3</count>
15948 <policy_evaluated>
15949 <disposition>none</disposition>
15950 <dkim>pass</dkim>
15951 <spf>pass</spf>
15952 </policy_evaluated>
15953 </row>
15954 <identifiers>
15955 <header_from>example.com</header_from>
15956 </identifiers>
15957 <auth_results>
15958 <dkim>
15959 <domain>example.com</domain>
15960 <result>pass</result>
15961 <human_result>verify result: all signatures verified</human_result>
15962 </dkim>
15963 <spf>
15964 <domain>163.com</domain>
15965 <result>pass</result>
15966 </spf>
15967 </auth_results>
15968 </record>
15969 <record>
15970 <row>
15971 <source_ip>150.255.4.110</source_ip>
15972 <count>3</count>
15973 <policy_evaluated>
15974 <disposition>reject</disposition>
15975 <dkim>fail</dkim>
15976 <spf>fail</spf>
15977 </policy_evaluated>
15978 </row>
15979 <identifiers>
15980 <header_from>example.com</header_from>
15981 </identifiers>
15982 <auth_results>
15983 <spf>
15984 <domain>example.com</domain>
15985 <result>fail</result>
15986 </spf>
15987 </auth_results>
15988 </record>
15989 <record>
15990 <row>
15991 <source_ip>220.181.12.61</source_ip>
15992 <count>1</count>
15993 <policy_evaluated>
15994 <disposition>none</disposition>
15995 <dkim>pass</dkim>
15996 <spf>pass</spf>
15997 </policy_evaluated>
15998 </row>
15999 <identifiers>
16000 <header_from>example.com</header_from>
16001 </identifiers>
16002 <auth_results>
16003 <dkim>
16004 <domain>example.com</domain>
16005 <result>pass</result>
16006 <human_result>verify result: all signatures verified</human_result>
16007 </dkim>
16008 <spf>
16009 <domain>163.com</domain>
16010 <result>pass</result>
16011 </spf>
16012 </auth_results>
16013 </record>
16014 <record>
16015 <row>
16016 <source_ip>209.85.161.169</source_ip>
16017 <count>5</count>
16018 <policy_evaluated>
16019 <disposition>none</disposition>
16020 <dkim>pass</dkim>
16021 <spf>pass</spf>
16022 </policy_evaluated>
16023 </row>
16024 <identifiers>
16025 <header_from>example.com</header_from>
16026 </identifiers>
16027 <auth_results>
16028 <dkim>
16029 <domain>example.com</domain>
16030 <result>pass</result>
16031 <human_result>verify result: all signatures verified</human_result>
16032 </dkim>
16033 <spf>
16034 <domain>gmail.com</domain>
16035 <result>pass</result>
16036 </spf>
16037 </auth_results>
16038 </record>
16039 <record>
16040 <row>
16041 <source_ip>218.1.66.71</source_ip>
16042 <count>1</count>
16043 <policy_evaluated>
16044 <disposition>none</disposition>
16045 <dkim>pass</dkim>
16046 <spf>fail</spf>
16047 </policy_evaluated>
16048 </row>
16049 <identifiers>
16050 <header_from>example.com</header_from>
16051 </identifiers>
16052 <auth_results>
16053 <dkim>
16054 <domain>example.com</domain>
16055 <result>pass</result>
16056 <human_result>verify result: all signatures verified</human_result>
16057 </dkim>
16058 <spf>
16059 <domain>sh163.net</domain>
16060 <result>none</result>
16061 </spf>
16062 </auth_results>
16063 </record>
16064 <record>
16065 <row>
16066 <source_ip>220.181.12.66</source_ip>
16067 <count>2</count>
16068 <policy_evaluated>
16069 <disposition>none</disposition>
16070 <dkim>pass</dkim>
16071 <spf>pass</spf>
16072 </policy_evaluated>
16073 </row>
16074 <identifiers>
16075 <header_from>example.com</header_from>
16076 </identifiers>
16077 <auth_results>
16078 <dkim>
16079 <domain>example.com</domain>
16080 <result>pass</result>
16081 <human_result>verify result: all signatures verified</human_result>
16082 </dkim>
16083 <spf>
16084 <domain>163.com</domain>
16085 <result>pass</result>
16086 </spf>
16087 </auth_results>
16088 </record>
16089 <record>
16090 <row>
16091 <source_ip>129.186.140.6</source_ip>
16092 <count>1</count>
16093 <policy_evaluated>
16094 <disposition>none</disposition>
16095 <dkim>pass</dkim>
16096 <spf>fail</spf>
16097 </policy_evaluated>
16098 </row>
16099 <identifiers>
16100 <header_from>example.com</header_from>
16101 </identifiers>
16102 <auth_results>
16103 <dkim>
16104 <domain>example.com</domain>
16105 <result>pass</result>
16106 <human_result>verify result: all signatures verified</human_result>
16107 </dkim>
16108 <spf>
16109 <domain>example.com</domain>
16110 <result>fail</result>
16111 </spf>
16112 </auth_results>
16113 </record>
16114 <record>
16115 <row>
16116 <source_ip>65.55.111.168</source_ip>
16117 <count>19</count>
16118 <policy_evaluated>
16119 <disposition>none</disposition>
16120 <dkim>pass</dkim>
16121 <spf>pass</spf>
16122 </policy_evaluated>
16123 </row>
16124 <identifiers>
16125 <header_from>example.com</header_from>
16126 </identifiers>
16127 <auth_results>
16128 <dkim>
16129 <domain>example.com</domain>
16130 <result>pass</result>
16131 <human_result>verify result: all signatures verified</human_result>
16132 </dkim>
16133 <spf>
16134 <domain>hotmail.it</domain>
16135 <result>pass</result>
16136 </spf>
16137 <spf>
16138 <domain>hotmail.com</domain>
16139 <result>pass</result>
16140 </spf>
16141 </auth_results>
16142 </record>
16143 <record>
16144 <row>
16145 <source_ip>220.181.12.64</source_ip>
16146 <count>4</count>
16147 <policy_evaluated>
16148 <disposition>none</disposition>
16149 <dkim>pass</dkim>
16150 <spf>pass</spf>
16151 </policy_evaluated>
16152 </row>
16153 <identifiers>
16154 <header_from>example.com</header_from>
16155 </identifiers>
16156 <auth_results>
16157 <dkim>
16158 <domain>example.com</domain>
16159 <result>pass</result>
16160 <human_result>verify result: all signatures verified</human_result>
16161 </dkim>
16162 <spf>
16163 <domain>163.com</domain>
16164 <result>pass</result>
16165 </spf>
16166 </auth_results>
16167 </record>
16168 <record>
16169 <row>
16170 <source_ip>202.107.243.234</source_ip>
16171 <count>9</count>
16172 <policy_evaluated>
16173 <disposition>reject</disposition>
16174 <dkim>fail</dkim>
16175 <spf>fail</spf>
16176 </policy_evaluated>
16177 </row>
16178 <identifiers>
16179 <header_from>example.com</header_from>
16180 </identifiers>
16181 <auth_results>
16182 <spf>
16183 <domain>example.com</domain>
16184 <result>fail</result>
16185 </spf>
16186 </auth_results>
16187 </record>
16188 <record>
16189 <row>
16190 <source_ip>202.38.64.46</source_ip>
16191 <count>2</count>
16192 <policy_evaluated>
16193 <disposition>none</disposition>
16194 <dkim>pass</dkim>
16195 <spf>pass</spf>
16196 </policy_evaluated>
16197 </row>
16198 <identifiers>
16199 <header_from>example.com</header_from>
16200 </identifiers>
16201 <auth_results>
16202 <dkim>
16203 <domain>example.com</domain>
16204 <result>pass</result>
16205 <human_result>verify result: all signatures verified</human_result>
16206 </dkim>
16207 <spf>
16208 <domain>mail.ustc.edu.cn</domain>
16209 <result>pass</result>
16210 </spf>
16211 </auth_results>
16212 </record>
16213 <record>
16214 <row>
16215 <source_ip>183.22.22.80</source_ip>
16216 <count>7</count>
16217 <policy_evaluated>
16218 <disposition>reject</disposition>
16219 <dkim>fail</dkim>
16220 <spf>fail</spf>
16221 </policy_evaluated>
16222 </row>
16223 <identifiers>
16224 <header_from>example.com</header_from>
16225 </identifiers>
16226 <auth_results>
16227 <spf>
16228 <domain>example.com</domain>
16229 <result>fail</result>
16230 </spf>
16231 </auth_results>
16232 </record>
16233 <record>
16234 <row>
16235 <source_ip>209.85.212.52</source_ip>
16236 <count>2</count>
16237 <policy_evaluated>
16238 <disposition>none</disposition>
16239 <dkim>pass</dkim>
16240 <spf>fail</spf>
16241 </policy_evaluated>
16242 </row>
16243 <identifiers>
16244 <header_from>example.com</header_from>
16245 </identifiers>
16246 <auth_results>
16247 <dkim>
16248 <domain>example.com</domain>
16249 <result>pass</result>
16250 <human_result>verify result: all signatures verified</human_result>
16251 </dkim>
16252 <spf>
16253 <domain>paxex.com.hk</domain>
16254 <result>none</result>
16255 </spf>
16256 </auth_results>
16257 </record>
16258 <record>
16259 <row>
16260 <source_ip>221.204.184.203</source_ip>
16261 <count>2</count>
16262 <policy_evaluated>
16263 <disposition>reject</disposition>
16264 <dkim>fail</dkim>
16265 <spf>fail</spf>
16266 </policy_evaluated>
16267 </row>
16268 <identifiers>
16269 <header_from>example.com</header_from>
16270 </identifiers>
16271 <auth_results>
16272 <spf>
16273 <domain>example.com</domain>
16274 <result>fail</result>
16275 </spf>
16276 </auth_results>
16277 </record>
16278 <record>
16279 <row>
16280 <source_ip>211.152.42.146</source_ip>
16281 <count>2</count>
16282 <policy_evaluated>
16283 <disposition>reject</disposition>
16284 <dkim>fail</dkim>
16285 <spf>fail</spf>
16286 </policy_evaluated>
16287 </row>
16288 <identifiers>
16289 <header_from>example.com</header_from>
16290 </identifiers>
16291 <auth_results>
16292 <dkim>
16293 <domain>example.com</domain>
16294 <result>fail</result>
16295 <human_result>signature error: RSA verify failed</human_result>
16296 </dkim>
16297 <spf>
16298 <domain>mail.umail81.cn4e.com</domain>
16299 <result>none</result>
16300 </spf>
16301 </auth_results>
16302 </record>
16303 <record>
16304 <row>
16305 <source_ip>209.85.214.169</source_ip>
16306 <count>12</count>
16307 <policy_evaluated>
16308 <disposition>none</disposition>
16309 <dkim>pass</dkim>
16310 <spf>pass</spf>
16311 </policy_evaluated>
16312 </row>
16313 <identifiers>
16314 <header_from>example.com</header_from>
16315 </identifiers>
16316 <auth_results>
16317 <dkim>
16318 <domain>example.com</domain>
16319 <result>pass</result>
16320 <human_result>verify result: all signatures verified</human_result>
16321 </dkim>
16322 <spf>
16323 <domain>gmail.com</domain>
16324 <result>pass</result>
16325 </spf>
16326 </auth_results>
16327 </record>
16328 <record>
16329 <row>
16330 <source_ip>61.145.121.80</source_ip>
16331 <count>2</count>
16332 <policy_evaluated>
16333 <disposition>none</disposition>
16334 <dkim>pass</dkim>
16335 <spf>fail</spf>
16336 </policy_evaluated>
16337 </row>
16338 <identifiers>
16339 <header_from>example.com</header_from>
16340 </identifiers>
16341 <auth_results>
16342 <dkim>
16343 <domain>example.com</domain>
16344 <result>pass</result>
16345 <human_result>verify result: all signatures verified</human_result>
16346 </dkim>
16347 <spf>
16348 <domain>glamoxcn.com</domain>
16349 <result>none</result>
16350 </spf>
16351 <spf>
16352 <domain>alevel.com.cn</domain>
16353 <result>none</result>
16354 </spf>
16355 </auth_results>
16356 </record>
16357 <record>
16358 <row>
16359 <source_ip>61.145.121.80</source_ip>
16360 <count>1</count>
16361 <policy_evaluated>
16362 <disposition>reject</disposition>
16363 <dkim>fail</dkim>
16364 <spf>pass</spf>
16365 </policy_evaluated>
16366 </row>
16367 <identifiers>
16368 <header_from>example.com</header_from>
16369 </identifiers>
16370 <auth_results>
16371 <dkim>
16372 <domain>example.com</domain>
16373 <result>fail</result>
16374 <human_result>signature error: RSA verify failed</human_result>
16375 </dkim>
16376 <spf>
16377 <domain>hk-mingjia.com</domain>
16378 <result>pass</result>
16379 </spf>
16380 </auth_results>
16381 </record>
16382 <record>
16383 <row>
16384 <source_ip>220.181.12.68</source_ip>
16385 <count>3</count>
16386 <policy_evaluated>
16387 <disposition>none</disposition>
16388 <dkim>pass</dkim>
16389 <spf>pass</spf>
16390 </policy_evaluated>
16391 </row>
16392 <identifiers>
16393 <header_from>example.com</header_from>
16394 </identifiers>
16395 <auth_results>
16396 <dkim>
16397 <domain>example.com</domain>
16398 <result>pass</result>
16399 <human_result>verify result: all signatures verified</human_result>
16400 </dkim>
16401 <spf>
16402 <domain>163.com</domain>
16403 <result>pass</result>
16404 </spf>
16405 </auth_results>
16406 </record>
16407 <record>
16408 <row>
16409 <source_ip>61.145.121.82</source_ip>
16410 <count>3</count>
16411 <policy_evaluated>
16412 <disposition>none</disposition>
16413 <dkim>pass</dkim>
16414 <spf>fail</spf>
16415 </policy_evaluated>
16416 </row>
16417 <identifiers>
16418 <header_from>example.com</header_from>
16419 </identifiers>
16420 <auth_results>
16421 <dkim>
16422 <domain>example.com</domain>
16423 <result>pass</result>
16424 <human_result>verify result: all signatures verified</human_result>
16425 </dkim>
16426 <spf>
16427 <domain>alevel.com.cn</domain>
16428 <result>none</result>
16429 </spf>
16430 <spf>
16431 <domain>lesaffre.com.cn</domain>
16432 <result>pass</result>
16433 </spf>
16434 <spf>
16435 <domain>deltaplus.com.cn</domain>
16436 <result>none</result>
16437 </spf>
16438 </auth_results>
16439 </record>
16440 <record>
16441 <row>
16442 <source_ip>112.134.75.160</source_ip>
16443 <count>3</count>
16444 <policy_evaluated>
16445 <disposition>reject</disposition>
16446 <dkim>fail</dkim>
16447 <spf>fail</spf>
16448 </policy_evaluated>
16449 </row>
16450 <identifiers>
16451 <header_from>example.com</header_from>
16452 </identifiers>
16453 <auth_results>
16454 <spf>
16455 <domain>example.com</domain>
16456 <result>fail</result>
16457 </spf>
16458 </auth_results>
16459 </record>
16460 <record>
16461 <row>
16462 <source_ip>113.114.247.8</source_ip>
16463 <count>18</count>
16464 <policy_evaluated>
16465 <disposition>reject</disposition>
16466 <dkim>fail</dkim>
16467 <spf>fail</spf>
16468 </policy_evaluated>
16469 </row>
16470 <identifiers>
16471 <header_from>example.com</header_from>
16472 </identifiers>
16473 <auth_results>
16474 <spf>
16475 <domain>example.com</domain>
16476 <result>fail</result>
16477 </spf>
16478 </auth_results>
16479 </record>
16480 <record>
16481 <row>
16482 <source_ip>106.10.148.245</source_ip>
16483 <count>1</count>
16484 <policy_evaluated>
16485 <disposition>none</disposition>
16486 <dkim>pass</dkim>
16487 <spf>fail</spf>
16488 </policy_evaluated>
16489 </row>
16490 <identifiers>
16491 <header_from>example.com</header_from>
16492 </identifiers>
16493 <auth_results>
16494 <dkim>
16495 <domain>example.com</domain>
16496 <result>pass</result>
16497 <human_result>verify result: all signatures verified</human_result>
16498 </dkim>
16499 <spf>
16500 <domain>example.com</domain>
16501 <result>fail</result>
16502 </spf>
16503 </auth_results>
16504 </record>
16505 <record>
16506 <row>
16507 <source_ip>218.102.53.154</source_ip>
16508 <count>2</count>
16509 <policy_evaluated>
16510 <disposition>none</disposition>
16511 <dkim>pass</dkim>
16512 <spf>fail</spf>
16513 </policy_evaluated>
16514 </row>
16515 <identifiers>
16516 <header_from>example.com</header_from>
16517 </identifiers>
16518 <auth_results>
16519 <dkim>
16520 <domain>example.com</domain>
16521 <result>pass</result>
16522 <human_result>verify result: all signatures verified</human_result>
16523 </dkim>
16524 <spf>
16525 <domain>example.com</domain>
16526 <result>fail</result>
16527 </spf>
16528 </auth_results>
16529 </record>
16530 <record>
16531 <row>
16532 <source_ip>113.108.23.54</source_ip>
16533 <count>1</count>
16534 <policy_evaluated>
16535 <disposition>none</disposition>
16536 <dkim>pass</dkim>
16537 <spf>pass</spf>
16538 </policy_evaluated>
16539 </row>
16540 <identifiers>
16541 <header_from>example.com</header_from>
16542 </identifiers>
16543 <auth_results>
16544 <dkim>
16545 <domain>example.com</domain>
16546 <result>pass</result>
16547 <human_result>verify result: all signatures verified</human_result>
16548 </dkim>
16549 <spf>
16550 <domain>qq.com</domain>
16551 <result>pass</result>
16552 </spf>
16553 </auth_results>
16554 </record>
16555 <record>
16556 <row>
16557 <source_ip>113.108.23.53</source_ip>
16558 <count>2</count>
16559 <policy_evaluated>
16560 <disposition>none</disposition>
16561 <dkim>pass</dkim>
16562 <spf>pass</spf>
16563 </policy_evaluated>
16564 </row>
16565 <identifiers>
16566 <header_from>example.com</header_from>
16567 </identifiers>
16568 <auth_results>
16569 <dkim>
16570 <domain>example.com</domain>
16571 <result>pass</result>
16572 <human_result>verify result: all signatures verified</human_result>
16573 </dkim>
16574 <spf>
16575 <domain>qq.com</domain>
16576 <result>pass</result>
16577 </spf>
16578 </auth_results>
16579 </record>
16580 <record>
16581 <row>
16582 <source_ip>113.108.23.52</source_ip>
16583 <count>4</count>
16584 <policy_evaluated>
16585 <disposition>none</disposition>
16586 <dkim>pass</dkim>
16587 <spf>pass</spf>
16588 </policy_evaluated>
16589 </row>
16590 <identifiers>
16591 <header_from>example.com</header_from>
16592 </identifiers>
16593 <auth_results>
16594 <dkim>
16595 <domain>example.com</domain>
16596 <result>pass</result>
16597 <human_result>verify result: all signatures verified</human_result>
16598 </dkim>
16599 <spf>
16600 <domain>qq.com</domain>
16601 <result>pass</result>
16602 </spf>
16603 </auth_results>
16604 </record>
16605 <record>
16606 <row>
16607 <source_ip>113.108.23.51</source_ip>
16608 <count>1</count>
16609 <policy_evaluated>
16610 <disposition>none</disposition>
16611 <dkim>pass</dkim>
16612 <spf>pass</spf>
16613 </policy_evaluated>
16614 </row>
16615 <identifiers>
16616 <header_from>example.com</header_from>
16617 </identifiers>
16618 <auth_results>
16619 <dkim>
16620 <domain>example.com</domain>
16621 <result>pass</result>
16622 <human_result>verify result: all signatures verified</human_result>
16623 </dkim>
16624 <spf>
16625 <domain>qq.com</domain>
16626 <result>pass</result>
16627 </spf>
16628 </auth_results>
16629 </record>
16630 <record>
16631 <row>
16632 <source_ip>113.108.23.50</source_ip>
16633 <count>3</count>
16634 <policy_evaluated>
16635 <disposition>none</disposition>
16636 <dkim>pass</dkim>
16637 <spf>pass</spf>
16638 </policy_evaluated>
16639 </row>
16640 <identifiers>
16641 <header_from>example.com</header_from>
16642 </identifiers>
16643 <auth_results>
16644 <dkim>
16645 <domain>example.com</domain>
16646 <result>pass</result>
16647 <human_result>verify result: all signatures verified</human_result>
16648 </dkim>
16649 <spf>
16650 <domain>qq.com</domain>
16651 <result>pass</result>
16652 </spf>
16653 </auth_results>
16654 </record>
16655 <record>
16656 <row>
16657 <source_ip>98.139.91.238</source_ip>
16658 <count>1</count>
16659 <policy_evaluated>
16660 <disposition>none</disposition>
16661 <dkim>pass</dkim>
16662 <spf>fail</spf>
16663 </policy_evaluated>
16664 </row>
16665 <identifiers>
16666 <header_from>example.com</header_from>
16667 </identifiers>
16668 <auth_results>
16669 <dkim>
16670 <domain>example.com</domain>
16671 <result>pass</result>
16672 <human_result>verify result: all signatures verified</human_result>
16673 </dkim>
16674 <spf>
16675 <domain>example.com</domain>
16676 <result>fail</result>
16677 </spf>
16678 </auth_results>
16679 </record>
16680 <record>
16681 <row>
16682 <source_ip>125.118.53.110</source_ip>
16683 <count>5</count>
16684 <policy_evaluated>
16685 <disposition>reject</disposition>
16686 <dkim>fail</dkim>
16687 <spf>fail</spf>
16688 </policy_evaluated>
16689 </row>
16690 <identifiers>
16691 <header_from>example.com</header_from>
16692 </identifiers>
16693 <auth_results>
16694 <spf>
16695 <domain>example.com</domain>
16696 <result>fail</result>
16697 </spf>
16698 </auth_results>
16699 </record>
16700 <record>
16701 <row>
16702 <source_ip>220.128.236.102</source_ip>
16703 <count>6</count>
16704 <policy_evaluated>
16705 <disposition>reject</disposition>
16706 <dkim>fail</dkim>
16707 <spf>fail</spf>
16708 </policy_evaluated>
16709 </row>
16710 <identifiers>
16711 <header_from>example.com</header_from>
16712 </identifiers>
16713 <auth_results>
16714 <spf>
16715 <domain>example.com</domain>
16716 <result>fail</result>
16717 </spf>
16718 </auth_results>
16719 </record>
16720 <record>
16721 <row>
16722 <source_ip>209.85.160.180</source_ip>
16723 <count>1</count>
16724 <policy_evaluated>
16725 <disposition>none</disposition>
16726 <dkim>pass</dkim>
16727 <spf>pass</spf>
16728 </policy_evaluated>
16729 </row>
16730 <identifiers>
16731 <header_from>example.com</header_from>
16732 </identifiers>
16733 <auth_results>
16734 <dkim>
16735 <domain>example.com</domain>
16736 <result>pass</result>
16737 <human_result>verify result: all signatures verified</human_result>
16738 </dkim>
16739 <spf>
16740 <domain>gmail.com</domain>
16741 <result>pass</result>
16742 </spf>
16743 </auth_results>
16744 </record>
16745 <record>
16746 <row>
16747 <source_ip>209.85.160.181</source_ip>
16748 <count>1</count>
16749 <policy_evaluated>
16750 <disposition>none</disposition>
16751 <dkim>pass</dkim>
16752 <spf>pass</spf>
16753 </policy_evaluated>
16754 </row>
16755 <identifiers>
16756 <header_from>example.com</header_from>
16757 </identifiers>
16758 <auth_results>
16759 <dkim>
16760 <domain>example.com</domain>
16761 <result>pass</result>
16762 <human_result>verify result: all signatures verified</human_result>
16763 </dkim>
16764 <spf>
16765 <domain>gmail.com</domain>
16766 <result>pass</result>
16767 </spf>
16768 </auth_results>
16769 </record>
16770 <record>
16771 <row>
16772 <source_ip>65.55.90.211</source_ip>
16773 <count>5</count>
16774 <policy_evaluated>
16775 <disposition>none</disposition>
16776 <dkim>pass</dkim>
16777 <spf>pass</spf>
16778 </policy_evaluated>
16779 </row>
16780 <identifiers>
16781 <header_from>example.com</header_from>
16782 </identifiers>
16783 <auth_results>
16784 <dkim>
16785 <domain>example.com</domain>
16786 <result>pass</result>
16787 <human_result>verify result: all signatures verified</human_result>
16788 </dkim>
16789 <spf>
16790 <domain>hotmail.com</domain>
16791 <result>pass</result>
16792 </spf>
16793 </auth_results>
16794 </record>
16795 <record>
16796 <row>
16797 <source_ip>65.55.90.210</source_ip>
16798 <count>7</count>
16799 <policy_evaluated>
16800 <disposition>none</disposition>
16801 <dkim>pass</dkim>
16802 <spf>pass</spf>
16803 </policy_evaluated>
16804 </row>
16805 <identifiers>
16806 <header_from>example.com</header_from>
16807 </identifiers>
16808 <auth_results>
16809 <dkim>
16810 <domain>example.com</domain>
16811 <result>pass</result>
16812 <human_result>verify result: all signatures verified</human_result>
16813 </dkim>
16814 <spf>
16815 <domain>hotmail.de</domain>
16816 <result>pass</result>
16817 </spf>
16818 <spf>
16819 <domain>hotmail.it</domain>
16820 <result>pass</result>
16821 </spf>
16822 <spf>
16823 <domain>hotmail.com</domain>
16824 <result>pass</result>
16825 </spf>
16826 </auth_results>
16827 </record>
16828 <record>
16829 <row>
16830 <source_ip>65.55.90.213</source_ip>
16831 <count>7</count>
16832 <policy_evaluated>
16833 <disposition>none</disposition>
16834 <dkim>pass</dkim>
16835 <spf>pass</spf>
16836 </policy_evaluated>
16837 </row>
16838 <identifiers>
16839 <header_from>example.com</header_from>
16840 </identifiers>
16841 <auth_results>
16842 <dkim>
16843 <domain>example.com</domain>
16844 <result>pass</result>
16845 <human_result>verify result: all signatures verified</human_result>
16846 </dkim>
16847 <spf>
16848 <domain>hotmail.it</domain>
16849 <result>pass</result>
16850 </spf>
16851 <spf>
16852 <domain>hotmail.com</domain>
16853 <result>pass</result>
16854 </spf>
16855 </auth_results>
16856 </record>
16857 <record>
16858 <row>
16859 <source_ip>65.55.90.212</source_ip>
16860 <count>5</count>
16861 <policy_evaluated>
16862 <disposition>none</disposition>
16863 <dkim>pass</dkim>
16864 <spf>pass</spf>
16865 </policy_evaluated>
16866 </row>
16867 <identifiers>
16868 <header_from>example.com</header_from>
16869 </identifiers>
16870 <auth_results>
16871 <dkim>
16872 <domain>example.com</domain>
16873 <result>pass</result>
16874 <human_result>verify result: all signatures verified</human_result>
16875 </dkim>
16876 <spf>
16877 <domain>hotmail.it</domain>
16878 <result>pass</result>
16879 </spf>
16880 <spf>
16881 <domain>live.cn</domain>
16882 <result>pass</result>
16883 </spf>
16884 <spf>
16885 <domain>hotmail.com</domain>
16886 <result>pass</result>
16887 </spf>
16888 </auth_results>
16889 </record>
16890 <record>
16891 <row>
16892 <source_ip>65.55.90.215</source_ip>
16893 <count>9</count>
16894 <policy_evaluated>
16895 <disposition>none</disposition>
16896 <dkim>pass</dkim>
16897 <spf>pass</spf>
16898 </policy_evaluated>
16899 </row>
16900 <identifiers>
16901 <header_from>pages.example.com, example.com</header_from>
16902 </identifiers>
16903 <auth_results>
16904 <dkim>
16905 <domain>pages.example.com</domain>
16906 <result>pass</result>
16907 <human_result>verify result: all signatures verified</human_result>
16908 </dkim>
16909 <dkim>
16910 <domain>example.com</domain>
16911 <result>pass</result>
16912 <human_result>verify result: all signatures verified</human_result>
16913 </dkim>
16914 <spf>
16915 <domain>hotmail.it</domain>
16916 <result>pass</result>
16917 </spf>
16918 <spf>
16919 <domain>hotmail.com</domain>
16920 <result>pass</result>
16921 </spf>
16922 </auth_results>
16923 </record>
16924 <record>
16925 <row>
16926 <source_ip>65.55.90.214</source_ip>
16927 <count>7</count>
16928 <policy_evaluated>
16929 <disposition>none</disposition>
16930 <dkim>pass</dkim>
16931 <spf>pass</spf>
16932 </policy_evaluated>
16933 </row>
16934 <identifiers>
16935 <header_from>example.com</header_from>
16936 </identifiers>
16937 <auth_results>
16938 <dkim>
16939 <domain>example.com</domain>
16940 <result>pass</result>
16941 <human_result>verify result: all signatures verified</human_result>
16942 </dkim>
16943 <spf>
16944 <domain>hotmail.de</domain>
16945 <result>pass</result>
16946 </spf>
16947 <spf>
16948 <domain>hotmail.com</domain>
16949 <result>pass</result>
16950 </spf>
16951 </auth_results>
16952 </record>
16953 <record>
16954 <row>
16955 <source_ip>65.55.90.217</source_ip>
16956 <count>5</count>
16957 <policy_evaluated>
16958 <disposition>none</disposition>
16959 <dkim>pass</dkim>
16960 <spf>pass</spf>
16961 </policy_evaluated>
16962 </row>
16963 <identifiers>
16964 <header_from>example.com</header_from>
16965 </identifiers>
16966 <auth_results>
16967 <dkim>
16968 <domain>example.com</domain>
16969 <result>pass</result>
16970 <human_result>verify result: all signatures verified</human_result>
16971 </dkim>
16972 <spf>
16973 <domain>hotmail.de</domain>
16974 <result>pass</result>
16975 </spf>
16976 <spf>
16977 <domain>hotmail.com</domain>
16978 <result>pass</result>
16979 </spf>
16980 </auth_results>
16981 </record>
16982 <record>
16983 <row>
16984 <source_ip>65.55.90.216</source_ip>
16985 <count>5</count>
16986 <policy_evaluated>
16987 <disposition>none</disposition>
16988 <dkim>pass</dkim>
16989 <spf>pass</spf>
16990 </policy_evaluated>
16991 </row>
16992 <identifiers>
16993 <header_from>example.com</header_from>
16994 </identifiers>
16995 <auth_results>
16996 <dkim>
16997 <domain>example.com</domain>
16998 <result>pass</result>
16999 <human_result>verify result: all signatures verified</human_result>
17000 </dkim>
17001 <spf>
17002 <domain>hotmail.com</domain>
17003 <result>pass</result>
17004 </spf>
17005 </auth_results>
17006 </record>
17007 <record>
17008 <row>
17009 <source_ip>65.55.90.219</source_ip>
17010 <count>5</count>
17011 <policy_evaluated>
17012 <disposition>none</disposition>
17013 <dkim>pass</dkim>
17014 <spf>pass</spf>
17015 </policy_evaluated>
17016 </row>
17017 <identifiers>
17018 <header_from>example.com</header_from>
17019 </identifiers>
17020 <auth_results>
17021 <dkim>
17022 <domain>example.com</domain>
17023 <result>pass</result>
17024 <human_result>verify result: all signatures verified</human_result>
17025 </dkim>
17026 <spf>
17027 <domain>hotmail.de</domain>
17028 <result>pass</result>
17029 </spf>
17030 <spf>
17031 <domain>hotmail.com</domain>
17032 <result>pass</result>
17033 </spf>
17034 </auth_results>
17035 </record>
17036 <record>
17037 <row>
17038 <source_ip>65.55.90.218</source_ip>
17039 <count>5</count>
17040 <policy_evaluated>
17041 <disposition>none</disposition>
17042 <dkim>pass</dkim>
17043 <spf>pass</spf>
17044 </policy_evaluated>
17045 </row>
17046 <identifiers>
17047 <header_from>example.com</header_from>
17048 </identifiers>
17049 <auth_results>
17050 <dkim>
17051 <domain>example.com</domain>
17052 <result>pass</result>
17053 <human_result>verify result: all signatures verified</human_result>
17054 </dkim>
17055 <spf>
17056 <domain>live.cn</domain>
17057 <result>pass</result>
17058 </spf>
17059 <spf>
17060 <domain>hotmail.com</domain>
17061 <result>pass</result>
17062 </spf>
17063 </auth_results>
17064 </record>
17065 <record>
17066 <row>
17067 <source_ip>129.7.234.211</source_ip>
17068 <count>1</count>
17069 <policy_evaluated>
17070 <disposition>none</disposition>
17071 <dkim>pass</dkim>
17072 <spf>fail</spf>
17073 </policy_evaluated>
17074 </row>
17075 <identifiers>
17076 <header_from>example.com</header_from>
17077 </identifiers>
17078 <auth_results>
17079 <dkim>
17080 <domain>example.com</domain>
17081 <result>pass</result>
17082 <human_result>verify result: all signatures verified</human_result>
17083 </dkim>
17084 <spf>
17085 <domain>example.com</domain>
17086 <result>fail</result>
17087 </spf>
17088 </auth_results>
17089 </record>
17090 <record>
17091 <row>
17092 <source_ip>113.97.31.101</source_ip>
17093 <count>4</count>
17094 <policy_evaluated>
17095 <disposition>reject</disposition>
17096 <dkim>fail</dkim>
17097 <spf>fail</spf>
17098 </policy_evaluated>
17099 </row>
17100 <identifiers>
17101 <header_from>example.com</header_from>
17102 </identifiers>
17103 <auth_results>
17104 <spf>
17105 <domain>example.com</domain>
17106 <result>fail</result>
17107 </spf>
17108 </auth_results>
17109 </record>
17110 <record>
17111 <row>
17112 <source_ip>114.218.132.52</source_ip>
17113 <count>3</count>
17114 <policy_evaluated>
17115 <disposition>reject</disposition>
17116 <dkim>fail</dkim>
17117 <spf>fail</spf>
17118 </policy_evaluated>
17119 </row>
17120 <identifiers>
17121 <header_from>example.com</header_from>
17122 </identifiers>
17123 <auth_results>
17124 <spf>
17125 <domain>example.com</domain>
17126 <result>fail</result>
17127 </spf>
17128 </auth_results>
17129 </record>
17130 <record>
17131 <row>
17132 <source_ip>183.62.104.144</source_ip>
17133 <count>1</count>
17134 <policy_evaluated>
17135 <disposition>none</disposition>
17136 <dkim>pass</dkim>
17137 <spf>pass</spf>
17138 </policy_evaluated>
17139 </row>
17140 <identifiers>
17141 <header_from>example.com</header_from>
17142 </identifiers>
17143 <auth_results>
17144 <dkim>
17145 <domain>example.com</domain>
17146 <result>pass</result>
17147 <human_result>verify result: all signatures verified</human_result>
17148 </dkim>
17149 <spf>
17150 <domain>qq.com</domain>
17151 <result>pass</result>
17152 </spf>
17153 </auth_results>
17154 </record>
17155 <record>
17156 <row>
17157 <source_ip>119.141.4.111</source_ip>
17158 <count>8</count>
17159 <policy_evaluated>
17160 <disposition>reject</disposition>
17161 <dkim>fail</dkim>
17162 <spf>fail</spf>
17163 </policy_evaluated>
17164 </row>
17165 <identifiers>
17166 <header_from>example.com</header_from>
17167 </identifiers>
17168 <auth_results>
17169 <spf>
17170 <domain>example.com</domain>
17171 <result>fail</result>
17172 </spf>
17173 </auth_results>
17174 </record>
17175 <record>
17176 <row>
17177 <source_ip>220.181.12.88</source_ip>
17178 <count>3</count>
17179 <policy_evaluated>
17180 <disposition>none</disposition>
17181 <dkim>pass</dkim>
17182 <spf>pass</spf>
17183 </policy_evaluated>
17184 </row>
17185 <identifiers>
17186 <header_from>example.com</header_from>
17187 </identifiers>
17188 <auth_results>
17189 <dkim>
17190 <domain>example.com</domain>
17191 <result>pass</result>
17192 <human_result>verify result: all signatures verified</human_result>
17193 </dkim>
17194 <spf>
17195 <domain>163.com</domain>
17196 <result>pass</result>
17197 </spf>
17198 </auth_results>
17199 </record>
17200 <record>
17201 <row>
17202 <source_ip>220.181.12.85</source_ip>
17203 <count>1</count>
17204 <policy_evaluated>
17205 <disposition>none</disposition>
17206 <dkim>pass</dkim>
17207 <spf>pass</spf>
17208 </policy_evaluated>
17209 </row>
17210 <identifiers>
17211 <header_from>example.com</header_from>
17212 </identifiers>
17213 <auth_results>
17214 <dkim>
17215 <domain>example.com</domain>
17216 <result>pass</result>
17217 <human_result>verify result: all signatures verified</human_result>
17218 </dkim>
17219 <spf>
17220 <domain>163.com</domain>
17221 <result>pass</result>
17222 </spf>
17223 </auth_results>
17224 </record>
17225 <record>
17226 <row>
17227 <source_ip>110.75.170.117</source_ip>
17228 <count>1</count>
17229 <policy_evaluated>
17230 <disposition>none</disposition>
17231 <dkim>pass</dkim>
17232 <spf>pass</spf>
17233 </policy_evaluated>
17234 </row>
17235 <identifiers>
17236 <header_from>example.com</header_from>
17237 </identifiers>
17238 <auth_results>
17239 <dkim>
17240 <domain>example.com</domain>
17241 <result>pass</result>
17242 <human_result>verify result: all signatures verified</human_result>
17243 </dkim>
17244 <spf>
17245 <domain>shuigongniao.com</domain>
17246 <result>pass</result>
17247 </spf>
17248 </auth_results>
17249 </record>
17250 <record>
17251 <row>
17252 <source_ip>111.248.6.203</source_ip>
17253 <count>1</count>
17254 <policy_evaluated>
17255 <disposition>reject</disposition>
17256 <dkim>fail</dkim>
17257 <spf>fail</spf>
17258 </policy_evaluated>
17259 </row>
17260 <identifiers>
17261 <header_from>example.com</header_from>
17262 </identifiers>
17263 <auth_results>
17264 <spf>
17265 <domain>example.com</domain>
17266 <result>fail</result>
17267 </spf>
17268 </auth_results>
17269 </record>
17270 <record>
17271 <row>
17272 <source_ip>113.108.12.80</source_ip>
17273 <count>2</count>
17274 <policy_evaluated>
17275 <disposition>none</disposition>
17276 <dkim>pass</dkim>
17277 <spf>pass</spf>
17278 </policy_evaluated>
17279 </row>
17280 <identifiers>
17281 <header_from>example.com</header_from>
17282 </identifiers>
17283 <auth_results>
17284 <dkim>
17285 <domain>example.com</domain>
17286 <result>pass</result>
17287 <human_result>verify result: all signatures verified</human_result>
17288 </dkim>
17289 <spf>
17290 <domain>qq.com</domain>
17291 <result>pass</result>
17292 </spf>
17293 </auth_results>
17294 </record>
17295 <record>
17296 <row>
17297 <source_ip>113.108.12.81</source_ip>
17298 <count>1</count>
17299 <policy_evaluated>
17300 <disposition>none</disposition>
17301 <dkim>pass</dkim>
17302 <spf>pass</spf>
17303 </policy_evaluated>
17304 </row>
17305 <identifiers>
17306 <header_from>example.com</header_from>
17307 </identifiers>
17308 <auth_results>
17309 <dkim>
17310 <domain>example.com</domain>
17311 <result>pass</result>
17312 <human_result>verify result: all signatures verified</human_result>
17313 </dkim>
17314 <spf>
17315 <domain>qq.com</domain>
17316 <result>pass</result>
17317 </spf>
17318 </auth_results>
17319 </record>
17320 <record>
17321 <row>
17322 <source_ip>113.108.12.82</source_ip>
17323 <count>3</count>
17324 <policy_evaluated>
17325 <disposition>none</disposition>
17326 <dkim>pass</dkim>
17327 <spf>pass</spf>
17328 </policy_evaluated>
17329 </row>
17330 <identifiers>
17331 <header_from>example.com</header_from>
17332 </identifiers>
17333 <auth_results>
17334 <dkim>
17335 <domain>example.com</domain>
17336 <result>pass</result>
17337 <human_result>verify result: all signatures verified</human_result>
17338 </dkim>
17339 <spf>
17340 <domain>qq.com</domain>
17341 <result>pass</result>
17342 </spf>
17343 </auth_results>
17344 </record>
17345 <record>
17346 <row>
17347 <source_ip>113.108.12.83</source_ip>
17348 <count>4</count>
17349 <policy_evaluated>
17350 <disposition>none</disposition>
17351 <dkim>pass</dkim>
17352 <spf>pass</spf>
17353 </policy_evaluated>
17354 </row>
17355 <identifiers>
17356 <header_from>example.com</header_from>
17357 </identifiers>
17358 <auth_results>
17359 <dkim>
17360 <domain>example.com</domain>
17361 <result>pass</result>
17362 <human_result>verify result: all signatures verified</human_result>
17363 </dkim>
17364 <spf>
17365 <domain>qq.com</domain>
17366 <result>pass</result>
17367 </spf>
17368 </auth_results>
17369 </record>
17370 <record>
17371 <row>
17372 <source_ip>113.108.12.84</source_ip>
17373 <count>3</count>
17374 <policy_evaluated>
17375 <disposition>none</disposition>
17376 <dkim>pass</dkim>
17377 <spf>pass</spf>
17378 </policy_evaluated>
17379 </row>
17380 <identifiers>
17381 <header_from>example.com</header_from>
17382 </identifiers>
17383 <auth_results>
17384 <dkim>
17385 <domain>example.com</domain>
17386 <result>pass</result>
17387 <human_result>verify result: all signatures verified</human_result>
17388 </dkim>
17389 <spf>
17390 <domain>qq.com</domain>
17391 <result>pass</result>
17392 </spf>
17393 </auth_results>
17394 </record>
17395 <record>
17396 <row>
17397 <source_ip>113.108.12.85</source_ip>
17398 <count>5</count>
17399 <policy_evaluated>
17400 <disposition>none</disposition>
17401 <dkim>pass</dkim>
17402 <spf>pass</spf>
17403 </policy_evaluated>
17404 </row>
17405 <identifiers>
17406 <header_from>example.com</header_from>
17407 </identifiers>
17408 <auth_results>
17409 <dkim>
17410 <domain>example.com</domain>
17411 <result>pass</result>
17412 <human_result>verify result: all signatures verified</human_result>
17413 </dkim>
17414 <spf>
17415 <domain>vip.qq.com</domain>
17416 <result>pass</result>
17417 </spf>
17418 <spf>
17419 <domain>qq.com</domain>
17420 <result>pass</result>
17421 </spf>
17422 </auth_results>
17423 </record>
17424 <record>
17425 <row>
17426 <source_ip>113.108.12.86</source_ip>
17427 <count>1</count>
17428 <policy_evaluated>
17429 <disposition>none</disposition>
17430 <dkim>pass</dkim>
17431 <spf>pass</spf>
17432 </policy_evaluated>
17433 </row>
17434 <identifiers>
17435 <header_from>example.com</header_from>
17436 </identifiers>
17437 <auth_results>
17438 <dkim>
17439 <domain>example.com</domain>
17440 <result>pass</result>
17441 <human_result>verify result: all signatures verified</human_result>
17442 </dkim>
17443 <spf>
17444 <domain>qq.com</domain>
17445 <result>pass</result>
17446 </spf>
17447 </auth_results>
17448 </record>
17449 <record>
17450 <row>
17451 <source_ip>113.108.12.87</source_ip>
17452 <count>3</count>
17453 <policy_evaluated>
17454 <disposition>none</disposition>
17455 <dkim>pass</dkim>
17456 <spf>pass</spf>
17457 </policy_evaluated>
17458 </row>
17459 <identifiers>
17460 <header_from>example.com</header_from>
17461 </identifiers>
17462 <auth_results>
17463 <dkim>
17464 <domain>example.com</domain>
17465 <result>pass</result>
17466 <human_result>verify result: all signatures verified</human_result>
17467 </dkim>
17468 <spf>
17469 <domain>vip.qq.com</domain>
17470 <result>pass</result>
17471 </spf>
17472 <spf>
17473 <domain>qq.com</domain>
17474 <result>pass</result>
17475 </spf>
17476 </auth_results>
17477 </record>
17478 <record>
17479 <row>
17480 <source_ip>183.23.105.243</source_ip>
17481 <count>3</count>
17482 <policy_evaluated>
17483 <disposition>reject</disposition>
17484 <dkim>fail</dkim>
17485 <spf>fail</spf>
17486 </policy_evaluated>
17487 </row>
17488 <identifiers>
17489 <header_from>example.com</header_from>
17490 </identifiers>
17491 <auth_results>
17492 <spf>
17493 <domain>example.com</domain>
17494 <result>fail</result>
17495 </spf>
17496 </auth_results>
17497 </record>
17498 <record>
17499 <row>
17500 <source_ip>192.43.227.18</source_ip>
17501 <count>1</count>
17502 <policy_evaluated>
17503 <disposition>none</disposition>
17504 <dkim>pass</dkim>
17505 <spf>fail</spf>
17506 </policy_evaluated>
17507 </row>
17508 <identifiers>
17509 <header_from>example.com</header_from>
17510 </identifiers>
17511 <auth_results>
17512 <dkim>
17513 <domain>example.com</domain>
17514 <result>pass</result>
17515 <human_result>verify result: all signatures verified</human_result>
17516 </dkim>
17517 <spf>
17518 <domain>student.adelaide.edu.au</domain>
17519 <result>none</result>
17520 </spf>
17521 </auth_results>
17522 </record>
17523 <record>
17524 <row>
17525 <source_ip>209.85.214.47</source_ip>
17526 <count>7</count>
17527 <policy_evaluated>
17528 <disposition>none</disposition>
17529 <dkim>pass</dkim>
17530 <spf>pass</spf>
17531 </policy_evaluated>
17532 </row>
17533 <identifiers>
17534 <header_from>example.com</header_from>
17535 </identifiers>
17536 <auth_results>
17537 <dkim>
17538 <domain>example.com</domain>
17539 <result>pass</result>
17540 <human_result>verify result: all signatures verified</human_result>
17541 </dkim>
17542 <spf>
17543 <domain>gmail.com</domain>
17544 <result>pass</result>
17545 </spf>
17546 <spf>
17547 <domain>googlemail.com</domain>
17548 <result>pass</result>
17549 </spf>
17550 </auth_results>
17551 </record>
17552 <record>
17553 <row>
17554 <source_ip>209.85.212.50</source_ip>
17555 <count>4</count>
17556 <policy_evaluated>
17557 <disposition>none</disposition>
17558 <dkim>pass</dkim>
17559 <spf>pass</spf>
17560 </policy_evaluated>
17561 </row>
17562 <identifiers>
17563 <header_from>example.com</header_from>
17564 </identifiers>
17565 <auth_results>
17566 <dkim>
17567 <domain>example.com</domain>
17568 <result>pass</result>
17569 <human_result>verify result: all signatures verified</human_result>
17570 </dkim>
17571 <spf>
17572 <domain>gmail.com</domain>
17573 <result>pass</result>
17574 </spf>
17575 </auth_results>
17576 </record>
17577 <record>
17578 <row>
17579 <source_ip>61.145.9.76</source_ip>
17580 <count>2</count>
17581 <policy_evaluated>
17582 <disposition>reject</disposition>
17583 <dkim>fail</dkim>
17584 <spf>fail</spf>
17585 </policy_evaluated>
17586 </row>
17587 <identifiers>
17588 <header_from>example.com</header_from>
17589 </identifiers>
17590 <auth_results>
17591 <spf>
17592 <domain>example.com</domain>
17593 <result>fail</result>
17594 </spf>
17595 </auth_results>
17596 </record>
17597 <record>
17598 <row>
17599 <source_ip>123.124.145.234</source_ip>
17600 <count>1</count>
17601 <policy_evaluated>
17602 <disposition>reject</disposition>
17603 <dkim>fail</dkim>
17604 <spf>fail</spf>
17605 </policy_evaluated>
17606 </row>
17607 <identifiers>
17608 <header_from>example.com</header_from>
17609 </identifiers>
17610 <auth_results>
17611 <dkim>
17612 <domain>example.com</domain>
17613 <result>neutral</result>
17614 <human_result>sigature verify error: message body does not hash to bh value</human_result>
17615 </dkim>
17616 <spf>
17617 <domain>ccom.edu.cn</domain>
17618 <result>none</result>
17619 </spf>
17620 </auth_results>
17621 </record>
17622 <record>
17623 <row>
17624 <source_ip>218.244.146.232</source_ip>
17625 <count>1</count>
17626 <policy_evaluated>
17627 <disposition>reject</disposition>
17628 <dkim>fail</dkim>
17629 <spf>fail</spf>
17630 </policy_evaluated>
17631 </row>
17632 <identifiers>
17633 <header_from>example.com</header_from>
17634 </identifiers>
17635 <auth_results>
17636 <dkim>
17637 <domain>example.com</domain>
17638 <result>fail</result>
17639 <human_result>signature error: RSA verify failed</human_result>
17640 </dkim>
17641 <spf>
17642 <domain>p3ne.com</domain>
17643 <result>none</result>
17644 </spf>
17645 </auth_results>
17646 </record>
17647 <record>
17648 <row>
17649 <source_ip>59.121.232.213</source_ip>
17650 <count>3</count>
17651 <policy_evaluated>
17652 <disposition>reject</disposition>
17653 <dkim>fail</dkim>
17654 <spf>fail</spf>
17655 </policy_evaluated>
17656 </row>
17657 <identifiers>
17658 <header_from>example.com</header_from>
17659 </identifiers>
17660 <auth_results>
17661 <spf>
17662 <domain>example.com</domain>
17663 <result>fail</result>
17664 </spf>
17665 </auth_results>
17666 </record>
17667 <record>
17668 <row>
17669 <source_ip>66.220.155.135</source_ip>
17670 <count>1536</count>
17671 <policy_evaluated>
17672 <disposition>none</disposition>
17673 <dkim>pass</dkim>
17674 <spf>pass</spf>
17675 </policy_evaluated>
17676 </row>
17677 <identifiers>
17678 <header_from>pages.example.com, example.com</header_from>
17679 </identifiers>
17680 <auth_results>
17681 <dkim>
17682 <domain>pages.example.com</domain>
17683 <result>pass</result>
17684 <human_result>verify result: all signatures verified</human_result>
17685 </dkim>
17686 <dkim>
17687 <domain>example.com</domain>
17688 <result>pass</result>
17689 <human_result>verify result: all signatures verified</human_result>
17690 </dkim>
17691 <spf>
17692 <domain>pages.example.com</domain>
17693 <result>neutral</result>
17694 </spf>
17695 <spf>
17696 <domain>example.com</domain>
17697 <result>pass</result>
17698 </spf>
17699 </auth_results>
17700 </record>
17701 <record>
17702 <row>
17703 <source_ip>123.58.178.226</source_ip>
17704 <count>5</count>
17705 <policy_evaluated>
17706 <disposition>none</disposition>
17707 <dkim>pass</dkim>
17708 <spf>pass</spf>
17709 </policy_evaluated>
17710 </row>
17711 <identifiers>
17712 <header_from>example.com</header_from>
17713 </identifiers>
17714 <auth_results>
17715 <dkim>
17716 <domain>example.com</domain>
17717 <result>pass</result>
17718 <human_result>verify result: all signatures verified</human_result>
17719 </dkim>
17720 <spf>
17721 <domain>yeah.net</domain>
17722 <result>pass</result>
17723 </spf>
17724 </auth_results>
17725 </record>
17726 <record>
17727 <row>
17728 <source_ip>123.58.178.225</source_ip>
17729 <count>3</count>
17730 <policy_evaluated>
17731 <disposition>none</disposition>
17732 <dkim>pass</dkim>
17733 <spf>pass</spf>
17734 </policy_evaluated>
17735 </row>
17736 <identifiers>
17737 <header_from>example.com</header_from>
17738 </identifiers>
17739 <auth_results>
17740 <dkim>
17741 <domain>example.com</domain>
17742 <result>pass</result>
17743 <human_result>verify result: all signatures verified</human_result>
17744 </dkim>
17745 <spf>
17746 <domain>yeah.net</domain>
17747 <result>pass</result>
17748 </spf>
17749 </auth_results>
17750 </record>
17751 <record>
17752 <row>
17753 <source_ip>123.58.178.224</source_ip>
17754 <count>2</count>
17755 <policy_evaluated>
17756 <disposition>none</disposition>
17757 <dkim>pass</dkim>
17758 <spf>pass</spf>
17759 </policy_evaluated>
17760 </row>
17761 <identifiers>
17762 <header_from>example.com</header_from>
17763 </identifiers>
17764 <auth_results>
17765 <dkim>
17766 <domain>example.com</domain>
17767 <result>pass</result>
17768 <human_result>verify result: all signatures verified</human_result>
17769 </dkim>
17770 <spf>
17771 <domain>yeah.net</domain>
17772 <result>pass</result>
17773 </spf>
17774 </auth_results>
17775 </record>
17776 <record>
17777 <row>
17778 <source_ip>58.62.17.138</source_ip>
17779 <count>35</count>
17780 <policy_evaluated>
17781 <disposition>reject</disposition>
17782 <dkim>fail</dkim>
17783 <spf>fail</spf>
17784 </policy_evaluated>
17785 </row>
17786 <identifiers>
17787 <header_from>example.com</header_from>
17788 </identifiers>
17789 <auth_results>
17790 <spf>
17791 <domain>example.com</domain>
17792 <result>fail</result>
17793 </spf>
17794 </auth_results>
17795 </record>
17796 <record>
17797 <row>
17798 <source_ip>113.108.13.47</source_ip>
17799 <count>4</count>
17800 <policy_evaluated>
17801 <disposition>none</disposition>
17802 <dkim>pass</dkim>
17803 <spf>pass</spf>
17804 </policy_evaluated>
17805 </row>
17806 <identifiers>
17807 <header_from>example.com</header_from>
17808 </identifiers>
17809 <auth_results>
17810 <dkim>
17811 <domain>example.com</domain>
17812 <result>pass</result>
17813 <human_result>verify result: all signatures verified</human_result>
17814 </dkim>
17815 <spf>
17816 <domain>qq.com</domain>
17817 <result>pass</result>
17818 </spf>
17819 </auth_results>
17820 </record>
17821 <record>
17822 <row>
17823 <source_ip>66.220.144.148</source_ip>
17824 <count>2159</count>
17825 <policy_evaluated>
17826 <disposition>none</disposition>
17827 <dkim>pass</dkim>
17828 <spf>pass</spf>
17829 </policy_evaluated>
17830 </row>
17831 <identifiers>
17832 <header_from>pages.example.com, example.com</header_from>
17833 </identifiers>
17834 <auth_results>
17835 <dkim>
17836 <domain>pages.example.com</domain>
17837 <result>pass</result>
17838 <human_result>verify result: all signatures verified</human_result>
17839 </dkim>
17840 <dkim>
17841 <domain>example.com</domain>
17842 <result>pass</result>
17843 <human_result>verify result: all signatures verified</human_result>
17844 </dkim>
17845 <spf>
17846 <domain>pages.example.com</domain>
17847 <result>pass</result>
17848 </spf>
17849 <spf>
17850 <domain>example.com</domain>
17851 <result>pass</result>
17852 </spf>
17853 </auth_results>
17854 </record>
17855 <record>
17856 <row>
17857 <source_ip>66.220.144.149</source_ip>
17858 <count>2069</count>
17859 <policy_evaluated>
17860 <disposition>none</disposition>
17861 <dkim>pass</dkim>
17862 <spf>pass</spf>
17863 </policy_evaluated>
17864 </row>
17865 <identifiers>
17866 <header_from>pages.example.com, example.com</header_from>
17867 </identifiers>
17868 <auth_results>
17869 <dkim>
17870 <domain>pages.example.com</domain>
17871 <result>pass</result>
17872 <human_result>verify result: all signatures verified</human_result>
17873 </dkim>
17874 <dkim>
17875 <domain>example.com</domain>
17876 <result>pass</result>
17877 <human_result>verify result: all signatures verified</human_result>
17878 </dkim>
17879 <spf>
17880 <domain>pages.example.com</domain>
17881 <result>pass</result>
17882 </spf>
17883 <spf>
17884 <domain>example.com</domain>
17885 <result>pass</result>
17886 </spf>
17887 </auth_results>
17888 </record>
17889 <record>
17890 <row>
17891 <source_ip>66.220.144.144</source_ip>
17892 <count>2022</count>
17893 <policy_evaluated>
17894 <disposition>none</disposition>
17895 <dkim>pass</dkim>
17896 <spf>pass</spf>
17897 </policy_evaluated>
17898 </row>
17899 <identifiers>
17900 <header_from>pages.example.com, example.com</header_from>
17901 </identifiers>
17902 <auth_results>
17903 <dkim>
17904 <domain>pages.example.com</domain>
17905 <result>pass</result>
17906 <human_result>verify result: all signatures verified</human_result>
17907 </dkim>
17908 <dkim>
17909 <domain>example.com</domain>
17910 <result>pass</result>
17911 <human_result>verify result: all signatures verified</human_result>
17912 </dkim>
17913 <spf>
17914 <domain>pages.example.com</domain>
17915 <result>neutral</result>
17916 </spf>
17917 <spf>
17918 <domain>example.com</domain>
17919 <result>pass</result>
17920 </spf>
17921 </auth_results>
17922 </record>
17923 <record>
17924 <row>
17925 <source_ip>66.220.144.145</source_ip>
17926 <count>1972</count>
17927 <policy_evaluated>
17928 <disposition>none</disposition>
17929 <dkim>pass</dkim>
17930 <spf>pass</spf>
17931 </policy_evaluated>
17932 </row>
17933 <identifiers>
17934 <header_from>pages.example.com, example.com</header_from>
17935 </identifiers>
17936 <auth_results>
17937 <dkim>
17938 <domain>pages.example.com</domain>
17939 <result>pass</result>
17940 <human_result>verify result: all signatures verified</human_result>
17941 </dkim>
17942 <dkim>
17943 <domain>example.com</domain>
17944 <result>pass</result>
17945 <human_result>verify result: all signatures verified</human_result>
17946 </dkim>
17947 <spf>
17948 <domain>pages.example.com</domain>
17949 <result>neutral</result>
17950 </spf>
17951 <spf>
17952 <domain>example.com</domain>
17953 <result>pass</result>
17954 </spf>
17955 </auth_results>
17956 </record>
17957 <record>
17958 <row>
17959 <source_ip>66.220.144.146</source_ip>
17960 <count>2102</count>
17961 <policy_evaluated>
17962 <disposition>none</disposition>
17963 <dkim>pass</dkim>
17964 <spf>pass</spf>
17965 </policy_evaluated>
17966 </row>
17967 <identifiers>
17968 <header_from>pages.example.com, example.com</header_from>
17969 </identifiers>
17970 <auth_results>
17971 <dkim>
17972 <domain>pages.example.com</domain>
17973 <result>pass</result>
17974 <human_result>verify result: all signatures verified</human_result>
17975 </dkim>
17976 <dkim>
17977 <domain>example.com</domain>
17978 <result>pass</result>
17979 <human_result>verify result: all signatures verified</human_result>
17980 </dkim>
17981 <spf>
17982 <domain>pages.example.com</domain>
17983 <result>pass</result>
17984 </spf>
17985 <spf>
17986 <domain>example.com</domain>
17987 <result>pass</result>
17988 </spf>
17989 </auth_results>
17990 </record>
17991 <record>
17992 <row>
17993 <source_ip>66.220.144.147</source_ip>
17994 <count>2041</count>
17995 <policy_evaluated>
17996 <disposition>none</disposition>
17997 <dkim>pass</dkim>
17998 <spf>pass</spf>
17999 </policy_evaluated>
18000 </row>
18001 <identifiers>
18002 <header_from>pages.example.com, example.com</header_from>
18003 </identifiers>
18004 <auth_results>
18005 <dkim>
18006 <domain>pages.example.com</domain>
18007 <result>pass</result>
18008 <human_result>verify result: all signatures verified</human_result>
18009 </dkim>
18010 <dkim>
18011 <domain>example.com</domain>
18012 <result>pass</result>
18013 <human_result>verify result: all signatures verified</human_result>
18014 </dkim>
18015 <spf>
18016 <domain>pages.example.com</domain>
18017 <result>pass</result>
18018 </spf>
18019 <spf>
18020 <domain>example.com</domain>
18021 <result>pass</result>
18022 </spf>
18023 </auth_results>
18024 </record>
18025 <record>
18026 <row>
18027 <source_ip>66.220.144.140</source_ip>
18028 <count>2063</count>
18029 <policy_evaluated>
18030 <disposition>none</disposition>
18031 <dkim>pass</dkim>
18032 <spf>pass</spf>
18033 </policy_evaluated>
18034 </row>
18035 <identifiers>
18036 <header_from>pages.example.com, example.com</header_from>
18037 </identifiers>
18038 <auth_results>
18039 <dkim>
18040 <domain>pages.example.com</domain>
18041 <result>pass</result>
18042 <human_result>verify result: all signatures verified</human_result>
18043 </dkim>
18044 <dkim>
18045 <domain>example.com</domain>
18046 <result>pass</result>
18047 <human_result>verify result: all signatures verified</human_result>
18048 </dkim>
18049 <spf>
18050 <domain>pages.example.com</domain>
18051 <result>pass</result>
18052 </spf>
18053 <spf>
18054 <domain>example.com</domain>
18055 <result>pass</result>
18056 </spf>
18057 </auth_results>
18058 </record>
18059 <record>
18060 <row>
18061 <source_ip>66.220.144.141</source_ip>
18062 <count>2102</count>
18063 <policy_evaluated>
18064 <disposition>none</disposition>
18065 <dkim>pass</dkim>
18066 <spf>pass</spf>
18067 </policy_evaluated>
18068 </row>
18069 <identifiers>
18070 <header_from>pages.example.com, example.com</header_from>
18071 </identifiers>
18072 <auth_results>
18073 <dkim>
18074 <domain>pages.example.com</domain>
18075 <result>pass</result>
18076 <human_result>verify result: all signatures verified</human_result>
18077 </dkim>
18078 <dkim>
18079 <domain>example.com</domain>
18080 <result>pass</result>
18081 <human_result>verify result: all signatures verified</human_result>
18082 </dkim>
18083 <spf>
18084 <domain>pages.example.com</domain>
18085 <result>neutral</result>
18086 </spf>
18087 <spf>
18088 <domain>example.com</domain>
18089 <result>pass</result>
18090 </spf>
18091 </auth_results>
18092 </record>
18093 <record>
18094 <row>
18095 <source_ip>66.220.144.142</source_ip>
18096 <count>2173</count>
18097 <policy_evaluated>
18098 <disposition>none</disposition>
18099 <dkim>pass</dkim>
18100 <spf>pass</spf>
18101 </policy_evaluated>
18102 </row>
18103 <identifiers>
18104 <header_from>pages.example.com, example.com</header_from>
18105 </identifiers>
18106 <auth_results>
18107 <dkim>
18108 <domain>pages.example.com</domain>
18109 <result>pass</result>
18110 <human_result>verify result: all signatures verified</human_result>
18111 </dkim>
18112 <dkim>
18113 <domain>example.com</domain>
18114 <result>pass</result>
18115 <human_result>verify result: all signatures verified</human_result>
18116 </dkim>
18117 <spf>
18118 <domain>pages.example.com</domain>
18119 <result>neutral</result>
18120 </spf>
18121 <spf>
18122 <domain>example.com</domain>
18123 <result>pass</result>
18124 </spf>
18125 </auth_results>
18126 </record>
18127 <record>
18128 <row>
18129 <source_ip>66.220.144.143</source_ip>
18130 <count>2083</count>
18131 <policy_evaluated>
18132 <disposition>none</disposition>
18133 <dkim>pass</dkim>
18134 <spf>pass</spf>
18135 </policy_evaluated>
18136 </row>
18137 <identifiers>
18138 <header_from>pages.example.com, example.com</header_from>
18139 </identifiers>
18140 <auth_results>
18141 <dkim>
18142 <domain>pages.example.com</domain>
18143 <result>pass</result>
18144 <human_result>verify result: all signatures verified</human_result>
18145 </dkim>
18146 <dkim>
18147 <domain>example.com</domain>
18148 <result>pass</result>
18149 <human_result>verify result: all signatures verified</human_result>
18150 </dkim>
18151 <spf>
18152 <domain>pages.example.com</domain>
18153 <result>pass</result>
18154 </spf>
18155 <spf>
18156 <domain>example.com</domain>
18157 <result>pass</result>
18158 </spf>
18159 </auth_results>
18160 </record>
18161 <record>
18162 <row>
18163 <source_ip>66.220.144.143</source_ip>
18164 <count>1</count>
18165 <policy_evaluated>
18166 <disposition>reject</disposition>
18167 <dkim>fail</dkim>
18168 <spf>fail</spf>
18169 </policy_evaluated>
18170 </row>
18171 <identifiers>
18172 <header_from>example.com</header_from>
18173 </identifiers>
18174 <auth_results>
18175 <dkim>
18176 <domain>example.com</domain>
18177 <result>temperror</result>
18178 <human_result>signature error: temporary dns failure requesting selector</human_result>
18179 </dkim>
18180 <spf>
18181 <domain>example.com</domain>
18182 <result>neutral</result>
18183 </spf>
18184 </auth_results>
18185 </record>
18186 <record>
18187 <row>
18188 <source_ip>175.111.255.130</source_ip>
18189 <count>12</count>
18190 <policy_evaluated>
18191 <disposition>reject</disposition>
18192 <dkim>fail</dkim>
18193 <spf>fail</spf>
18194 </policy_evaluated>
18195 </row>
18196 <identifiers>
18197 <header_from>example.com</header_from>
18198 </identifiers>
18199 <auth_results>
18200 <spf>
18201 <domain>example.com</domain>
18202 <result>fail</result>
18203 </spf>
18204 </auth_results>
18205 </record>
18206 <record>
18207 <row>
18208 <source_ip>209.85.160.41</source_ip>
18209 <count>4</count>
18210 <policy_evaluated>
18211 <disposition>none</disposition>
18212 <dkim>pass</dkim>
18213 <spf>pass</spf>
18214 </policy_evaluated>
18215 </row>
18216 <identifiers>
18217 <header_from>example.com</header_from>
18218 </identifiers>
18219 <auth_results>
18220 <dkim>
18221 <domain>example.com</domain>
18222 <result>pass</result>
18223 <human_result>verify result: all signatures verified</human_result>
18224 </dkim>
18225 <spf>
18226 <domain>gmail.com</domain>
18227 <result>pass</result>
18228 </spf>
18229 </auth_results>
18230 </record>
18231 <record>
18232 <row>
18233 <source_ip>218.107.251.178</source_ip>
18234 <count>1</count>
18235 <policy_evaluated>
18236 <disposition>reject</disposition>
18237 <dkim>fail</dkim>
18238 <spf>fail</spf>
18239 </policy_evaluated>
18240 </row>
18241 <identifiers>
18242 <header_from>example.com</header_from>
18243 </identifiers>
18244 <auth_results>
18245 <spf>
18246 <domain>example.com</domain>
18247 <result>fail</result>
18248 </spf>
18249 </auth_results>
18250 </record>
18251 <record>
18252 <row>
18253 <source_ip>121.15.200.73</source_ip>
18254 <count>42</count>
18255 <policy_evaluated>
18256 <disposition>reject</disposition>
18257 <dkim>fail</dkim>
18258 <spf>fail</spf>
18259 </policy_evaluated>
18260 </row>
18261 <identifiers>
18262 <header_from>example.com</header_from>
18263 </identifiers>
18264 <auth_results>
18265 <spf>
18266 <domain>example.com</domain>
18267 <result>fail</result>
18268 </spf>
18269 </auth_results>
18270 </record>
18271 <record>
18272 <row>
18273 <source_ip>209.85.217.173</source_ip>
18274 <count>4</count>
18275 <policy_evaluated>
18276 <disposition>none</disposition>
18277 <dkim>pass</dkim>
18278 <spf>pass</spf>
18279 </policy_evaluated>
18280 </row>
18281 <identifiers>
18282 <header_from>example.com</header_from>
18283 </identifiers>
18284 <auth_results>
18285 <dkim>
18286 <domain>example.com</domain>
18287 <result>pass</result>
18288 <human_result>verify result: all signatures verified</human_result>
18289 </dkim>
18290 <spf>
18291 <domain>gmail.com</domain>
18292 <result>pass</result>
18293 </spf>
18294 </auth_results>
18295 </record>
18296 <record>
18297 <row>
18298 <source_ip>209.85.217.169</source_ip>
18299 <count>3</count>
18300 <policy_evaluated>
18301 <disposition>none</disposition>
18302 <dkim>pass</dkim>
18303 <spf>pass</spf>
18304 </policy_evaluated>
18305 </row>
18306 <identifiers>
18307 <header_from>example.com</header_from>
18308 </identifiers>
18309 <auth_results>
18310 <dkim>
18311 <domain>example.com</domain>
18312 <result>pass</result>
18313 <human_result>verify result: all signatures verified</human_result>
18314 </dkim>
18315 <spf>
18316 <domain>gmail.com</domain>
18317 <result>pass</result>
18318 </spf>
18319 </auth_results>
18320 </record>
18321 <record>
18322 <row>
18323 <source_ip>64.18.0.24</source_ip>
18324 <count>1</count>
18325 <policy_evaluated>
18326 <disposition>none</disposition>
18327 <dkim>pass</dkim>
18328 <spf>pass</spf>
18329 </policy_evaluated>
18330 </row>
18331 <identifiers>
18332 <header_from>example.com</header_from>
18333 </identifiers>
18334 <auth_results>
18335 <dkim>
18336 <domain>example.com</domain>
18337 <result>pass</result>
18338 <human_result>verify result: all signatures verified</human_result>
18339 </dkim>
18340 <spf>
18341 <domain>unomaha.edu</domain>
18342 <result>pass</result>
18343 </spf>
18344 </auth_results>
18345 </record>
18346 <record>
18347 <row>
18348 <source_ip>218.1.66.83</source_ip>
18349 <count>1</count>
18350 <policy_evaluated>
18351 <disposition>none</disposition>
18352 <dkim>pass</dkim>
18353 <spf>fail</spf>
18354 </policy_evaluated>
18355 </row>
18356 <identifiers>
18357 <header_from>example.com</header_from>
18358 </identifiers>
18359 <auth_results>
18360 <dkim>
18361 <domain>example.com</domain>
18362 <result>pass</result>
18363 <human_result>verify result: all signatures verified</human_result>
18364 </dkim>
18365 <spf>
18366 <domain>citiz.net</domain>
18367 <result>none</result>
18368 </spf>
18369 </auth_results>
18370 </record>
18371 <record>
18372 <row>
18373 <source_ip>113.66.109.91</source_ip>
18374 <count>1</count>
18375 <policy_evaluated>
18376 <disposition>reject</disposition>
18377 <dkim>fail</dkim>
18378 <spf>fail</spf>
18379 </policy_evaluated>
18380 </row>
18381 <identifiers>
18382 <header_from>example.com</header_from>
18383 </identifiers>
18384 <auth_results>
18385 <spf>
18386 <domain>example.com</domain>
18387 <result>fail</result>
18388 </spf>
18389 </auth_results>
18390 </record>
18391 <record>
18392 <row>
18393 <source_ip>113.79.149.43</source_ip>
18394 <count>1</count>
18395 <policy_evaluated>
18396 <disposition>reject</disposition>
18397 <dkim>fail</dkim>
18398 <spf>fail</spf>
18399 </policy_evaluated>
18400 </row>
18401 <identifiers>
18402 <header_from>example.com</header_from>
18403 </identifiers>
18404 <auth_results>
18405 <spf>
18406 <domain>example.com</domain>
18407 <result>fail</result>
18408 </spf>
18409 </auth_results>
18410 </record>
18411 <record>
18412 <row>
18413 <source_ip>123.58.177.168</source_ip>
18414 <count>1</count>
18415 <policy_evaluated>
18416 <disposition>none</disposition>
18417 <dkim>pass</dkim>
18418 <spf>pass</spf>
18419 </policy_evaluated>
18420 </row>
18421 <identifiers>
18422 <header_from>example.com</header_from>
18423 </identifiers>
18424 <auth_results>
18425 <dkim>
18426 <domain>example.com</domain>
18427 <result>pass</result>
18428 <human_result>verify result: all signatures verified</human_result>
18429 </dkim>
18430 <spf>
18431 <domain>vip.163.com</domain>
18432 <result>pass</result>
18433 </spf>
18434 </auth_results>
18435 </record>
18436 <record>
18437 <row>
18438 <source_ip>211.147.240.3</source_ip>
18439 <count>3</count>
18440 <policy_evaluated>
18441 <disposition>reject</disposition>
18442 <dkim>fail</dkim>
18443 <spf>fail</spf>
18444 </policy_evaluated>
18445 </row>
18446 <identifiers>
18447 <header_from>example.com</header_from>
18448 </identifiers>
18449 <auth_results>
18450 <spf>
18451 <domain>example.com</domain>
18452 <result>fail</result>
18453 </spf>
18454 </auth_results>
18455 </record>
18456 <record>
18457 <row>
18458 <source_ip>113.106.198.106</source_ip>
18459 <count>3</count>
18460 <policy_evaluated>
18461 <disposition>reject</disposition>
18462 <dkim>fail</dkim>
18463 <spf>fail</spf>
18464 </policy_evaluated>
18465 </row>
18466 <identifiers>
18467 <header_from>example.com</header_from>
18468 </identifiers>
18469 <auth_results>
18470 <spf>
18471 <domain>example.com</domain>
18472 <result>fail</result>
18473 </spf>
18474 </auth_results>
18475 </record>
18476 <record>
18477 <row>
18478 <source_ip>209.85.213.176</source_ip>
18479 <count>7</count>
18480 <policy_evaluated>
18481 <disposition>none</disposition>
18482 <dkim>pass</dkim>
18483 <spf>pass</spf>
18484 </policy_evaluated>
18485 </row>
18486 <identifiers>
18487 <header_from>example.com</header_from>
18488 </identifiers>
18489 <auth_results>
18490 <dkim>
18491 <domain>example.com</domain>
18492 <result>pass</result>
18493 <human_result>verify result: all signatures verified</human_result>
18494 </dkim>
18495 <spf>
18496 <domain>owu.edu</domain>
18497 <result>pass</result>
18498 </spf>
18499 <spf>
18500 <domain>gmail.com</domain>
18501 <result>pass</result>
18502 </spf>
18503 </auth_results>
18504 </record>
18505 <record>
18506 <row>
18507 <source_ip>209.85.213.177</source_ip>
18508 <count>1</count>
18509 <policy_evaluated>
18510 <disposition>none</disposition>
18511 <dkim>pass</dkim>
18512 <spf>pass</spf>
18513 </policy_evaluated>
18514 </row>
18515 <identifiers>
18516 <header_from>example.com</header_from>
18517 </identifiers>
18518 <auth_results>
18519 <dkim>
18520 <domain>example.com</domain>
18521 <result>pass</result>
18522 <human_result>verify result: all signatures verified</human_result>
18523 </dkim>
18524 <spf>
18525 <domain>gmail.com</domain>
18526 <result>pass</result>
18527 </spf>
18528 </auth_results>
18529 </record>
18530 <record>
18531 <row>
18532 <source_ip>209.85.213.174</source_ip>
18533 <count>5</count>
18534 <policy_evaluated>
18535 <disposition>none</disposition>
18536 <dkim>pass</dkim>
18537 <spf>pass</spf>
18538 </policy_evaluated>
18539 </row>
18540 <identifiers>
18541 <header_from>example.com</header_from>
18542 </identifiers>
18543 <auth_results>
18544 <dkim>
18545 <domain>example.com</domain>
18546 <result>pass</result>
18547 <human_result>verify result: all signatures verified</human_result>
18548 </dkim>
18549 <spf>
18550 <domain>gmail.com</domain>
18551 <result>pass</result>
18552 </spf>
18553 </auth_results>
18554 </record>
18555 <record>
18556 <row>
18557 <source_ip>209.85.213.175</source_ip>
18558 <count>3</count>
18559 <policy_evaluated>
18560 <disposition>none</disposition>
18561 <dkim>pass</dkim>
18562 <spf>pass</spf>
18563 </policy_evaluated>
18564 </row>
18565 <identifiers>
18566 <header_from>example.com</header_from>
18567 </identifiers>
18568 <auth_results>
18569 <dkim>
18570 <domain>example.com</domain>
18571 <result>pass</result>
18572 <human_result>verify result: all signatures verified</human_result>
18573 </dkim>
18574 <spf>
18575 <domain>gmail.com</domain>
18576 <result>pass</result>
18577 </spf>
18578 </auth_results>
18579 </record>
18580 <record>
18581 <row>
18582 <source_ip>209.85.213.172</source_ip>
18583 <count>4</count>
18584 <policy_evaluated>
18585 <disposition>none</disposition>
18586 <dkim>pass</dkim>
18587 <spf>pass</spf>
18588 </policy_evaluated>
18589 </row>
18590 <identifiers>
18591 <header_from>example.com</header_from>
18592 </identifiers>
18593 <auth_results>
18594 <dkim>
18595 <domain>example.com</domain>
18596 <result>pass</result>
18597 <human_result>verify result: all signatures verified</human_result>
18598 </dkim>
18599 <spf>
18600 <domain>gmail.com</domain>
18601 <result>pass</result>
18602 </spf>
18603 </auth_results>
18604 </record>
18605 <record>
18606 <row>
18607 <source_ip>209.85.213.173</source_ip>
18608 <count>5</count>
18609 <policy_evaluated>
18610 <disposition>none</disposition>
18611 <dkim>pass</dkim>
18612 <spf>pass</spf>
18613 </policy_evaluated>
18614 </row>
18615 <identifiers>
18616 <header_from>example.com</header_from>
18617 </identifiers>
18618 <auth_results>
18619 <dkim>
18620 <domain>example.com</domain>
18621 <result>pass</result>
18622 <human_result>verify result: all signatures verified</human_result>
18623 </dkim>
18624 <spf>
18625 <domain>gmail.com</domain>
18626 <result>pass</result>
18627 </spf>
18628 </auth_results>
18629 </record>
18630 <record>
18631 <row>
18632 <source_ip>209.85.213.170</source_ip>
18633 <count>5</count>
18634 <policy_evaluated>
18635 <disposition>none</disposition>
18636 <dkim>pass</dkim>
18637 <spf>pass</spf>
18638 </policy_evaluated>
18639 </row>
18640 <identifiers>
18641 <header_from>example.com</header_from>
18642 </identifiers>
18643 <auth_results>
18644 <dkim>
18645 <domain>example.com</domain>
18646 <result>pass</result>
18647 <human_result>verify result: all signatures verified</human_result>
18648 </dkim>
18649 <spf>
18650 <domain>owu.edu</domain>
18651 <result>pass</result>
18652 </spf>
18653 <spf>
18654 <domain>gmail.com</domain>
18655 <result>pass</result>
18656 </spf>
18657 </auth_results>
18658 </record>
18659 <record>
18660 <row>
18661 <source_ip>209.85.213.171</source_ip>
18662 <count>7</count>
18663 <policy_evaluated>
18664 <disposition>none</disposition>
18665 <dkim>pass</dkim>
18666 <spf>pass</spf>
18667 </policy_evaluated>
18668 </row>
18669 <identifiers>
18670 <header_from>example.com</header_from>
18671 </identifiers>
18672 <auth_results>
18673 <dkim>
18674 <domain>example.com</domain>
18675 <result>pass</result>
18676 <human_result>verify result: all signatures verified</human_result>
18677 </dkim>
18678 <spf>
18679 <domain>gmail.com</domain>
18680 <result>pass</result>
18681 </spf>
18682 </auth_results>
18683 </record>
18684 <record>
18685 <row>
18686 <source_ip>58.215.44.55</source_ip>
18687 <count>1</count>
18688 <policy_evaluated>
18689 <disposition>reject</disposition>
18690 <dkim>fail</dkim>
18691 <spf>fail</spf>
18692 </policy_evaluated>
18693 </row>
18694 <identifiers>
18695 <header_from>example.com</header_from>
18696 </identifiers>
18697 <auth_results>
18698 <spf>
18699 <domain>sdo.com</domain>
18700 <result>softfail</result>
18701 </spf>
18702 </auth_results>
18703 </record>
18704 <record>
18705 <row>
18706 <source_ip>209.85.213.178</source_ip>
18707 <count>5</count>
18708 <policy_evaluated>
18709 <disposition>none</disposition>
18710 <dkim>pass</dkim>
18711 <spf>pass</spf>
18712 </policy_evaluated>
18713 </row>
18714 <identifiers>
18715 <header_from>example.com</header_from>
18716 </identifiers>
18717 <auth_results>
18718 <dkim>
18719 <domain>example.com</domain>
18720 <result>pass</result>
18721 <human_result>verify result: all signatures verified</human_result>
18722 </dkim>
18723 <spf>
18724 <domain>gmail.com</domain>
18725 <result>pass</result>
18726 </spf>
18727 </auth_results>
18728 </record>
18729 <record>
18730 <row>
18731 <source_ip>209.85.213.179</source_ip>
18732 <count>1</count>
18733 <policy_evaluated>
18734 <disposition>none</disposition>
18735 <dkim>pass</dkim>
18736 <spf>pass</spf>
18737 </policy_evaluated>
18738 </row>
18739 <identifiers>
18740 <header_from>example.com</header_from>
18741 </identifiers>
18742 <auth_results>
18743 <dkim>
18744 <domain>example.com</domain>
18745 <result>pass</result>
18746 <human_result>verify result: all signatures verified</human_result>
18747 </dkim>
18748 <spf>
18749 <domain>gmail.com</domain>
18750 <result>pass</result>
18751 </spf>
18752 </auth_results>
18753 </record>
18754 <record>
18755 <row>
18756 <source_ip>209.85.217.172</source_ip>
18757 <count>1</count>
18758 <policy_evaluated>
18759 <disposition>none</disposition>
18760 <dkim>pass</dkim>
18761 <spf>pass</spf>
18762 </policy_evaluated>
18763 </row>
18764 <identifiers>
18765 <header_from>example.com</header_from>
18766 </identifiers>
18767 <auth_results>
18768 <dkim>
18769 <domain>example.com</domain>
18770 <result>pass</result>
18771 <human_result>verify result: all signatures verified</human_result>
18772 </dkim>
18773 <spf>
18774 <domain>gmail.com</domain>
18775 <result>pass</result>
18776 </spf>
18777 </auth_results>
18778 </record>
18779 <record>
18780 <row>
18781 <source_ip>210.75.17.210</source_ip>
18782 <count>60</count>
18783 <policy_evaluated>
18784 <disposition>reject</disposition>
18785 <dkim>fail</dkim>
18786 <spf>fail</spf>
18787 </policy_evaluated>
18788 </row>
18789 <identifiers>
18790 <header_from>example.com</header_from>
18791 </identifiers>
18792 <auth_results>
18793 <spf>
18794 <domain>example.com</domain>
18795 <result>fail</result>
18796 </spf>
18797 </auth_results>
18798 </record>
18799 <record>
18800 <row>
18801 <source_ip>120.84.21.89</source_ip>
18802 <count>4</count>
18803 <policy_evaluated>
18804 <disposition>none</disposition>
18805 <dkim>pass</dkim>
18806 <spf>pass</spf>
18807 </policy_evaluated>
18808 </row>
18809 <identifiers>
18810 <header_from>example.com</header_from>
18811 </identifiers>
18812 <auth_results>
18813 <dkim>
18814 <domain>example.com</domain>
18815 <result>pass</result>
18816 <human_result>verify result: all signatures verified</human_result>
18817 </dkim>
18818 <spf>
18819 <domain>139.com</domain>
18820 <result>pass</result>
18821 </spf>
18822 </auth_results>
18823 </record>
18824 <record>
18825 <row>
18826 <source_ip>209.85.213.44</source_ip>
18827 <count>7</count>
18828 <policy_evaluated>
18829 <disposition>none</disposition>
18830 <dkim>pass</dkim>
18831 <spf>pass</spf>
18832 </policy_evaluated>
18833 </row>
18834 <identifiers>
18835 <header_from>example.com</header_from>
18836 </identifiers>
18837 <auth_results>
18838 <dkim>
18839 <domain>example.com</domain>
18840 <result>pass</result>
18841 <human_result>verify result: all signatures verified</human_result>
18842 </dkim>
18843 <spf>
18844 <domain>gmail.com</domain>
18845 <result>pass</result>
18846 </spf>
18847 </auth_results>
18848 </record>
18849 <record>
18850 <row>
18851 <source_ip>210.0.190.68</source_ip>
18852 <count>15</count>
18853 <policy_evaluated>
18854 <disposition>reject</disposition>
18855 <dkim>fail</dkim>
18856 <spf>fail</spf>
18857 </policy_evaluated>
18858 </row>
18859 <identifiers>
18860 <header_from>example.com</header_from>
18861 </identifiers>
18862 <auth_results>
18863 <spf>
18864 <domain>example.com</domain>
18865 <result>fail</result>
18866 </spf>
18867 </auth_results>
18868 </record>
18869 <record>
18870 <row>
18871 <source_ip>202.120.224.10</source_ip>
18872 <count>4</count>
18873 <policy_evaluated>
18874 <disposition>none</disposition>
18875 <dkim>pass</dkim>
18876 <spf>fail</spf>
18877 </policy_evaluated>
18878 </row>
18879 <identifiers>
18880 <header_from>example.com</header_from>
18881 </identifiers>
18882 <auth_results>
18883 <dkim>
18884 <domain>example.com</domain>
18885 <result>pass</result>
18886 <human_result>verify result: all signatures verified</human_result>
18887 </dkim>
18888 <spf>
18889 <domain>fudan.edu.cn</domain>
18890 <result>none</result>
18891 </spf>
18892 </auth_results>
18893 </record>
18894 <record>
18895 <row>
18896 <source_ip>209.85.217.170</source_ip>
18897 <count>4</count>
18898 <policy_evaluated>
18899 <disposition>none</disposition>
18900 <dkim>pass</dkim>
18901 <spf>pass</spf>
18902 </policy_evaluated>
18903 </row>
18904 <identifiers>
18905 <header_from>example.com</header_from>
18906 </identifiers>
18907 <auth_results>
18908 <dkim>
18909 <domain>example.com</domain>
18910 <result>pass</result>
18911 <human_result>verify result: all signatures verified</human_result>
18912 </dkim>
18913 <spf>
18914 <domain>gmail.com</domain>
18915 <result>pass</result>
18916 </spf>
18917 </auth_results>
18918 </record>
18919 <record>
18920 <row>
18921 <source_ip>209.85.212.51</source_ip>
18922 <count>6</count>
18923 <policy_evaluated>
18924 <disposition>none</disposition>
18925 <dkim>pass</dkim>
18926 <spf>pass</spf>
18927 </policy_evaluated>
18928 </row>
18929 <identifiers>
18930 <header_from>example.com</header_from>
18931 </identifiers>
18932 <auth_results>
18933 <dkim>
18934 <domain>example.com</domain>
18935 <result>pass</result>
18936 <human_result>verify result: all signatures verified</human_result>
18937 </dkim>
18938 <spf>
18939 <domain>paxex.com.hk</domain>
18940 <result>none</result>
18941 </spf>
18942 <spf>
18943 <domain>gmail.com</domain>
18944 <result>pass</result>
18945 </spf>
18946 </auth_results>
18947 </record>
18948 <record>
18949 <row>
18950 <source_ip>65.55.111.169</source_ip>
18951 <count>17</count>
18952 <policy_evaluated>
18953 <disposition>none</disposition>
18954 <dkim>pass</dkim>
18955 <spf>pass</spf>
18956 </policy_evaluated>
18957 </row>
18958 <identifiers>
18959 <header_from>example.com</header_from>
18960 </identifiers>
18961 <auth_results>
18962 <dkim>
18963 <domain>example.com</domain>
18964 <result>pass</result>
18965 <human_result>verify result: all signatures verified</human_result>
18966 </dkim>
18967 <spf>
18968 <domain>hotmail.co.uk</domain>
18969 <result>pass</result>
18970 </spf>
18971 <spf>
18972 <domain>hotmail.it</domain>
18973 <result>pass</result>
18974 </spf>
18975 <spf>
18976 <domain>w.cn</domain>
18977 <result>none</result>
18978 </spf>
18979 <spf>
18980 <domain>hotmail.com</domain>
18981 <result>pass</result>
18982 </spf>
18983 <spf>
18984 <domain>hotmail.de</domain>
18985 <result>pass</result>
18986 </spf>
18987 </auth_results>
18988 </record>
18989 <record>
18990 <row>
18991 <source_ip>209.85.212.53</source_ip>
18992 <count>4</count>
18993 <policy_evaluated>
18994 <disposition>none</disposition>
18995 <dkim>pass</dkim>
18996 <spf>pass</spf>
18997 </policy_evaluated>
18998 </row>
18999 <identifiers>
19000 <header_from>example.com</header_from>
19001 </identifiers>
19002 <auth_results>
19003 <dkim>
19004 <domain>example.com</domain>
19005 <result>pass</result>
19006 <human_result>verify result: all signatures verified</human_result>
19007 </dkim>
19008 <spf>
19009 <domain>gmail.com</domain>
19010 <result>pass</result>
19011 </spf>
19012 </auth_results>
19013 </record>
19014 <record>
19015 <row>
19016 <source_ip>74.125.82.44</source_ip>
19017 <count>3</count>
19018 <policy_evaluated>
19019 <disposition>none</disposition>
19020 <dkim>pass</dkim>
19021 <spf>pass</spf>
19022 </policy_evaluated>
19023 </row>
19024 <identifiers>
19025 <header_from>example.com</header_from>
19026 </identifiers>
19027 <auth_results>
19028 <dkim>
19029 <domain>example.com</domain>
19030 <result>pass</result>
19031 <human_result>verify result: all signatures verified</human_result>
19032 </dkim>
19033 <spf>
19034 <domain>gmail.com</domain>
19035 <result>pass</result>
19036 </spf>
19037 </auth_results>
19038 </record>
19039 <record>
19040 <row>
19041 <source_ip>209.85.212.54</source_ip>
19042 <count>3</count>
19043 <policy_evaluated>
19044 <disposition>none</disposition>
19045 <dkim>pass</dkim>
19046 <spf>pass</spf>
19047 </policy_evaluated>
19048 </row>
19049 <identifiers>
19050 <header_from>example.com</header_from>
19051 </identifiers>
19052 <auth_results>
19053 <dkim>
19054 <domain>example.com</domain>
19055 <result>pass</result>
19056 <human_result>verify result: all signatures verified</human_result>
19057 </dkim>
19058 <spf>
19059 <domain>gmail.com</domain>
19060 <result>pass</result>
19061 </spf>
19062 </auth_results>
19063 </record>
19064 <record>
19065 <row>
19066 <source_ip>65.55.111.160</source_ip>
19067 <count>23</count>
19068 <policy_evaluated>
19069 <disposition>none</disposition>
19070 <dkim>pass</dkim>
19071 <spf>pass</spf>
19072 </policy_evaluated>
19073 </row>
19074 <identifiers>
19075 <header_from>example.com</header_from>
19076 </identifiers>
19077 <auth_results>
19078 <dkim>
19079 <domain>example.com</domain>
19080 <result>pass</result>
19081 <human_result>verify result: all signatures verified</human_result>
19082 </dkim>
19083 <spf>
19084 <domain>hotmail.fr</domain>
19085 <result>pass</result>
19086 </spf>
19087 <spf>
19088 <domain>hotmail.de</domain>
19089 <result>pass</result>
19090 </spf>
19091 <spf>
19092 <domain>hotmail.it</domain>
19093 <result>pass</result>
19094 </spf>
19095 <spf>
19096 <domain>hotmail.com</domain>
19097 <result>pass</result>
19098 </spf>
19099 </auth_results>
19100 </record>
19101 <record>
19102 <row>
19103 <source_ip>65.55.111.161</source_ip>
19104 <count>13</count>
19105 <policy_evaluated>
19106 <disposition>none</disposition>
19107 <dkim>pass</dkim>
19108 <spf>pass</spf>
19109 </policy_evaluated>
19110 </row>
19111 <identifiers>
19112 <header_from>example.com</header_from>
19113 </identifiers>
19114 <auth_results>
19115 <dkim>
19116 <domain>example.com</domain>
19117 <result>pass</result>
19118 <human_result>verify result: all signatures verified</human_result>
19119 </dkim>
19120 <spf>
19121 <domain>hotmail.de</domain>
19122 <result>pass</result>
19123 </spf>
19124 <spf>
19125 <domain>hotmail.it</domain>
19126 <result>pass</result>
19127 </spf>
19128 <spf>
19129 <domain>hotmail.com</domain>
19130 <result>pass</result>
19131 </spf>
19132 </auth_results>
19133 </record>
19134 <record>
19135 <row>
19136 <source_ip>65.55.111.162</source_ip>
19137 <count>13</count>
19138 <policy_evaluated>
19139 <disposition>none</disposition>
19140 <dkim>pass</dkim>
19141 <spf>pass</spf>
19142 </policy_evaluated>
19143 </row>
19144 <identifiers>
19145 <header_from>example.com</header_from>
19146 </identifiers>
19147 <auth_results>
19148 <dkim>
19149 <domain>example.com</domain>
19150 <result>pass</result>
19151 <human_result>verify result: all signatures verified</human_result>
19152 </dkim>
19153 <spf>
19154 <domain>hotmail.it</domain>
19155 <result>pass</result>
19156 </spf>
19157 <spf>
19158 <domain>hotmail.com</domain>
19159 <result>pass</result>
19160 </spf>
19161 </auth_results>
19162 </record>
19163 <record>
19164 <row>
19165 <source_ip>65.55.111.163</source_ip>
19166 <count>18</count>
19167 <policy_evaluated>
19168 <disposition>none</disposition>
19169 <dkim>pass</dkim>
19170 <spf>pass</spf>
19171 </policy_evaluated>
19172 </row>
19173 <identifiers>
19174 <header_from>example.com</header_from>
19175 </identifiers>
19176 <auth_results>
19177 <dkim>
19178 <domain>example.com</domain>
19179 <result>pass</result>
19180 <human_result>verify result: all signatures verified</human_result>
19181 </dkim>
19182 <spf>
19183 <domain>hotmail.de</domain>
19184 <result>pass</result>
19185 </spf>
19186 <spf>
19187 <domain>hotmail.it</domain>
19188 <result>pass</result>
19189 </spf>
19190 <spf>
19191 <domain>hotmail.com</domain>
19192 <result>pass</result>
19193 </spf>
19194 </auth_results>
19195 </record>
19196 <record>
19197 <row>
19198 <source_ip>65.55.111.164</source_ip>
19199 <count>15</count>
19200 <policy_evaluated>
19201 <disposition>none</disposition>
19202 <dkim>pass</dkim>
19203 <spf>pass</spf>
19204 </policy_evaluated>
19205 </row>
19206 <identifiers>
19207 <header_from>example.com</header_from>
19208 </identifiers>
19209 <auth_results>
19210 <dkim>
19211 <domain>example.com</domain>
19212 <result>pass</result>
19213 <human_result>verify result: all signatures verified</human_result>
19214 </dkim>
19215 <spf>
19216 <domain>msn.cn</domain>
19217 <result>pass</result>
19218 </spf>
19219 <spf>
19220 <domain>hotmail.it</domain>
19221 <result>pass</result>
19222 </spf>
19223 <spf>
19224 <domain>hotmail.com</domain>
19225 <result>pass</result>
19226 </spf>
19227 <spf>
19228 <domain>hotmail.de</domain>
19229 <result>pass</result>
19230 </spf>
19231 </auth_results>
19232 </record>
19233 <record>
19234 <row>
19235 <source_ip>65.55.111.165</source_ip>
19236 <count>19</count>
19237 <policy_evaluated>
19238 <disposition>none</disposition>
19239 <dkim>pass</dkim>
19240 <spf>pass</spf>
19241 </policy_evaluated>
19242 </row>
19243 <identifiers>
19244 <header_from>pages.example.com, example.com</header_from>
19245 </identifiers>
19246 <auth_results>
19247 <dkim>
19248 <domain>pages.example.com</domain>
19249 <result>pass</result>
19250 <human_result>verify result: all signatures verified</human_result>
19251 </dkim>
19252 <dkim>
19253 <domain>example.com</domain>
19254 <result>pass</result>
19255 <human_result>verify result: all signatures verified</human_result>
19256 </dkim>
19257 <spf>
19258 <domain>hotmail.de</domain>
19259 <result>pass</result>
19260 </spf>
19261 <spf>
19262 <domain>hotmail.it</domain>
19263 <result>pass</result>
19264 </spf>
19265 <spf>
19266 <domain>hotmail.com</domain>
19267 <result>pass</result>
19268 </spf>
19269 </auth_results>
19270 </record>
19271 <record>
19272 <row>
19273 <source_ip>65.55.111.166</source_ip>
19274 <count>13</count>
19275 <policy_evaluated>
19276 <disposition>none</disposition>
19277 <dkim>pass</dkim>
19278 <spf>pass</spf>
19279 </policy_evaluated>
19280 </row>
19281 <identifiers>
19282 <header_from>example.com</header_from>
19283 </identifiers>
19284 <auth_results>
19285 <dkim>
19286 <domain>example.com</domain>
19287 <result>pass</result>
19288 <human_result>verify result: all signatures verified</human_result>
19289 </dkim>
19290 <spf>
19291 <domain>hotmail.de</domain>
19292 <result>pass</result>
19293 </spf>
19294 <spf>
19295 <domain>hotmail.it</domain>
19296 <result>pass</result>
19297 </spf>
19298 <spf>
19299 <domain>hotmail.com</domain>
19300 <result>pass</result>
19301 </spf>
19302 </auth_results>
19303 </record>
19304 <record>
19305 <row>
19306 <source_ip>65.55.111.167</source_ip>
19307 <count>19</count>
19308 <policy_evaluated>
19309 <disposition>none</disposition>
19310 <dkim>pass</dkim>
19311 <spf>pass</spf>
19312 </policy_evaluated>
19313 </row>
19314 <identifiers>
19315 <header_from>pages.example.com, example.com</header_from>
19316 </identifiers>
19317 <auth_results>
19318 <dkim>
19319 <domain>pages.example.com</domain>
19320 <result>pass</result>
19321 <human_result>verify result: all signatures verified</human_result>
19322 </dkim>
19323 <dkim>
19324 <domain>example.com</domain>
19325 <result>pass</result>
19326 <human_result>verify result: all signatures verified</human_result>
19327 </dkim>
19328 <spf>
19329 <domain>hotmail.it</domain>
19330 <result>pass</result>
19331 </spf>
19332 <spf>
19333 <domain>hotmail.com</domain>
19334 <result>pass</result>
19335 </spf>
19336 </auth_results>
19337 </record>
19338 <record>
19339 <row>
19340 <source_ip>209.85.217.174</source_ip>
19341 <count>1</count>
19342 <policy_evaluated>
19343 <disposition>none</disposition>
19344 <dkim>pass</dkim>
19345 <spf>pass</spf>
19346 </policy_evaluated>
19347 </row>
19348 <identifiers>
19349 <header_from>example.com</header_from>
19350 </identifiers>
19351 <auth_results>
19352 <dkim>
19353 <domain>example.com</domain>
19354 <result>pass</result>
19355 <human_result>verify result: all signatures verified</human_result>
19356 </dkim>
19357 <spf>
19358 <domain>gmail.com</domain>
19359 <result>pass</result>
19360 </spf>
19361 </auth_results>
19362 </record>
19363 <record>
19364 <row>
19365 <source_ip>128.248.155.6</source_ip>
19366 <count>4</count>
19367 <policy_evaluated>
19368 <disposition>none</disposition>
19369 <dkim>pass</dkim>
19370 <spf>fail</spf>
19371 </policy_evaluated>
19372 </row>
19373 <identifiers>
19374 <header_from>example.com</header_from>
19375 </identifiers>
19376 <auth_results>
19377 <dkim>
19378 <domain>example.com</domain>
19379 <result>pass</result>
19380 <human_result>verify result: all signatures verified</human_result>
19381 </dkim>
19382 <spf>
19383 <domain>example.com</domain>
19384 <result>fail</result>
19385 </spf>
19386 </auth_results>
19387 </record>
19388 <record>
19389 <row>
19390 <source_ip>209.85.217.176</source_ip>
19391 <count>3</count>
19392 <policy_evaluated>
19393 <disposition>none</disposition>
19394 <dkim>pass</dkim>
19395 <spf>pass</spf>
19396 </policy_evaluated>
19397 </row>
19398 <identifiers>
19399 <header_from>example.com</header_from>
19400 </identifiers>
19401 <auth_results>
19402 <dkim>
19403 <domain>example.com</domain>
19404 <result>pass</result>
19405 <human_result>verify result: all signatures verified</human_result>
19406 </dkim>
19407 <spf>
19408 <domain>njit.edu</domain>
19409 <result>neutral</result>
19410 </spf>
19411 <spf>
19412 <domain>gmail.com</domain>
19413 <result>pass</result>
19414 </spf>
19415 </auth_results>
19416 </record>
19417 <record>
19418 <row>
19419 <source_ip>209.85.213.42</source_ip>
19420 <count>2</count>
19421 <policy_evaluated>
19422 <disposition>none</disposition>
19423 <dkim>pass</dkim>
19424 <spf>pass</spf>
19425 </policy_evaluated>
19426 </row>
19427 <identifiers>
19428 <header_from>example.com</header_from>
19429 </identifiers>
19430 <auth_results>
19431 <dkim>
19432 <domain>example.com</domain>
19433 <result>pass</result>
19434 <human_result>verify result: all signatures verified</human_result>
19435 </dkim>
19436 <spf>
19437 <domain>gmail.com</domain>
19438 <result>pass</result>
19439 </spf>
19440 </auth_results>
19441 </record>
19442 <record>
19443 <row>
19444 <source_ip>66.220.155.164</source_ip>
19445 <count>6</count>
19446 <policy_evaluated>
19447 <disposition>none</disposition>
19448 <dkim>pass</dkim>
19449 <spf>pass</spf>
19450 </policy_evaluated>
19451 </row>
19452 <identifiers>
19453 <header_from>example.com</header_from>
19454 </identifiers>
19455 <auth_results>
19456 <dkim>
19457 <domain>example.com</domain>
19458 <result>pass</result>
19459 <human_result>verify result: all signatures verified</human_result>
19460 </dkim>
19461 <spf>
19462 <domain>example.com</domain>
19463 <result>pass</result>
19464 </spf>
19465 </auth_results>
19466 </record>
19467 <record>
19468 <row>
19469 <source_ip>66.220.155.165</source_ip>
19470 <count>9</count>
19471 <policy_evaluated>
19472 <disposition>none</disposition>
19473 <dkim>pass</dkim>
19474 <spf>pass</spf>
19475 </policy_evaluated>
19476 </row>
19477 <identifiers>
19478 <header_from>example.com</header_from>
19479 </identifiers>
19480 <auth_results>
19481 <dkim>
19482 <domain>example.com</domain>
19483 <result>pass</result>
19484 <human_result>verify result: all signatures verified</human_result>
19485 </dkim>
19486 <spf>
19487 <domain>example.com</domain>
19488 <result>pass</result>
19489 </spf>
19490 </auth_results>
19491 </record>
19492 <record>
19493 <row>
19494 <source_ip>66.220.155.166</source_ip>
19495 <count>6</count>
19496 <policy_evaluated>
19497 <disposition>none</disposition>
19498 <dkim>pass</dkim>
19499 <spf>pass</spf>
19500 </policy_evaluated>
19501 </row>
19502 <identifiers>
19503 <header_from>example.com</header_from>
19504 </identifiers>
19505 <auth_results>
19506 <dkim>
19507 <domain>example.com</domain>
19508 <result>pass</result>
19509 <human_result>verify result: all signatures verified</human_result>
19510 </dkim>
19511 <spf>
19512 <domain>example.com</domain>
19513 <result>pass</result>
19514 </spf>
19515 </auth_results>
19516 </record>
19517 <record>
19518 <row>
19519 <source_ip>66.220.155.167</source_ip>
19520 <count>13</count>
19521 <policy_evaluated>
19522 <disposition>none</disposition>
19523 <dkim>pass</dkim>
19524 <spf>pass</spf>
19525 </policy_evaluated>
19526 </row>
19527 <identifiers>
19528 <header_from>example.com</header_from>
19529 </identifiers>
19530 <auth_results>
19531 <dkim>
19532 <domain>example.com</domain>
19533 <result>pass</result>
19534 <human_result>verify result: all signatures verified</human_result>
19535 </dkim>
19536 <spf>
19537 <domain>example.com</domain>
19538 <result>pass</result>
19539 </spf>
19540 </auth_results>
19541 </record>
19542 <record>
19543 <row>
19544 <source_ip>66.220.155.160</source_ip>
19545 <count>14</count>
19546 <policy_evaluated>
19547 <disposition>none</disposition>
19548 <dkim>pass</dkim>
19549 <spf>pass</spf>
19550 </policy_evaluated>
19551 </row>
19552 <identifiers>
19553 <header_from>example.com</header_from>
19554 </identifiers>
19555 <auth_results>
19556 <dkim>
19557 <domain>example.com</domain>
19558 <result>pass</result>
19559 <human_result>verify result: all signatures verified</human_result>
19560 </dkim>
19561 <spf>
19562 <domain>example.com</domain>
19563 <result>pass</result>
19564 </spf>
19565 </auth_results>
19566 </record>
19567 <record>
19568 <row>
19569 <source_ip>66.220.155.161</source_ip>
19570 <count>17</count>
19571 <policy_evaluated>
19572 <disposition>none</disposition>
19573 <dkim>pass</dkim>
19574 <spf>pass</spf>
19575 </policy_evaluated>
19576 </row>
19577 <identifiers>
19578 <header_from>example.com</header_from>
19579 </identifiers>
19580 <auth_results>
19581 <dkim>
19582 <domain>example.com</domain>
19583 <result>pass</result>
19584 <human_result>verify result: all signatures verified</human_result>
19585 </dkim>
19586 <spf>
19587 <domain>example.com</domain>
19588 <result>pass</result>
19589 </spf>
19590 </auth_results>
19591 </record>
19592 <record>
19593 <row>
19594 <source_ip>66.220.155.162</source_ip>
19595 <count>16</count>
19596 <policy_evaluated>
19597 <disposition>none</disposition>
19598 <dkim>pass</dkim>
19599 <spf>pass</spf>
19600 </policy_evaluated>
19601 </row>
19602 <identifiers>
19603 <header_from>example.com</header_from>
19604 </identifiers>
19605 <auth_results>
19606 <dkim>
19607 <domain>example.com</domain>
19608 <result>pass</result>
19609 <human_result>verify result: all signatures verified</human_result>
19610 </dkim>
19611 <spf>
19612 <domain>example.com</domain>
19613 <result>pass</result>
19614 </spf>
19615 </auth_results>
19616 </record>
19617 <record>
19618 <row>
19619 <source_ip>66.220.155.163</source_ip>
19620 <count>9</count>
19621 <policy_evaluated>
19622 <disposition>none</disposition>
19623 <dkim>pass</dkim>
19624 <spf>pass</spf>
19625 </policy_evaluated>
19626 </row>
19627 <identifiers>
19628 <header_from>example.com</header_from>
19629 </identifiers>
19630 <auth_results>
19631 <dkim>
19632 <domain>example.com</domain>
19633 <result>pass</result>
19634 <human_result>verify result: all signatures verified</human_result>
19635 </dkim>
19636 <spf>
19637 <domain>example.com</domain>
19638 <result>pass</result>
19639 </spf>
19640 </auth_results>
19641 </record>
19642 <record>
19643 <row>
19644 <source_ip>202.65.196.163</source_ip>
19645 <count>8</count>
19646 <policy_evaluated>
19647 <disposition>none</disposition>
19648 <dkim>pass</dkim>
19649 <spf>fail</spf>
19650 </policy_evaluated>
19651 </row>
19652 <identifiers>
19653 <header_from>example.com</header_from>
19654 </identifiers>
19655 <auth_results>
19656 <dkim>
19657 <domain>example.com</domain>
19658 <result>pass</result>
19659 <human_result>verify result: all signatures verified</human_result>
19660 </dkim>
19661 <spf>
19662 <domain>example.com</domain>
19663 <result>fail</result>
19664 </spf>
19665 </auth_results>
19666 </record>
19667 </feedback>
0 # ===========================================================================
1 # http://www.gnu.org/software/autoconf-archive/ax_pthread.html
2 # ===========================================================================
3 #
4 # SYNOPSIS
5 #
6 # AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
7 #
8 # DESCRIPTION
9 #
10 # This macro figures out how to build C programs using POSIX threads. It
11 # sets the PTHREAD_LIBS output variable to the threads library and linker
12 # flags, and the PTHREAD_CFLAGS output variable to any special C compiler
13 # flags that are needed. (The user can also force certain compiler
14 # flags/libs to be tested by setting these environment variables.)
15 #
16 # Also sets PTHREAD_CC to any special C compiler that is needed for
17 # multi-threaded programs (defaults to the value of CC otherwise). (This
18 # is necessary on AIX to use the special cc_r compiler alias.)
19 #
20 # NOTE: You are assumed to not only compile your program with these flags,
21 # but also link it with them as well. e.g. you should link with
22 # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
23 #
24 # If you are only building threads programs, you may wish to use these
25 # variables in your default LIBS, CFLAGS, and CC:
26 #
27 # LIBS="$PTHREAD_LIBS $LIBS"
28 # CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
29 # CC="$PTHREAD_CC"
30 #
31 # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
32 # has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
33 # (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
34 #
35 # ACTION-IF-FOUND is a list of shell commands to run if a threads library
36 # is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
37 # is not found. If ACTION-IF-FOUND is not specified, the default action
38 # will define HAVE_PTHREAD.
39 #
40 # Please let the authors know if this macro fails on any platform, or if
41 # you have any other suggestions or comments. This macro was based on work
42 # by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
43 # from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
44 # Alejandro Forero Cuervo to the autoconf macro repository. We are also
45 # grateful for the helpful feedback of numerous users.
46 #
47 # LICENSE
48 #
49 # Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
50 #
51 # This program is free software: you can redistribute it and/or modify it
52 # under the terms of the GNU General Public License as published by the
53 # Free Software Foundation, either version 3 of the License, or (at your
54 # option) any later version.
55 #
56 # This program is distributed in the hope that it will be useful, but
57 # WITHOUT ANY WARRANTY; without even the implied warranty of
58 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
59 # Public License for more details.
60 #
61 # You should have received a copy of the GNU General Public License along
62 # with this program. If not, see <http://www.gnu.org/licenses/>.
63 #
64 # As a special exception, the respective Autoconf Macro's copyright owner
65 # gives unlimited permission to copy, distribute and modify the configure
66 # scripts that are the output of Autoconf when processing the Macro. You
67 # need not follow the terms of the GNU General Public License when using
68 # or distributing such scripts, even though portions of the text of the
69 # Macro appear in them. The GNU General Public License (GPL) does govern
70 # all other use of the material that constitutes the Autoconf Macro.
71 #
72 # This special exception to the GPL applies to versions of the Autoconf
73 # Macro released by the Autoconf Archive. When you make and distribute a
74 # modified version of the Autoconf Macro, you may extend this special
75 # exception to the GPL to apply to your modified version as well.
76
77 #serial 9
78
79 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
80 AC_DEFUN([AX_PTHREAD], [
81 AC_REQUIRE([AC_CANONICAL_HOST])
82 AC_LANG_SAVE
83 AC_LANG_C
84 ax_pthread_ok=no
85
86 # We used to check for pthread.h first, but this fails if pthread.h
87 # requires special compiler flags (e.g. on True64 or Sequent).
88 # It gets checked for in the link test anyway.
89
90 # First of all, check if the user has set any of the PTHREAD_LIBS,
91 # etcetera environment variables, and if threads linking works using
92 # them:
93 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
94 save_CFLAGS="$CFLAGS"
95 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
96 save_LIBS="$LIBS"
97 LIBS="$PTHREAD_LIBS $LIBS"
98 AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
99 AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
100 AC_MSG_RESULT($ax_pthread_ok)
101 if test x"$ax_pthread_ok" = xno; then
102 PTHREAD_LIBS=""
103 PTHREAD_CFLAGS=""
104 fi
105 LIBS="$save_LIBS"
106 CFLAGS="$save_CFLAGS"
107 fi
108
109 # We must check for the threads library under a number of different
110 # names; the ordering is very important because some systems
111 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
112 # libraries is broken (non-POSIX).
113
114 # Create a list of thread flags to try. Items starting with a "-" are
115 # C compiler flags, and other items are library names, except for "none"
116 # which indicates that we try without any flags at all, and "pthread-config"
117 # which is a program returning the flags for the Pth emulation library.
118
119 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
120
121 # The ordering *is* (sometimes) important. Some notes on the
122 # individual items follow:
123
124 # pthreads: AIX (must check this before -lpthread)
125 # none: in case threads are in libc; should be tried before -Kthread and
126 # other compiler flags to prevent continual compiler warnings
127 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
128 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
129 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
130 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
131 # -pthreads: Solaris/gcc
132 # -mthreads: Mingw32/gcc, Lynx/gcc
133 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
134 # doesn't hurt to check since this sometimes defines pthreads too;
135 # also defines -D_REENTRANT)
136 # ... -mt is also the pthreads flag for HP/aCC
137 # pthread: Linux, etcetera
138 # --thread-safe: KAI C++
139 # pthread-config: use pthread-config program (for GNU Pth library)
140
141 case "${host_cpu}-${host_os}" in
142 *solaris*)
143
144 # On Solaris (at least, for some versions), libc contains stubbed
145 # (non-functional) versions of the pthreads routines, so link-based
146 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
147 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
148 # a function called by this macro, so we could check for that, but
149 # who knows whether they'll stub that too in a future libc.) So,
150 # we'll just look for -pthreads and -lpthread first:
151
152 ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
153 ;;
154
155 *-darwin*)
156 ax_pthread_flags="-pthread $ax_pthread_flags"
157 ;;
158 esac
159
160 if test x"$ax_pthread_ok" = xno; then
161 for flag in $ax_pthread_flags; do
162
163 case $flag in
164 none)
165 AC_MSG_CHECKING([whether pthreads work without any flags])
166 ;;
167
168 -*)
169 AC_MSG_CHECKING([whether pthreads work with $flag])
170 PTHREAD_CFLAGS="$flag"
171 ;;
172
173 pthread-config)
174 AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
175 if test x"$ax_pthread_config" = xno; then continue; fi
176 PTHREAD_CFLAGS="`pthread-config --cflags`"
177 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
178 ;;
179
180 *)
181 AC_MSG_CHECKING([for the pthreads library -l$flag])
182 PTHREAD_LIBS="-l$flag"
183 ;;
184 esac
185
186 save_LIBS="$LIBS"
187 save_CFLAGS="$CFLAGS"
188 LIBS="$PTHREAD_LIBS $LIBS"
189 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
190
191 # Check for various functions. We must include pthread.h,
192 # since some functions may be macros. (On the Sequent, we
193 # need a special flag -Kthread to make this header compile.)
194 # We check for pthread_join because it is in -lpthread on IRIX
195 # while pthread_create is in libc. We check for pthread_attr_init
196 # due to DEC craziness with -lpthreads. We check for
197 # pthread_cleanup_push because it is one of the few pthread
198 # functions on Solaris that doesn't have a non-functional libc stub.
199 # We try pthread_create on general principles.
200 AC_TRY_LINK([#include <pthread.h>
201 static void routine(void* a) {a=0;}
202 static void* start_routine(void* a) {return a;}],
203 [pthread_t th; pthread_attr_t attr;
204 pthread_create(&th,0,start_routine,0);
205 pthread_join(th, 0);
206 pthread_attr_init(&attr);
207 pthread_cleanup_push(routine, 0);
208 pthread_cleanup_pop(0); ],
209 [ax_pthread_ok=yes])
210
211 LIBS="$save_LIBS"
212 CFLAGS="$save_CFLAGS"
213
214 AC_MSG_RESULT($ax_pthread_ok)
215 if test "x$ax_pthread_ok" = xyes; then
216 break;
217 fi
218
219 PTHREAD_LIBS=""
220 PTHREAD_CFLAGS=""
221 done
222 fi
223
224 # Various other checks:
225 if test "x$ax_pthread_ok" = xyes; then
226 save_LIBS="$LIBS"
227 LIBS="$PTHREAD_LIBS $LIBS"
228 save_CFLAGS="$CFLAGS"
229 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
230
231 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
232 AC_MSG_CHECKING([for joinable pthread attribute])
233 attr_name=unknown
234 for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
235 AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
236 [attr_name=$attr; break])
237 done
238 AC_MSG_RESULT($attr_name)
239 if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
240 AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
241 [Define to necessary symbol if this constant
242 uses a non-standard name on your system.])
243 fi
244
245 AC_MSG_CHECKING([if more special flags are required for pthreads])
246 flag=no
247 case "${host_cpu}-${host_os}" in
248 *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
249 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
250 esac
251 AC_MSG_RESULT(${flag})
252 if test "x$flag" != xno; then
253 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
254 fi
255
256 LIBS="$save_LIBS"
257 CFLAGS="$save_CFLAGS"
258
259 # More AIX lossage: must compile with xlc_r or cc_r
260 if test x"$GCC" != xyes; then
261 AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
262 else
263 PTHREAD_CC=$CC
264 fi
265 else
266 PTHREAD_CC="$CC"
267 fi
268
269 AC_SUBST(PTHREAD_LIBS)
270 AC_SUBST(PTHREAD_CFLAGS)
271 AC_SUBST(PTHREAD_CC)
272
273 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
274 if test x"$ax_pthread_ok" = xyes; then
275 ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
276 :
277 else
278 ax_pthread_ok=no
279 $2
280 fi
281 AC_LANG_RESTORE
282 ])dnl AX_PTHREAD
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
4 # Inc.
5 # Written by Gordon Matzigkeit, 1996
6 #
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
10
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
14 # Inc.
15 # Written by Gordon Matzigkeit, 1996
16 #
17 # This file is part of GNU Libtool.
18 #
19 # GNU Libtool is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License as
21 # published by the Free Software Foundation; either version 2 of
22 # the License, or (at your option) any later version.
23 #
24 # As a special exception to the GNU General Public License,
25 # if you distribute this file as part of a program or library that
26 # is built using GNU Libtool, you may include this file under the
27 # same distribution terms that you use for the rest of that program.
28 #
29 # GNU Libtool is distributed in the hope that it will be useful,
30 # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 # GNU General Public License for more details.
33 #
34 # You should have received a copy of the GNU General Public License
35 # along with GNU Libtool; see the file COPYING. If not, a copy
36 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
37 # obtained by writing to the Free Software Foundation, Inc.,
38 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
39 ])
40
41 # serial 57 LT_INIT
42
43
44 # LT_PREREQ(VERSION)
45 # ------------------
46 # Complain and exit if this libtool version is less that VERSION.
47 m4_defun([LT_PREREQ],
48 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
49 [m4_default([$3],
50 [m4_fatal([Libtool version $1 or higher is required],
51 63)])],
52 [$2])])
53
54
55 # _LT_CHECK_BUILDDIR
56 # ------------------
57 # Complain if the absolute build directory name contains unusual characters
58 m4_defun([_LT_CHECK_BUILDDIR],
59 [case `pwd` in
60 *\ * | *\ *)
61 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
62 esac
63 ])
64
65
66 # LT_INIT([OPTIONS])
67 # ------------------
68 AC_DEFUN([LT_INIT],
69 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
70 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
71 AC_BEFORE([$0], [LT_LANG])dnl
72 AC_BEFORE([$0], [LT_OUTPUT])dnl
73 AC_BEFORE([$0], [LTDL_INIT])dnl
74 m4_require([_LT_CHECK_BUILDDIR])dnl
75
76 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
77 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
78 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
79 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
80 dnl unless we require an AC_DEFUNed macro:
81 AC_REQUIRE([LTOPTIONS_VERSION])dnl
82 AC_REQUIRE([LTSUGAR_VERSION])dnl
83 AC_REQUIRE([LTVERSION_VERSION])dnl
84 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
85 m4_require([_LT_PROG_LTMAIN])dnl
86
87 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
88
89 dnl Parse OPTIONS
90 _LT_SET_OPTIONS([$0], [$1])
91
92 # This can be used to rebuild libtool when needed
93 LIBTOOL_DEPS="$ltmain"
94
95 # Always use our own libtool.
96 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
97 AC_SUBST(LIBTOOL)dnl
98
99 _LT_SETUP
100
101 # Only expand once:
102 m4_define([LT_INIT])
103 ])# LT_INIT
104
105 # Old names:
106 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
107 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
108 dnl aclocal-1.4 backwards compatibility:
109 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
110 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
111
112
113 # _LT_CC_BASENAME(CC)
114 # -------------------
115 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
116 m4_defun([_LT_CC_BASENAME],
117 [for cc_temp in $1""; do
118 case $cc_temp in
119 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 \-*) ;;
122 *) break;;
123 esac
124 done
125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
126 ])
127
128
129 # _LT_FILEUTILS_DEFAULTS
130 # ----------------------
131 # It is okay to use these file commands and assume they have been set
132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
133 m4_defun([_LT_FILEUTILS_DEFAULTS],
134 [: ${CP="cp -f"}
135 : ${MV="mv -f"}
136 : ${RM="rm -f"}
137 ])# _LT_FILEUTILS_DEFAULTS
138
139
140 # _LT_SETUP
141 # ---------
142 m4_defun([_LT_SETUP],
143 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
144 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
145 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
146 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
147
148 _LT_DECL([], [host_alias], [0], [The host system])dnl
149 _LT_DECL([], [host], [0])dnl
150 _LT_DECL([], [host_os], [0])dnl
151 dnl
152 _LT_DECL([], [build_alias], [0], [The build system])dnl
153 _LT_DECL([], [build], [0])dnl
154 _LT_DECL([], [build_os], [0])dnl
155 dnl
156 AC_REQUIRE([AC_PROG_CC])dnl
157 AC_REQUIRE([LT_PATH_LD])dnl
158 AC_REQUIRE([LT_PATH_NM])dnl
159 dnl
160 AC_REQUIRE([AC_PROG_LN_S])dnl
161 test -z "$LN_S" && LN_S="ln -s"
162 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
163 dnl
164 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
165 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
166 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
167 dnl
168 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
169 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
170 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
171 m4_require([_LT_CMD_RELOAD])dnl
172 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
173 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
174 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
175 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
176 m4_require([_LT_WITH_SYSROOT])dnl
177
178 _LT_CONFIG_LIBTOOL_INIT([
179 # See if we are running on zsh, and set the options which allow our
180 # commands through without removal of \ escapes INIT.
181 if test -n "\${ZSH_VERSION+set}" ; then
182 setopt NO_GLOB_SUBST
183 fi
184 ])
185 if test -n "${ZSH_VERSION+set}" ; then
186 setopt NO_GLOB_SUBST
187 fi
188
189 _LT_CHECK_OBJDIR
190
191 m4_require([_LT_TAG_COMPILER])dnl
192
193 case $host_os in
194 aix3*)
195 # AIX sometimes has problems with the GCC collect2 program. For some
196 # reason, if we set the COLLECT_NAMES environment variable, the problems
197 # vanish in a puff of smoke.
198 if test "X${COLLECT_NAMES+set}" != Xset; then
199 COLLECT_NAMES=
200 export COLLECT_NAMES
201 fi
202 ;;
203 esac
204
205 # Global variables:
206 ofile=libtool
207 can_build_shared=yes
208
209 # All known linkers require a `.a' archive for static linking (except MSVC,
210 # which needs '.lib').
211 libext=a
212
213 with_gnu_ld="$lt_cv_prog_gnu_ld"
214
215 old_CC="$CC"
216 old_CFLAGS="$CFLAGS"
217
218 # Set sane defaults for various variables
219 test -z "$CC" && CC=cc
220 test -z "$LTCC" && LTCC=$CC
221 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
222 test -z "$LD" && LD=ld
223 test -z "$ac_objext" && ac_objext=o
224
225 _LT_CC_BASENAME([$compiler])
226
227 # Only perform the check for file, if the check method requires it
228 test -z "$MAGIC_CMD" && MAGIC_CMD=file
229 case $deplibs_check_method in
230 file_magic*)
231 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
232 _LT_PATH_MAGIC
233 fi
234 ;;
235 esac
236
237 # Use C for the default configuration in the libtool script
238 LT_SUPPORTED_TAG([CC])
239 _LT_LANG_C_CONFIG
240 _LT_LANG_DEFAULT_CONFIG
241 _LT_CONFIG_COMMANDS
242 ])# _LT_SETUP
243
244
245 # _LT_PREPARE_SED_QUOTE_VARS
246 # --------------------------
247 # Define a few sed substitution that help us do robust quoting.
248 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
249 [# Backslashify metacharacters that are still active within
250 # double-quoted strings.
251 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
252
253 # Same as above, but do not quote variable references.
254 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
255
256 # Sed substitution to delay expansion of an escaped shell variable in a
257 # double_quote_subst'ed string.
258 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
259
260 # Sed substitution to delay expansion of an escaped single quote.
261 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
262
263 # Sed substitution to avoid accidental globbing in evaled expressions
264 no_glob_subst='s/\*/\\\*/g'
265 ])
266
267 # _LT_PROG_LTMAIN
268 # ---------------
269 # Note that this code is called both from `configure', and `config.status'
270 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
271 # `config.status' has no value for ac_aux_dir unless we are using Automake,
272 # so we pass a copy along to make sure it has a sensible value anyway.
273 m4_defun([_LT_PROG_LTMAIN],
274 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
275 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
276 ltmain="$ac_aux_dir/ltmain.sh"
277 ])# _LT_PROG_LTMAIN
278
279
280 ## ------------------------------------- ##
281 ## Accumulate code for creating libtool. ##
282 ## ------------------------------------- ##
283
284 # So that we can recreate a full libtool script including additional
285 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
286 # in macros and then make a single call at the end using the `libtool'
287 # label.
288
289
290 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
291 # ----------------------------------------
292 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
293 m4_define([_LT_CONFIG_LIBTOOL_INIT],
294 [m4_ifval([$1],
295 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
296 [$1
297 ])])])
298
299 # Initialize.
300 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
301
302
303 # _LT_CONFIG_LIBTOOL([COMMANDS])
304 # ------------------------------
305 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
306 m4_define([_LT_CONFIG_LIBTOOL],
307 [m4_ifval([$1],
308 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
309 [$1
310 ])])])
311
312 # Initialize.
313 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
314
315
316 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
317 # -----------------------------------------------------
318 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
319 [_LT_CONFIG_LIBTOOL([$1])
320 _LT_CONFIG_LIBTOOL_INIT([$2])
321 ])
322
323
324 # _LT_FORMAT_COMMENT([COMMENT])
325 # -----------------------------
326 # Add leading comment marks to the start of each line, and a trailing
327 # full-stop to the whole comment if one is not present already.
328 m4_define([_LT_FORMAT_COMMENT],
329 [m4_ifval([$1], [
330 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
331 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
332 )])
333
334
335
336 ## ------------------------ ##
337 ## FIXME: Eliminate VARNAME ##
338 ## ------------------------ ##
339
340
341 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
342 # -------------------------------------------------------------------
343 # CONFIGNAME is the name given to the value in the libtool script.
344 # VARNAME is the (base) name used in the configure script.
345 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
346 # VARNAME. Any other value will be used directly.
347 m4_define([_LT_DECL],
348 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
349 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
350 [m4_ifval([$1], [$1], [$2])])
351 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
352 m4_ifval([$4],
353 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
354 lt_dict_add_subkey([lt_decl_dict], [$2],
355 [tagged?], [m4_ifval([$5], [yes], [no])])])
356 ])
357
358
359 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
360 # --------------------------------------------------------
361 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
362
363
364 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
365 # ------------------------------------------------
366 m4_define([lt_decl_tag_varnames],
367 [_lt_decl_filter([tagged?], [yes], $@)])
368
369
370 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
371 # ---------------------------------------------------------
372 m4_define([_lt_decl_filter],
373 [m4_case([$#],
374 [0], [m4_fatal([$0: too few arguments: $#])],
375 [1], [m4_fatal([$0: too few arguments: $#: $1])],
376 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
377 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
378 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
379 ])
380
381
382 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
383 # --------------------------------------------------
384 m4_define([lt_decl_quote_varnames],
385 [_lt_decl_filter([value], [1], $@)])
386
387
388 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
389 # ---------------------------------------------------
390 m4_define([lt_decl_dquote_varnames],
391 [_lt_decl_filter([value], [2], $@)])
392
393
394 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
395 # ---------------------------------------------------
396 m4_define([lt_decl_varnames_tagged],
397 [m4_assert([$# <= 2])dnl
398 _$0(m4_quote(m4_default([$1], [[, ]])),
399 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
400 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
401 m4_define([_lt_decl_varnames_tagged],
402 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
403
404
405 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
406 # ------------------------------------------------
407 m4_define([lt_decl_all_varnames],
408 [_$0(m4_quote(m4_default([$1], [[, ]])),
409 m4_if([$2], [],
410 m4_quote(lt_decl_varnames),
411 m4_quote(m4_shift($@))))[]dnl
412 ])
413 m4_define([_lt_decl_all_varnames],
414 [lt_join($@, lt_decl_varnames_tagged([$1],
415 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
416 ])
417
418
419 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
420 # ------------------------------------
421 # Quote a variable value, and forward it to `config.status' so that its
422 # declaration there will have the same value as in `configure'. VARNAME
423 # must have a single quote delimited value for this to work.
424 m4_define([_LT_CONFIG_STATUS_DECLARE],
425 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
426
427
428 # _LT_CONFIG_STATUS_DECLARATIONS
429 # ------------------------------
430 # We delimit libtool config variables with single quotes, so when
431 # we write them to config.status, we have to be sure to quote all
432 # embedded single quotes properly. In configure, this macro expands
433 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
434 #
435 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
436 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
437 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
438 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
439
440
441 # _LT_LIBTOOL_TAGS
442 # ----------------
443 # Output comment and list of tags supported by the script
444 m4_defun([_LT_LIBTOOL_TAGS],
445 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
446 available_tags="_LT_TAGS"dnl
447 ])
448
449
450 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
451 # -----------------------------------
452 # Extract the dictionary values for VARNAME (optionally with TAG) and
453 # expand to a commented shell variable setting:
454 #
455 # # Some comment about what VAR is for.
456 # visible_name=$lt_internal_name
457 m4_define([_LT_LIBTOOL_DECLARE],
458 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
459 [description])))[]dnl
460 m4_pushdef([_libtool_name],
461 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
462 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
463 [0], [_libtool_name=[$]$1],
464 [1], [_libtool_name=$lt_[]$1],
465 [2], [_libtool_name=$lt_[]$1],
466 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
467 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
468 ])
469
470
471 # _LT_LIBTOOL_CONFIG_VARS
472 # -----------------------
473 # Produce commented declarations of non-tagged libtool config variables
474 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
475 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
476 # section) are produced by _LT_LIBTOOL_TAG_VARS.
477 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
478 [m4_foreach([_lt_var],
479 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
480 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
481
482
483 # _LT_LIBTOOL_TAG_VARS(TAG)
484 # -------------------------
485 m4_define([_LT_LIBTOOL_TAG_VARS],
486 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
487 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
488
489
490 # _LT_TAGVAR(VARNAME, [TAGNAME])
491 # ------------------------------
492 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
493
494
495 # _LT_CONFIG_COMMANDS
496 # -------------------
497 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
498 # variables for single and double quote escaping we saved from calls
499 # to _LT_DECL, we can put quote escaped variables declarations
500 # into `config.status', and then the shell code to quote escape them in
501 # for loops in `config.status'. Finally, any additional code accumulated
502 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
503 m4_defun([_LT_CONFIG_COMMANDS],
504 [AC_PROVIDE_IFELSE([LT_OUTPUT],
505 dnl If the libtool generation code has been placed in $CONFIG_LT,
506 dnl instead of duplicating it all over again into config.status,
507 dnl then we will have config.status run $CONFIG_LT later, so it
508 dnl needs to know what name is stored there:
509 [AC_CONFIG_COMMANDS([libtool],
510 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
511 dnl If the libtool generation code is destined for config.status,
512 dnl expand the accumulated commands and init code now:
513 [AC_CONFIG_COMMANDS([libtool],
514 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
515 ])#_LT_CONFIG_COMMANDS
516
517
518 # Initialize.
519 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
520 [
521
522 # The HP-UX ksh and POSIX shell print the target directory to stdout
523 # if CDPATH is set.
524 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
525
526 sed_quote_subst='$sed_quote_subst'
527 double_quote_subst='$double_quote_subst'
528 delay_variable_subst='$delay_variable_subst'
529 _LT_CONFIG_STATUS_DECLARATIONS
530 LTCC='$LTCC'
531 LTCFLAGS='$LTCFLAGS'
532 compiler='$compiler_DEFAULT'
533
534 # A function that is used when there is no print builtin or printf.
535 func_fallback_echo ()
536 {
537 eval 'cat <<_LTECHO_EOF
538 \$[]1
539 _LTECHO_EOF'
540 }
541
542 # Quote evaled strings.
543 for var in lt_decl_all_varnames([[ \
544 ]], lt_decl_quote_varnames); do
545 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
546 *[[\\\\\\\`\\"\\\$]]*)
547 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
548 ;;
549 *)
550 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
551 ;;
552 esac
553 done
554
555 # Double-quote double-evaled strings.
556 for var in lt_decl_all_varnames([[ \
557 ]], lt_decl_dquote_varnames); do
558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
559 *[[\\\\\\\`\\"\\\$]]*)
560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
561 ;;
562 *)
563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
564 ;;
565 esac
566 done
567
568 _LT_OUTPUT_LIBTOOL_INIT
569 ])
570
571 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
572 # ------------------------------------
573 # Generate a child script FILE with all initialization necessary to
574 # reuse the environment learned by the parent script, and make the
575 # file executable. If COMMENT is supplied, it is inserted after the
576 # `#!' sequence but before initialization text begins. After this
577 # macro, additional text can be appended to FILE to form the body of
578 # the child script. The macro ends with non-zero status if the
579 # file could not be fully written (such as if the disk is full).
580 m4_ifdef([AS_INIT_GENERATED],
581 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
582 [m4_defun([_LT_GENERATED_FILE_INIT],
583 [m4_require([AS_PREPARE])]dnl
584 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
585 [lt_write_fail=0
586 cat >$1 <<_ASEOF || lt_write_fail=1
587 #! $SHELL
588 # Generated by $as_me.
589 $2
590 SHELL=\${CONFIG_SHELL-$SHELL}
591 export SHELL
592 _ASEOF
593 cat >>$1 <<\_ASEOF || lt_write_fail=1
594 AS_SHELL_SANITIZE
595 _AS_PREPARE
596 exec AS_MESSAGE_FD>&1
597 _ASEOF
598 test $lt_write_fail = 0 && chmod +x $1[]dnl
599 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
600
601 # LT_OUTPUT
602 # ---------
603 # This macro allows early generation of the libtool script (before
604 # AC_OUTPUT is called), incase it is used in configure for compilation
605 # tests.
606 AC_DEFUN([LT_OUTPUT],
607 [: ${CONFIG_LT=./config.lt}
608 AC_MSG_NOTICE([creating $CONFIG_LT])
609 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
610 [# Run this file to recreate a libtool stub with the current configuration.])
611
612 cat >>"$CONFIG_LT" <<\_LTEOF
613 lt_cl_silent=false
614 exec AS_MESSAGE_LOG_FD>>config.log
615 {
616 echo
617 AS_BOX([Running $as_me.])
618 } >&AS_MESSAGE_LOG_FD
619
620 lt_cl_help="\
621 \`$as_me' creates a local libtool stub from the current configuration,
622 for use in further configure time tests before the real libtool is
623 generated.
624
625 Usage: $[0] [[OPTIONS]]
626
627 -h, --help print this help, then exit
628 -V, --version print version number, then exit
629 -q, --quiet do not print progress messages
630 -d, --debug don't remove temporary files
631
632 Report bugs to <bug-libtool@gnu.org>."
633
634 lt_cl_version="\
635 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
636 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
637 configured by $[0], generated by m4_PACKAGE_STRING.
638
639 Copyright (C) 2010 Free Software Foundation, Inc.
640 This config.lt script is free software; the Free Software Foundation
641 gives unlimited permision to copy, distribute and modify it."
642
643 while test $[#] != 0
644 do
645 case $[1] in
646 --version | --v* | -V )
647 echo "$lt_cl_version"; exit 0 ;;
648 --help | --h* | -h )
649 echo "$lt_cl_help"; exit 0 ;;
650 --debug | --d* | -d )
651 debug=: ;;
652 --quiet | --q* | --silent | --s* | -q )
653 lt_cl_silent=: ;;
654
655 -*) AC_MSG_ERROR([unrecognized option: $[1]
656 Try \`$[0] --help' for more information.]) ;;
657
658 *) AC_MSG_ERROR([unrecognized argument: $[1]
659 Try \`$[0] --help' for more information.]) ;;
660 esac
661 shift
662 done
663
664 if $lt_cl_silent; then
665 exec AS_MESSAGE_FD>/dev/null
666 fi
667 _LTEOF
668
669 cat >>"$CONFIG_LT" <<_LTEOF
670 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
671 _LTEOF
672
673 cat >>"$CONFIG_LT" <<\_LTEOF
674 AC_MSG_NOTICE([creating $ofile])
675 _LT_OUTPUT_LIBTOOL_COMMANDS
676 AS_EXIT(0)
677 _LTEOF
678 chmod +x "$CONFIG_LT"
679
680 # configure is writing to config.log, but config.lt does its own redirection,
681 # appending to config.log, which fails on DOS, as config.log is still kept
682 # open by configure. Here we exec the FD to /dev/null, effectively closing
683 # config.log, so it can be properly (re)opened and appended to by config.lt.
684 lt_cl_success=:
685 test "$silent" = yes &&
686 lt_config_lt_args="$lt_config_lt_args --quiet"
687 exec AS_MESSAGE_LOG_FD>/dev/null
688 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
689 exec AS_MESSAGE_LOG_FD>>config.log
690 $lt_cl_success || AS_EXIT(1)
691 ])# LT_OUTPUT
692
693
694 # _LT_CONFIG(TAG)
695 # ---------------
696 # If TAG is the built-in tag, create an initial libtool script with a
697 # default configuration from the untagged config vars. Otherwise add code
698 # to config.status for appending the configuration named by TAG from the
699 # matching tagged config vars.
700 m4_defun([_LT_CONFIG],
701 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
702 _LT_CONFIG_SAVE_COMMANDS([
703 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
704 m4_if(_LT_TAG, [C], [
705 # See if we are running on zsh, and set the options which allow our
706 # commands through without removal of \ escapes.
707 if test -n "${ZSH_VERSION+set}" ; then
708 setopt NO_GLOB_SUBST
709 fi
710
711 cfgfile="${ofile}T"
712 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
713 $RM "$cfgfile"
714
715 cat <<_LT_EOF >> "$cfgfile"
716 #! $SHELL
717
718 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
719 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
720 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
721 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
722 #
723 _LT_COPYING
724 _LT_LIBTOOL_TAGS
725
726 # ### BEGIN LIBTOOL CONFIG
727 _LT_LIBTOOL_CONFIG_VARS
728 _LT_LIBTOOL_TAG_VARS
729 # ### END LIBTOOL CONFIG
730
731 _LT_EOF
732
733 case $host_os in
734 aix3*)
735 cat <<\_LT_EOF >> "$cfgfile"
736 # AIX sometimes has problems with the GCC collect2 program. For some
737 # reason, if we set the COLLECT_NAMES environment variable, the problems
738 # vanish in a puff of smoke.
739 if test "X${COLLECT_NAMES+set}" != Xset; then
740 COLLECT_NAMES=
741 export COLLECT_NAMES
742 fi
743 _LT_EOF
744 ;;
745 esac
746
747 _LT_PROG_LTMAIN
748
749 # We use sed instead of cat because bash on DJGPP gets confused if
750 # if finds mixed CR/LF and LF-only lines. Since sed operates in
751 # text mode, it properly converts lines to CR/LF. This bash problem
752 # is reportedly fixed, but why not run on old versions too?
753 sed '$q' "$ltmain" >> "$cfgfile" \
754 || (rm -f "$cfgfile"; exit 1)
755
756 _LT_PROG_REPLACE_SHELLFNS
757
758 mv -f "$cfgfile" "$ofile" ||
759 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
760 chmod +x "$ofile"
761 ],
762 [cat <<_LT_EOF >> "$ofile"
763
764 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
765 dnl in a comment (ie after a #).
766 # ### BEGIN LIBTOOL TAG CONFIG: $1
767 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
768 # ### END LIBTOOL TAG CONFIG: $1
769 _LT_EOF
770 ])dnl /m4_if
771 ],
772 [m4_if([$1], [], [
773 PACKAGE='$PACKAGE'
774 VERSION='$VERSION'
775 TIMESTAMP='$TIMESTAMP'
776 RM='$RM'
777 ofile='$ofile'], [])
778 ])dnl /_LT_CONFIG_SAVE_COMMANDS
779 ])# _LT_CONFIG
780
781
782 # LT_SUPPORTED_TAG(TAG)
783 # ---------------------
784 # Trace this macro to discover what tags are supported by the libtool
785 # --tag option, using:
786 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
787 AC_DEFUN([LT_SUPPORTED_TAG], [])
788
789
790 # C support is built-in for now
791 m4_define([_LT_LANG_C_enabled], [])
792 m4_define([_LT_TAGS], [])
793
794
795 # LT_LANG(LANG)
796 # -------------
797 # Enable libtool support for the given language if not already enabled.
798 AC_DEFUN([LT_LANG],
799 [AC_BEFORE([$0], [LT_OUTPUT])dnl
800 m4_case([$1],
801 [C], [_LT_LANG(C)],
802 [C++], [_LT_LANG(CXX)],
803 [Java], [_LT_LANG(GCJ)],
804 [Fortran 77], [_LT_LANG(F77)],
805 [Fortran], [_LT_LANG(FC)],
806 [Windows Resource], [_LT_LANG(RC)],
807 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
808 [_LT_LANG($1)],
809 [m4_fatal([$0: unsupported language: "$1"])])])dnl
810 ])# LT_LANG
811
812
813 # _LT_LANG(LANGNAME)
814 # ------------------
815 m4_defun([_LT_LANG],
816 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
817 [LT_SUPPORTED_TAG([$1])dnl
818 m4_append([_LT_TAGS], [$1 ])dnl
819 m4_define([_LT_LANG_]$1[_enabled], [])dnl
820 _LT_LANG_$1_CONFIG($1)])dnl
821 ])# _LT_LANG
822
823
824 # _LT_LANG_DEFAULT_CONFIG
825 # -----------------------
826 m4_defun([_LT_LANG_DEFAULT_CONFIG],
827 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
828 [LT_LANG(CXX)],
829 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
830
831 AC_PROVIDE_IFELSE([AC_PROG_F77],
832 [LT_LANG(F77)],
833 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
834
835 AC_PROVIDE_IFELSE([AC_PROG_FC],
836 [LT_LANG(FC)],
837 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
838
839 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
840 dnl pulling things in needlessly.
841 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
842 [LT_LANG(GCJ)],
843 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
844 [LT_LANG(GCJ)],
845 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
846 [LT_LANG(GCJ)],
847 [m4_ifdef([AC_PROG_GCJ],
848 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
849 m4_ifdef([A][M_PROG_GCJ],
850 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
851 m4_ifdef([LT_PROG_GCJ],
852 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
853
854 AC_PROVIDE_IFELSE([LT_PROG_RC],
855 [LT_LANG(RC)],
856 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
857 ])# _LT_LANG_DEFAULT_CONFIG
858
859 # Obsolete macros:
860 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
861 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
862 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
863 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
864 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
865 dnl aclocal-1.4 backwards compatibility:
866 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
867 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
868 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
869 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
870 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
871
872
873 # _LT_TAG_COMPILER
874 # ----------------
875 m4_defun([_LT_TAG_COMPILER],
876 [AC_REQUIRE([AC_PROG_CC])dnl
877
878 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
879 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
880 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
881 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
882
883 # If no C compiler was specified, use CC.
884 LTCC=${LTCC-"$CC"}
885
886 # If no C compiler flags were specified, use CFLAGS.
887 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
888
889 # Allow CC to be a program name with arguments.
890 compiler=$CC
891 ])# _LT_TAG_COMPILER
892
893
894 # _LT_COMPILER_BOILERPLATE
895 # ------------------------
896 # Check for compiler boilerplate output or warnings with
897 # the simple compiler test code.
898 m4_defun([_LT_COMPILER_BOILERPLATE],
899 [m4_require([_LT_DECL_SED])dnl
900 ac_outfile=conftest.$ac_objext
901 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
902 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
903 _lt_compiler_boilerplate=`cat conftest.err`
904 $RM conftest*
905 ])# _LT_COMPILER_BOILERPLATE
906
907
908 # _LT_LINKER_BOILERPLATE
909 # ----------------------
910 # Check for linker boilerplate output or warnings with
911 # the simple link test code.
912 m4_defun([_LT_LINKER_BOILERPLATE],
913 [m4_require([_LT_DECL_SED])dnl
914 ac_outfile=conftest.$ac_objext
915 echo "$lt_simple_link_test_code" >conftest.$ac_ext
916 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
917 _lt_linker_boilerplate=`cat conftest.err`
918 $RM -r conftest*
919 ])# _LT_LINKER_BOILERPLATE
920
921 # _LT_REQUIRED_DARWIN_CHECKS
922 # -------------------------
923 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
924 case $host_os in
925 rhapsody* | darwin*)
926 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
927 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
928 AC_CHECK_TOOL([LIPO], [lipo], [:])
929 AC_CHECK_TOOL([OTOOL], [otool], [:])
930 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
931 _LT_DECL([], [DSYMUTIL], [1],
932 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
933 _LT_DECL([], [NMEDIT], [1],
934 [Tool to change global to local symbols on Mac OS X])
935 _LT_DECL([], [LIPO], [1],
936 [Tool to manipulate fat objects and archives on Mac OS X])
937 _LT_DECL([], [OTOOL], [1],
938 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
939 _LT_DECL([], [OTOOL64], [1],
940 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
941
942 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
943 [lt_cv_apple_cc_single_mod=no
944 if test -z "${LT_MULTI_MODULE}"; then
945 # By default we will add the -single_module flag. You can override
946 # by either setting the environment variable LT_MULTI_MODULE
947 # non-empty at configure time, or by adding -multi_module to the
948 # link flags.
949 rm -rf libconftest.dylib*
950 echo "int foo(void){return 1;}" > conftest.c
951 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
952 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
953 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
954 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
955 _lt_result=$?
956 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
957 lt_cv_apple_cc_single_mod=yes
958 else
959 cat conftest.err >&AS_MESSAGE_LOG_FD
960 fi
961 rm -rf libconftest.dylib*
962 rm -f conftest.*
963 fi])
964 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
965 [lt_cv_ld_exported_symbols_list],
966 [lt_cv_ld_exported_symbols_list=no
967 save_LDFLAGS=$LDFLAGS
968 echo "_main" > conftest.sym
969 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
970 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
971 [lt_cv_ld_exported_symbols_list=yes],
972 [lt_cv_ld_exported_symbols_list=no])
973 LDFLAGS="$save_LDFLAGS"
974 ])
975 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
976 [lt_cv_ld_force_load=no
977 cat > conftest.c << _LT_EOF
978 int forced_loaded() { return 2;}
979 _LT_EOF
980 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
981 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
982 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
983 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
984 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
985 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
986 cat > conftest.c << _LT_EOF
987 int main() { return 0;}
988 _LT_EOF
989 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
990 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
991 _lt_result=$?
992 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
993 lt_cv_ld_force_load=yes
994 else
995 cat conftest.err >&AS_MESSAGE_LOG_FD
996 fi
997 rm -f conftest.err libconftest.a conftest conftest.c
998 rm -rf conftest.dSYM
999 ])
1000 case $host_os in
1001 rhapsody* | darwin1.[[012]])
1002 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1003 darwin1.*)
1004 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1005 darwin*) # darwin 5.x on
1006 # if running on 10.5 or later, the deployment target defaults
1007 # to the OS version, if on x86, and 10.4, the deployment
1008 # target defaults to 10.4. Don't you love it?
1009 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1010 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1011 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1012 10.[[012]]*)
1013 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1014 10.*)
1015 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1016 esac
1017 ;;
1018 esac
1019 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1020 _lt_dar_single_mod='$single_module'
1021 fi
1022 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1023 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1024 else
1025 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1026 fi
1027 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1028 _lt_dsymutil='~$DSYMUTIL $lib || :'
1029 else
1030 _lt_dsymutil=
1031 fi
1032 ;;
1033 esac
1034 ])
1035
1036
1037 # _LT_DARWIN_LINKER_FEATURES
1038 # --------------------------
1039 # Checks for linker and compiler features on darwin
1040 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1041 [
1042 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1043 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1044 _LT_TAGVAR(hardcode_direct, $1)=no
1045 _LT_TAGVAR(hardcode_automatic, $1)=yes
1046 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1047 if test "$lt_cv_ld_force_load" = "yes"; then
1048 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1049 else
1050 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1051 fi
1052 _LT_TAGVAR(link_all_deplibs, $1)=yes
1053 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1054 case $cc_basename in
1055 ifort*) _lt_dar_can_shared=yes ;;
1056 *) _lt_dar_can_shared=$GCC ;;
1057 esac
1058 if test "$_lt_dar_can_shared" = "yes"; then
1059 output_verbose_link_cmd=func_echo_all
1060 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1061 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1062 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1063 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1064 m4_if([$1], [CXX],
1065 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1066 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1067 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1068 fi
1069 ],[])
1070 else
1071 _LT_TAGVAR(ld_shlibs, $1)=no
1072 fi
1073 ])
1074
1075 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1076 # ----------------------------------
1077 # Links a minimal program and checks the executable
1078 # for the system default hardcoded library path. In most cases,
1079 # this is /usr/lib:/lib, but when the MPI compilers are used
1080 # the location of the communication and MPI libs are included too.
1081 # If we don't find anything, use the default library path according
1082 # to the aix ld manual.
1083 # Store the results from the different compilers for each TAGNAME.
1084 # Allow to override them for all tags through lt_cv_aix_libpath.
1085 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1086 [m4_require([_LT_DECL_SED])dnl
1087 if test "${lt_cv_aix_libpath+set}" = set; then
1088 aix_libpath=$lt_cv_aix_libpath
1089 else
1090 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1091 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1092 lt_aix_libpath_sed='[
1093 /Import File Strings/,/^$/ {
1094 /^0/ {
1095 s/^0 *\([^ ]*\) *$/\1/
1096 p
1097 }
1098 }]'
1099 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1100 # Check for a 64-bit object if we didn't find anything.
1101 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1102 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1103 fi],[])
1104 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1105 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1106 fi
1107 ])
1108 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1109 fi
1110 ])# _LT_SYS_MODULE_PATH_AIX
1111
1112
1113 # _LT_SHELL_INIT(ARG)
1114 # -------------------
1115 m4_define([_LT_SHELL_INIT],
1116 [m4_divert_text([M4SH-INIT], [$1
1117 ])])# _LT_SHELL_INIT
1118
1119
1120
1121 # _LT_PROG_ECHO_BACKSLASH
1122 # -----------------------
1123 # Find how we can fake an echo command that does not interpret backslash.
1124 # In particular, with Autoconf 2.60 or later we add some code to the start
1125 # of the generated configure script which will find a shell with a builtin
1126 # printf (which we can use as an echo command).
1127 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1128 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1129 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1130 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1131
1132 AC_MSG_CHECKING([how to print strings])
1133 # Test print first, because it will be a builtin if present.
1134 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1135 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1136 ECHO='print -r --'
1137 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1138 ECHO='printf %s\n'
1139 else
1140 # Use this function as a fallback that always works.
1141 func_fallback_echo ()
1142 {
1143 eval 'cat <<_LTECHO_EOF
1144 $[]1
1145 _LTECHO_EOF'
1146 }
1147 ECHO='func_fallback_echo'
1148 fi
1149
1150 # func_echo_all arg...
1151 # Invoke $ECHO with all args, space-separated.
1152 func_echo_all ()
1153 {
1154 $ECHO "$*"
1155 }
1156
1157 case "$ECHO" in
1158 printf*) AC_MSG_RESULT([printf]) ;;
1159 print*) AC_MSG_RESULT([print -r]) ;;
1160 *) AC_MSG_RESULT([cat]) ;;
1161 esac
1162
1163 m4_ifdef([_AS_DETECT_SUGGESTED],
1164 [_AS_DETECT_SUGGESTED([
1165 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1166 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1167 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1168 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1169 PATH=/empty FPATH=/empty; export PATH FPATH
1170 test "X`printf %s $ECHO`" = "X$ECHO" \
1171 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1172
1173 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1174 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1175 ])# _LT_PROG_ECHO_BACKSLASH
1176
1177
1178 # _LT_WITH_SYSROOT
1179 # ----------------
1180 AC_DEFUN([_LT_WITH_SYSROOT],
1181 [AC_MSG_CHECKING([for sysroot])
1182 AC_ARG_WITH([sysroot],
1183 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1184 (or the compiler's sysroot if not specified).],
1185 [], [with_sysroot=no])
1186
1187 dnl lt_sysroot will always be passed unquoted. We quote it here
1188 dnl in case the user passed a directory name.
1189 lt_sysroot=
1190 case ${with_sysroot} in #(
1191 yes)
1192 if test "$GCC" = yes; then
1193 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1194 fi
1195 ;; #(
1196 /*)
1197 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1198 ;; #(
1199 no|'')
1200 ;; #(
1201 *)
1202 AC_MSG_RESULT([${with_sysroot}])
1203 AC_MSG_ERROR([The sysroot must be an absolute path.])
1204 ;;
1205 esac
1206
1207 AC_MSG_RESULT([${lt_sysroot:-no}])
1208 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1209 [dependent libraries, and in which our libraries should be installed.])])
1210
1211 # _LT_ENABLE_LOCK
1212 # ---------------
1213 m4_defun([_LT_ENABLE_LOCK],
1214 [AC_ARG_ENABLE([libtool-lock],
1215 [AS_HELP_STRING([--disable-libtool-lock],
1216 [avoid locking (might break parallel builds)])])
1217 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1218
1219 # Some flags need to be propagated to the compiler or linker for good
1220 # libtool support.
1221 case $host in
1222 ia64-*-hpux*)
1223 # Find out which ABI we are using.
1224 echo 'int i;' > conftest.$ac_ext
1225 if AC_TRY_EVAL(ac_compile); then
1226 case `/usr/bin/file conftest.$ac_objext` in
1227 *ELF-32*)
1228 HPUX_IA64_MODE="32"
1229 ;;
1230 *ELF-64*)
1231 HPUX_IA64_MODE="64"
1232 ;;
1233 esac
1234 fi
1235 rm -rf conftest*
1236 ;;
1237 *-*-irix6*)
1238 # Find out which ABI we are using.
1239 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1240 if AC_TRY_EVAL(ac_compile); then
1241 if test "$lt_cv_prog_gnu_ld" = yes; then
1242 case `/usr/bin/file conftest.$ac_objext` in
1243 *32-bit*)
1244 LD="${LD-ld} -melf32bsmip"
1245 ;;
1246 *N32*)
1247 LD="${LD-ld} -melf32bmipn32"
1248 ;;
1249 *64-bit*)
1250 LD="${LD-ld} -melf64bmip"
1251 ;;
1252 esac
1253 else
1254 case `/usr/bin/file conftest.$ac_objext` in
1255 *32-bit*)
1256 LD="${LD-ld} -32"
1257 ;;
1258 *N32*)
1259 LD="${LD-ld} -n32"
1260 ;;
1261 *64-bit*)
1262 LD="${LD-ld} -64"
1263 ;;
1264 esac
1265 fi
1266 fi
1267 rm -rf conftest*
1268 ;;
1269
1270 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1271 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1272 # Find out which ABI we are using.
1273 echo 'int i;' > conftest.$ac_ext
1274 if AC_TRY_EVAL(ac_compile); then
1275 case `/usr/bin/file conftest.o` in
1276 *32-bit*)
1277 case $host in
1278 x86_64-*kfreebsd*-gnu)
1279 LD="${LD-ld} -m elf_i386_fbsd"
1280 ;;
1281 x86_64-*linux*)
1282 LD="${LD-ld} -m elf_i386"
1283 ;;
1284 ppc64-*linux*|powerpc64-*linux*)
1285 LD="${LD-ld} -m elf32ppclinux"
1286 ;;
1287 s390x-*linux*)
1288 LD="${LD-ld} -m elf_s390"
1289 ;;
1290 sparc64-*linux*)
1291 LD="${LD-ld} -m elf32_sparc"
1292 ;;
1293 esac
1294 ;;
1295 *64-bit*)
1296 case $host in
1297 x86_64-*kfreebsd*-gnu)
1298 LD="${LD-ld} -m elf_x86_64_fbsd"
1299 ;;
1300 x86_64-*linux*)
1301 LD="${LD-ld} -m elf_x86_64"
1302 ;;
1303 ppc*-*linux*|powerpc*-*linux*)
1304 LD="${LD-ld} -m elf64ppc"
1305 ;;
1306 s390*-*linux*|s390*-*tpf*)
1307 LD="${LD-ld} -m elf64_s390"
1308 ;;
1309 sparc*-*linux*)
1310 LD="${LD-ld} -m elf64_sparc"
1311 ;;
1312 esac
1313 ;;
1314 esac
1315 fi
1316 rm -rf conftest*
1317 ;;
1318
1319 *-*-sco3.2v5*)
1320 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1321 SAVE_CFLAGS="$CFLAGS"
1322 CFLAGS="$CFLAGS -belf"
1323 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1324 [AC_LANG_PUSH(C)
1325 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1326 AC_LANG_POP])
1327 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1328 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1329 CFLAGS="$SAVE_CFLAGS"
1330 fi
1331 ;;
1332 sparc*-*solaris*)
1333 # Find out which ABI we are using.
1334 echo 'int i;' > conftest.$ac_ext
1335 if AC_TRY_EVAL(ac_compile); then
1336 case `/usr/bin/file conftest.o` in
1337 *64-bit*)
1338 case $lt_cv_prog_gnu_ld in
1339 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1340 *)
1341 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1342 LD="${LD-ld} -64"
1343 fi
1344 ;;
1345 esac
1346 ;;
1347 esac
1348 fi
1349 rm -rf conftest*
1350 ;;
1351 esac
1352
1353 need_locks="$enable_libtool_lock"
1354 ])# _LT_ENABLE_LOCK
1355
1356
1357 # _LT_PROG_AR
1358 # -----------
1359 m4_defun([_LT_PROG_AR],
1360 [AC_CHECK_TOOLS(AR, [ar], false)
1361 : ${AR=ar}
1362 : ${AR_FLAGS=cru}
1363 _LT_DECL([], [AR], [1], [The archiver])
1364 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1365
1366 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1367 [lt_cv_ar_at_file=no
1368 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1369 [echo conftest.$ac_objext > conftest.lst
1370 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1371 AC_TRY_EVAL([lt_ar_try])
1372 if test "$ac_status" -eq 0; then
1373 # Ensure the archiver fails upon bogus file names.
1374 rm -f conftest.$ac_objext libconftest.a
1375 AC_TRY_EVAL([lt_ar_try])
1376 if test "$ac_status" -ne 0; then
1377 lt_cv_ar_at_file=@
1378 fi
1379 fi
1380 rm -f conftest.* libconftest.a
1381 ])
1382 ])
1383
1384 if test "x$lt_cv_ar_at_file" = xno; then
1385 archiver_list_spec=
1386 else
1387 archiver_list_spec=$lt_cv_ar_at_file
1388 fi
1389 _LT_DECL([], [archiver_list_spec], [1],
1390 [How to feed a file listing to the archiver])
1391 ])# _LT_PROG_AR
1392
1393
1394 # _LT_CMD_OLD_ARCHIVE
1395 # -------------------
1396 m4_defun([_LT_CMD_OLD_ARCHIVE],
1397 [_LT_PROG_AR
1398
1399 AC_CHECK_TOOL(STRIP, strip, :)
1400 test -z "$STRIP" && STRIP=:
1401 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1402
1403 AC_CHECK_TOOL(RANLIB, ranlib, :)
1404 test -z "$RANLIB" && RANLIB=:
1405 _LT_DECL([], [RANLIB], [1],
1406 [Commands used to install an old-style archive])
1407
1408 # Determine commands to create old-style static archives.
1409 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1410 old_postinstall_cmds='chmod 644 $oldlib'
1411 old_postuninstall_cmds=
1412
1413 if test -n "$RANLIB"; then
1414 case $host_os in
1415 openbsd*)
1416 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1417 ;;
1418 *)
1419 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1420 ;;
1421 esac
1422 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1423 fi
1424
1425 case $host_os in
1426 darwin*)
1427 lock_old_archive_extraction=yes ;;
1428 *)
1429 lock_old_archive_extraction=no ;;
1430 esac
1431 _LT_DECL([], [old_postinstall_cmds], [2])
1432 _LT_DECL([], [old_postuninstall_cmds], [2])
1433 _LT_TAGDECL([], [old_archive_cmds], [2],
1434 [Commands used to build an old-style archive])
1435 _LT_DECL([], [lock_old_archive_extraction], [0],
1436 [Whether to use a lock for old archive extraction])
1437 ])# _LT_CMD_OLD_ARCHIVE
1438
1439
1440 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1441 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1442 # ----------------------------------------------------------------
1443 # Check whether the given compiler option works
1444 AC_DEFUN([_LT_COMPILER_OPTION],
1445 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1446 m4_require([_LT_DECL_SED])dnl
1447 AC_CACHE_CHECK([$1], [$2],
1448 [$2=no
1449 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1450 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1451 lt_compiler_flag="$3"
1452 # Insert the option either (1) after the last *FLAGS variable, or
1453 # (2) before a word containing "conftest.", or (3) at the end.
1454 # Note that $ac_compile itself does not contain backslashes and begins
1455 # with a dollar sign (not a hyphen), so the echo should work correctly.
1456 # The option is referenced via a variable to avoid confusing sed.
1457 lt_compile=`echo "$ac_compile" | $SED \
1458 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1459 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1460 -e 's:$: $lt_compiler_flag:'`
1461 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1462 (eval "$lt_compile" 2>conftest.err)
1463 ac_status=$?
1464 cat conftest.err >&AS_MESSAGE_LOG_FD
1465 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1466 if (exit $ac_status) && test -s "$ac_outfile"; then
1467 # The compiler can only warn and ignore the option if not recognized
1468 # So say no if there are warnings other than the usual output.
1469 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1470 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1471 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1472 $2=yes
1473 fi
1474 fi
1475 $RM conftest*
1476 ])
1477
1478 if test x"[$]$2" = xyes; then
1479 m4_if([$5], , :, [$5])
1480 else
1481 m4_if([$6], , :, [$6])
1482 fi
1483 ])# _LT_COMPILER_OPTION
1484
1485 # Old name:
1486 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1487 dnl aclocal-1.4 backwards compatibility:
1488 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1489
1490
1491 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1492 # [ACTION-SUCCESS], [ACTION-FAILURE])
1493 # ----------------------------------------------------
1494 # Check whether the given linker option works
1495 AC_DEFUN([_LT_LINKER_OPTION],
1496 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1497 m4_require([_LT_DECL_SED])dnl
1498 AC_CACHE_CHECK([$1], [$2],
1499 [$2=no
1500 save_LDFLAGS="$LDFLAGS"
1501 LDFLAGS="$LDFLAGS $3"
1502 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1503 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1504 # The linker can only warn and ignore the option if not recognized
1505 # So say no if there are warnings
1506 if test -s conftest.err; then
1507 # Append any errors to the config.log.
1508 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1509 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1510 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1511 if diff conftest.exp conftest.er2 >/dev/null; then
1512 $2=yes
1513 fi
1514 else
1515 $2=yes
1516 fi
1517 fi
1518 $RM -r conftest*
1519 LDFLAGS="$save_LDFLAGS"
1520 ])
1521
1522 if test x"[$]$2" = xyes; then
1523 m4_if([$4], , :, [$4])
1524 else
1525 m4_if([$5], , :, [$5])
1526 fi
1527 ])# _LT_LINKER_OPTION
1528
1529 # Old name:
1530 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1531 dnl aclocal-1.4 backwards compatibility:
1532 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1533
1534
1535 # LT_CMD_MAX_LEN
1536 #---------------
1537 AC_DEFUN([LT_CMD_MAX_LEN],
1538 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1539 # find the maximum length of command line arguments
1540 AC_MSG_CHECKING([the maximum length of command line arguments])
1541 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1542 i=0
1543 teststring="ABCD"
1544
1545 case $build_os in
1546 msdosdjgpp*)
1547 # On DJGPP, this test can blow up pretty badly due to problems in libc
1548 # (any single argument exceeding 2000 bytes causes a buffer overrun
1549 # during glob expansion). Even if it were fixed, the result of this
1550 # check would be larger than it should be.
1551 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1552 ;;
1553
1554 gnu*)
1555 # Under GNU Hurd, this test is not required because there is
1556 # no limit to the length of command line arguments.
1557 # Libtool will interpret -1 as no limit whatsoever
1558 lt_cv_sys_max_cmd_len=-1;
1559 ;;
1560
1561 cygwin* | mingw* | cegcc*)
1562 # On Win9x/ME, this test blows up -- it succeeds, but takes
1563 # about 5 minutes as the teststring grows exponentially.
1564 # Worse, since 9x/ME are not pre-emptively multitasking,
1565 # you end up with a "frozen" computer, even though with patience
1566 # the test eventually succeeds (with a max line length of 256k).
1567 # Instead, let's just punt: use the minimum linelength reported by
1568 # all of the supported platforms: 8192 (on NT/2K/XP).
1569 lt_cv_sys_max_cmd_len=8192;
1570 ;;
1571
1572 mint*)
1573 # On MiNT this can take a long time and run out of memory.
1574 lt_cv_sys_max_cmd_len=8192;
1575 ;;
1576
1577 amigaos*)
1578 # On AmigaOS with pdksh, this test takes hours, literally.
1579 # So we just punt and use a minimum line length of 8192.
1580 lt_cv_sys_max_cmd_len=8192;
1581 ;;
1582
1583 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1584 # This has been around since 386BSD, at least. Likely further.
1585 if test -x /sbin/sysctl; then
1586 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1587 elif test -x /usr/sbin/sysctl; then
1588 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1589 else
1590 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1591 fi
1592 # And add a safety zone
1593 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1594 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1595 ;;
1596
1597 interix*)
1598 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1599 lt_cv_sys_max_cmd_len=196608
1600 ;;
1601
1602 osf*)
1603 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1604 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1605 # nice to cause kernel panics so lets avoid the loop below.
1606 # First set a reasonable default.
1607 lt_cv_sys_max_cmd_len=16384
1608 #
1609 if test -x /sbin/sysconfig; then
1610 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1611 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1612 esac
1613 fi
1614 ;;
1615 sco3.2v5*)
1616 lt_cv_sys_max_cmd_len=102400
1617 ;;
1618 sysv5* | sco5v6* | sysv4.2uw2*)
1619 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1620 if test -n "$kargmax"; then
1621 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1622 else
1623 lt_cv_sys_max_cmd_len=32768
1624 fi
1625 ;;
1626 *)
1627 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1628 if test -n "$lt_cv_sys_max_cmd_len"; then
1629 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1630 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1631 else
1632 # Make teststring a little bigger before we do anything with it.
1633 # a 1K string should be a reasonable start.
1634 for i in 1 2 3 4 5 6 7 8 ; do
1635 teststring=$teststring$teststring
1636 done
1637 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1638 # If test is not a shell built-in, we'll probably end up computing a
1639 # maximum length that is only half of the actual maximum length, but
1640 # we can't tell.
1641 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
1642 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1643 test $i != 17 # 1/2 MB should be enough
1644 do
1645 i=`expr $i + 1`
1646 teststring=$teststring$teststring
1647 done
1648 # Only check the string length outside the loop.
1649 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1650 teststring=
1651 # Add a significant safety factor because C++ compilers can tack on
1652 # massive amounts of additional arguments before passing them to the
1653 # linker. It appears as though 1/2 is a usable value.
1654 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1655 fi
1656 ;;
1657 esac
1658 ])
1659 if test -n $lt_cv_sys_max_cmd_len ; then
1660 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1661 else
1662 AC_MSG_RESULT(none)
1663 fi
1664 max_cmd_len=$lt_cv_sys_max_cmd_len
1665 _LT_DECL([], [max_cmd_len], [0],
1666 [What is the maximum length of a command?])
1667 ])# LT_CMD_MAX_LEN
1668
1669 # Old name:
1670 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1671 dnl aclocal-1.4 backwards compatibility:
1672 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1673
1674
1675 # _LT_HEADER_DLFCN
1676 # ----------------
1677 m4_defun([_LT_HEADER_DLFCN],
1678 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1679 ])# _LT_HEADER_DLFCN
1680
1681
1682 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1683 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1684 # ----------------------------------------------------------------
1685 m4_defun([_LT_TRY_DLOPEN_SELF],
1686 [m4_require([_LT_HEADER_DLFCN])dnl
1687 if test "$cross_compiling" = yes; then :
1688 [$4]
1689 else
1690 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1691 lt_status=$lt_dlunknown
1692 cat > conftest.$ac_ext <<_LT_EOF
1693 [#line $LINENO "configure"
1694 #include "confdefs.h"
1695
1696 #if HAVE_DLFCN_H
1697 #include <dlfcn.h>
1698 #endif
1699
1700 #include <stdio.h>
1701
1702 #ifdef RTLD_GLOBAL
1703 # define LT_DLGLOBAL RTLD_GLOBAL
1704 #else
1705 # ifdef DL_GLOBAL
1706 # define LT_DLGLOBAL DL_GLOBAL
1707 # else
1708 # define LT_DLGLOBAL 0
1709 # endif
1710 #endif
1711
1712 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1713 find out it does not work in some platform. */
1714 #ifndef LT_DLLAZY_OR_NOW
1715 # ifdef RTLD_LAZY
1716 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1717 # else
1718 # ifdef DL_LAZY
1719 # define LT_DLLAZY_OR_NOW DL_LAZY
1720 # else
1721 # ifdef RTLD_NOW
1722 # define LT_DLLAZY_OR_NOW RTLD_NOW
1723 # else
1724 # ifdef DL_NOW
1725 # define LT_DLLAZY_OR_NOW DL_NOW
1726 # else
1727 # define LT_DLLAZY_OR_NOW 0
1728 # endif
1729 # endif
1730 # endif
1731 # endif
1732 #endif
1733
1734 /* When -fvisbility=hidden is used, assume the code has been annotated
1735 correspondingly for the symbols needed. */
1736 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1737 int fnord () __attribute__((visibility("default")));
1738 #endif
1739
1740 int fnord () { return 42; }
1741 int main ()
1742 {
1743 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1744 int status = $lt_dlunknown;
1745
1746 if (self)
1747 {
1748 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1749 else
1750 {
1751 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1752 else puts (dlerror ());
1753 }
1754 /* dlclose (self); */
1755 }
1756 else
1757 puts (dlerror ());
1758
1759 return status;
1760 }]
1761 _LT_EOF
1762 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1763 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1764 lt_status=$?
1765 case x$lt_status in
1766 x$lt_dlno_uscore) $1 ;;
1767 x$lt_dlneed_uscore) $2 ;;
1768 x$lt_dlunknown|x*) $3 ;;
1769 esac
1770 else :
1771 # compilation failed
1772 $3
1773 fi
1774 fi
1775 rm -fr conftest*
1776 ])# _LT_TRY_DLOPEN_SELF
1777
1778
1779 # LT_SYS_DLOPEN_SELF
1780 # ------------------
1781 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1782 [m4_require([_LT_HEADER_DLFCN])dnl
1783 if test "x$enable_dlopen" != xyes; then
1784 enable_dlopen=unknown
1785 enable_dlopen_self=unknown
1786 enable_dlopen_self_static=unknown
1787 else
1788 lt_cv_dlopen=no
1789 lt_cv_dlopen_libs=
1790
1791 case $host_os in
1792 beos*)
1793 lt_cv_dlopen="load_add_on"
1794 lt_cv_dlopen_libs=
1795 lt_cv_dlopen_self=yes
1796 ;;
1797
1798 mingw* | pw32* | cegcc*)
1799 lt_cv_dlopen="LoadLibrary"
1800 lt_cv_dlopen_libs=
1801 ;;
1802
1803 cygwin*)
1804 lt_cv_dlopen="dlopen"
1805 lt_cv_dlopen_libs=
1806 ;;
1807
1808 darwin*)
1809 # if libdl is installed we need to link against it
1810 AC_CHECK_LIB([dl], [dlopen],
1811 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1812 lt_cv_dlopen="dyld"
1813 lt_cv_dlopen_libs=
1814 lt_cv_dlopen_self=yes
1815 ])
1816 ;;
1817
1818 *)
1819 AC_CHECK_FUNC([shl_load],
1820 [lt_cv_dlopen="shl_load"],
1821 [AC_CHECK_LIB([dld], [shl_load],
1822 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1823 [AC_CHECK_FUNC([dlopen],
1824 [lt_cv_dlopen="dlopen"],
1825 [AC_CHECK_LIB([dl], [dlopen],
1826 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1827 [AC_CHECK_LIB([svld], [dlopen],
1828 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1829 [AC_CHECK_LIB([dld], [dld_link],
1830 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1831 ])
1832 ])
1833 ])
1834 ])
1835 ])
1836 ;;
1837 esac
1838
1839 if test "x$lt_cv_dlopen" != xno; then
1840 enable_dlopen=yes
1841 else
1842 enable_dlopen=no
1843 fi
1844
1845 case $lt_cv_dlopen in
1846 dlopen)
1847 save_CPPFLAGS="$CPPFLAGS"
1848 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1849
1850 save_LDFLAGS="$LDFLAGS"
1851 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1852
1853 save_LIBS="$LIBS"
1854 LIBS="$lt_cv_dlopen_libs $LIBS"
1855
1856 AC_CACHE_CHECK([whether a program can dlopen itself],
1857 lt_cv_dlopen_self, [dnl
1858 _LT_TRY_DLOPEN_SELF(
1859 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1860 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1861 ])
1862
1863 if test "x$lt_cv_dlopen_self" = xyes; then
1864 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1865 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1866 lt_cv_dlopen_self_static, [dnl
1867 _LT_TRY_DLOPEN_SELF(
1868 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1869 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1870 ])
1871 fi
1872
1873 CPPFLAGS="$save_CPPFLAGS"
1874 LDFLAGS="$save_LDFLAGS"
1875 LIBS="$save_LIBS"
1876 ;;
1877 esac
1878
1879 case $lt_cv_dlopen_self in
1880 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1881 *) enable_dlopen_self=unknown ;;
1882 esac
1883
1884 case $lt_cv_dlopen_self_static in
1885 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1886 *) enable_dlopen_self_static=unknown ;;
1887 esac
1888 fi
1889 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1890 [Whether dlopen is supported])
1891 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1892 [Whether dlopen of programs is supported])
1893 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1894 [Whether dlopen of statically linked programs is supported])
1895 ])# LT_SYS_DLOPEN_SELF
1896
1897 # Old name:
1898 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1899 dnl aclocal-1.4 backwards compatibility:
1900 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1901
1902
1903 # _LT_COMPILER_C_O([TAGNAME])
1904 # ---------------------------
1905 # Check to see if options -c and -o are simultaneously supported by compiler.
1906 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1907 m4_defun([_LT_COMPILER_C_O],
1908 [m4_require([_LT_DECL_SED])dnl
1909 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1910 m4_require([_LT_TAG_COMPILER])dnl
1911 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1912 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1913 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1914 $RM -r conftest 2>/dev/null
1915 mkdir conftest
1916 cd conftest
1917 mkdir out
1918 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1919
1920 lt_compiler_flag="-o out/conftest2.$ac_objext"
1921 # Insert the option either (1) after the last *FLAGS variable, or
1922 # (2) before a word containing "conftest.", or (3) at the end.
1923 # Note that $ac_compile itself does not contain backslashes and begins
1924 # with a dollar sign (not a hyphen), so the echo should work correctly.
1925 lt_compile=`echo "$ac_compile" | $SED \
1926 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1927 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1928 -e 's:$: $lt_compiler_flag:'`
1929 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1930 (eval "$lt_compile" 2>out/conftest.err)
1931 ac_status=$?
1932 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1933 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1934 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1935 then
1936 # The compiler can only warn and ignore the option if not recognized
1937 # So say no if there are warnings
1938 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
1939 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1940 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1941 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1942 fi
1943 fi
1944 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1945 $RM conftest*
1946 # SGI C++ compiler will create directory out/ii_files/ for
1947 # template instantiation
1948 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1949 $RM out/* && rmdir out
1950 cd ..
1951 $RM -r conftest
1952 $RM conftest*
1953 ])
1954 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1955 [Does compiler simultaneously support -c and -o options?])
1956 ])# _LT_COMPILER_C_O
1957
1958
1959 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1960 # ----------------------------------
1961 # Check to see if we can do hard links to lock some files if needed
1962 m4_defun([_LT_COMPILER_FILE_LOCKS],
1963 [m4_require([_LT_ENABLE_LOCK])dnl
1964 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1965 _LT_COMPILER_C_O([$1])
1966
1967 hard_links="nottested"
1968 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1969 # do not overwrite the value of need_locks provided by the user
1970 AC_MSG_CHECKING([if we can lock with hard links])
1971 hard_links=yes
1972 $RM conftest*
1973 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1974 touch conftest.a
1975 ln conftest.a conftest.b 2>&5 || hard_links=no
1976 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1977 AC_MSG_RESULT([$hard_links])
1978 if test "$hard_links" = no; then
1979 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1980 need_locks=warn
1981 fi
1982 else
1983 need_locks=no
1984 fi
1985 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1986 ])# _LT_COMPILER_FILE_LOCKS
1987
1988
1989 # _LT_CHECK_OBJDIR
1990 # ----------------
1991 m4_defun([_LT_CHECK_OBJDIR],
1992 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1993 [rm -f .libs 2>/dev/null
1994 mkdir .libs 2>/dev/null
1995 if test -d .libs; then
1996 lt_cv_objdir=.libs
1997 else
1998 # MS-DOS does not allow filenames that begin with a dot.
1999 lt_cv_objdir=_libs
2000 fi
2001 rmdir .libs 2>/dev/null])
2002 objdir=$lt_cv_objdir
2003 _LT_DECL([], [objdir], [0],
2004 [The name of the directory that contains temporary libtool files])dnl
2005 m4_pattern_allow([LT_OBJDIR])dnl
2006 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2007 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2008 ])# _LT_CHECK_OBJDIR
2009
2010
2011 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2012 # --------------------------------------
2013 # Check hardcoding attributes.
2014 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2015 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2016 _LT_TAGVAR(hardcode_action, $1)=
2017 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2018 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2019 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2020
2021 # We can hardcode non-existent directories.
2022 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2023 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2024 # have to relink, otherwise we might link with an installed library
2025 # when we should be linking with a yet-to-be-installed one
2026 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2027 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2028 # Linking always hardcodes the temporary library directory.
2029 _LT_TAGVAR(hardcode_action, $1)=relink
2030 else
2031 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2032 _LT_TAGVAR(hardcode_action, $1)=immediate
2033 fi
2034 else
2035 # We cannot hardcode anything, or else we can only hardcode existing
2036 # directories.
2037 _LT_TAGVAR(hardcode_action, $1)=unsupported
2038 fi
2039 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2040
2041 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2042 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2043 # Fast installation is not supported
2044 enable_fast_install=no
2045 elif test "$shlibpath_overrides_runpath" = yes ||
2046 test "$enable_shared" = no; then
2047 # Fast installation is not necessary
2048 enable_fast_install=needless
2049 fi
2050 _LT_TAGDECL([], [hardcode_action], [0],
2051 [How to hardcode a shared library path into an executable])
2052 ])# _LT_LINKER_HARDCODE_LIBPATH
2053
2054
2055 # _LT_CMD_STRIPLIB
2056 # ----------------
2057 m4_defun([_LT_CMD_STRIPLIB],
2058 [m4_require([_LT_DECL_EGREP])
2059 striplib=
2060 old_striplib=
2061 AC_MSG_CHECKING([whether stripping libraries is possible])
2062 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2063 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2064 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2065 AC_MSG_RESULT([yes])
2066 else
2067 # FIXME - insert some real tests, host_os isn't really good enough
2068 case $host_os in
2069 darwin*)
2070 if test -n "$STRIP" ; then
2071 striplib="$STRIP -x"
2072 old_striplib="$STRIP -S"
2073 AC_MSG_RESULT([yes])
2074 else
2075 AC_MSG_RESULT([no])
2076 fi
2077 ;;
2078 *)
2079 AC_MSG_RESULT([no])
2080 ;;
2081 esac
2082 fi
2083 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2084 _LT_DECL([], [striplib], [1])
2085 ])# _LT_CMD_STRIPLIB
2086
2087
2088 # _LT_SYS_DYNAMIC_LINKER([TAG])
2089 # -----------------------------
2090 # PORTME Fill in your ld.so characteristics
2091 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2092 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2093 m4_require([_LT_DECL_EGREP])dnl
2094 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2095 m4_require([_LT_DECL_OBJDUMP])dnl
2096 m4_require([_LT_DECL_SED])dnl
2097 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2098 AC_MSG_CHECKING([dynamic linker characteristics])
2099 m4_if([$1],
2100 [], [
2101 if test "$GCC" = yes; then
2102 case $host_os in
2103 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2104 *) lt_awk_arg="/^libraries:/" ;;
2105 esac
2106 case $host_os in
2107 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2108 *) lt_sed_strip_eq="s,=/,/,g" ;;
2109 esac
2110 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2111 case $lt_search_path_spec in
2112 *\;*)
2113 # if the path contains ";" then we assume it to be the separator
2114 # otherwise default to the standard path separator (i.e. ":") - it is
2115 # assumed that no part of a normal pathname contains ";" but that should
2116 # okay in the real world where ";" in dirpaths is itself problematic.
2117 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2118 ;;
2119 *)
2120 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2121 ;;
2122 esac
2123 # Ok, now we have the path, separated by spaces, we can step through it
2124 # and add multilib dir if necessary.
2125 lt_tmp_lt_search_path_spec=
2126 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2127 for lt_sys_path in $lt_search_path_spec; do
2128 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2129 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2130 else
2131 test -d "$lt_sys_path" && \
2132 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2133 fi
2134 done
2135 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2136 BEGIN {RS=" "; FS="/|\n";} {
2137 lt_foo="";
2138 lt_count=0;
2139 for (lt_i = NF; lt_i > 0; lt_i--) {
2140 if ($lt_i != "" && $lt_i != ".") {
2141 if ($lt_i == "..") {
2142 lt_count++;
2143 } else {
2144 if (lt_count == 0) {
2145 lt_foo="/" $lt_i lt_foo;
2146 } else {
2147 lt_count--;
2148 }
2149 }
2150 }
2151 }
2152 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2153 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2154 }'`
2155 # AWK program above erroneously prepends '/' to C:/dos/paths
2156 # for these hosts.
2157 case $host_os in
2158 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2159 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2160 esac
2161 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2162 else
2163 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2164 fi])
2165 library_names_spec=
2166 libname_spec='lib$name'
2167 soname_spec=
2168 shrext_cmds=".so"
2169 postinstall_cmds=
2170 postuninstall_cmds=
2171 finish_cmds=
2172 finish_eval=
2173 shlibpath_var=
2174 shlibpath_overrides_runpath=unknown
2175 version_type=none
2176 dynamic_linker="$host_os ld.so"
2177 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2178 need_lib_prefix=unknown
2179 hardcode_into_libs=no
2180
2181 # when you set need_version to no, make sure it does not cause -set_version
2182 # flags to be left without arguments
2183 need_version=unknown
2184
2185 case $host_os in
2186 aix3*)
2187 version_type=linux
2188 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2189 shlibpath_var=LIBPATH
2190
2191 # AIX 3 has no versioning support, so we append a major version to the name.
2192 soname_spec='${libname}${release}${shared_ext}$major'
2193 ;;
2194
2195 aix[[4-9]]*)
2196 version_type=linux
2197 need_lib_prefix=no
2198 need_version=no
2199 hardcode_into_libs=yes
2200 if test "$host_cpu" = ia64; then
2201 # AIX 5 supports IA64
2202 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2203 shlibpath_var=LD_LIBRARY_PATH
2204 else
2205 # With GCC up to 2.95.x, collect2 would create an import file
2206 # for dependence libraries. The import file would start with
2207 # the line `#! .'. This would cause the generated library to
2208 # depend on `.', always an invalid library. This was fixed in
2209 # development snapshots of GCC prior to 3.0.
2210 case $host_os in
2211 aix4 | aix4.[[01]] | aix4.[[01]].*)
2212 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2213 echo ' yes '
2214 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2215 :
2216 else
2217 can_build_shared=no
2218 fi
2219 ;;
2220 esac
2221 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2222 # soname into executable. Probably we can add versioning support to
2223 # collect2, so additional links can be useful in future.
2224 if test "$aix_use_runtimelinking" = yes; then
2225 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2226 # instead of lib<name>.a to let people know that these are not
2227 # typical AIX shared libraries.
2228 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2229 else
2230 # We preserve .a as extension for shared libraries through AIX4.2
2231 # and later when we are not doing run time linking.
2232 library_names_spec='${libname}${release}.a $libname.a'
2233 soname_spec='${libname}${release}${shared_ext}$major'
2234 fi
2235 shlibpath_var=LIBPATH
2236 fi
2237 ;;
2238
2239 amigaos*)
2240 case $host_cpu in
2241 powerpc)
2242 # Since July 2007 AmigaOS4 officially supports .so libraries.
2243 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2244 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2245 ;;
2246 m68k)
2247 library_names_spec='$libname.ixlibrary $libname.a'
2248 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2249 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
2250 ;;
2251 esac
2252 ;;
2253
2254 beos*)
2255 library_names_spec='${libname}${shared_ext}'
2256 dynamic_linker="$host_os ld.so"
2257 shlibpath_var=LIBRARY_PATH
2258 ;;
2259
2260 bsdi[[45]]*)
2261 version_type=linux
2262 need_version=no
2263 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2264 soname_spec='${libname}${release}${shared_ext}$major'
2265 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2266 shlibpath_var=LD_LIBRARY_PATH
2267 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2268 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2269 # the default ld.so.conf also contains /usr/contrib/lib and
2270 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2271 # libtool to hard-code these into programs
2272 ;;
2273
2274 cygwin* | mingw* | pw32* | cegcc*)
2275 version_type=windows
2276 shrext_cmds=".dll"
2277 need_version=no
2278 need_lib_prefix=no
2279
2280 case $GCC,$cc_basename in
2281 yes,*)
2282 # gcc
2283 library_names_spec='$libname.dll.a'
2284 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2285 postinstall_cmds='base_file=`basename \${file}`~
2286 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2287 dldir=$destdir/`dirname \$dlpath`~
2288 test -d \$dldir || mkdir -p \$dldir~
2289 $install_prog $dir/$dlname \$dldir/$dlname~
2290 chmod a+x \$dldir/$dlname~
2291 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2292 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2293 fi'
2294 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2295 dlpath=$dir/\$dldll~
2296 $RM \$dlpath'
2297 shlibpath_overrides_runpath=yes
2298
2299 case $host_os in
2300 cygwin*)
2301 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2302 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2303 m4_if([$1], [],[
2304 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2305 ;;
2306 mingw* | cegcc*)
2307 # MinGW DLLs use traditional 'lib' prefix
2308 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2309 ;;
2310 pw32*)
2311 # pw32 DLLs use 'pw' prefix rather than 'lib'
2312 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2313 ;;
2314 esac
2315 dynamic_linker='Win32 ld.exe'
2316 ;;
2317
2318 *,cl*)
2319 # Native MSVC
2320 libname_spec='$name'
2321 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2322 library_names_spec='${libname}.dll.lib'
2323
2324 case $build_os in
2325 mingw*)
2326 sys_lib_search_path_spec=
2327 lt_save_ifs=$IFS
2328 IFS=';'
2329 for lt_path in $LIB
2330 do
2331 IFS=$lt_save_ifs
2332 # Let DOS variable expansion print the short 8.3 style file name.
2333 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2334 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2335 done
2336 IFS=$lt_save_ifs
2337 # Convert to MSYS style.
2338 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2339 ;;
2340 cygwin*)
2341 # Convert to unix form, then to dos form, then back to unix form
2342 # but this time dos style (no spaces!) so that the unix form looks
2343 # like /cygdrive/c/PROGRA~1:/cygdr...
2344 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2345 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2346 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2347 ;;
2348 *)
2349 sys_lib_search_path_spec="$LIB"
2350 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2351 # It is most probably a Windows format PATH.
2352 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2353 else
2354 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2355 fi
2356 # FIXME: find the short name or the path components, as spaces are
2357 # common. (e.g. "Program Files" -> "PROGRA~1")
2358 ;;
2359 esac
2360
2361 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2362 postinstall_cmds='base_file=`basename \${file}`~
2363 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2364 dldir=$destdir/`dirname \$dlpath`~
2365 test -d \$dldir || mkdir -p \$dldir~
2366 $install_prog $dir/$dlname \$dldir/$dlname'
2367 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2368 dlpath=$dir/\$dldll~
2369 $RM \$dlpath'
2370 shlibpath_overrides_runpath=yes
2371 dynamic_linker='Win32 link.exe'
2372 ;;
2373
2374 *)
2375 # Assume MSVC wrapper
2376 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2377 dynamic_linker='Win32 ld.exe'
2378 ;;
2379 esac
2380 # FIXME: first we should search . and the directory the executable is in
2381 shlibpath_var=PATH
2382 ;;
2383
2384 darwin* | rhapsody*)
2385 dynamic_linker="$host_os dyld"
2386 version_type=darwin
2387 need_lib_prefix=no
2388 need_version=no
2389 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2390 soname_spec='${libname}${release}${major}$shared_ext'
2391 shlibpath_overrides_runpath=yes
2392 shlibpath_var=DYLD_LIBRARY_PATH
2393 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2394 m4_if([$1], [],[
2395 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2396 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2397 ;;
2398
2399 dgux*)
2400 version_type=linux
2401 need_lib_prefix=no
2402 need_version=no
2403 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2404 soname_spec='${libname}${release}${shared_ext}$major'
2405 shlibpath_var=LD_LIBRARY_PATH
2406 ;;
2407
2408 freebsd1*)
2409 dynamic_linker=no
2410 ;;
2411
2412 freebsd* | dragonfly*)
2413 # DragonFly does not have aout. When/if they implement a new
2414 # versioning mechanism, adjust this.
2415 if test -x /usr/bin/objformat; then
2416 objformat=`/usr/bin/objformat`
2417 else
2418 case $host_os in
2419 freebsd[[123]]*) objformat=aout ;;
2420 *) objformat=elf ;;
2421 esac
2422 fi
2423 version_type=freebsd-$objformat
2424 case $version_type in
2425 freebsd-elf*)
2426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2427 need_version=no
2428 need_lib_prefix=no
2429 ;;
2430 freebsd-*)
2431 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2432 need_version=yes
2433 ;;
2434 esac
2435 shlibpath_var=LD_LIBRARY_PATH
2436 case $host_os in
2437 freebsd2*)
2438 shlibpath_overrides_runpath=yes
2439 ;;
2440 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2441 shlibpath_overrides_runpath=yes
2442 hardcode_into_libs=yes
2443 ;;
2444 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2445 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2446 shlibpath_overrides_runpath=no
2447 hardcode_into_libs=yes
2448 ;;
2449 *) # from 4.6 on, and DragonFly
2450 shlibpath_overrides_runpath=yes
2451 hardcode_into_libs=yes
2452 ;;
2453 esac
2454 ;;
2455
2456 gnu*)
2457 version_type=linux
2458 need_lib_prefix=no
2459 need_version=no
2460 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2461 soname_spec='${libname}${release}${shared_ext}$major'
2462 shlibpath_var=LD_LIBRARY_PATH
2463 hardcode_into_libs=yes
2464 ;;
2465
2466 haiku*)
2467 version_type=linux
2468 need_lib_prefix=no
2469 need_version=no
2470 dynamic_linker="$host_os runtime_loader"
2471 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2472 soname_spec='${libname}${release}${shared_ext}$major'
2473 shlibpath_var=LIBRARY_PATH
2474 shlibpath_overrides_runpath=yes
2475 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2476 hardcode_into_libs=yes
2477 ;;
2478
2479 hpux9* | hpux10* | hpux11*)
2480 # Give a soname corresponding to the major version so that dld.sl refuses to
2481 # link against other versions.
2482 version_type=sunos
2483 need_lib_prefix=no
2484 need_version=no
2485 case $host_cpu in
2486 ia64*)
2487 shrext_cmds='.so'
2488 hardcode_into_libs=yes
2489 dynamic_linker="$host_os dld.so"
2490 shlibpath_var=LD_LIBRARY_PATH
2491 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2493 soname_spec='${libname}${release}${shared_ext}$major'
2494 if test "X$HPUX_IA64_MODE" = X32; then
2495 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2496 else
2497 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2498 fi
2499 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2500 ;;
2501 hppa*64*)
2502 shrext_cmds='.sl'
2503 hardcode_into_libs=yes
2504 dynamic_linker="$host_os dld.sl"
2505 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2506 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2507 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2508 soname_spec='${libname}${release}${shared_ext}$major'
2509 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2510 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2511 ;;
2512 *)
2513 shrext_cmds='.sl'
2514 dynamic_linker="$host_os dld.sl"
2515 shlibpath_var=SHLIB_PATH
2516 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2517 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2518 soname_spec='${libname}${release}${shared_ext}$major'
2519 ;;
2520 esac
2521 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2522 postinstall_cmds='chmod 555 $lib'
2523 # or fails outright, so override atomically:
2524 install_override_mode=555
2525 ;;
2526
2527 interix[[3-9]]*)
2528 version_type=linux
2529 need_lib_prefix=no
2530 need_version=no
2531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2532 soname_spec='${libname}${release}${shared_ext}$major'
2533 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2534 shlibpath_var=LD_LIBRARY_PATH
2535 shlibpath_overrides_runpath=no
2536 hardcode_into_libs=yes
2537 ;;
2538
2539 irix5* | irix6* | nonstopux*)
2540 case $host_os in
2541 nonstopux*) version_type=nonstopux ;;
2542 *)
2543 if test "$lt_cv_prog_gnu_ld" = yes; then
2544 version_type=linux
2545 else
2546 version_type=irix
2547 fi ;;
2548 esac
2549 need_lib_prefix=no
2550 need_version=no
2551 soname_spec='${libname}${release}${shared_ext}$major'
2552 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2553 case $host_os in
2554 irix5* | nonstopux*)
2555 libsuff= shlibsuff=
2556 ;;
2557 *)
2558 case $LD in # libtool.m4 will add one of these switches to LD
2559 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2560 libsuff= shlibsuff= libmagic=32-bit;;
2561 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2562 libsuff=32 shlibsuff=N32 libmagic=N32;;
2563 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2564 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2565 *) libsuff= shlibsuff= libmagic=never-match;;
2566 esac
2567 ;;
2568 esac
2569 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2570 shlibpath_overrides_runpath=no
2571 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2572 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2573 hardcode_into_libs=yes
2574 ;;
2575
2576 # No shared lib support for Linux oldld, aout, or coff.
2577 linux*oldld* | linux*aout* | linux*coff*)
2578 dynamic_linker=no
2579 ;;
2580
2581 # This must be Linux ELF.
2582 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2583 version_type=linux
2584 need_lib_prefix=no
2585 need_version=no
2586 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2587 soname_spec='${libname}${release}${shared_ext}$major'
2588 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2589 shlibpath_var=LD_LIBRARY_PATH
2590 shlibpath_overrides_runpath=no
2591
2592 # Some binutils ld are patched to set DT_RUNPATH
2593 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2594 [lt_cv_shlibpath_overrides_runpath=no
2595 save_LDFLAGS=$LDFLAGS
2596 save_libdir=$libdir
2597 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2598 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2599 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2600 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2601 [lt_cv_shlibpath_overrides_runpath=yes])])
2602 LDFLAGS=$save_LDFLAGS
2603 libdir=$save_libdir
2604 ])
2605 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2606
2607 # This implies no fast_install, which is unacceptable.
2608 # Some rework will be needed to allow for fast_install
2609 # before this can be enabled.
2610 hardcode_into_libs=yes
2611
2612 # Append ld.so.conf contents to the search path
2613 if test -f /etc/ld.so.conf; then
2614 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2615 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2616 fi
2617
2618 # We used to test for /lib/ld.so.1 and disable shared libraries on
2619 # powerpc, because MkLinux only supported shared libraries with the
2620 # GNU dynamic linker. Since this was broken with cross compilers,
2621 # most powerpc-linux boxes support dynamic linking these days and
2622 # people can always --disable-shared, the test was removed, and we
2623 # assume the GNU/Linux dynamic linker is in use.
2624 dynamic_linker='GNU/Linux ld.so'
2625 ;;
2626
2627 netbsd*)
2628 version_type=sunos
2629 need_lib_prefix=no
2630 need_version=no
2631 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2632 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2633 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2634 dynamic_linker='NetBSD (a.out) ld.so'
2635 else
2636 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2637 soname_spec='${libname}${release}${shared_ext}$major'
2638 dynamic_linker='NetBSD ld.elf_so'
2639 fi
2640 shlibpath_var=LD_LIBRARY_PATH
2641 shlibpath_overrides_runpath=yes
2642 hardcode_into_libs=yes
2643 ;;
2644
2645 newsos6)
2646 version_type=linux
2647 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2648 shlibpath_var=LD_LIBRARY_PATH
2649 shlibpath_overrides_runpath=yes
2650 ;;
2651
2652 *nto* | *qnx*)
2653 version_type=qnx
2654 need_lib_prefix=no
2655 need_version=no
2656 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2657 soname_spec='${libname}${release}${shared_ext}$major'
2658 shlibpath_var=LD_LIBRARY_PATH
2659 shlibpath_overrides_runpath=no
2660 hardcode_into_libs=yes
2661 dynamic_linker='ldqnx.so'
2662 ;;
2663
2664 openbsd*)
2665 version_type=sunos
2666 sys_lib_dlsearch_path_spec="/usr/lib"
2667 need_lib_prefix=no
2668 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2669 case $host_os in
2670 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2671 *) need_version=no ;;
2672 esac
2673 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2674 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2675 shlibpath_var=LD_LIBRARY_PATH
2676 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2677 case $host_os in
2678 openbsd2.[[89]] | openbsd2.[[89]].*)
2679 shlibpath_overrides_runpath=no
2680 ;;
2681 *)
2682 shlibpath_overrides_runpath=yes
2683 ;;
2684 esac
2685 else
2686 shlibpath_overrides_runpath=yes
2687 fi
2688 ;;
2689
2690 os2*)
2691 libname_spec='$name'
2692 shrext_cmds=".dll"
2693 need_lib_prefix=no
2694 library_names_spec='$libname${shared_ext} $libname.a'
2695 dynamic_linker='OS/2 ld.exe'
2696 shlibpath_var=LIBPATH
2697 ;;
2698
2699 osf3* | osf4* | osf5*)
2700 version_type=osf
2701 need_lib_prefix=no
2702 need_version=no
2703 soname_spec='${libname}${release}${shared_ext}$major'
2704 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2705 shlibpath_var=LD_LIBRARY_PATH
2706 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2707 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2708 ;;
2709
2710 rdos*)
2711 dynamic_linker=no
2712 ;;
2713
2714 solaris*)
2715 version_type=linux
2716 need_lib_prefix=no
2717 need_version=no
2718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2719 soname_spec='${libname}${release}${shared_ext}$major'
2720 shlibpath_var=LD_LIBRARY_PATH
2721 shlibpath_overrides_runpath=yes
2722 hardcode_into_libs=yes
2723 # ldd complains unless libraries are executable
2724 postinstall_cmds='chmod +x $lib'
2725 ;;
2726
2727 sunos4*)
2728 version_type=sunos
2729 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2730 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2731 shlibpath_var=LD_LIBRARY_PATH
2732 shlibpath_overrides_runpath=yes
2733 if test "$with_gnu_ld" = yes; then
2734 need_lib_prefix=no
2735 fi
2736 need_version=yes
2737 ;;
2738
2739 sysv4 | sysv4.3*)
2740 version_type=linux
2741 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2742 soname_spec='${libname}${release}${shared_ext}$major'
2743 shlibpath_var=LD_LIBRARY_PATH
2744 case $host_vendor in
2745 sni)
2746 shlibpath_overrides_runpath=no
2747 need_lib_prefix=no
2748 runpath_var=LD_RUN_PATH
2749 ;;
2750 siemens)
2751 need_lib_prefix=no
2752 ;;
2753 motorola)
2754 need_lib_prefix=no
2755 need_version=no
2756 shlibpath_overrides_runpath=no
2757 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2758 ;;
2759 esac
2760 ;;
2761
2762 sysv4*MP*)
2763 if test -d /usr/nec ;then
2764 version_type=linux
2765 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2766 soname_spec='$libname${shared_ext}.$major'
2767 shlibpath_var=LD_LIBRARY_PATH
2768 fi
2769 ;;
2770
2771 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2772 version_type=freebsd-elf
2773 need_lib_prefix=no
2774 need_version=no
2775 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2776 soname_spec='${libname}${release}${shared_ext}$major'
2777 shlibpath_var=LD_LIBRARY_PATH
2778 shlibpath_overrides_runpath=yes
2779 hardcode_into_libs=yes
2780 if test "$with_gnu_ld" = yes; then
2781 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2782 else
2783 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2784 case $host_os in
2785 sco3.2v5*)
2786 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2787 ;;
2788 esac
2789 fi
2790 sys_lib_dlsearch_path_spec='/usr/lib'
2791 ;;
2792
2793 tpf*)
2794 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2795 version_type=linux
2796 need_lib_prefix=no
2797 need_version=no
2798 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2799 shlibpath_var=LD_LIBRARY_PATH
2800 shlibpath_overrides_runpath=no
2801 hardcode_into_libs=yes
2802 ;;
2803
2804 uts4*)
2805 version_type=linux
2806 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2807 soname_spec='${libname}${release}${shared_ext}$major'
2808 shlibpath_var=LD_LIBRARY_PATH
2809 ;;
2810
2811 *)
2812 dynamic_linker=no
2813 ;;
2814 esac
2815 AC_MSG_RESULT([$dynamic_linker])
2816 test "$dynamic_linker" = no && can_build_shared=no
2817
2818 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2819 if test "$GCC" = yes; then
2820 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2821 fi
2822
2823 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2824 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2825 fi
2826 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2827 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2828 fi
2829
2830 _LT_DECL([], [variables_saved_for_relink], [1],
2831 [Variables whose values should be saved in libtool wrapper scripts and
2832 restored at link time])
2833 _LT_DECL([], [need_lib_prefix], [0],
2834 [Do we need the "lib" prefix for modules?])
2835 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2836 _LT_DECL([], [version_type], [0], [Library versioning type])
2837 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2838 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2839 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2840 [Is shlibpath searched before the hard-coded library search path?])
2841 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2842 _LT_DECL([], [library_names_spec], [1],
2843 [[List of archive names. First name is the real one, the rest are links.
2844 The last name is the one that the linker finds with -lNAME]])
2845 _LT_DECL([], [soname_spec], [1],
2846 [[The coded name of the library, if different from the real name]])
2847 _LT_DECL([], [install_override_mode], [1],
2848 [Permission mode override for installation of shared libraries])
2849 _LT_DECL([], [postinstall_cmds], [2],
2850 [Command to use after installation of a shared archive])
2851 _LT_DECL([], [postuninstall_cmds], [2],
2852 [Command to use after uninstallation of a shared archive])
2853 _LT_DECL([], [finish_cmds], [2],
2854 [Commands used to finish a libtool library installation in a directory])
2855 _LT_DECL([], [finish_eval], [1],
2856 [[As "finish_cmds", except a single script fragment to be evaled but
2857 not shown]])
2858 _LT_DECL([], [hardcode_into_libs], [0],
2859 [Whether we should hardcode library paths into libraries])
2860 _LT_DECL([], [sys_lib_search_path_spec], [2],
2861 [Compile-time system search path for libraries])
2862 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2863 [Run-time system search path for libraries])
2864 ])# _LT_SYS_DYNAMIC_LINKER
2865
2866
2867 # _LT_PATH_TOOL_PREFIX(TOOL)
2868 # --------------------------
2869 # find a file program which can recognize shared library
2870 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2871 [m4_require([_LT_DECL_EGREP])dnl
2872 AC_MSG_CHECKING([for $1])
2873 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2874 [case $MAGIC_CMD in
2875 [[\\/*] | ?:[\\/]*])
2876 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2877 ;;
2878 *)
2879 lt_save_MAGIC_CMD="$MAGIC_CMD"
2880 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2881 dnl $ac_dummy forces splitting on constant user-supplied paths.
2882 dnl POSIX.2 word splitting is done only on the output of word expansions,
2883 dnl not every word. This closes a longstanding sh security hole.
2884 ac_dummy="m4_if([$2], , $PATH, [$2])"
2885 for ac_dir in $ac_dummy; do
2886 IFS="$lt_save_ifs"
2887 test -z "$ac_dir" && ac_dir=.
2888 if test -f $ac_dir/$1; then
2889 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2890 if test -n "$file_magic_test_file"; then
2891 case $deplibs_check_method in
2892 "file_magic "*)
2893 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2894 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2895 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2896 $EGREP "$file_magic_regex" > /dev/null; then
2897 :
2898 else
2899 cat <<_LT_EOF 1>&2
2900
2901 *** Warning: the command libtool uses to detect shared libraries,
2902 *** $file_magic_cmd, produces output that libtool cannot recognize.
2903 *** The result is that libtool may fail to recognize shared libraries
2904 *** as such. This will affect the creation of libtool libraries that
2905 *** depend on shared libraries, but programs linked with such libtool
2906 *** libraries will work regardless of this problem. Nevertheless, you
2907 *** may want to report the problem to your system manager and/or to
2908 *** bug-libtool@gnu.org
2909
2910 _LT_EOF
2911 fi ;;
2912 esac
2913 fi
2914 break
2915 fi
2916 done
2917 IFS="$lt_save_ifs"
2918 MAGIC_CMD="$lt_save_MAGIC_CMD"
2919 ;;
2920 esac])
2921 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2922 if test -n "$MAGIC_CMD"; then
2923 AC_MSG_RESULT($MAGIC_CMD)
2924 else
2925 AC_MSG_RESULT(no)
2926 fi
2927 _LT_DECL([], [MAGIC_CMD], [0],
2928 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2929 ])# _LT_PATH_TOOL_PREFIX
2930
2931 # Old name:
2932 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2933 dnl aclocal-1.4 backwards compatibility:
2934 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2935
2936
2937 # _LT_PATH_MAGIC
2938 # --------------
2939 # find a file program which can recognize a shared library
2940 m4_defun([_LT_PATH_MAGIC],
2941 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2942 if test -z "$lt_cv_path_MAGIC_CMD"; then
2943 if test -n "$ac_tool_prefix"; then
2944 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2945 else
2946 MAGIC_CMD=:
2947 fi
2948 fi
2949 ])# _LT_PATH_MAGIC
2950
2951
2952 # LT_PATH_LD
2953 # ----------
2954 # find the pathname to the GNU or non-GNU linker
2955 AC_DEFUN([LT_PATH_LD],
2956 [AC_REQUIRE([AC_PROG_CC])dnl
2957 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2958 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2959 m4_require([_LT_DECL_SED])dnl
2960 m4_require([_LT_DECL_EGREP])dnl
2961 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
2962
2963 AC_ARG_WITH([gnu-ld],
2964 [AS_HELP_STRING([--with-gnu-ld],
2965 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2966 [test "$withval" = no || with_gnu_ld=yes],
2967 [with_gnu_ld=no])dnl
2968
2969 ac_prog=ld
2970 if test "$GCC" = yes; then
2971 # Check if gcc -print-prog-name=ld gives a path.
2972 AC_MSG_CHECKING([for ld used by $CC])
2973 case $host in
2974 *-*-mingw*)
2975 # gcc leaves a trailing carriage return which upsets mingw
2976 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2977 *)
2978 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2979 esac
2980 case $ac_prog in
2981 # Accept absolute paths.
2982 [[\\/]]* | ?:[[\\/]]*)
2983 re_direlt='/[[^/]][[^/]]*/\.\./'
2984 # Canonicalize the pathname of ld
2985 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2986 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2987 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2988 done
2989 test -z "$LD" && LD="$ac_prog"
2990 ;;
2991 "")
2992 # If it fails, then pretend we aren't using GCC.
2993 ac_prog=ld
2994 ;;
2995 *)
2996 # If it is relative, then search for the first ld in PATH.
2997 with_gnu_ld=unknown
2998 ;;
2999 esac
3000 elif test "$with_gnu_ld" = yes; then
3001 AC_MSG_CHECKING([for GNU ld])
3002 else
3003 AC_MSG_CHECKING([for non-GNU ld])
3004 fi
3005 AC_CACHE_VAL(lt_cv_path_LD,
3006 [if test -z "$LD"; then
3007 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3008 for ac_dir in $PATH; do
3009 IFS="$lt_save_ifs"
3010 test -z "$ac_dir" && ac_dir=.
3011 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3012 lt_cv_path_LD="$ac_dir/$ac_prog"
3013 # Check to see if the program is GNU ld. I'd rather use --version,
3014 # but apparently some variants of GNU ld only accept -v.
3015 # Break only if it was the GNU/non-GNU ld that we prefer.
3016 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3017 *GNU* | *'with BFD'*)
3018 test "$with_gnu_ld" != no && break
3019 ;;
3020 *)
3021 test "$with_gnu_ld" != yes && break
3022 ;;
3023 esac
3024 fi
3025 done
3026 IFS="$lt_save_ifs"
3027 else
3028 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3029 fi])
3030 LD="$lt_cv_path_LD"
3031 if test -n "$LD"; then
3032 AC_MSG_RESULT($LD)
3033 else
3034 AC_MSG_RESULT(no)
3035 fi
3036 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3037 _LT_PATH_LD_GNU
3038 AC_SUBST([LD])
3039
3040 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3041 ])# LT_PATH_LD
3042
3043 # Old names:
3044 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3045 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3046 dnl aclocal-1.4 backwards compatibility:
3047 dnl AC_DEFUN([AM_PROG_LD], [])
3048 dnl AC_DEFUN([AC_PROG_LD], [])
3049
3050
3051 # _LT_PATH_LD_GNU
3052 #- --------------
3053 m4_defun([_LT_PATH_LD_GNU],
3054 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3055 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3056 case `$LD -v 2>&1 </dev/null` in
3057 *GNU* | *'with BFD'*)
3058 lt_cv_prog_gnu_ld=yes
3059 ;;
3060 *)
3061 lt_cv_prog_gnu_ld=no
3062 ;;
3063 esac])
3064 with_gnu_ld=$lt_cv_prog_gnu_ld
3065 ])# _LT_PATH_LD_GNU
3066
3067
3068 # _LT_CMD_RELOAD
3069 # --------------
3070 # find reload flag for linker
3071 # -- PORTME Some linkers may need a different reload flag.
3072 m4_defun([_LT_CMD_RELOAD],
3073 [AC_CACHE_CHECK([for $LD option to reload object files],
3074 lt_cv_ld_reload_flag,
3075 [lt_cv_ld_reload_flag='-r'])
3076 reload_flag=$lt_cv_ld_reload_flag
3077 case $reload_flag in
3078 "" | " "*) ;;
3079 *) reload_flag=" $reload_flag" ;;
3080 esac
3081 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3082 case $host_os in
3083 cygwin* | mingw* | pw32* | cegcc*)
3084 if test "$GCC" != yes; then
3085 reload_cmds=false
3086 fi
3087 ;;
3088 darwin*)
3089 if test "$GCC" = yes; then
3090 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3091 else
3092 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3093 fi
3094 ;;
3095 esac
3096 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3097 _LT_TAGDECL([], [reload_cmds], [2])dnl
3098 ])# _LT_CMD_RELOAD
3099
3100
3101 # _LT_CHECK_MAGIC_METHOD
3102 # ----------------------
3103 # how to check for library dependencies
3104 # -- PORTME fill in with the dynamic library characteristics
3105 m4_defun([_LT_CHECK_MAGIC_METHOD],
3106 [m4_require([_LT_DECL_EGREP])
3107 m4_require([_LT_DECL_OBJDUMP])
3108 AC_CACHE_CHECK([how to recognize dependent libraries],
3109 lt_cv_deplibs_check_method,
3110 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3111 lt_cv_file_magic_test_file=
3112 lt_cv_deplibs_check_method='unknown'
3113 # Need to set the preceding variable on all platforms that support
3114 # interlibrary dependencies.
3115 # 'none' -- dependencies not supported.
3116 # `unknown' -- same as none, but documents that we really don't know.
3117 # 'pass_all' -- all dependencies passed with no checks.
3118 # 'test_compile' -- check by making test program.
3119 # 'file_magic [[regex]]' -- check by looking for files in library path
3120 # which responds to the $file_magic_cmd with a given extended regex.
3121 # If you have `file' or equivalent on your system and you're not sure
3122 # whether `pass_all' will *always* work, you probably want this one.
3123
3124 case $host_os in
3125 aix[[4-9]]*)
3126 lt_cv_deplibs_check_method=pass_all
3127 ;;
3128
3129 beos*)
3130 lt_cv_deplibs_check_method=pass_all
3131 ;;
3132
3133 bsdi[[45]]*)
3134 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3135 lt_cv_file_magic_cmd='/usr/bin/file -L'
3136 lt_cv_file_magic_test_file=/shlib/libc.so
3137 ;;
3138
3139 cygwin*)
3140 # func_win32_libid is a shell function defined in ltmain.sh
3141 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3142 lt_cv_file_magic_cmd='func_win32_libid'
3143 ;;
3144
3145 mingw* | pw32*)
3146 # Base MSYS/MinGW do not provide the 'file' command needed by
3147 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3148 # unless we find 'file', for example because we are cross-compiling.
3149 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3150 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3151 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3152 lt_cv_file_magic_cmd='func_win32_libid'
3153 else
3154 # Keep this pattern in sync with the one in func_win32_libid.
3155 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3156 lt_cv_file_magic_cmd='$OBJDUMP -f'
3157 fi
3158 ;;
3159
3160 cegcc*)
3161 # use the weaker test based on 'objdump'. See mingw*.
3162 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3163 lt_cv_file_magic_cmd='$OBJDUMP -f'
3164 ;;
3165
3166 darwin* | rhapsody*)
3167 lt_cv_deplibs_check_method=pass_all
3168 ;;
3169
3170 freebsd* | dragonfly*)
3171 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3172 case $host_cpu in
3173 i*86 )
3174 # Not sure whether the presence of OpenBSD here was a mistake.
3175 # Let's accept both of them until this is cleared up.
3176 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3177 lt_cv_file_magic_cmd=/usr/bin/file
3178 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3179 ;;
3180 esac
3181 else
3182 lt_cv_deplibs_check_method=pass_all
3183 fi
3184 ;;
3185
3186 gnu*)
3187 lt_cv_deplibs_check_method=pass_all
3188 ;;
3189
3190 haiku*)
3191 lt_cv_deplibs_check_method=pass_all
3192 ;;
3193
3194 hpux10.20* | hpux11*)
3195 lt_cv_file_magic_cmd=/usr/bin/file
3196 case $host_cpu in
3197 ia64*)
3198 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3199 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3200 ;;
3201 hppa*64*)
3202 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3203 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3204 ;;
3205 *)
3206 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3207 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3208 ;;
3209 esac
3210 ;;
3211
3212 interix[[3-9]]*)
3213 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3214 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3215 ;;
3216
3217 irix5* | irix6* | nonstopux*)
3218 case $LD in
3219 *-32|*"-32 ") libmagic=32-bit;;
3220 *-n32|*"-n32 ") libmagic=N32;;
3221 *-64|*"-64 ") libmagic=64-bit;;
3222 *) libmagic=never-match;;
3223 esac
3224 lt_cv_deplibs_check_method=pass_all
3225 ;;
3226
3227 # This must be Linux ELF.
3228 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3229 lt_cv_deplibs_check_method=pass_all
3230 ;;
3231
3232 netbsd*)
3233 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3234 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3235 else
3236 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3237 fi
3238 ;;
3239
3240 newos6*)
3241 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3242 lt_cv_file_magic_cmd=/usr/bin/file
3243 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3244 ;;
3245
3246 *nto* | *qnx*)
3247 lt_cv_deplibs_check_method=pass_all
3248 ;;
3249
3250 openbsd*)
3251 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3252 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3253 else
3254 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3255 fi
3256 ;;
3257
3258 osf3* | osf4* | osf5*)
3259 lt_cv_deplibs_check_method=pass_all
3260 ;;
3261
3262 rdos*)
3263 lt_cv_deplibs_check_method=pass_all
3264 ;;
3265
3266 solaris*)
3267 lt_cv_deplibs_check_method=pass_all
3268 ;;
3269
3270 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3271 lt_cv_deplibs_check_method=pass_all
3272 ;;
3273
3274 sysv4 | sysv4.3*)
3275 case $host_vendor in
3276 motorola)
3277 lt_cv_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]]'
3278 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3279 ;;
3280 ncr)
3281 lt_cv_deplibs_check_method=pass_all
3282 ;;
3283 sequent)
3284 lt_cv_file_magic_cmd='/bin/file'
3285 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3286 ;;
3287 sni)
3288 lt_cv_file_magic_cmd='/bin/file'
3289 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3290 lt_cv_file_magic_test_file=/lib/libc.so
3291 ;;
3292 siemens)
3293 lt_cv_deplibs_check_method=pass_all
3294 ;;
3295 pc)
3296 lt_cv_deplibs_check_method=pass_all
3297 ;;
3298 esac
3299 ;;
3300
3301 tpf*)
3302 lt_cv_deplibs_check_method=pass_all
3303 ;;
3304 esac
3305 ])
3306
3307 file_magic_glob=
3308 want_nocaseglob=no
3309 if test "$build" = "$host"; then
3310 case $host_os in
3311 mingw* | pw32*)
3312 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3313 want_nocaseglob=yes
3314 else
3315 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3316 fi
3317 ;;
3318 esac
3319 fi
3320
3321 file_magic_cmd=$lt_cv_file_magic_cmd
3322 deplibs_check_method=$lt_cv_deplibs_check_method
3323 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3324
3325 _LT_DECL([], [deplibs_check_method], [1],
3326 [Method to check whether dependent libraries are shared objects])
3327 _LT_DECL([], [file_magic_cmd], [1],
3328 [Command to use when deplibs_check_method = "file_magic"])
3329 _LT_DECL([], [file_magic_glob], [1],
3330 [How to find potential files when deplibs_check_method = "file_magic"])
3331 _LT_DECL([], [want_nocaseglob], [1],
3332 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3333 ])# _LT_CHECK_MAGIC_METHOD
3334
3335
3336 # LT_PATH_NM
3337 # ----------
3338 # find the pathname to a BSD- or MS-compatible name lister
3339 AC_DEFUN([LT_PATH_NM],
3340 [AC_REQUIRE([AC_PROG_CC])dnl
3341 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3342 [if test -n "$NM"; then
3343 # Let the user override the test.
3344 lt_cv_path_NM="$NM"
3345 else
3346 lt_nm_to_check="${ac_tool_prefix}nm"
3347 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3348 lt_nm_to_check="$lt_nm_to_check nm"
3349 fi
3350 for lt_tmp_nm in $lt_nm_to_check; do
3351 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3352 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3353 IFS="$lt_save_ifs"
3354 test -z "$ac_dir" && ac_dir=.
3355 tmp_nm="$ac_dir/$lt_tmp_nm"
3356 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3357 # Check to see if the nm accepts a BSD-compat flag.
3358 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3359 # nm: unknown option "B" ignored
3360 # Tru64's nm complains that /dev/null is an invalid object file
3361 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3362 */dev/null* | *'Invalid file or object type'*)
3363 lt_cv_path_NM="$tmp_nm -B"
3364 break
3365 ;;
3366 *)
3367 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3368 */dev/null*)
3369 lt_cv_path_NM="$tmp_nm -p"
3370 break
3371 ;;
3372 *)
3373 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3374 continue # so that we can try to find one that supports BSD flags
3375 ;;
3376 esac
3377 ;;
3378 esac
3379 fi
3380 done
3381 IFS="$lt_save_ifs"
3382 done
3383 : ${lt_cv_path_NM=no}
3384 fi])
3385 if test "$lt_cv_path_NM" != "no"; then
3386 NM="$lt_cv_path_NM"
3387 else
3388 # Didn't find any BSD compatible name lister, look for dumpbin.
3389 if test -n "$DUMPBIN"; then :
3390 # Let the user override the test.
3391 else
3392 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3393 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3394 *COFF*)
3395 DUMPBIN="$DUMPBIN -symbols"
3396 ;;
3397 *)
3398 DUMPBIN=:
3399 ;;
3400 esac
3401 fi
3402 AC_SUBST([DUMPBIN])
3403 if test "$DUMPBIN" != ":"; then
3404 NM="$DUMPBIN"
3405 fi
3406 fi
3407 test -z "$NM" && NM=nm
3408 AC_SUBST([NM])
3409 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3410
3411 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3412 [lt_cv_nm_interface="BSD nm"
3413 echo "int some_variable = 0;" > conftest.$ac_ext
3414 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3415 (eval "$ac_compile" 2>conftest.err)
3416 cat conftest.err >&AS_MESSAGE_LOG_FD
3417 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3418 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3419 cat conftest.err >&AS_MESSAGE_LOG_FD
3420 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3421 cat conftest.out >&AS_MESSAGE_LOG_FD
3422 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3423 lt_cv_nm_interface="MS dumpbin"
3424 fi
3425 rm -f conftest*])
3426 ])# LT_PATH_NM
3427
3428 # Old names:
3429 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3430 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3431 dnl aclocal-1.4 backwards compatibility:
3432 dnl AC_DEFUN([AM_PROG_NM], [])
3433 dnl AC_DEFUN([AC_PROG_NM], [])
3434
3435 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3436 # --------------------------------
3437 # how to determine the name of the shared library
3438 # associated with a specific link library.
3439 # -- PORTME fill in with the dynamic library characteristics
3440 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3441 [m4_require([_LT_DECL_EGREP])
3442 m4_require([_LT_DECL_OBJDUMP])
3443 m4_require([_LT_DECL_DLLTOOL])
3444 AC_CACHE_CHECK([how to associate runtime and link libraries],
3445 lt_cv_sharedlib_from_linklib_cmd,
3446 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3447
3448 case $host_os in
3449 cygwin* | mingw* | pw32* | cegcc*)
3450 # two different shell functions defined in ltmain.sh
3451 # decide which to use based on capabilities of $DLLTOOL
3452 case `$DLLTOOL --help 2>&1` in
3453 *--identify-strict*)
3454 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3455 ;;
3456 *)
3457 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3458 ;;
3459 esac
3460 ;;
3461 *)
3462 # fallback: assume linklib IS sharedlib
3463 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3464 ;;
3465 esac
3466 ])
3467 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3468 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3469
3470 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3471 [Command to associate shared and link libraries])
3472 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3473
3474
3475 # _LT_PATH_MANIFEST_TOOL
3476 # ----------------------
3477 # locate the manifest tool
3478 m4_defun([_LT_PATH_MANIFEST_TOOL],
3479 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3480 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3481 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3482 [lt_cv_path_mainfest_tool=no
3483 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3484 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3485 cat conftest.err >&AS_MESSAGE_LOG_FD
3486 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3487 lt_cv_path_mainfest_tool=yes
3488 fi
3489 rm -f conftest*])
3490 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3491 MANIFEST_TOOL=:
3492 fi
3493 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3494 ])# _LT_PATH_MANIFEST_TOOL
3495
3496
3497 # LT_LIB_M
3498 # --------
3499 # check for math library
3500 AC_DEFUN([LT_LIB_M],
3501 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3502 LIBM=
3503 case $host in
3504 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3505 # These system don't have libm, or don't need it
3506 ;;
3507 *-ncr-sysv4.3*)
3508 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3509 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3510 ;;
3511 *)
3512 AC_CHECK_LIB(m, cos, LIBM="-lm")
3513 ;;
3514 esac
3515 AC_SUBST([LIBM])
3516 ])# LT_LIB_M
3517
3518 # Old name:
3519 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3520 dnl aclocal-1.4 backwards compatibility:
3521 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3522
3523
3524 # _LT_COMPILER_NO_RTTI([TAGNAME])
3525 # -------------------------------
3526 m4_defun([_LT_COMPILER_NO_RTTI],
3527 [m4_require([_LT_TAG_COMPILER])dnl
3528
3529 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3530
3531 if test "$GCC" = yes; then
3532 case $cc_basename in
3533 nvcc*)
3534 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3535 *)
3536 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3537 esac
3538
3539 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3540 lt_cv_prog_compiler_rtti_exceptions,
3541 [-fno-rtti -fno-exceptions], [],
3542 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3543 fi
3544 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3545 [Compiler flag to turn off builtin functions])
3546 ])# _LT_COMPILER_NO_RTTI
3547
3548
3549 # _LT_CMD_GLOBAL_SYMBOLS
3550 # ----------------------
3551 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3552 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3553 AC_REQUIRE([AC_PROG_CC])dnl
3554 AC_REQUIRE([AC_PROG_AWK])dnl
3555 AC_REQUIRE([LT_PATH_NM])dnl
3556 AC_REQUIRE([LT_PATH_LD])dnl
3557 m4_require([_LT_DECL_SED])dnl
3558 m4_require([_LT_DECL_EGREP])dnl
3559 m4_require([_LT_TAG_COMPILER])dnl
3560
3561 # Check for command to grab the raw symbol name followed by C symbol from nm.
3562 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3563 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3564 [
3565 # These are sane defaults that work on at least a few old systems.
3566 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3567
3568 # Character class describing NM global symbol codes.
3569 symcode='[[BCDEGRST]]'
3570
3571 # Regexp to match symbols that can be accessed directly from C.
3572 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3573
3574 # Define system-specific variables.
3575 case $host_os in
3576 aix*)
3577 symcode='[[BCDT]]'
3578 ;;
3579 cygwin* | mingw* | pw32* | cegcc*)
3580 symcode='[[ABCDGISTW]]'
3581 ;;
3582 hpux*)
3583 if test "$host_cpu" = ia64; then
3584 symcode='[[ABCDEGRST]]'
3585 fi
3586 ;;
3587 irix* | nonstopux*)
3588 symcode='[[BCDEGRST]]'
3589 ;;
3590 osf*)
3591 symcode='[[BCDEGQRST]]'
3592 ;;
3593 solaris*)
3594 symcode='[[BDRT]]'
3595 ;;
3596 sco3.2v5*)
3597 symcode='[[DT]]'
3598 ;;
3599 sysv4.2uw2*)
3600 symcode='[[DT]]'
3601 ;;
3602 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3603 symcode='[[ABDT]]'
3604 ;;
3605 sysv4)
3606 symcode='[[DFNSTU]]'
3607 ;;
3608 esac
3609
3610 # If we're using GNU nm, then use its standard symbol codes.
3611 case `$NM -V 2>&1` in
3612 *GNU* | *'with BFD'*)
3613 symcode='[[ABCDGIRSTW]]' ;;
3614 esac
3615
3616 # Transform an extracted symbol line into a proper C declaration.
3617 # Some systems (esp. on ia64) link data and code symbols differently,
3618 # so use this general approach.
3619 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3620
3621 # Transform an extracted symbol line into symbol name and symbol address
3622 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3623 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3624
3625 # Handle CRLF in mingw tool chain
3626 opt_cr=
3627 case $build_os in
3628 mingw*)
3629 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3630 ;;
3631 esac
3632
3633 # Try without a prefix underscore, then with it.
3634 for ac_symprfx in "" "_"; do
3635
3636 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3637 symxfrm="\\1 $ac_symprfx\\2 \\2"
3638
3639 # Write the raw and C identifiers.
3640 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3641 # Fake it for dumpbin and say T for any non-static function
3642 # and D for any global variable.
3643 # Also find C++ and __fastcall symbols from MSVC++,
3644 # which start with @ or ?.
3645 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3646 " {last_section=section; section=\$ 3};"\
3647 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3648 " \$ 0!~/External *\|/{next};"\
3649 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3650 " {if(hide[section]) next};"\
3651 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3652 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3653 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3654 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3655 " ' prfx=^$ac_symprfx]"
3656 else
3657 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3658 fi
3659 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3660
3661 # Check to see that the pipe works correctly.
3662 pipe_works=no
3663
3664 rm -f conftest*
3665 cat > conftest.$ac_ext <<_LT_EOF
3666 #ifdef __cplusplus
3667 extern "C" {
3668 #endif
3669 char nm_test_var;
3670 void nm_test_func(void);
3671 void nm_test_func(void){}
3672 #ifdef __cplusplus
3673 }
3674 #endif
3675 int main(){nm_test_var='a';nm_test_func();return(0);}
3676 _LT_EOF
3677
3678 if AC_TRY_EVAL(ac_compile); then
3679 # Now try to grab the symbols.
3680 nlist=conftest.nm
3681 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3682 # Try sorting and uniquifying the output.
3683 if sort "$nlist" | uniq > "$nlist"T; then
3684 mv -f "$nlist"T "$nlist"
3685 else
3686 rm -f "$nlist"T
3687 fi
3688
3689 # Make sure that we snagged all the symbols we need.
3690 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3691 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3692 cat <<_LT_EOF > conftest.$ac_ext
3693 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3694 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3695 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3696 relocations are performed -- see ld's documentation on pseudo-relocs. */
3697 # define LT@&t@_DLSYM_CONST
3698 #elif defined(__osf__)
3699 /* This system does not cope well with relocations in const data. */
3700 # define LT@&t@_DLSYM_CONST
3701 #else
3702 # define LT@&t@_DLSYM_CONST const
3703 #endif
3704
3705 #ifdef __cplusplus
3706 extern "C" {
3707 #endif
3708
3709 _LT_EOF
3710 # Now generate the symbol file.
3711 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3712
3713 cat <<_LT_EOF >> conftest.$ac_ext
3714
3715 /* The mapping between symbol names and symbols. */
3716 LT@&t@_DLSYM_CONST struct {
3717 const char *name;
3718 void *address;
3719 }
3720 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3721 {
3722 { "@PROGRAM@", (void *) 0 },
3723 _LT_EOF
3724 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3725 cat <<\_LT_EOF >> conftest.$ac_ext
3726 {0, (void *) 0}
3727 };
3728
3729 /* This works around a problem in FreeBSD linker */
3730 #ifdef FREEBSD_WORKAROUND
3731 static const void *lt_preloaded_setup() {
3732 return lt__PROGRAM__LTX_preloaded_symbols;
3733 }
3734 #endif
3735
3736 #ifdef __cplusplus
3737 }
3738 #endif
3739 _LT_EOF
3740 # Now try linking the two files.
3741 mv conftest.$ac_objext conftstm.$ac_objext
3742 lt_globsym_save_LIBS=$LIBS
3743 lt_globsym_save_CFLAGS=$CFLAGS
3744 LIBS="conftstm.$ac_objext"
3745 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3746 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3747 pipe_works=yes
3748 fi
3749 LIBS=$lt_globsym_save_LIBS
3750 CFLAGS=$lt_globsym_save_CFLAGS
3751 else
3752 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3753 fi
3754 else
3755 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3756 fi
3757 else
3758 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3759 fi
3760 else
3761 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3762 cat conftest.$ac_ext >&5
3763 fi
3764 rm -rf conftest* conftst*
3765
3766 # Do not use the global_symbol_pipe unless it works.
3767 if test "$pipe_works" = yes; then
3768 break
3769 else
3770 lt_cv_sys_global_symbol_pipe=
3771 fi
3772 done
3773 ])
3774 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3775 lt_cv_sys_global_symbol_to_cdecl=
3776 fi
3777 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3778 AC_MSG_RESULT(failed)
3779 else
3780 AC_MSG_RESULT(ok)
3781 fi
3782
3783 # Response file support.
3784 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3785 nm_file_list_spec='@'
3786 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3787 nm_file_list_spec='@'
3788 fi
3789
3790 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3791 [Take the output of nm and produce a listing of raw symbols and C names])
3792 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3793 [Transform the output of nm in a proper C declaration])
3794 _LT_DECL([global_symbol_to_c_name_address],
3795 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3796 [Transform the output of nm in a C name address pair])
3797 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3798 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3799 [Transform the output of nm in a C name address pair when lib prefix is needed])
3800 _LT_DECL([], [nm_file_list_spec], [1],
3801 [Specify filename containing input files for $NM])
3802 ]) # _LT_CMD_GLOBAL_SYMBOLS
3803
3804
3805 # _LT_COMPILER_PIC([TAGNAME])
3806 # ---------------------------
3807 m4_defun([_LT_COMPILER_PIC],
3808 [m4_require([_LT_TAG_COMPILER])dnl
3809 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3810 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3811 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3812
3813 m4_if([$1], [CXX], [
3814 # C++ specific cases for pic, static, wl, etc.
3815 if test "$GXX" = yes; then
3816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3817 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3818
3819 case $host_os in
3820 aix*)
3821 # All AIX code is PIC.
3822 if test "$host_cpu" = ia64; then
3823 # AIX 5 now supports IA64 processor
3824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3825 fi
3826 ;;
3827
3828 amigaos*)
3829 case $host_cpu in
3830 powerpc)
3831 # see comment about AmigaOS4 .so support
3832 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3833 ;;
3834 m68k)
3835 # FIXME: we need at least 68020 code to build shared libraries, but
3836 # adding the `-m68020' flag to GCC prevents building anything better,
3837 # like `-m68040'.
3838 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3839 ;;
3840 esac
3841 ;;
3842
3843 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3844 # PIC is the default for these OSes.
3845 ;;
3846 mingw* | cygwin* | os2* | pw32* | cegcc*)
3847 # This hack is so that the source file can tell whether it is being
3848 # built for inclusion in a dll (and should export symbols for example).
3849 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3850 # (--disable-auto-import) libraries
3851 m4_if([$1], [GCJ], [],
3852 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3853 ;;
3854 darwin* | rhapsody*)
3855 # PIC is the default on this platform
3856 # Common symbols not allowed in MH_DYLIB files
3857 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3858 ;;
3859 *djgpp*)
3860 # DJGPP does not support shared libraries at all
3861 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3862 ;;
3863 haiku*)
3864 # PIC is the default for Haiku.
3865 # The "-static" flag exists, but is broken.
3866 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3867 ;;
3868 interix[[3-9]]*)
3869 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3870 # Instead, we relocate shared libraries at runtime.
3871 ;;
3872 sysv4*MP*)
3873 if test -d /usr/nec; then
3874 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3875 fi
3876 ;;
3877 hpux*)
3878 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3879 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3880 # sets the default TLS model and affects inlining.
3881 case $host_cpu in
3882 hppa*64*)
3883 ;;
3884 *)
3885 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3886 ;;
3887 esac
3888 ;;
3889 *qnx* | *nto*)
3890 # QNX uses GNU C++, but need to define -shared option too, otherwise
3891 # it will coredump.
3892 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3893 ;;
3894 *)
3895 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3896 ;;
3897 esac
3898 else
3899 case $host_os in
3900 aix[[4-9]]*)
3901 # All AIX code is PIC.
3902 if test "$host_cpu" = ia64; then
3903 # AIX 5 now supports IA64 processor
3904 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3905 else
3906 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3907 fi
3908 ;;
3909 chorus*)
3910 case $cc_basename in
3911 cxch68*)
3912 # Green Hills C++ Compiler
3913 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3914 ;;
3915 esac
3916 ;;
3917 mingw* | cygwin* | os2* | pw32* | cegcc*)
3918 # This hack is so that the source file can tell whether it is being
3919 # built for inclusion in a dll (and should export symbols for example).
3920 m4_if([$1], [GCJ], [],
3921 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3922 ;;
3923 dgux*)
3924 case $cc_basename in
3925 ec++*)
3926 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3927 ;;
3928 ghcx*)
3929 # Green Hills C++ Compiler
3930 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3931 ;;
3932 *)
3933 ;;
3934 esac
3935 ;;
3936 freebsd* | dragonfly*)
3937 # FreeBSD uses GNU C++
3938 ;;
3939 hpux9* | hpux10* | hpux11*)
3940 case $cc_basename in
3941 CC*)
3942 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3943 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3944 if test "$host_cpu" != ia64; then
3945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3946 fi
3947 ;;
3948 aCC*)
3949 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3950 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3951 case $host_cpu in
3952 hppa*64*|ia64*)
3953 # +Z the default
3954 ;;
3955 *)
3956 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3957 ;;
3958 esac
3959 ;;
3960 *)
3961 ;;
3962 esac
3963 ;;
3964 interix*)
3965 # This is c89, which is MS Visual C++ (no shared libs)
3966 # Anyone wants to do a port?
3967 ;;
3968 irix5* | irix6* | nonstopux*)
3969 case $cc_basename in
3970 CC*)
3971 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3972 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3973 # CC pic flag -KPIC is the default.
3974 ;;
3975 *)
3976 ;;
3977 esac
3978 ;;
3979 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3980 case $cc_basename in
3981 KCC*)
3982 # KAI C++ Compiler
3983 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3984 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3985 ;;
3986 ecpc* )
3987 # old Intel C++ for x86_64 which still supported -KPIC.
3988 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3989 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3990 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3991 ;;
3992 icpc* )
3993 # Intel C++, used to be incompatible with GCC.
3994 # ICC 10 doesn't accept -KPIC any more.
3995 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3996 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3997 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3998 ;;
3999 pgCC* | pgcpp*)
4000 # Portland Group C++ compiler
4001 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4002 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4003 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4004 ;;
4005 cxx*)
4006 # Compaq C++
4007 # Make sure the PIC flag is empty. It appears that all Alpha
4008 # Linux and Compaq Tru64 Unix objects are PIC.
4009 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4010 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4011 ;;
4012 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4013 # IBM XL 8.0, 9.0 on PPC and BlueGene
4014 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4015 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4016 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4017 ;;
4018 *)
4019 case `$CC -V 2>&1 | sed 5q` in
4020 *Sun\ C*)
4021 # Sun C++ 5.9
4022 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4023 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4024 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4025 ;;
4026 esac
4027 ;;
4028 esac
4029 ;;
4030 lynxos*)
4031 ;;
4032 m88k*)
4033 ;;
4034 mvs*)
4035 case $cc_basename in
4036 cxx*)
4037 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4038 ;;
4039 *)
4040 ;;
4041 esac
4042 ;;
4043 netbsd*)
4044 ;;
4045 *qnx* | *nto*)
4046 # QNX uses GNU C++, but need to define -shared option too, otherwise
4047 # it will coredump.
4048 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4049 ;;
4050 osf3* | osf4* | osf5*)
4051 case $cc_basename in
4052 KCC*)
4053 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4054 ;;
4055 RCC*)
4056 # Rational C++ 2.4.1
4057 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4058 ;;
4059 cxx*)
4060 # Digital/Compaq C++
4061 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4062 # Make sure the PIC flag is empty. It appears that all Alpha
4063 # Linux and Compaq Tru64 Unix objects are PIC.
4064 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4065 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4066 ;;
4067 *)
4068 ;;
4069 esac
4070 ;;
4071 psos*)
4072 ;;
4073 solaris*)
4074 case $cc_basename in
4075 CC* | sunCC*)
4076 # Sun C++ 4.2, 5.x and Centerline C++
4077 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4078 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4079 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4080 ;;
4081 gcx*)
4082 # Green Hills C++ Compiler
4083 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4084 ;;
4085 *)
4086 ;;
4087 esac
4088 ;;
4089 sunos4*)
4090 case $cc_basename in
4091 CC*)
4092 # Sun C++ 4.x
4093 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4094 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4095 ;;
4096 lcc*)
4097 # Lucid
4098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4099 ;;
4100 *)
4101 ;;
4102 esac
4103 ;;
4104 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4105 case $cc_basename in
4106 CC*)
4107 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4108 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4109 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4110 ;;
4111 esac
4112 ;;
4113 tandem*)
4114 case $cc_basename in
4115 NCC*)
4116 # NonStop-UX NCC 3.20
4117 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4118 ;;
4119 *)
4120 ;;
4121 esac
4122 ;;
4123 vxworks*)
4124 ;;
4125 *)
4126 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4127 ;;
4128 esac
4129 fi
4130 ],
4131 [
4132 if test "$GCC" = yes; then
4133 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4134 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4135
4136 case $host_os in
4137 aix*)
4138 # All AIX code is PIC.
4139 if test "$host_cpu" = ia64; then
4140 # AIX 5 now supports IA64 processor
4141 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4142 fi
4143 ;;
4144
4145 amigaos*)
4146 case $host_cpu in
4147 powerpc)
4148 # see comment about AmigaOS4 .so support
4149 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4150 ;;
4151 m68k)
4152 # FIXME: we need at least 68020 code to build shared libraries, but
4153 # adding the `-m68020' flag to GCC prevents building anything better,
4154 # like `-m68040'.
4155 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4156 ;;
4157 esac
4158 ;;
4159
4160 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4161 # PIC is the default for these OSes.
4162 ;;
4163
4164 mingw* | cygwin* | pw32* | os2* | cegcc*)
4165 # This hack is so that the source file can tell whether it is being
4166 # built for inclusion in a dll (and should export symbols for example).
4167 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4168 # (--disable-auto-import) libraries
4169 m4_if([$1], [GCJ], [],
4170 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4171 ;;
4172
4173 darwin* | rhapsody*)
4174 # PIC is the default on this platform
4175 # Common symbols not allowed in MH_DYLIB files
4176 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4177 ;;
4178
4179 haiku*)
4180 # PIC is the default for Haiku.
4181 # The "-static" flag exists, but is broken.
4182 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4183 ;;
4184
4185 hpux*)
4186 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4187 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4188 # sets the default TLS model and affects inlining.
4189 case $host_cpu in
4190 hppa*64*)
4191 # +Z the default
4192 ;;
4193 *)
4194 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4195 ;;
4196 esac
4197 ;;
4198
4199 interix[[3-9]]*)
4200 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4201 # Instead, we relocate shared libraries at runtime.
4202 ;;
4203
4204 msdosdjgpp*)
4205 # Just because we use GCC doesn't mean we suddenly get shared libraries
4206 # on systems that don't support them.
4207 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4208 enable_shared=no
4209 ;;
4210
4211 *nto* | *qnx*)
4212 # QNX uses GNU C++, but need to define -shared option too, otherwise
4213 # it will coredump.
4214 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4215 ;;
4216
4217 sysv4*MP*)
4218 if test -d /usr/nec; then
4219 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4220 fi
4221 ;;
4222
4223 *)
4224 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4225 ;;
4226 esac
4227
4228 case $cc_basename in
4229 nvcc*) # Cuda Compiler Driver 2.2
4230 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4231 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
4232 ;;
4233 esac
4234 else
4235 # PORTME Check for flag to pass linker flags through the system compiler.
4236 case $host_os in
4237 aix*)
4238 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4239 if test "$host_cpu" = ia64; then
4240 # AIX 5 now supports IA64 processor
4241 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4242 else
4243 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4244 fi
4245 ;;
4246
4247 mingw* | cygwin* | pw32* | os2* | cegcc*)
4248 # This hack is so that the source file can tell whether it is being
4249 # built for inclusion in a dll (and should export symbols for example).
4250 m4_if([$1], [GCJ], [],
4251 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4252 ;;
4253
4254 hpux9* | hpux10* | hpux11*)
4255 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4256 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4257 # not for PA HP-UX.
4258 case $host_cpu in
4259 hppa*64*|ia64*)
4260 # +Z the default
4261 ;;
4262 *)
4263 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4264 ;;
4265 esac
4266 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4267 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4268 ;;
4269
4270 irix5* | irix6* | nonstopux*)
4271 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4272 # PIC (with -KPIC) is the default.
4273 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4274 ;;
4275
4276 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4277 case $cc_basename in
4278 # old Intel for x86_64 which still supported -KPIC.
4279 ecc*)
4280 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4281 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4282 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4283 ;;
4284 # icc used to be incompatible with GCC.
4285 # ICC 10 doesn't accept -KPIC any more.
4286 icc* | ifort*)
4287 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4288 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4289 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4290 ;;
4291 # Lahey Fortran 8.1.
4292 lf95*)
4293 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4294 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4295 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4296 ;;
4297 nagfor*)
4298 # NAG Fortran compiler
4299 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4300 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4302 ;;
4303 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4304 # Portland Group compilers (*not* the Pentium gcc compiler,
4305 # which looks to be a dead project)
4306 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4307 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4308 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4309 ;;
4310 ccc*)
4311 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4312 # All Alpha code is PIC.
4313 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4314 ;;
4315 xl* | bgxl* | bgf* | mpixl*)
4316 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4317 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4318 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4319 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4320 ;;
4321 *)
4322 case `$CC -V 2>&1 | sed 5q` in
4323 *Sun\ F* | *Sun*Fortran*)
4324 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4326 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4327 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4328 ;;
4329 *Sun\ C*)
4330 # Sun C 5.9
4331 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4332 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4333 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4334 ;;
4335 esac
4336 ;;
4337 esac
4338 ;;
4339
4340 newsos6)
4341 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4342 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4343 ;;
4344
4345 *nto* | *qnx*)
4346 # QNX uses GNU C++, but need to define -shared option too, otherwise
4347 # it will coredump.
4348 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4349 ;;
4350
4351 osf3* | osf4* | osf5*)
4352 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4353 # All OSF/1 code is PIC.
4354 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4355 ;;
4356
4357 rdos*)
4358 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4359 ;;
4360
4361 solaris*)
4362 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4363 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4364 case $cc_basename in
4365 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4367 *)
4368 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4369 esac
4370 ;;
4371
4372 sunos4*)
4373 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4374 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4375 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4376 ;;
4377
4378 sysv4 | sysv4.2uw2* | sysv4.3*)
4379 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4380 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4381 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4382 ;;
4383
4384 sysv4*MP*)
4385 if test -d /usr/nec ;then
4386 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4387 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4388 fi
4389 ;;
4390
4391 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4392 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4394 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4395 ;;
4396
4397 unicos*)
4398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4399 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4400 ;;
4401
4402 uts4*)
4403 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4404 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4405 ;;
4406
4407 *)
4408 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4409 ;;
4410 esac
4411 fi
4412 ])
4413 case $host_os in
4414 # For platforms which do not support PIC, -DPIC is meaningless:
4415 *djgpp*)
4416 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4417 ;;
4418 *)
4419 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4420 ;;
4421 esac
4422
4423 AC_CACHE_CHECK([for $compiler option to produce PIC],
4424 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4425 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4426 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4427
4428 #
4429 # Check to make sure the PIC flag actually works.
4430 #
4431 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4432 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4433 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4434 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4435 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4436 "" | " "*) ;;
4437 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4438 esac],
4439 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4440 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4441 fi
4442 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4443 [Additional compiler flags for building library objects])
4444
4445 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4446 [How to pass a linker flag through the compiler])
4447 #
4448 # Check to make sure the static flag actually works.
4449 #
4450 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4451 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4452 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4453 $lt_tmp_static_flag,
4454 [],
4455 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4456 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4457 [Compiler flag to prevent dynamic linking])
4458 ])# _LT_COMPILER_PIC
4459
4460
4461 # _LT_LINKER_SHLIBS([TAGNAME])
4462 # ----------------------------
4463 # See if the linker supports building shared libraries.
4464 m4_defun([_LT_LINKER_SHLIBS],
4465 [AC_REQUIRE([LT_PATH_LD])dnl
4466 AC_REQUIRE([LT_PATH_NM])dnl
4467 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4468 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4469 m4_require([_LT_DECL_EGREP])dnl
4470 m4_require([_LT_DECL_SED])dnl
4471 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4472 m4_require([_LT_TAG_COMPILER])dnl
4473 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4474 m4_if([$1], [CXX], [
4475 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4476 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4477 case $host_os in
4478 aix[[4-9]]*)
4479 # If we're using GNU nm, then we don't want the "-C" option.
4480 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4481 # Also, AIX nm treats weak defined symbols like other global defined
4482 # symbols, whereas GNU nm marks them as "W".
4483 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4484 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4485 else
4486 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4487 fi
4488 ;;
4489 pw32*)
4490 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4491 ;;
4492 cygwin* | mingw* | cegcc*)
4493 case $cc_basename in
4494 cl*) ;;
4495 *)
4496 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4497 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4498 ;;
4499 esac
4500 ;;
4501 *)
4502 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4503 ;;
4504 esac
4505 ], [
4506 runpath_var=
4507 _LT_TAGVAR(allow_undefined_flag, $1)=
4508 _LT_TAGVAR(always_export_symbols, $1)=no
4509 _LT_TAGVAR(archive_cmds, $1)=
4510 _LT_TAGVAR(archive_expsym_cmds, $1)=
4511 _LT_TAGVAR(compiler_needs_object, $1)=no
4512 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4513 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4514 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4515 _LT_TAGVAR(hardcode_automatic, $1)=no
4516 _LT_TAGVAR(hardcode_direct, $1)=no
4517 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4518 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4519 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4520 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4521 _LT_TAGVAR(hardcode_minus_L, $1)=no
4522 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4523 _LT_TAGVAR(inherit_rpath, $1)=no
4524 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4525 _LT_TAGVAR(module_cmds, $1)=
4526 _LT_TAGVAR(module_expsym_cmds, $1)=
4527 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4528 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4529 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4530 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4531 # include_expsyms should be a list of space-separated symbols to be *always*
4532 # included in the symbol list
4533 _LT_TAGVAR(include_expsyms, $1)=
4534 # exclude_expsyms can be an extended regexp of symbols to exclude
4535 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4536 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4537 # as well as any symbol that contains `d'.
4538 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4539 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4540 # platforms (ab)use it in PIC code, but their linkers get confused if
4541 # the symbol is explicitly referenced. Since portable code cannot
4542 # rely on this symbol name, it's probably fine to never include it in
4543 # preloaded symbol tables.
4544 # Exclude shared library initialization/finalization symbols.
4545 dnl Note also adjust exclude_expsyms for C++ above.
4546 extract_expsyms_cmds=
4547
4548 case $host_os in
4549 cygwin* | mingw* | pw32* | cegcc*)
4550 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4551 # When not using gcc, we currently assume that we are using
4552 # Microsoft Visual C++.
4553 if test "$GCC" != yes; then
4554 with_gnu_ld=no
4555 fi
4556 ;;
4557 interix*)
4558 # we just hope/assume this is gcc and not c89 (= MSVC++)
4559 with_gnu_ld=yes
4560 ;;
4561 openbsd*)
4562 with_gnu_ld=no
4563 ;;
4564 esac
4565
4566 _LT_TAGVAR(ld_shlibs, $1)=yes
4567
4568 # On some targets, GNU ld is compatible enough with the native linker
4569 # that we're better off using the native interface for both.
4570 lt_use_gnu_ld_interface=no
4571 if test "$with_gnu_ld" = yes; then
4572 case $host_os in
4573 aix*)
4574 # The AIX port of GNU ld has always aspired to compatibility
4575 # with the native linker. However, as the warning in the GNU ld
4576 # block says, versions before 2.19.5* couldn't really create working
4577 # shared libraries, regardless of the interface used.
4578 case `$LD -v 2>&1` in
4579 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4580 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4581 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4582 *)
4583 lt_use_gnu_ld_interface=yes
4584 ;;
4585 esac
4586 ;;
4587 *)
4588 lt_use_gnu_ld_interface=yes
4589 ;;
4590 esac
4591 fi
4592
4593 if test "$lt_use_gnu_ld_interface" = yes; then
4594 # If archive_cmds runs LD, not CC, wlarc should be empty
4595 wlarc='${wl}'
4596
4597 # Set some defaults for GNU ld with shared library support. These
4598 # are reset later if shared libraries are not supported. Putting them
4599 # here allows them to be overridden if necessary.
4600 runpath_var=LD_RUN_PATH
4601 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4602 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4603 # ancient GNU ld didn't support --whole-archive et. al.
4604 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4605 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4606 else
4607 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4608 fi
4609 supports_anon_versioning=no
4610 case `$LD -v 2>&1` in
4611 *GNU\ gold*) supports_anon_versioning=yes ;;
4612 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4613 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4614 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4615 *\ 2.11.*) ;; # other 2.11 versions
4616 *) supports_anon_versioning=yes ;;
4617 esac
4618
4619 # See if GNU ld supports shared libraries.
4620 case $host_os in
4621 aix[[3-9]]*)
4622 # On AIX/PPC, the GNU linker is very broken
4623 if test "$host_cpu" != ia64; then
4624 _LT_TAGVAR(ld_shlibs, $1)=no
4625 cat <<_LT_EOF 1>&2
4626
4627 *** Warning: the GNU linker, at least up to release 2.19, is reported
4628 *** to be unable to reliably create shared libraries on AIX.
4629 *** Therefore, libtool is disabling shared libraries support. If you
4630 *** really care for shared libraries, you may want to install binutils
4631 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4632 *** You will then need to restart the configuration process.
4633
4634 _LT_EOF
4635 fi
4636 ;;
4637
4638 amigaos*)
4639 case $host_cpu in
4640 powerpc)
4641 # see comment about AmigaOS4 .so support
4642 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4643 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4644 ;;
4645 m68k)
4646 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4648 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4649 ;;
4650 esac
4651 ;;
4652
4653 beos*)
4654 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4655 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4656 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4657 # support --undefined. This deserves some investigation. FIXME
4658 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4659 else
4660 _LT_TAGVAR(ld_shlibs, $1)=no
4661 fi
4662 ;;
4663
4664 cygwin* | mingw* | pw32* | cegcc*)
4665 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4666 # as there is no search path for DLLs.
4667 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4668 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4669 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4670 _LT_TAGVAR(always_export_symbols, $1)=no
4671 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4672 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4673 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4674
4675 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4676 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4677 # If the export-symbols file already is a .def file (1st line
4678 # is EXPORTS), use it as is; otherwise, prepend...
4679 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4680 cp $export_symbols $output_objdir/$soname.def;
4681 else
4682 echo EXPORTS > $output_objdir/$soname.def;
4683 cat $export_symbols >> $output_objdir/$soname.def;
4684 fi~
4685 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4686 else
4687 _LT_TAGVAR(ld_shlibs, $1)=no
4688 fi
4689 ;;
4690
4691 haiku*)
4692 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4693 _LT_TAGVAR(link_all_deplibs, $1)=yes
4694 ;;
4695
4696 interix[[3-9]]*)
4697 _LT_TAGVAR(hardcode_direct, $1)=no
4698 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4700 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4701 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4702 # Instead, shared libraries are loaded at an image base (0x10000000 by
4703 # default) and relocated if they conflict, which is a slow very memory
4704 # consuming and fragmenting process. To avoid this, we pick a random,
4705 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4706 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4707 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4708 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4709 ;;
4710
4711 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4712 tmp_diet=no
4713 if test "$host_os" = linux-dietlibc; then
4714 case $cc_basename in
4715 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4716 esac
4717 fi
4718 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4719 && test "$tmp_diet" = no
4720 then
4721 tmp_addflag=' $pic_flag'
4722 tmp_sharedflag='-shared'
4723 case $cc_basename,$host_cpu in
4724 pgcc*) # Portland Group C compiler
4725 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4726 tmp_addflag=' $pic_flag'
4727 ;;
4728 pgf77* | pgf90* | pgf95* | pgfortran*)
4729 # Portland Group f77 and f90 compilers
4730 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4731 tmp_addflag=' $pic_flag -Mnomain' ;;
4732 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4733 tmp_addflag=' -i_dynamic' ;;
4734 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4735 tmp_addflag=' -i_dynamic -nofor_main' ;;
4736 ifc* | ifort*) # Intel Fortran compiler
4737 tmp_addflag=' -nofor_main' ;;
4738 lf95*) # Lahey Fortran 8.1
4739 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4740 tmp_sharedflag='--shared' ;;
4741 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4742 tmp_sharedflag='-qmkshrobj'
4743 tmp_addflag= ;;
4744 nvcc*) # Cuda Compiler Driver 2.2
4745 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4746 _LT_TAGVAR(compiler_needs_object, $1)=yes
4747 ;;
4748 esac
4749 case `$CC -V 2>&1 | sed 5q` in
4750 *Sun\ C*) # Sun C 5.9
4751 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4752 _LT_TAGVAR(compiler_needs_object, $1)=yes
4753 tmp_sharedflag='-G' ;;
4754 *Sun\ F*) # Sun Fortran 8.3
4755 tmp_sharedflag='-G' ;;
4756 esac
4757 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4758
4759 if test "x$supports_anon_versioning" = xyes; then
4760 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4761 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4762 echo "local: *; };" >> $output_objdir/$libname.ver~
4763 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4764 fi
4765
4766 case $cc_basename in
4767 xlf* | bgf* | bgxlf* | mpixlf*)
4768 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4769 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4770 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4771 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4772 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4773 if test "x$supports_anon_versioning" = xyes; then
4774 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4775 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4776 echo "local: *; };" >> $output_objdir/$libname.ver~
4777 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4778 fi
4779 ;;
4780 esac
4781 else
4782 _LT_TAGVAR(ld_shlibs, $1)=no
4783 fi
4784 ;;
4785
4786 netbsd*)
4787 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4788 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4789 wlarc=
4790 else
4791 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4792 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4793 fi
4794 ;;
4795
4796 solaris*)
4797 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4798 _LT_TAGVAR(ld_shlibs, $1)=no
4799 cat <<_LT_EOF 1>&2
4800
4801 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4802 *** create shared libraries on Solaris systems. Therefore, libtool
4803 *** is disabling shared libraries support. We urge you to upgrade GNU
4804 *** binutils to release 2.9.1 or newer. Another option is to modify
4805 *** your PATH or compiler configuration so that the native linker is
4806 *** used, and then restart.
4807
4808 _LT_EOF
4809 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4811 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4812 else
4813 _LT_TAGVAR(ld_shlibs, $1)=no
4814 fi
4815 ;;
4816
4817 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4818 case `$LD -v 2>&1` in
4819 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4820 _LT_TAGVAR(ld_shlibs, $1)=no
4821 cat <<_LT_EOF 1>&2
4822
4823 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4824 *** reliably create shared libraries on SCO systems. Therefore, libtool
4825 *** is disabling shared libraries support. We urge you to upgrade GNU
4826 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4827 *** your PATH or compiler configuration so that the native linker is
4828 *** used, and then restart.
4829
4830 _LT_EOF
4831 ;;
4832 *)
4833 # For security reasons, it is highly recommended that you always
4834 # use absolute paths for naming shared libraries, and exclude the
4835 # DT_RUNPATH tag from executables and libraries. But doing so
4836 # requires that you compile everything twice, which is a pain.
4837 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4838 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4839 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4840 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4841 else
4842 _LT_TAGVAR(ld_shlibs, $1)=no
4843 fi
4844 ;;
4845 esac
4846 ;;
4847
4848 sunos4*)
4849 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4850 wlarc=
4851 _LT_TAGVAR(hardcode_direct, $1)=yes
4852 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4853 ;;
4854
4855 *)
4856 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4857 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4858 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4859 else
4860 _LT_TAGVAR(ld_shlibs, $1)=no
4861 fi
4862 ;;
4863 esac
4864
4865 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4866 runpath_var=
4867 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4868 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4869 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4870 fi
4871 else
4872 # PORTME fill in a description of your system's linker (not GNU ld)
4873 case $host_os in
4874 aix3*)
4875 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4876 _LT_TAGVAR(always_export_symbols, $1)=yes
4877 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4878 # Note: this linker hardcodes the directories in LIBPATH if there
4879 # are no directories specified by -L.
4880 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4881 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4882 # Neither direct hardcoding nor static linking is supported with a
4883 # broken collect2.
4884 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4885 fi
4886 ;;
4887
4888 aix[[4-9]]*)
4889 if test "$host_cpu" = ia64; then
4890 # On IA64, the linker does run time linking by default, so we don't
4891 # have to do anything special.
4892 aix_use_runtimelinking=no
4893 exp_sym_flag='-Bexport'
4894 no_entry_flag=""
4895 else
4896 # If we're using GNU nm, then we don't want the "-C" option.
4897 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4898 # Also, AIX nm treats weak defined symbols like other global
4899 # defined symbols, whereas GNU nm marks them as "W".
4900 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4901 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4902 else
4903 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4904 fi
4905 aix_use_runtimelinking=no
4906
4907 # Test if we are trying to use run time linking or normal
4908 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4909 # need to do runtime linking.
4910 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4911 for ld_flag in $LDFLAGS; do
4912 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4913 aix_use_runtimelinking=yes
4914 break
4915 fi
4916 done
4917 ;;
4918 esac
4919
4920 exp_sym_flag='-bexport'
4921 no_entry_flag='-bnoentry'
4922 fi
4923
4924 # When large executables or shared objects are built, AIX ld can
4925 # have problems creating the table of contents. If linking a library
4926 # or program results in "error TOC overflow" add -mminimal-toc to
4927 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4928 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4929
4930 _LT_TAGVAR(archive_cmds, $1)=''
4931 _LT_TAGVAR(hardcode_direct, $1)=yes
4932 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4933 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4934 _LT_TAGVAR(link_all_deplibs, $1)=yes
4935 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4936
4937 if test "$GCC" = yes; then
4938 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4939 # We only want to do this on AIX 4.2 and lower, the check
4940 # below for broken collect2 doesn't work under 4.3+
4941 collect2name=`${CC} -print-prog-name=collect2`
4942 if test -f "$collect2name" &&
4943 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4944 then
4945 # We have reworked collect2
4946 :
4947 else
4948 # We have old collect2
4949 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4950 # It fails to find uninstalled libraries when the uninstalled
4951 # path is not listed in the libpath. Setting hardcode_minus_L
4952 # to unsupported forces relinking
4953 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4954 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4955 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4956 fi
4957 ;;
4958 esac
4959 shared_flag='-shared'
4960 if test "$aix_use_runtimelinking" = yes; then
4961 shared_flag="$shared_flag "'${wl}-G'
4962 fi
4963 else
4964 # not using gcc
4965 if test "$host_cpu" = ia64; then
4966 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4967 # chokes on -Wl,-G. The following line is correct:
4968 shared_flag='-G'
4969 else
4970 if test "$aix_use_runtimelinking" = yes; then
4971 shared_flag='${wl}-G'
4972 else
4973 shared_flag='${wl}-bM:SRE'
4974 fi
4975 fi
4976 fi
4977
4978 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4979 # It seems that -bexpall does not export symbols beginning with
4980 # underscore (_), so it is better to generate a list of symbols to export.
4981 _LT_TAGVAR(always_export_symbols, $1)=yes
4982 if test "$aix_use_runtimelinking" = yes; then
4983 # Warning - without using the other runtime loading flags (-brtl),
4984 # -berok will link without error, but may produce a broken library.
4985 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4986 # Determine the default libpath from the value encoded in an
4987 # empty executable.
4988 _LT_SYS_MODULE_PATH_AIX([$1])
4989 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4990 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4991 else
4992 if test "$host_cpu" = ia64; then
4993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4994 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4995 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4996 else
4997 # Determine the default libpath from the value encoded in an
4998 # empty executable.
4999 _LT_SYS_MODULE_PATH_AIX([$1])
5000 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5001 # Warning - without using the other run time loading flags,
5002 # -berok will link without error, but may produce a broken library.
5003 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5004 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5005 if test "$with_gnu_ld" = yes; then
5006 # We only use this code for GNU lds that support --whole-archive.
5007 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5008 else
5009 # Exported symbols can be pulled into shared objects from archives
5010 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5011 fi
5012 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5013 # This is similar to how AIX traditionally builds its shared libraries.
5014 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5015 fi
5016 fi
5017 ;;
5018
5019 amigaos*)
5020 case $host_cpu in
5021 powerpc)
5022 # see comment about AmigaOS4 .so support
5023 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5024 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5025 ;;
5026 m68k)
5027 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5029 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5030 ;;
5031 esac
5032 ;;
5033
5034 bsdi[[45]]*)
5035 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5036 ;;
5037
5038 cygwin* | mingw* | pw32* | cegcc*)
5039 # When not using gcc, we currently assume that we are using
5040 # Microsoft Visual C++.
5041 # hardcode_libdir_flag_spec is actually meaningless, as there is
5042 # no search path for DLLs.
5043 case $cc_basename in
5044 cl*)
5045 # Native MSVC
5046 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5047 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5048 _LT_TAGVAR(always_export_symbols, $1)=yes
5049 _LT_TAGVAR(file_list_spec, $1)='@'
5050 # Tell ltmain to make .lib files, not .a files.
5051 libext=lib
5052 # Tell ltmain to make .dll files, not .so files.
5053 shrext_cmds=".dll"
5054 # FIXME: Setting linknames here is a bad hack.
5055 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5056 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5057 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5058 else
5059 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5060 fi~
5061 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5062 linknames='
5063 # The linker will not automatically build a static lib if we build a DLL.
5064 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5065 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5066 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5067 # Don't use ranlib
5068 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5069 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5070 lt_tool_outputfile="@TOOL_OUTPUT@"~
5071 case $lt_outputfile in
5072 *.exe|*.EXE) ;;
5073 *)
5074 lt_outputfile="$lt_outputfile.exe"
5075 lt_tool_outputfile="$lt_tool_outputfile.exe"
5076 ;;
5077 esac~
5078 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5079 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5080 $RM "$lt_outputfile.manifest";
5081 fi'
5082 ;;
5083 *)
5084 # Assume MSVC wrapper
5085 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5086 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5087 # Tell ltmain to make .lib files, not .a files.
5088 libext=lib
5089 # Tell ltmain to make .dll files, not .so files.
5090 shrext_cmds=".dll"
5091 # FIXME: Setting linknames here is a bad hack.
5092 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5093 # The linker will automatically build a .lib file if we build a DLL.
5094 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5095 # FIXME: Should let the user specify the lib program.
5096 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5097 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5098 ;;
5099 esac
5100 ;;
5101
5102 darwin* | rhapsody*)
5103 _LT_DARWIN_LINKER_FEATURES($1)
5104 ;;
5105
5106 dgux*)
5107 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5108 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5109 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5110 ;;
5111
5112 freebsd1*)
5113 _LT_TAGVAR(ld_shlibs, $1)=no
5114 ;;
5115
5116 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5117 # support. Future versions do this automatically, but an explicit c++rt0.o
5118 # does not break anything, and helps significantly (at the cost of a little
5119 # extra space).
5120 freebsd2.2*)
5121 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5123 _LT_TAGVAR(hardcode_direct, $1)=yes
5124 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5125 ;;
5126
5127 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5128 freebsd2*)
5129 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5130 _LT_TAGVAR(hardcode_direct, $1)=yes
5131 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5132 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5133 ;;
5134
5135 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5136 freebsd* | dragonfly*)
5137 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5138 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5139 _LT_TAGVAR(hardcode_direct, $1)=yes
5140 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5141 ;;
5142
5143 hpux9*)
5144 if test "$GCC" = yes; then
5145 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5146 else
5147 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5148 fi
5149 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5150 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5151 _LT_TAGVAR(hardcode_direct, $1)=yes
5152
5153 # hardcode_minus_L: Not really in the search PATH,
5154 # but as the default location of the library.
5155 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5156 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5157 ;;
5158
5159 hpux10*)
5160 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5161 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5162 else
5163 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5164 fi
5165 if test "$with_gnu_ld" = no; then
5166 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5167 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5168 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5169 _LT_TAGVAR(hardcode_direct, $1)=yes
5170 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5171 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5172 # hardcode_minus_L: Not really in the search PATH,
5173 # but as the default location of the library.
5174 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5175 fi
5176 ;;
5177
5178 hpux11*)
5179 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5180 case $host_cpu in
5181 hppa*64*)
5182 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5183 ;;
5184 ia64*)
5185 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5186 ;;
5187 *)
5188 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5189 ;;
5190 esac
5191 else
5192 case $host_cpu in
5193 hppa*64*)
5194 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5195 ;;
5196 ia64*)
5197 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5198 ;;
5199 *)
5200 m4_if($1, [], [
5201 # Older versions of the 11.00 compiler do not understand -b yet
5202 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5203 _LT_LINKER_OPTION([if $CC understands -b],
5204 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5205 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5206 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5207 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5208 ;;
5209 esac
5210 fi
5211 if test "$with_gnu_ld" = no; then
5212 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5213 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5214
5215 case $host_cpu in
5216 hppa*64*|ia64*)
5217 _LT_TAGVAR(hardcode_direct, $1)=no
5218 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5219 ;;
5220 *)
5221 _LT_TAGVAR(hardcode_direct, $1)=yes
5222 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5223 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5224
5225 # hardcode_minus_L: Not really in the search PATH,
5226 # but as the default location of the library.
5227 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5228 ;;
5229 esac
5230 fi
5231 ;;
5232
5233 irix5* | irix6* | nonstopux*)
5234 if test "$GCC" = yes; then
5235 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5236 # Try to use the -exported_symbol ld option, if it does not
5237 # work, assume that -exports_file does not work either and
5238 # implicitly export all symbols.
5239 # This should be the same for all languages, so no per-tag cache variable.
5240 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5241 [lt_cv_irix_exported_symbol],
5242 [save_LDFLAGS="$LDFLAGS"
5243 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5244 AC_LINK_IFELSE(
5245 [AC_LANG_SOURCE(
5246 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5247 [C++], [[int foo (void) { return 0; }]],
5248 [Fortran 77], [[
5249 subroutine foo
5250 end]],
5251 [Fortran], [[
5252 subroutine foo
5253 end]])])],
5254 [lt_cv_irix_exported_symbol=yes],
5255 [lt_cv_irix_exported_symbol=no])
5256 LDFLAGS="$save_LDFLAGS"])
5257 if test "$lt_cv_irix_exported_symbol" = yes; then
5258 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5259 fi
5260 else
5261 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5262 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5263 fi
5264 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5265 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5266 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5267 _LT_TAGVAR(inherit_rpath, $1)=yes
5268 _LT_TAGVAR(link_all_deplibs, $1)=yes
5269 ;;
5270
5271 netbsd*)
5272 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5273 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5274 else
5275 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5276 fi
5277 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5278 _LT_TAGVAR(hardcode_direct, $1)=yes
5279 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5280 ;;
5281
5282 newsos6)
5283 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5284 _LT_TAGVAR(hardcode_direct, $1)=yes
5285 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5286 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5287 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5288 ;;
5289
5290 *nto* | *qnx*)
5291 ;;
5292
5293 openbsd*)
5294 if test -f /usr/libexec/ld.so; then
5295 _LT_TAGVAR(hardcode_direct, $1)=yes
5296 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5297 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5298 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5299 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5300 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5301 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5302 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5303 else
5304 case $host_os in
5305 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5306 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5307 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5308 ;;
5309 *)
5310 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5311 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5312 ;;
5313 esac
5314 fi
5315 else
5316 _LT_TAGVAR(ld_shlibs, $1)=no
5317 fi
5318 ;;
5319
5320 os2*)
5321 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5322 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5323 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5324 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5325 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5326 ;;
5327
5328 osf3*)
5329 if test "$GCC" = yes; then
5330 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5331 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5332 else
5333 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5334 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5335 fi
5336 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5337 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5338 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5339 ;;
5340
5341 osf4* | osf5*) # as osf3* with the addition of -msym flag
5342 if test "$GCC" = yes; then
5343 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5344 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5345 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5346 else
5347 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5348 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5349 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5350 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5351
5352 # Both c and cxx compiler support -rpath directly
5353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5354 fi
5355 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5356 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5357 ;;
5358
5359 solaris*)
5360 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5361 if test "$GCC" = yes; then
5362 wlarc='${wl}'
5363 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5364 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5365 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5366 else
5367 case `$CC -V 2>&1` in
5368 *"Compilers 5.0"*)
5369 wlarc=''
5370 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5371 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5372 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5373 ;;
5374 *)
5375 wlarc='${wl}'
5376 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5377 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5378 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5379 ;;
5380 esac
5381 fi
5382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5383 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5384 case $host_os in
5385 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5386 *)
5387 # The compiler driver will combine and reorder linker options,
5388 # but understands `-z linker_flag'. GCC discards it without `$wl',
5389 # but is careful enough not to reorder.
5390 # Supported since Solaris 2.6 (maybe 2.5.1?)
5391 if test "$GCC" = yes; then
5392 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5393 else
5394 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5395 fi
5396 ;;
5397 esac
5398 _LT_TAGVAR(link_all_deplibs, $1)=yes
5399 ;;
5400
5401 sunos4*)
5402 if test "x$host_vendor" = xsequent; then
5403 # Use $CC to link under sequent, because it throws in some extra .o
5404 # files that make .init and .fini sections work.
5405 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5406 else
5407 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5408 fi
5409 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5410 _LT_TAGVAR(hardcode_direct, $1)=yes
5411 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5412 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5413 ;;
5414
5415 sysv4)
5416 case $host_vendor in
5417 sni)
5418 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5419 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5420 ;;
5421 siemens)
5422 ## LD is ld it makes a PLAMLIB
5423 ## CC just makes a GrossModule.
5424 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5425 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5426 _LT_TAGVAR(hardcode_direct, $1)=no
5427 ;;
5428 motorola)
5429 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5430 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5431 ;;
5432 esac
5433 runpath_var='LD_RUN_PATH'
5434 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5435 ;;
5436
5437 sysv4.3*)
5438 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5439 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5440 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5441 ;;
5442
5443 sysv4*MP*)
5444 if test -d /usr/nec; then
5445 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5446 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5447 runpath_var=LD_RUN_PATH
5448 hardcode_runpath_var=yes
5449 _LT_TAGVAR(ld_shlibs, $1)=yes
5450 fi
5451 ;;
5452
5453 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5454 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5455 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5456 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5457 runpath_var='LD_RUN_PATH'
5458
5459 if test "$GCC" = yes; then
5460 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5461 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5462 else
5463 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5464 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5465 fi
5466 ;;
5467
5468 sysv5* | sco3.2v5* | sco5v6*)
5469 # Note: We can NOT use -z defs as we might desire, because we do not
5470 # link with -lc, and that would cause any symbols used from libc to
5471 # always be unresolved, which means just about no library would
5472 # ever link correctly. If we're not using GNU ld we use -z text
5473 # though, which does catch some bad symbols but isn't as heavy-handed
5474 # as -z defs.
5475 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5476 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5477 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5478 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5479 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5480 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5481 _LT_TAGVAR(link_all_deplibs, $1)=yes
5482 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5483 runpath_var='LD_RUN_PATH'
5484
5485 if test "$GCC" = yes; then
5486 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5487 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5488 else
5489 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5490 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5491 fi
5492 ;;
5493
5494 uts4*)
5495 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5496 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5497 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5498 ;;
5499
5500 *)
5501 _LT_TAGVAR(ld_shlibs, $1)=no
5502 ;;
5503 esac
5504
5505 if test x$host_vendor = xsni; then
5506 case $host in
5507 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5508 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5509 ;;
5510 esac
5511 fi
5512 fi
5513 ])
5514 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5515 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5516
5517 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5518
5519 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5520 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5521 _LT_DECL([], [extract_expsyms_cmds], [2],
5522 [The commands to extract the exported symbol list from a shared archive])
5523
5524 #
5525 # Do we need to explicitly link libc?
5526 #
5527 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5528 x|xyes)
5529 # Assume -lc should be added
5530 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5531
5532 if test "$enable_shared" = yes && test "$GCC" = yes; then
5533 case $_LT_TAGVAR(archive_cmds, $1) in
5534 *'~'*)
5535 # FIXME: we may have to deal with multi-command sequences.
5536 ;;
5537 '$CC '*)
5538 # Test whether the compiler implicitly links with -lc since on some
5539 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5540 # to ld, don't add -lc before -lgcc.
5541 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5542 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5543 [$RM conftest*
5544 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5545
5546 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5547 soname=conftest
5548 lib=conftest
5549 libobjs=conftest.$ac_objext
5550 deplibs=
5551 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5552 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5553 compiler_flags=-v
5554 linker_flags=-v
5555 verstring=
5556 output_objdir=.
5557 libname=conftest
5558 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5559 _LT_TAGVAR(allow_undefined_flag, $1)=
5560 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5561 then
5562 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5563 else
5564 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5565 fi
5566 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5567 else
5568 cat conftest.err 1>&5
5569 fi
5570 $RM conftest*
5571 ])
5572 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5573 ;;
5574 esac
5575 fi
5576 ;;
5577 esac
5578
5579 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5580 [Whether or not to add -lc for building shared libraries])
5581 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5582 [enable_shared_with_static_runtimes], [0],
5583 [Whether or not to disallow shared libs when runtime libs are static])
5584 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5585 [Compiler flag to allow reflexive dlopens])
5586 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5587 [Compiler flag to generate shared objects directly from archives])
5588 _LT_TAGDECL([], [compiler_needs_object], [1],
5589 [Whether the compiler copes with passing no objects directly])
5590 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5591 [Create an old-style archive from a shared archive])
5592 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5593 [Create a temporary old-style archive to link instead of a shared archive])
5594 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5595 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5596 _LT_TAGDECL([], [module_cmds], [2],
5597 [Commands used to build a loadable module if different from building
5598 a shared archive.])
5599 _LT_TAGDECL([], [module_expsym_cmds], [2])
5600 _LT_TAGDECL([], [with_gnu_ld], [1],
5601 [Whether we are building with GNU ld or not])
5602 _LT_TAGDECL([], [allow_undefined_flag], [1],
5603 [Flag that allows shared libraries with undefined symbols to be built])
5604 _LT_TAGDECL([], [no_undefined_flag], [1],
5605 [Flag that enforces no undefined symbols])
5606 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5607 [Flag to hardcode $libdir into a binary during linking.
5608 This must work even if $libdir does not exist])
5609 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5610 [[If ld is used when linking, flag to hardcode $libdir into a binary
5611 during linking. This must work even if $libdir does not exist]])
5612 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5613 [Whether we need a single "-rpath" flag with a separated argument])
5614 _LT_TAGDECL([], [hardcode_direct], [0],
5615 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5616 DIR into the resulting binary])
5617 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5618 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5619 DIR into the resulting binary and the resulting library dependency is
5620 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5621 library is relocated])
5622 _LT_TAGDECL([], [hardcode_minus_L], [0],
5623 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5624 into the resulting binary])
5625 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5626 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5627 into the resulting binary])
5628 _LT_TAGDECL([], [hardcode_automatic], [0],
5629 [Set to "yes" if building a shared library automatically hardcodes DIR
5630 into the library and all subsequent libraries and executables linked
5631 against it])
5632 _LT_TAGDECL([], [inherit_rpath], [0],
5633 [Set to yes if linker adds runtime paths of dependent libraries
5634 to runtime path list])
5635 _LT_TAGDECL([], [link_all_deplibs], [0],
5636 [Whether libtool must link a program against all its dependency libraries])
5637 _LT_TAGDECL([], [always_export_symbols], [0],
5638 [Set to "yes" if exported symbols are required])
5639 _LT_TAGDECL([], [export_symbols_cmds], [2],
5640 [The commands to list exported symbols])
5641 _LT_TAGDECL([], [exclude_expsyms], [1],
5642 [Symbols that should not be listed in the preloaded symbols])
5643 _LT_TAGDECL([], [include_expsyms], [1],
5644 [Symbols that must always be exported])
5645 _LT_TAGDECL([], [prelink_cmds], [2],
5646 [Commands necessary for linking programs (against libraries) with templates])
5647 _LT_TAGDECL([], [postlink_cmds], [2],
5648 [Commands necessary for finishing linking programs])
5649 _LT_TAGDECL([], [file_list_spec], [1],
5650 [Specify filename containing input files])
5651 dnl FIXME: Not yet implemented
5652 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5653 dnl [Compiler flag to generate thread safe objects])
5654 ])# _LT_LINKER_SHLIBS
5655
5656
5657 # _LT_LANG_C_CONFIG([TAG])
5658 # ------------------------
5659 # Ensure that the configuration variables for a C compiler are suitably
5660 # defined. These variables are subsequently used by _LT_CONFIG to write
5661 # the compiler configuration to `libtool'.
5662 m4_defun([_LT_LANG_C_CONFIG],
5663 [m4_require([_LT_DECL_EGREP])dnl
5664 lt_save_CC="$CC"
5665 AC_LANG_PUSH(C)
5666
5667 # Source file extension for C test sources.
5668 ac_ext=c
5669
5670 # Object file extension for compiled C test sources.
5671 objext=o
5672 _LT_TAGVAR(objext, $1)=$objext
5673
5674 # Code to be used in simple compile tests
5675 lt_simple_compile_test_code="int some_variable = 0;"
5676
5677 # Code to be used in simple link tests
5678 lt_simple_link_test_code='int main(){return(0);}'
5679
5680 _LT_TAG_COMPILER
5681 # Save the default compiler, since it gets overwritten when the other
5682 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5683 compiler_DEFAULT=$CC
5684
5685 # save warnings/boilerplate of simple test code
5686 _LT_COMPILER_BOILERPLATE
5687 _LT_LINKER_BOILERPLATE
5688
5689 ## CAVEAT EMPTOR:
5690 ## There is no encapsulation within the following macros, do not change
5691 ## the running order or otherwise move them around unless you know exactly
5692 ## what you are doing...
5693 if test -n "$compiler"; then
5694 _LT_COMPILER_NO_RTTI($1)
5695 _LT_COMPILER_PIC($1)
5696 _LT_COMPILER_C_O($1)
5697 _LT_COMPILER_FILE_LOCKS($1)
5698 _LT_LINKER_SHLIBS($1)
5699 _LT_SYS_DYNAMIC_LINKER($1)
5700 _LT_LINKER_HARDCODE_LIBPATH($1)
5701 LT_SYS_DLOPEN_SELF
5702 _LT_CMD_STRIPLIB
5703
5704 # Report which library types will actually be built
5705 AC_MSG_CHECKING([if libtool supports shared libraries])
5706 AC_MSG_RESULT([$can_build_shared])
5707
5708 AC_MSG_CHECKING([whether to build shared libraries])
5709 test "$can_build_shared" = "no" && enable_shared=no
5710
5711 # On AIX, shared libraries and static libraries use the same namespace, and
5712 # are all built from PIC.
5713 case $host_os in
5714 aix3*)
5715 test "$enable_shared" = yes && enable_static=no
5716 if test -n "$RANLIB"; then
5717 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5718 postinstall_cmds='$RANLIB $lib'
5719 fi
5720 ;;
5721
5722 aix[[4-9]]*)
5723 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5724 test "$enable_shared" = yes && enable_static=no
5725 fi
5726 ;;
5727 esac
5728 AC_MSG_RESULT([$enable_shared])
5729
5730 AC_MSG_CHECKING([whether to build static libraries])
5731 # Make sure either enable_shared or enable_static is yes.
5732 test "$enable_shared" = yes || enable_static=yes
5733 AC_MSG_RESULT([$enable_static])
5734
5735 _LT_CONFIG($1)
5736 fi
5737 AC_LANG_POP
5738 CC="$lt_save_CC"
5739 ])# _LT_LANG_C_CONFIG
5740
5741
5742 # _LT_LANG_CXX_CONFIG([TAG])
5743 # --------------------------
5744 # Ensure that the configuration variables for a C++ compiler are suitably
5745 # defined. These variables are subsequently used by _LT_CONFIG to write
5746 # the compiler configuration to `libtool'.
5747 m4_defun([_LT_LANG_CXX_CONFIG],
5748 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5749 m4_require([_LT_DECL_EGREP])dnl
5750 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5751 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5752 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5753 (test "X$CXX" != "Xg++"))) ; then
5754 AC_PROG_CXXCPP
5755 else
5756 _lt_caught_CXX_error=yes
5757 fi
5758
5759 AC_LANG_PUSH(C++)
5760 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5761 _LT_TAGVAR(allow_undefined_flag, $1)=
5762 _LT_TAGVAR(always_export_symbols, $1)=no
5763 _LT_TAGVAR(archive_expsym_cmds, $1)=
5764 _LT_TAGVAR(compiler_needs_object, $1)=no
5765 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5766 _LT_TAGVAR(hardcode_direct, $1)=no
5767 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5768 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5769 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5770 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5771 _LT_TAGVAR(hardcode_minus_L, $1)=no
5772 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5773 _LT_TAGVAR(hardcode_automatic, $1)=no
5774 _LT_TAGVAR(inherit_rpath, $1)=no
5775 _LT_TAGVAR(module_cmds, $1)=
5776 _LT_TAGVAR(module_expsym_cmds, $1)=
5777 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5778 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5779 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5780 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5781 _LT_TAGVAR(no_undefined_flag, $1)=
5782 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5783 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5784
5785 # Source file extension for C++ test sources.
5786 ac_ext=cpp
5787
5788 # Object file extension for compiled C++ test sources.
5789 objext=o
5790 _LT_TAGVAR(objext, $1)=$objext
5791
5792 # No sense in running all these tests if we already determined that
5793 # the CXX compiler isn't working. Some variables (like enable_shared)
5794 # are currently assumed to apply to all compilers on this platform,
5795 # and will be corrupted by setting them based on a non-working compiler.
5796 if test "$_lt_caught_CXX_error" != yes; then
5797 # Code to be used in simple compile tests
5798 lt_simple_compile_test_code="int some_variable = 0;"
5799
5800 # Code to be used in simple link tests
5801 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5802
5803 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5804 _LT_TAG_COMPILER
5805
5806 # save warnings/boilerplate of simple test code
5807 _LT_COMPILER_BOILERPLATE
5808 _LT_LINKER_BOILERPLATE
5809
5810 # Allow CC to be a program name with arguments.
5811 lt_save_CC=$CC
5812 lt_save_CFLAGS=$CFLAGS
5813 lt_save_LD=$LD
5814 lt_save_GCC=$GCC
5815 GCC=$GXX
5816 lt_save_with_gnu_ld=$with_gnu_ld
5817 lt_save_path_LD=$lt_cv_path_LD
5818 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5819 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5820 else
5821 $as_unset lt_cv_prog_gnu_ld
5822 fi
5823 if test -n "${lt_cv_path_LDCXX+set}"; then
5824 lt_cv_path_LD=$lt_cv_path_LDCXX
5825 else
5826 $as_unset lt_cv_path_LD
5827 fi
5828 test -z "${LDCXX+set}" || LD=$LDCXX
5829 CC=${CXX-"c++"}
5830 CFLAGS=$CXXFLAGS
5831 compiler=$CC
5832 _LT_TAGVAR(compiler, $1)=$CC
5833 _LT_CC_BASENAME([$compiler])
5834
5835 if test -n "$compiler"; then
5836 # We don't want -fno-exception when compiling C++ code, so set the
5837 # no_builtin_flag separately
5838 if test "$GXX" = yes; then
5839 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5840 else
5841 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5842 fi
5843
5844 if test "$GXX" = yes; then
5845 # Set up default GNU C++ configuration
5846
5847 LT_PATH_LD
5848
5849 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5850 # archiving commands below assume that GNU ld is being used.
5851 if test "$with_gnu_ld" = yes; then
5852 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5853 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5854
5855 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5856 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5857
5858 # If archive_cmds runs LD, not CC, wlarc should be empty
5859 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5860 # investigate it a little bit more. (MM)
5861 wlarc='${wl}'
5862
5863 # ancient GNU ld didn't support --whole-archive et. al.
5864 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5865 $GREP 'no-whole-archive' > /dev/null; then
5866 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5867 else
5868 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5869 fi
5870 else
5871 with_gnu_ld=no
5872 wlarc=
5873
5874 # A generic and very simple default shared library creation
5875 # command for GNU C++ for the case where it uses the native
5876 # linker, instead of GNU ld. If possible, this setting should
5877 # overridden to take advantage of the native linker features on
5878 # the platform it is being used on.
5879 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5880 fi
5881
5882 # Commands to make compiler produce verbose output that lists
5883 # what "hidden" libraries, object files and flags are used when
5884 # linking a shared library.
5885 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5886
5887 else
5888 GXX=no
5889 with_gnu_ld=no
5890 wlarc=
5891 fi
5892
5893 # PORTME: fill in a description of your system's C++ link characteristics
5894 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5895 _LT_TAGVAR(ld_shlibs, $1)=yes
5896 case $host_os in
5897 aix3*)
5898 # FIXME: insert proper C++ library support
5899 _LT_TAGVAR(ld_shlibs, $1)=no
5900 ;;
5901 aix[[4-9]]*)
5902 if test "$host_cpu" = ia64; then
5903 # On IA64, the linker does run time linking by default, so we don't
5904 # have to do anything special.
5905 aix_use_runtimelinking=no
5906 exp_sym_flag='-Bexport'
5907 no_entry_flag=""
5908 else
5909 aix_use_runtimelinking=no
5910
5911 # Test if we are trying to use run time linking or normal
5912 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5913 # need to do runtime linking.
5914 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5915 for ld_flag in $LDFLAGS; do
5916 case $ld_flag in
5917 *-brtl*)
5918 aix_use_runtimelinking=yes
5919 break
5920 ;;
5921 esac
5922 done
5923 ;;
5924 esac
5925
5926 exp_sym_flag='-bexport'
5927 no_entry_flag='-bnoentry'
5928 fi
5929
5930 # When large executables or shared objects are built, AIX ld can
5931 # have problems creating the table of contents. If linking a library
5932 # or program results in "error TOC overflow" add -mminimal-toc to
5933 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5934 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5935
5936 _LT_TAGVAR(archive_cmds, $1)=''
5937 _LT_TAGVAR(hardcode_direct, $1)=yes
5938 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5939 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5940 _LT_TAGVAR(link_all_deplibs, $1)=yes
5941 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5942
5943 if test "$GXX" = yes; then
5944 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5945 # We only want to do this on AIX 4.2 and lower, the check
5946 # below for broken collect2 doesn't work under 4.3+
5947 collect2name=`${CC} -print-prog-name=collect2`
5948 if test -f "$collect2name" &&
5949 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5950 then
5951 # We have reworked collect2
5952 :
5953 else
5954 # We have old collect2
5955 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5956 # It fails to find uninstalled libraries when the uninstalled
5957 # path is not listed in the libpath. Setting hardcode_minus_L
5958 # to unsupported forces relinking
5959 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5960 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5961 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5962 fi
5963 esac
5964 shared_flag='-shared'
5965 if test "$aix_use_runtimelinking" = yes; then
5966 shared_flag="$shared_flag "'${wl}-G'
5967 fi
5968 else
5969 # not using gcc
5970 if test "$host_cpu" = ia64; then
5971 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5972 # chokes on -Wl,-G. The following line is correct:
5973 shared_flag='-G'
5974 else
5975 if test "$aix_use_runtimelinking" = yes; then
5976 shared_flag='${wl}-G'
5977 else
5978 shared_flag='${wl}-bM:SRE'
5979 fi
5980 fi
5981 fi
5982
5983 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5984 # It seems that -bexpall does not export symbols beginning with
5985 # underscore (_), so it is better to generate a list of symbols to
5986 # export.
5987 _LT_TAGVAR(always_export_symbols, $1)=yes
5988 if test "$aix_use_runtimelinking" = yes; then
5989 # Warning - without using the other runtime loading flags (-brtl),
5990 # -berok will link without error, but may produce a broken library.
5991 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5992 # Determine the default libpath from the value encoded in an empty
5993 # executable.
5994 _LT_SYS_MODULE_PATH_AIX([$1])
5995 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5996
5997 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5998 else
5999 if test "$host_cpu" = ia64; then
6000 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6001 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6002 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6003 else
6004 # Determine the default libpath from the value encoded in an
6005 # empty executable.
6006 _LT_SYS_MODULE_PATH_AIX([$1])
6007 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6008 # Warning - without using the other run time loading flags,
6009 # -berok will link without error, but may produce a broken library.
6010 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6011 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6012 if test "$with_gnu_ld" = yes; then
6013 # We only use this code for GNU lds that support --whole-archive.
6014 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6015 else
6016 # Exported symbols can be pulled into shared objects from archives
6017 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6018 fi
6019 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6020 # This is similar to how AIX traditionally builds its shared
6021 # libraries.
6022 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6023 fi
6024 fi
6025 ;;
6026
6027 beos*)
6028 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6029 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6030 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6031 # support --undefined. This deserves some investigation. FIXME
6032 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6033 else
6034 _LT_TAGVAR(ld_shlibs, $1)=no
6035 fi
6036 ;;
6037
6038 chorus*)
6039 case $cc_basename in
6040 *)
6041 # FIXME: insert proper C++ library support
6042 _LT_TAGVAR(ld_shlibs, $1)=no
6043 ;;
6044 esac
6045 ;;
6046
6047 cygwin* | mingw* | pw32* | cegcc*)
6048 case $GXX,$cc_basename in
6049 ,cl* | no,cl*)
6050 # Native MSVC
6051 # hardcode_libdir_flag_spec is actually meaningless, as there is
6052 # no search path for DLLs.
6053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6054 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6055 _LT_TAGVAR(always_export_symbols, $1)=yes
6056 _LT_TAGVAR(file_list_spec, $1)='@'
6057 # Tell ltmain to make .lib files, not .a files.
6058 libext=lib
6059 # Tell ltmain to make .dll files, not .so files.
6060 shrext_cmds=".dll"
6061 # FIXME: Setting linknames here is a bad hack.
6062 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6063 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6064 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6065 else
6066 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6067 fi~
6068 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6069 linknames='
6070 # The linker will not automatically build a static lib if we build a DLL.
6071 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6072 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6073 # Don't use ranlib
6074 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6075 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6076 lt_tool_outputfile="@TOOL_OUTPUT@"~
6077 case $lt_outputfile in
6078 *.exe|*.EXE) ;;
6079 *)
6080 lt_outputfile="$lt_outputfile.exe"
6081 lt_tool_outputfile="$lt_tool_outputfile.exe"
6082 ;;
6083 esac~
6084 func_to_tool_file "$lt_outputfile"~
6085 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6086 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6087 $RM "$lt_outputfile.manifest";
6088 fi'
6089 ;;
6090 *)
6091 # g++
6092 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6093 # as there is no search path for DLLs.
6094 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6095 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6096 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6097 _LT_TAGVAR(always_export_symbols, $1)=no
6098 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6099
6100 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6101 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6102 # If the export-symbols file already is a .def file (1st line
6103 # is EXPORTS), use it as is; otherwise, prepend...
6104 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6105 cp $export_symbols $output_objdir/$soname.def;
6106 else
6107 echo EXPORTS > $output_objdir/$soname.def;
6108 cat $export_symbols >> $output_objdir/$soname.def;
6109 fi~
6110 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6111 else
6112 _LT_TAGVAR(ld_shlibs, $1)=no
6113 fi
6114 ;;
6115 esac
6116 ;;
6117 darwin* | rhapsody*)
6118 _LT_DARWIN_LINKER_FEATURES($1)
6119 ;;
6120
6121 dgux*)
6122 case $cc_basename in
6123 ec++*)
6124 # FIXME: insert proper C++ library support
6125 _LT_TAGVAR(ld_shlibs, $1)=no
6126 ;;
6127 ghcx*)
6128 # Green Hills C++ Compiler
6129 # FIXME: insert proper C++ library support
6130 _LT_TAGVAR(ld_shlibs, $1)=no
6131 ;;
6132 *)
6133 # FIXME: insert proper C++ library support
6134 _LT_TAGVAR(ld_shlibs, $1)=no
6135 ;;
6136 esac
6137 ;;
6138
6139 freebsd[[12]]*)
6140 # C++ shared libraries reported to be fairly broken before
6141 # switch to ELF
6142 _LT_TAGVAR(ld_shlibs, $1)=no
6143 ;;
6144
6145 freebsd-elf*)
6146 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6147 ;;
6148
6149 freebsd* | dragonfly*)
6150 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6151 # conventions
6152 _LT_TAGVAR(ld_shlibs, $1)=yes
6153 ;;
6154
6155 gnu*)
6156 ;;
6157
6158 haiku*)
6159 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6160 _LT_TAGVAR(link_all_deplibs, $1)=yes
6161 ;;
6162
6163 hpux9*)
6164 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6165 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6166 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6167 _LT_TAGVAR(hardcode_direct, $1)=yes
6168 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6169 # but as the default
6170 # location of the library.
6171
6172 case $cc_basename in
6173 CC*)
6174 # FIXME: insert proper C++ library support
6175 _LT_TAGVAR(ld_shlibs, $1)=no
6176 ;;
6177 aCC*)
6178 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6179 # Commands to make compiler produce verbose output that lists
6180 # what "hidden" libraries, object files and flags are used when
6181 # linking a shared library.
6182 #
6183 # There doesn't appear to be a way to prevent this compiler from
6184 # explicitly linking system object files so we need to strip them
6185 # from the output so that they don't get included in the library
6186 # dependencies.
6187 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6188 ;;
6189 *)
6190 if test "$GXX" = yes; then
6191 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6192 else
6193 # FIXME: insert proper C++ library support
6194 _LT_TAGVAR(ld_shlibs, $1)=no
6195 fi
6196 ;;
6197 esac
6198 ;;
6199
6200 hpux10*|hpux11*)
6201 if test $with_gnu_ld = no; then
6202 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6203 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6204
6205 case $host_cpu in
6206 hppa*64*|ia64*)
6207 ;;
6208 *)
6209 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6210 ;;
6211 esac
6212 fi
6213 case $host_cpu in
6214 hppa*64*|ia64*)
6215 _LT_TAGVAR(hardcode_direct, $1)=no
6216 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6217 ;;
6218 *)
6219 _LT_TAGVAR(hardcode_direct, $1)=yes
6220 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6221 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6222 # but as the default
6223 # location of the library.
6224 ;;
6225 esac
6226
6227 case $cc_basename in
6228 CC*)
6229 # FIXME: insert proper C++ library support
6230 _LT_TAGVAR(ld_shlibs, $1)=no
6231 ;;
6232 aCC*)
6233 case $host_cpu in
6234 hppa*64*)
6235 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6236 ;;
6237 ia64*)
6238 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6239 ;;
6240 *)
6241 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6242 ;;
6243 esac
6244 # Commands to make compiler produce verbose output that lists
6245 # what "hidden" libraries, object files and flags are used when
6246 # linking a shared library.
6247 #
6248 # There doesn't appear to be a way to prevent this compiler from
6249 # explicitly linking system object files so we need to strip them
6250 # from the output so that they don't get included in the library
6251 # dependencies.
6252 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6253 ;;
6254 *)
6255 if test "$GXX" = yes; then
6256 if test $with_gnu_ld = no; then
6257 case $host_cpu in
6258 hppa*64*)
6259 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6260 ;;
6261 ia64*)
6262 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6263 ;;
6264 *)
6265 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6266 ;;
6267 esac
6268 fi
6269 else
6270 # FIXME: insert proper C++ library support
6271 _LT_TAGVAR(ld_shlibs, $1)=no
6272 fi
6273 ;;
6274 esac
6275 ;;
6276
6277 interix[[3-9]]*)
6278 _LT_TAGVAR(hardcode_direct, $1)=no
6279 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6280 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6281 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6282 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6283 # Instead, shared libraries are loaded at an image base (0x10000000 by
6284 # default) and relocated if they conflict, which is a slow very memory
6285 # consuming and fragmenting process. To avoid this, we pick a random,
6286 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6287 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6288 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6289 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6290 ;;
6291 irix5* | irix6*)
6292 case $cc_basename in
6293 CC*)
6294 # SGI C++
6295 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6296
6297 # Archives containing C++ object files must be created using
6298 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6299 # necessary to make sure instantiated templates are included
6300 # in the archive.
6301 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6302 ;;
6303 *)
6304 if test "$GXX" = yes; then
6305 if test "$with_gnu_ld" = no; then
6306 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6307 else
6308 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6309 fi
6310 fi
6311 _LT_TAGVAR(link_all_deplibs, $1)=yes
6312 ;;
6313 esac
6314 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6315 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6316 _LT_TAGVAR(inherit_rpath, $1)=yes
6317 ;;
6318
6319 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6320 case $cc_basename in
6321 KCC*)
6322 # Kuck and Associates, Inc. (KAI) C++ Compiler
6323
6324 # KCC will only create a shared library if the output file
6325 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6326 # to its proper name (with version) after linking.
6327 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6328 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6329 # Commands to make compiler produce verbose output that lists
6330 # what "hidden" libraries, object files and flags are used when
6331 # linking a shared library.
6332 #
6333 # There doesn't appear to be a way to prevent this compiler from
6334 # explicitly linking system object files so we need to strip them
6335 # from the output so that they don't get included in the library
6336 # dependencies.
6337 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6338
6339 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6340 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6341
6342 # Archives containing C++ object files must be created using
6343 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6344 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6345 ;;
6346 icpc* | ecpc* )
6347 # Intel C++
6348 with_gnu_ld=yes
6349 # version 8.0 and above of icpc choke on multiply defined symbols
6350 # if we add $predep_objects and $postdep_objects, however 7.1 and
6351 # earlier do not add the objects themselves.
6352 case `$CC -V 2>&1` in
6353 *"Version 7."*)
6354 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6355 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6356 ;;
6357 *) # Version 8.0 or newer
6358 tmp_idyn=
6359 case $host_cpu in
6360 ia64*) tmp_idyn=' -i_dynamic';;
6361 esac
6362 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6363 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6364 ;;
6365 esac
6366 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6367 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6368 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6369 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6370 ;;
6371 pgCC* | pgcpp*)
6372 # Portland Group C++ compiler
6373 case `$CC -V` in
6374 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6375 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6376 rm -rf $tpldir~
6377 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6378 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6379 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6380 rm -rf $tpldir~
6381 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6382 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6383 $RANLIB $oldlib'
6384 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6385 rm -rf $tpldir~
6386 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6387 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6388 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6389 rm -rf $tpldir~
6390 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6391 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6392 ;;
6393 *) # Version 6 and above use weak symbols
6394 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6395 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6396 ;;
6397 esac
6398
6399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6400 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6401 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6402 ;;
6403 cxx*)
6404 # Compaq C++
6405 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6406 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6407
6408 runpath_var=LD_RUN_PATH
6409 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6410 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6411
6412 # Commands to make compiler produce verbose output that lists
6413 # what "hidden" libraries, object files and flags are used when
6414 # linking a shared library.
6415 #
6416 # There doesn't appear to be a way to prevent this compiler from
6417 # explicitly linking system object files so we need to strip them
6418 # from the output so that they don't get included in the library
6419 # dependencies.
6420 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
6421 ;;
6422 xl* | mpixl* | bgxl*)
6423 # IBM XL 8.0 on PPC, with GNU ld
6424 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6425 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6426 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6427 if test "x$supports_anon_versioning" = xyes; then
6428 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6429 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6430 echo "local: *; };" >> $output_objdir/$libname.ver~
6431 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6432 fi
6433 ;;
6434 *)
6435 case `$CC -V 2>&1 | sed 5q` in
6436 *Sun\ C*)
6437 # Sun C++ 5.9
6438 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6439 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6440 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6441 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6442 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6443 _LT_TAGVAR(compiler_needs_object, $1)=yes
6444
6445 # Not sure whether something based on
6446 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6447 # would be better.
6448 output_verbose_link_cmd='func_echo_all'
6449
6450 # Archives containing C++ object files must be created using
6451 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6452 # necessary to make sure instantiated templates are included
6453 # in the archive.
6454 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6455 ;;
6456 esac
6457 ;;
6458 esac
6459 ;;
6460
6461 lynxos*)
6462 # FIXME: insert proper C++ library support
6463 _LT_TAGVAR(ld_shlibs, $1)=no
6464 ;;
6465
6466 m88k*)
6467 # FIXME: insert proper C++ library support
6468 _LT_TAGVAR(ld_shlibs, $1)=no
6469 ;;
6470
6471 mvs*)
6472 case $cc_basename in
6473 cxx*)
6474 # FIXME: insert proper C++ library support
6475 _LT_TAGVAR(ld_shlibs, $1)=no
6476 ;;
6477 *)
6478 # FIXME: insert proper C++ library support
6479 _LT_TAGVAR(ld_shlibs, $1)=no
6480 ;;
6481 esac
6482 ;;
6483
6484 netbsd*)
6485 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6486 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6487 wlarc=
6488 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6489 _LT_TAGVAR(hardcode_direct, $1)=yes
6490 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6491 fi
6492 # Workaround some broken pre-1.5 toolchains
6493 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6494 ;;
6495
6496 *nto* | *qnx*)
6497 _LT_TAGVAR(ld_shlibs, $1)=yes
6498 ;;
6499
6500 openbsd2*)
6501 # C++ shared libraries are fairly broken
6502 _LT_TAGVAR(ld_shlibs, $1)=no
6503 ;;
6504
6505 openbsd*)
6506 if test -f /usr/libexec/ld.so; then
6507 _LT_TAGVAR(hardcode_direct, $1)=yes
6508 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6509 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6510 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6511 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6512 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6513 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6514 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6515 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6516 fi
6517 output_verbose_link_cmd=func_echo_all
6518 else
6519 _LT_TAGVAR(ld_shlibs, $1)=no
6520 fi
6521 ;;
6522
6523 osf3* | osf4* | osf5*)
6524 case $cc_basename in
6525 KCC*)
6526 # Kuck and Associates, Inc. (KAI) C++ Compiler
6527
6528 # KCC will only create a shared library if the output file
6529 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6530 # to its proper name (with version) after linking.
6531 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6532
6533 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6534 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6535
6536 # Archives containing C++ object files must be created using
6537 # the KAI C++ compiler.
6538 case $host in
6539 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6540 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6541 esac
6542 ;;
6543 RCC*)
6544 # Rational C++ 2.4.1
6545 # FIXME: insert proper C++ library support
6546 _LT_TAGVAR(ld_shlibs, $1)=no
6547 ;;
6548 cxx*)
6549 case $host in
6550 osf3*)
6551 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6552 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6553 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6554 ;;
6555 *)
6556 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6557 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6558 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6559 echo "-hidden">> $lib.exp~
6560 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6561 $RM $lib.exp'
6562 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6563 ;;
6564 esac
6565
6566 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6567
6568 # Commands to make compiler produce verbose output that lists
6569 # what "hidden" libraries, object files and flags are used when
6570 # linking a shared library.
6571 #
6572 # There doesn't appear to be a way to prevent this compiler from
6573 # explicitly linking system object files so we need to strip them
6574 # from the output so that they don't get included in the library
6575 # dependencies.
6576 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6577 ;;
6578 *)
6579 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6580 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6581 case $host in
6582 osf3*)
6583 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6584 ;;
6585 *)
6586 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6587 ;;
6588 esac
6589
6590 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6591 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6592
6593 # Commands to make compiler produce verbose output that lists
6594 # what "hidden" libraries, object files and flags are used when
6595 # linking a shared library.
6596 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6597
6598 else
6599 # FIXME: insert proper C++ library support
6600 _LT_TAGVAR(ld_shlibs, $1)=no
6601 fi
6602 ;;
6603 esac
6604 ;;
6605
6606 psos*)
6607 # FIXME: insert proper C++ library support
6608 _LT_TAGVAR(ld_shlibs, $1)=no
6609 ;;
6610
6611 sunos4*)
6612 case $cc_basename in
6613 CC*)
6614 # Sun C++ 4.x
6615 # FIXME: insert proper C++ library support
6616 _LT_TAGVAR(ld_shlibs, $1)=no
6617 ;;
6618 lcc*)
6619 # Lucid
6620 # FIXME: insert proper C++ library support
6621 _LT_TAGVAR(ld_shlibs, $1)=no
6622 ;;
6623 *)
6624 # FIXME: insert proper C++ library support
6625 _LT_TAGVAR(ld_shlibs, $1)=no
6626 ;;
6627 esac
6628 ;;
6629
6630 solaris*)
6631 case $cc_basename in
6632 CC* | sunCC*)
6633 # Sun C++ 4.2, 5.x and Centerline C++
6634 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6635 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6636 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6637 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6638 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6639
6640 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6641 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6642 case $host_os in
6643 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6644 *)
6645 # The compiler driver will combine and reorder linker options,
6646 # but understands `-z linker_flag'.
6647 # Supported since Solaris 2.6 (maybe 2.5.1?)
6648 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6649 ;;
6650 esac
6651 _LT_TAGVAR(link_all_deplibs, $1)=yes
6652
6653 output_verbose_link_cmd='func_echo_all'
6654
6655 # Archives containing C++ object files must be created using
6656 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6657 # necessary to make sure instantiated templates are included
6658 # in the archive.
6659 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6660 ;;
6661 gcx*)
6662 # Green Hills C++ Compiler
6663 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6664
6665 # The C++ compiler must be used to create the archive.
6666 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6667 ;;
6668 *)
6669 # GNU C++ compiler with Solaris linker
6670 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6671 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6672 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6673 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6674 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6675 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6676
6677 # Commands to make compiler produce verbose output that lists
6678 # what "hidden" libraries, object files and flags are used when
6679 # linking a shared library.
6680 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6681 else
6682 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6683 # platform.
6684 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6685 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6686 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6687
6688 # Commands to make compiler produce verbose output that lists
6689 # what "hidden" libraries, object files and flags are used when
6690 # linking a shared library.
6691 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6692 fi
6693
6694 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6695 case $host_os in
6696 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6697 *)
6698 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6699 ;;
6700 esac
6701 fi
6702 ;;
6703 esac
6704 ;;
6705
6706 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6707 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6708 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6709 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6710 runpath_var='LD_RUN_PATH'
6711
6712 case $cc_basename in
6713 CC*)
6714 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6715 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6716 ;;
6717 *)
6718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6719 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6720 ;;
6721 esac
6722 ;;
6723
6724 sysv5* | sco3.2v5* | sco5v6*)
6725 # Note: We can NOT use -z defs as we might desire, because we do not
6726 # link with -lc, and that would cause any symbols used from libc to
6727 # always be unresolved, which means just about no library would
6728 # ever link correctly. If we're not using GNU ld we use -z text
6729 # though, which does catch some bad symbols but isn't as heavy-handed
6730 # as -z defs.
6731 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6732 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6733 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6734 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6735 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6736 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6737 _LT_TAGVAR(link_all_deplibs, $1)=yes
6738 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6739 runpath_var='LD_RUN_PATH'
6740
6741 case $cc_basename in
6742 CC*)
6743 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6744 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6745 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6746 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6747 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6748 '"$_LT_TAGVAR(reload_cmds, $1)"
6749 ;;
6750 *)
6751 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6752 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6753 ;;
6754 esac
6755 ;;
6756
6757 tandem*)
6758 case $cc_basename in
6759 NCC*)
6760 # NonStop-UX NCC 3.20
6761 # FIXME: insert proper C++ library support
6762 _LT_TAGVAR(ld_shlibs, $1)=no
6763 ;;
6764 *)
6765 # FIXME: insert proper C++ library support
6766 _LT_TAGVAR(ld_shlibs, $1)=no
6767 ;;
6768 esac
6769 ;;
6770
6771 vxworks*)
6772 # FIXME: insert proper C++ library support
6773 _LT_TAGVAR(ld_shlibs, $1)=no
6774 ;;
6775
6776 *)
6777 # FIXME: insert proper C++ library support
6778 _LT_TAGVAR(ld_shlibs, $1)=no
6779 ;;
6780 esac
6781
6782 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6783 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6784
6785 _LT_TAGVAR(GCC, $1)="$GXX"
6786 _LT_TAGVAR(LD, $1)="$LD"
6787
6788 ## CAVEAT EMPTOR:
6789 ## There is no encapsulation within the following macros, do not change
6790 ## the running order or otherwise move them around unless you know exactly
6791 ## what you are doing...
6792 _LT_SYS_HIDDEN_LIBDEPS($1)
6793 _LT_COMPILER_PIC($1)
6794 _LT_COMPILER_C_O($1)
6795 _LT_COMPILER_FILE_LOCKS($1)
6796 _LT_LINKER_SHLIBS($1)
6797 _LT_SYS_DYNAMIC_LINKER($1)
6798 _LT_LINKER_HARDCODE_LIBPATH($1)
6799
6800 _LT_CONFIG($1)
6801 fi # test -n "$compiler"
6802
6803 CC=$lt_save_CC
6804 CFLAGS=$lt_save_CFLAGS
6805 LDCXX=$LD
6806 LD=$lt_save_LD
6807 GCC=$lt_save_GCC
6808 with_gnu_ld=$lt_save_with_gnu_ld
6809 lt_cv_path_LDCXX=$lt_cv_path_LD
6810 lt_cv_path_LD=$lt_save_path_LD
6811 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6812 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6813 fi # test "$_lt_caught_CXX_error" != yes
6814
6815 AC_LANG_POP
6816 ])# _LT_LANG_CXX_CONFIG
6817
6818
6819 # _LT_FUNC_STRIPNAME_CNF
6820 # ----------------------
6821 # func_stripname_cnf prefix suffix name
6822 # strip PREFIX and SUFFIX off of NAME.
6823 # PREFIX and SUFFIX must not contain globbing or regex special
6824 # characters, hashes, percent signs, but SUFFIX may contain a leading
6825 # dot (in which case that matches only a dot).
6826 #
6827 # This function is identical to the (non-XSI) version of func_stripname,
6828 # except this one can be used by m4 code that may be executed by configure,
6829 # rather than the libtool script.
6830 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6831 AC_REQUIRE([_LT_DECL_SED])
6832 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6833 func_stripname_cnf ()
6834 {
6835 case ${2} in
6836 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6837 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6838 esac
6839 } # func_stripname_cnf
6840 ])# _LT_FUNC_STRIPNAME_CNF
6841
6842 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6843 # ---------------------------------
6844 # Figure out "hidden" library dependencies from verbose
6845 # compiler output when linking a shared library.
6846 # Parse the compiler output and extract the necessary
6847 # objects, libraries and library flags.
6848 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6849 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6850 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6851 # Dependencies to place before and after the object being linked:
6852 _LT_TAGVAR(predep_objects, $1)=
6853 _LT_TAGVAR(postdep_objects, $1)=
6854 _LT_TAGVAR(predeps, $1)=
6855 _LT_TAGVAR(postdeps, $1)=
6856 _LT_TAGVAR(compiler_lib_search_path, $1)=
6857
6858 dnl we can't use the lt_simple_compile_test_code here,
6859 dnl because it contains code intended for an executable,
6860 dnl not a library. It's possible we should let each
6861 dnl tag define a new lt_????_link_test_code variable,
6862 dnl but it's only used here...
6863 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6864 int a;
6865 void foo (void) { a = 0; }
6866 _LT_EOF
6867 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6868 class Foo
6869 {
6870 public:
6871 Foo (void) { a = 0; }
6872 private:
6873 int a;
6874 };
6875 _LT_EOF
6876 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6877 subroutine foo
6878 implicit none
6879 integer*4 a
6880 a=0
6881 return
6882 end
6883 _LT_EOF
6884 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6885 subroutine foo
6886 implicit none
6887 integer a
6888 a=0
6889 return
6890 end
6891 _LT_EOF
6892 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6893 public class foo {
6894 private int a;
6895 public void bar (void) {
6896 a = 0;
6897 }
6898 };
6899 _LT_EOF
6900 ])
6901
6902 _lt_libdeps_save_CFLAGS=$CFLAGS
6903 case "$CC $CFLAGS " in #(
6904 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6905 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6906 esac
6907
6908 dnl Parse the compiler output and extract the necessary
6909 dnl objects, libraries and library flags.
6910 if AC_TRY_EVAL(ac_compile); then
6911 # Parse the compiler output and extract the necessary
6912 # objects, libraries and library flags.
6913
6914 # Sentinel used to keep track of whether or not we are before
6915 # the conftest object file.
6916 pre_test_object_deps_done=no
6917
6918 for p in `eval "$output_verbose_link_cmd"`; do
6919 case ${prev}${p} in
6920
6921 -L* | -R* | -l*)
6922 # Some compilers place space between "-{L,R}" and the path.
6923 # Remove the space.
6924 if test $p = "-L" ||
6925 test $p = "-R"; then
6926 prev=$p
6927 continue
6928 fi
6929
6930 # Expand the sysroot to ease extracting the directories later.
6931 if test -z "$prev"; then
6932 case $p in
6933 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
6934 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
6935 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
6936 esac
6937 fi
6938 case $p in
6939 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
6940 esac
6941 if test "$pre_test_object_deps_done" = no; then
6942 case ${prev} in
6943 -L | -R)
6944 # Internal compiler library paths should come after those
6945 # provided the user. The postdeps already come after the
6946 # user supplied libs so there is no need to process them.
6947 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6948 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6949 else
6950 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6951 fi
6952 ;;
6953 # The "-l" case would never come before the object being
6954 # linked, so don't bother handling this case.
6955 esac
6956 else
6957 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6958 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6959 else
6960 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6961 fi
6962 fi
6963 prev=
6964 ;;
6965
6966 *.lto.$objext) ;; # Ignore GCC LTO objects
6967 *.$objext)
6968 # This assumes that the test object file only shows up
6969 # once in the compiler output.
6970 if test "$p" = "conftest.$objext"; then
6971 pre_test_object_deps_done=yes
6972 continue
6973 fi
6974
6975 if test "$pre_test_object_deps_done" = no; then
6976 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6977 _LT_TAGVAR(predep_objects, $1)="$p"
6978 else
6979 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6980 fi
6981 else
6982 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6983 _LT_TAGVAR(postdep_objects, $1)="$p"
6984 else
6985 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6986 fi
6987 fi
6988 ;;
6989
6990 *) ;; # Ignore the rest.
6991
6992 esac
6993 done
6994
6995 # Clean up.
6996 rm -f a.out a.exe
6997 else
6998 echo "libtool.m4: error: problem compiling $1 test program"
6999 fi
7000
7001 $RM -f confest.$objext
7002 CFLAGS=$_lt_libdeps_save_CFLAGS
7003
7004 # PORTME: override above test on systems where it is broken
7005 m4_if([$1], [CXX],
7006 [case $host_os in
7007 interix[[3-9]]*)
7008 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7009 # hack all around it, let's just trust "g++" to DTRT.
7010 _LT_TAGVAR(predep_objects,$1)=
7011 _LT_TAGVAR(postdep_objects,$1)=
7012 _LT_TAGVAR(postdeps,$1)=
7013 ;;
7014
7015 linux*)
7016 case `$CC -V 2>&1 | sed 5q` in
7017 *Sun\ C*)
7018 # Sun C++ 5.9
7019
7020 # The more standards-conforming stlport4 library is
7021 # incompatible with the Cstd library. Avoid specifying
7022 # it if it's in CXXFLAGS. Ignore libCrun as
7023 # -library=stlport4 depends on it.
7024 case " $CXX $CXXFLAGS " in
7025 *" -library=stlport4 "*)
7026 solaris_use_stlport4=yes
7027 ;;
7028 esac
7029
7030 if test "$solaris_use_stlport4" != yes; then
7031 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7032 fi
7033 ;;
7034 esac
7035 ;;
7036
7037 solaris*)
7038 case $cc_basename in
7039 CC* | sunCC*)
7040 # The more standards-conforming stlport4 library is
7041 # incompatible with the Cstd library. Avoid specifying
7042 # it if it's in CXXFLAGS. Ignore libCrun as
7043 # -library=stlport4 depends on it.
7044 case " $CXX $CXXFLAGS " in
7045 *" -library=stlport4 "*)
7046 solaris_use_stlport4=yes
7047 ;;
7048 esac
7049
7050 # Adding this requires a known-good setup of shared libraries for
7051 # Sun compiler versions before 5.6, else PIC objects from an old
7052 # archive will be linked into the output, leading to subtle bugs.
7053 if test "$solaris_use_stlport4" != yes; then
7054 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7055 fi
7056 ;;
7057 esac
7058 ;;
7059 esac
7060 ])
7061
7062 case " $_LT_TAGVAR(postdeps, $1) " in
7063 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7064 esac
7065 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7066 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7067 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7068 fi
7069 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7070 [The directories searched by this compiler when creating a shared library])
7071 _LT_TAGDECL([], [predep_objects], [1],
7072 [Dependencies to place before and after the objects being linked to
7073 create a shared library])
7074 _LT_TAGDECL([], [postdep_objects], [1])
7075 _LT_TAGDECL([], [predeps], [1])
7076 _LT_TAGDECL([], [postdeps], [1])
7077 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7078 [The library search path used internally by the compiler when linking
7079 a shared library])
7080 ])# _LT_SYS_HIDDEN_LIBDEPS
7081
7082
7083 # _LT_LANG_F77_CONFIG([TAG])
7084 # --------------------------
7085 # Ensure that the configuration variables for a Fortran 77 compiler are
7086 # suitably defined. These variables are subsequently used by _LT_CONFIG
7087 # to write the compiler configuration to `libtool'.
7088 m4_defun([_LT_LANG_F77_CONFIG],
7089 [AC_LANG_PUSH(Fortran 77)
7090 if test -z "$F77" || test "X$F77" = "Xno"; then
7091 _lt_disable_F77=yes
7092 fi
7093
7094 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7095 _LT_TAGVAR(allow_undefined_flag, $1)=
7096 _LT_TAGVAR(always_export_symbols, $1)=no
7097 _LT_TAGVAR(archive_expsym_cmds, $1)=
7098 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7099 _LT_TAGVAR(hardcode_direct, $1)=no
7100 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7102 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7103 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7104 _LT_TAGVAR(hardcode_minus_L, $1)=no
7105 _LT_TAGVAR(hardcode_automatic, $1)=no
7106 _LT_TAGVAR(inherit_rpath, $1)=no
7107 _LT_TAGVAR(module_cmds, $1)=
7108 _LT_TAGVAR(module_expsym_cmds, $1)=
7109 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7110 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7111 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7112 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7113 _LT_TAGVAR(no_undefined_flag, $1)=
7114 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7115 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7116
7117 # Source file extension for f77 test sources.
7118 ac_ext=f
7119
7120 # Object file extension for compiled f77 test sources.
7121 objext=o
7122 _LT_TAGVAR(objext, $1)=$objext
7123
7124 # No sense in running all these tests if we already determined that
7125 # the F77 compiler isn't working. Some variables (like enable_shared)
7126 # are currently assumed to apply to all compilers on this platform,
7127 # and will be corrupted by setting them based on a non-working compiler.
7128 if test "$_lt_disable_F77" != yes; then
7129 # Code to be used in simple compile tests
7130 lt_simple_compile_test_code="\
7131 subroutine t
7132 return
7133 end
7134 "
7135
7136 # Code to be used in simple link tests
7137 lt_simple_link_test_code="\
7138 program t
7139 end
7140 "
7141
7142 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7143 _LT_TAG_COMPILER
7144
7145 # save warnings/boilerplate of simple test code
7146 _LT_COMPILER_BOILERPLATE
7147 _LT_LINKER_BOILERPLATE
7148
7149 # Allow CC to be a program name with arguments.
7150 lt_save_CC="$CC"
7151 lt_save_GCC=$GCC
7152 lt_save_CFLAGS=$CFLAGS
7153 CC=${F77-"f77"}
7154 CFLAGS=$FFLAGS
7155 compiler=$CC
7156 _LT_TAGVAR(compiler, $1)=$CC
7157 _LT_CC_BASENAME([$compiler])
7158 GCC=$G77
7159 if test -n "$compiler"; then
7160 AC_MSG_CHECKING([if libtool supports shared libraries])
7161 AC_MSG_RESULT([$can_build_shared])
7162
7163 AC_MSG_CHECKING([whether to build shared libraries])
7164 test "$can_build_shared" = "no" && enable_shared=no
7165
7166 # On AIX, shared libraries and static libraries use the same namespace, and
7167 # are all built from PIC.
7168 case $host_os in
7169 aix3*)
7170 test "$enable_shared" = yes && enable_static=no
7171 if test -n "$RANLIB"; then
7172 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7173 postinstall_cmds='$RANLIB $lib'
7174 fi
7175 ;;
7176 aix[[4-9]]*)
7177 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7178 test "$enable_shared" = yes && enable_static=no
7179 fi
7180 ;;
7181 esac
7182 AC_MSG_RESULT([$enable_shared])
7183
7184 AC_MSG_CHECKING([whether to build static libraries])
7185 # Make sure either enable_shared or enable_static is yes.
7186 test "$enable_shared" = yes || enable_static=yes
7187 AC_MSG_RESULT([$enable_static])
7188
7189 _LT_TAGVAR(GCC, $1)="$G77"
7190 _LT_TAGVAR(LD, $1)="$LD"
7191
7192 ## CAVEAT EMPTOR:
7193 ## There is no encapsulation within the following macros, do not change
7194 ## the running order or otherwise move them around unless you know exactly
7195 ## what you are doing...
7196 _LT_COMPILER_PIC($1)
7197 _LT_COMPILER_C_O($1)
7198 _LT_COMPILER_FILE_LOCKS($1)
7199 _LT_LINKER_SHLIBS($1)
7200 _LT_SYS_DYNAMIC_LINKER($1)
7201 _LT_LINKER_HARDCODE_LIBPATH($1)
7202
7203 _LT_CONFIG($1)
7204 fi # test -n "$compiler"
7205
7206 GCC=$lt_save_GCC
7207 CC="$lt_save_CC"
7208 CFLAGS="$lt_save_CFLAGS"
7209 fi # test "$_lt_disable_F77" != yes
7210
7211 AC_LANG_POP
7212 ])# _LT_LANG_F77_CONFIG
7213
7214
7215 # _LT_LANG_FC_CONFIG([TAG])
7216 # -------------------------
7217 # Ensure that the configuration variables for a Fortran compiler are
7218 # suitably defined. These variables are subsequently used by _LT_CONFIG
7219 # to write the compiler configuration to `libtool'.
7220 m4_defun([_LT_LANG_FC_CONFIG],
7221 [AC_LANG_PUSH(Fortran)
7222
7223 if test -z "$FC" || test "X$FC" = "Xno"; then
7224 _lt_disable_FC=yes
7225 fi
7226
7227 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7228 _LT_TAGVAR(allow_undefined_flag, $1)=
7229 _LT_TAGVAR(always_export_symbols, $1)=no
7230 _LT_TAGVAR(archive_expsym_cmds, $1)=
7231 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7232 _LT_TAGVAR(hardcode_direct, $1)=no
7233 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7234 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7235 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7236 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7237 _LT_TAGVAR(hardcode_minus_L, $1)=no
7238 _LT_TAGVAR(hardcode_automatic, $1)=no
7239 _LT_TAGVAR(inherit_rpath, $1)=no
7240 _LT_TAGVAR(module_cmds, $1)=
7241 _LT_TAGVAR(module_expsym_cmds, $1)=
7242 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7243 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7244 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7245 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7246 _LT_TAGVAR(no_undefined_flag, $1)=
7247 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7248 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7249
7250 # Source file extension for fc test sources.
7251 ac_ext=${ac_fc_srcext-f}
7252
7253 # Object file extension for compiled fc test sources.
7254 objext=o
7255 _LT_TAGVAR(objext, $1)=$objext
7256
7257 # No sense in running all these tests if we already determined that
7258 # the FC compiler isn't working. Some variables (like enable_shared)
7259 # are currently assumed to apply to all compilers on this platform,
7260 # and will be corrupted by setting them based on a non-working compiler.
7261 if test "$_lt_disable_FC" != yes; then
7262 # Code to be used in simple compile tests
7263 lt_simple_compile_test_code="\
7264 subroutine t
7265 return
7266 end
7267 "
7268
7269 # Code to be used in simple link tests
7270 lt_simple_link_test_code="\
7271 program t
7272 end
7273 "
7274
7275 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7276 _LT_TAG_COMPILER
7277
7278 # save warnings/boilerplate of simple test code
7279 _LT_COMPILER_BOILERPLATE
7280 _LT_LINKER_BOILERPLATE
7281
7282 # Allow CC to be a program name with arguments.
7283 lt_save_CC="$CC"
7284 lt_save_GCC=$GCC
7285 lt_save_CFLAGS=$CFLAGS
7286 CC=${FC-"f95"}
7287 CFLAGS=$FCFLAGS
7288 compiler=$CC
7289 GCC=$ac_cv_fc_compiler_gnu
7290
7291 _LT_TAGVAR(compiler, $1)=$CC
7292 _LT_CC_BASENAME([$compiler])
7293
7294 if test -n "$compiler"; then
7295 AC_MSG_CHECKING([if libtool supports shared libraries])
7296 AC_MSG_RESULT([$can_build_shared])
7297
7298 AC_MSG_CHECKING([whether to build shared libraries])
7299 test "$can_build_shared" = "no" && enable_shared=no
7300
7301 # On AIX, shared libraries and static libraries use the same namespace, and
7302 # are all built from PIC.
7303 case $host_os in
7304 aix3*)
7305 test "$enable_shared" = yes && enable_static=no
7306 if test -n "$RANLIB"; then
7307 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7308 postinstall_cmds='$RANLIB $lib'
7309 fi
7310 ;;
7311 aix[[4-9]]*)
7312 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7313 test "$enable_shared" = yes && enable_static=no
7314 fi
7315 ;;
7316 esac
7317 AC_MSG_RESULT([$enable_shared])
7318
7319 AC_MSG_CHECKING([whether to build static libraries])
7320 # Make sure either enable_shared or enable_static is yes.
7321 test "$enable_shared" = yes || enable_static=yes
7322 AC_MSG_RESULT([$enable_static])
7323
7324 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7325 _LT_TAGVAR(LD, $1)="$LD"
7326
7327 ## CAVEAT EMPTOR:
7328 ## There is no encapsulation within the following macros, do not change
7329 ## the running order or otherwise move them around unless you know exactly
7330 ## what you are doing...
7331 _LT_SYS_HIDDEN_LIBDEPS($1)
7332 _LT_COMPILER_PIC($1)
7333 _LT_COMPILER_C_O($1)
7334 _LT_COMPILER_FILE_LOCKS($1)
7335 _LT_LINKER_SHLIBS($1)
7336 _LT_SYS_DYNAMIC_LINKER($1)
7337 _LT_LINKER_HARDCODE_LIBPATH($1)
7338
7339 _LT_CONFIG($1)
7340 fi # test -n "$compiler"
7341
7342 GCC=$lt_save_GCC
7343 CC=$lt_save_CC
7344 CFLAGS=$lt_save_CFLAGS
7345 fi # test "$_lt_disable_FC" != yes
7346
7347 AC_LANG_POP
7348 ])# _LT_LANG_FC_CONFIG
7349
7350
7351 # _LT_LANG_GCJ_CONFIG([TAG])
7352 # --------------------------
7353 # Ensure that the configuration variables for the GNU Java Compiler compiler
7354 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7355 # to write the compiler configuration to `libtool'.
7356 m4_defun([_LT_LANG_GCJ_CONFIG],
7357 [AC_REQUIRE([LT_PROG_GCJ])dnl
7358 AC_LANG_SAVE
7359
7360 # Source file extension for Java test sources.
7361 ac_ext=java
7362
7363 # Object file extension for compiled Java test sources.
7364 objext=o
7365 _LT_TAGVAR(objext, $1)=$objext
7366
7367 # Code to be used in simple compile tests
7368 lt_simple_compile_test_code="class foo {}"
7369
7370 # Code to be used in simple link tests
7371 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7372
7373 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7374 _LT_TAG_COMPILER
7375
7376 # save warnings/boilerplate of simple test code
7377 _LT_COMPILER_BOILERPLATE
7378 _LT_LINKER_BOILERPLATE
7379
7380 # Allow CC to be a program name with arguments.
7381 lt_save_CC=$CC
7382 lt_save_CFLAGS=$CFLAGS
7383 lt_save_GCC=$GCC
7384 GCC=yes
7385 CC=${GCJ-"gcj"}
7386 CFLAGS=$GCJFLAGS
7387 compiler=$CC
7388 _LT_TAGVAR(compiler, $1)=$CC
7389 _LT_TAGVAR(LD, $1)="$LD"
7390 _LT_CC_BASENAME([$compiler])
7391
7392 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7393 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7394
7395 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7396 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7397 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7398
7399 ## CAVEAT EMPTOR:
7400 ## There is no encapsulation within the following macros, do not change
7401 ## the running order or otherwise move them around unless you know exactly
7402 ## what you are doing...
7403 if test -n "$compiler"; then
7404 _LT_COMPILER_NO_RTTI($1)
7405 _LT_COMPILER_PIC($1)
7406 _LT_COMPILER_C_O($1)
7407 _LT_COMPILER_FILE_LOCKS($1)
7408 _LT_LINKER_SHLIBS($1)
7409 _LT_LINKER_HARDCODE_LIBPATH($1)
7410
7411 _LT_CONFIG($1)
7412 fi
7413
7414 AC_LANG_RESTORE
7415
7416 GCC=$lt_save_GCC
7417 CC=$lt_save_CC
7418 CFLAGS=$lt_save_CFLAGS
7419 ])# _LT_LANG_GCJ_CONFIG
7420
7421
7422 # _LT_LANG_RC_CONFIG([TAG])
7423 # -------------------------
7424 # Ensure that the configuration variables for the Windows resource compiler
7425 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7426 # to write the compiler configuration to `libtool'.
7427 m4_defun([_LT_LANG_RC_CONFIG],
7428 [AC_REQUIRE([LT_PROG_RC])dnl
7429 AC_LANG_SAVE
7430
7431 # Source file extension for RC test sources.
7432 ac_ext=rc
7433
7434 # Object file extension for compiled RC test sources.
7435 objext=o
7436 _LT_TAGVAR(objext, $1)=$objext
7437
7438 # Code to be used in simple compile tests
7439 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7440
7441 # Code to be used in simple link tests
7442 lt_simple_link_test_code="$lt_simple_compile_test_code"
7443
7444 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7445 _LT_TAG_COMPILER
7446
7447 # save warnings/boilerplate of simple test code
7448 _LT_COMPILER_BOILERPLATE
7449 _LT_LINKER_BOILERPLATE
7450
7451 # Allow CC to be a program name with arguments.
7452 lt_save_CC="$CC"
7453 lt_save_CFLAGS=$CFLAGS
7454 lt_save_GCC=$GCC
7455 GCC=
7456 CC=${RC-"windres"}
7457 CFLAGS=
7458 compiler=$CC
7459 _LT_TAGVAR(compiler, $1)=$CC
7460 _LT_CC_BASENAME([$compiler])
7461 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7462
7463 if test -n "$compiler"; then
7464 :
7465 _LT_CONFIG($1)
7466 fi
7467
7468 GCC=$lt_save_GCC
7469 AC_LANG_RESTORE
7470 CC=$lt_save_CC
7471 CFLAGS=$lt_save_CFLAGS
7472 ])# _LT_LANG_RC_CONFIG
7473
7474
7475 # LT_PROG_GCJ
7476 # -----------
7477 AC_DEFUN([LT_PROG_GCJ],
7478 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7479 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7480 [AC_CHECK_TOOL(GCJ, gcj,)
7481 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7482 AC_SUBST(GCJFLAGS)])])[]dnl
7483 ])
7484
7485 # Old name:
7486 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7487 dnl aclocal-1.4 backwards compatibility:
7488 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7489
7490
7491 # LT_PROG_RC
7492 # ----------
7493 AC_DEFUN([LT_PROG_RC],
7494 [AC_CHECK_TOOL(RC, windres,)
7495 ])
7496
7497 # Old name:
7498 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7499 dnl aclocal-1.4 backwards compatibility:
7500 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7501
7502
7503 # _LT_DECL_EGREP
7504 # --------------
7505 # If we don't have a new enough Autoconf to choose the best grep
7506 # available, choose the one first in the user's PATH.
7507 m4_defun([_LT_DECL_EGREP],
7508 [AC_REQUIRE([AC_PROG_EGREP])dnl
7509 AC_REQUIRE([AC_PROG_FGREP])dnl
7510 test -z "$GREP" && GREP=grep
7511 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7512 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7513 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7514 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7515 AC_SUBST([GREP])
7516 ])
7517
7518
7519 # _LT_DECL_OBJDUMP
7520 # --------------
7521 # If we don't have a new enough Autoconf to choose the best objdump
7522 # available, choose the one first in the user's PATH.
7523 m4_defun([_LT_DECL_OBJDUMP],
7524 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7525 test -z "$OBJDUMP" && OBJDUMP=objdump
7526 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7527 AC_SUBST([OBJDUMP])
7528 ])
7529
7530 # _LT_DECL_DLLTOOL
7531 # ----------------
7532 # Ensure DLLTOOL variable is set.
7533 m4_defun([_LT_DECL_DLLTOOL],
7534 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7535 test -z "$DLLTOOL" && DLLTOOL=dlltool
7536 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7537 AC_SUBST([DLLTOOL])
7538 ])
7539
7540 # _LT_DECL_SED
7541 # ------------
7542 # Check for a fully-functional sed program, that truncates
7543 # as few characters as possible. Prefer GNU sed if found.
7544 m4_defun([_LT_DECL_SED],
7545 [AC_PROG_SED
7546 test -z "$SED" && SED=sed
7547 Xsed="$SED -e 1s/^X//"
7548 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7549 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7550 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7551 ])# _LT_DECL_SED
7552
7553 m4_ifndef([AC_PROG_SED], [
7554 ############################################################
7555 # NOTE: This macro has been submitted for inclusion into #
7556 # GNU Autoconf as AC_PROG_SED. When it is available in #
7557 # a released version of Autoconf we should remove this #
7558 # macro and use it instead. #
7559 ############################################################
7560
7561 m4_defun([AC_PROG_SED],
7562 [AC_MSG_CHECKING([for a sed that does not truncate output])
7563 AC_CACHE_VAL(lt_cv_path_SED,
7564 [# Loop through the user's path and test for sed and gsed.
7565 # Then use that list of sed's as ones to test for truncation.
7566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7567 for as_dir in $PATH
7568 do
7569 IFS=$as_save_IFS
7570 test -z "$as_dir" && as_dir=.
7571 for lt_ac_prog in sed gsed; do
7572 for ac_exec_ext in '' $ac_executable_extensions; do
7573 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7574 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7575 fi
7576 done
7577 done
7578 done
7579 IFS=$as_save_IFS
7580 lt_ac_max=0
7581 lt_ac_count=0
7582 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7583 # along with /bin/sed that truncates output.
7584 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7585 test ! -f $lt_ac_sed && continue
7586 cat /dev/null > conftest.in
7587 lt_ac_count=0
7588 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7589 # Check for GNU sed and select it if it is found.
7590 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7591 lt_cv_path_SED=$lt_ac_sed
7592 break
7593 fi
7594 while true; do
7595 cat conftest.in conftest.in >conftest.tmp
7596 mv conftest.tmp conftest.in
7597 cp conftest.in conftest.nl
7598 echo >>conftest.nl
7599 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7600 cmp -s conftest.out conftest.nl || break
7601 # 10000 chars as input seems more than enough
7602 test $lt_ac_count -gt 10 && break
7603 lt_ac_count=`expr $lt_ac_count + 1`
7604 if test $lt_ac_count -gt $lt_ac_max; then
7605 lt_ac_max=$lt_ac_count
7606 lt_cv_path_SED=$lt_ac_sed
7607 fi
7608 done
7609 done
7610 ])
7611 SED=$lt_cv_path_SED
7612 AC_SUBST([SED])
7613 AC_MSG_RESULT([$SED])
7614 ])#AC_PROG_SED
7615 ])#m4_ifndef
7616
7617 # Old name:
7618 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7619 dnl aclocal-1.4 backwards compatibility:
7620 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7621
7622
7623 # _LT_CHECK_SHELL_FEATURES
7624 # ------------------------
7625 # Find out whether the shell is Bourne or XSI compatible,
7626 # or has some other useful features.
7627 m4_defun([_LT_CHECK_SHELL_FEATURES],
7628 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7629 # Try some XSI features
7630 xsi_shell=no
7631 ( _lt_dummy="a/b/c"
7632 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7633 = c,a/b,b/c, \
7634 && eval 'test $(( 1 + 1 )) -eq 2 \
7635 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7636 && xsi_shell=yes
7637 AC_MSG_RESULT([$xsi_shell])
7638 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7639
7640 AC_MSG_CHECKING([whether the shell understands "+="])
7641 lt_shell_append=no
7642 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7643 >/dev/null 2>&1 \
7644 && lt_shell_append=yes
7645 AC_MSG_RESULT([$lt_shell_append])
7646 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7647
7648 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7649 lt_unset=unset
7650 else
7651 lt_unset=false
7652 fi
7653 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7654
7655 # test EBCDIC or ASCII
7656 case `echo X|tr X '\101'` in
7657 A) # ASCII based system
7658 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7659 lt_SP2NL='tr \040 \012'
7660 lt_NL2SP='tr \015\012 \040\040'
7661 ;;
7662 *) # EBCDIC based system
7663 lt_SP2NL='tr \100 \n'
7664 lt_NL2SP='tr \r\n \100\100'
7665 ;;
7666 esac
7667 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7668 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7669 ])# _LT_CHECK_SHELL_FEATURES
7670
7671
7672 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7673 # ------------------------------------------------------
7674 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7675 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7676 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7677 [dnl {
7678 sed -e '/^$1 ()$/,/^} # $1 /c\
7679 $1 ()\
7680 {\
7681 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7682 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7683 && mv -f "$cfgfile.tmp" "$cfgfile" \
7684 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7685 test 0 -eq $? || _lt_function_replace_fail=:
7686 ])
7687
7688
7689 # _LT_PROG_REPLACE_SHELLFNS
7690 # -------------------------
7691 # Replace existing portable implementations of several shell functions with
7692 # equivalent extended shell implementations where those features are available..
7693 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7694 [if test x"$xsi_shell" = xyes; then
7695 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7696 case ${1} in
7697 */*) func_dirname_result="${1%/*}${2}" ;;
7698 * ) func_dirname_result="${3}" ;;
7699 esac])
7700
7701 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7702 func_basename_result="${1##*/}"])
7703
7704 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7705 case ${1} in
7706 */*) func_dirname_result="${1%/*}${2}" ;;
7707 * ) func_dirname_result="${3}" ;;
7708 esac
7709 func_basename_result="${1##*/}"])
7710
7711 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7712 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7713 # positional parameters, so assign one to ordinary parameter first.
7714 func_stripname_result=${3}
7715 func_stripname_result=${func_stripname_result#"${1}"}
7716 func_stripname_result=${func_stripname_result%"${2}"}])
7717
7718 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7719 func_split_long_opt_name=${1%%=*}
7720 func_split_long_opt_arg=${1#*=}])
7721
7722 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7723 func_split_short_opt_arg=${1#??}
7724 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7725
7726 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7727 case ${1} in
7728 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7729 *) func_lo2o_result=${1} ;;
7730 esac])
7731
7732 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7733
7734 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7735
7736 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7737 fi
7738
7739 if test x"$lt_shell_append" = xyes; then
7740 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7741
7742 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7743 func_quote_for_eval "${2}"
7744 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7745 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7746
7747 # Save a `func_append' function call where possible by direct use of '+='
7748 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7749 && mv -f "$cfgfile.tmp" "$cfgfile" \
7750 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7751 test 0 -eq $? || _lt_function_replace_fail=:
7752 else
7753 # Save a `func_append' function call even when '+=' is not available
7754 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7755 && mv -f "$cfgfile.tmp" "$cfgfile" \
7756 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7757 test 0 -eq $? || _lt_function_replace_fail=:
7758 fi
7759
7760 if test x"$_lt_function_replace_fail" = x":"; then
7761 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7762 fi
7763 ])
7764
7765 # _LT_PATH_CONVERSION_FUNCTIONS
7766 # -----------------------------
7767 # Determine which file name conversion functions should be used by
7768 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7769 # for certain cross-compile configurations and native mingw.
7770 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7771 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7772 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7773 AC_MSG_CHECKING([how to convert $build file names to $host format])
7774 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7775 [case $host in
7776 *-*-mingw* )
7777 case $build in
7778 *-*-mingw* ) # actually msys
7779 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7780 ;;
7781 *-*-cygwin* )
7782 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7783 ;;
7784 * ) # otherwise, assume *nix
7785 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7786 ;;
7787 esac
7788 ;;
7789 *-*-cygwin* )
7790 case $build in
7791 *-*-mingw* ) # actually msys
7792 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7793 ;;
7794 *-*-cygwin* )
7795 lt_cv_to_host_file_cmd=func_convert_file_noop
7796 ;;
7797 * ) # otherwise, assume *nix
7798 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7799 ;;
7800 esac
7801 ;;
7802 * ) # unhandled hosts (and "normal" native builds)
7803 lt_cv_to_host_file_cmd=func_convert_file_noop
7804 ;;
7805 esac
7806 ])
7807 to_host_file_cmd=$lt_cv_to_host_file_cmd
7808 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7809 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7810 [0], [convert $build file names to $host format])dnl
7811
7812 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7813 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7814 [#assume ordinary cross tools, or native build.
7815 lt_cv_to_tool_file_cmd=func_convert_file_noop
7816 case $host in
7817 *-*-mingw* )
7818 case $build in
7819 *-*-mingw* ) # actually msys
7820 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7821 ;;
7822 esac
7823 ;;
7824 esac
7825 ])
7826 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7827 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7828 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7829 [0], [convert $build files to toolchain format])dnl
7830 ])# _LT_PATH_CONVERSION_FUNCTIONS
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
3 # Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 7 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_define([_LT_MANGLE_OPTION],
19 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23 # ---------------------------------------
24 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26 # saved as a flag.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
32 ])
33
34
35 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36 # ------------------------------------------------------------
37 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38 m4_define([_LT_IF_OPTION],
39 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43 # -------------------------------------------------------
44 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45 # are set.
46 m4_define([_LT_UNLESS_OPTIONS],
47 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51 ])[]dnl
52 ])
53
54
55 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56 # ----------------------------------------
57 # OPTION-LIST is a space-separated list of Libtool options associated
58 # with MACRO-NAME. If any OPTION has a matching handler declared with
59 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60 # the unknown option and exit.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 ])
85 ])# _LT_SET_OPTIONS
86
87
88 ## --------------------------------- ##
89 ## Macros to handle LT_INIT options. ##
90 ## --------------------------------- ##
91
92 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93 # -----------------------------------------
94 m4_define([_LT_MANGLE_DEFUN],
95 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
97
98 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99 # -----------------------------------------------
100 m4_define([LT_OPTION_DEFINE],
101 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102 ])# LT_OPTION_DEFINE
103
104
105 # dlopen
106 # ------
107 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108 ])
109
110 AU_DEFUN([AC_LIBTOOL_DLOPEN],
111 [_LT_SET_OPTION([LT_INIT], [dlopen])
112 AC_DIAGNOSE([obsolete],
113 [$0: Remove this warning and the call to _LT_SET_OPTION when you
114 put the `dlopen' option into LT_INIT's first parameter.])
115 ])
116
117 dnl aclocal-1.4 backwards compatibility:
118 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
120
121 # win32-dll
122 # ---------
123 # Declare package support for building win32 dll's.
124 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125 [enable_win32_dll=yes
126
127 case $host in
128 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
132 ;;
133 esac
134
135 test -z "$AS" && AS=as
136 _LT_DECL([], [AS], [1], [Assembler program])dnl
137
138 test -z "$DLLTOOL" && DLLTOOL=dlltool
139 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
140
141 test -z "$OBJDUMP" && OBJDUMP=objdump
142 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
143 ])# win32-dll
144
145 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
147 _LT_SET_OPTION([LT_INIT], [win32-dll])
148 AC_DIAGNOSE([obsolete],
149 [$0: Remove this warning and the call to _LT_SET_OPTION when you
150 put the `win32-dll' option into LT_INIT's first parameter.])
151 ])
152
153 dnl aclocal-1.4 backwards compatibility:
154 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
156
157 # _LT_ENABLE_SHARED([DEFAULT])
158 # ----------------------------
159 # implement the --enable-shared flag, and supports the `shared' and
160 # `disable-shared' LT_INIT options.
161 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162 m4_define([_LT_ENABLE_SHARED],
163 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164 AC_ARG_ENABLE([shared],
165 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167 [p=${PACKAGE-default}
168 case $enableval in
169 yes) enable_shared=yes ;;
170 no) enable_shared=no ;;
171 *)
172 enable_shared=no
173 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
177 if test "X$pkg" = "X$p"; then
178 enable_shared=yes
179 fi
180 done
181 IFS="$lt_save_ifs"
182 ;;
183 esac],
184 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
186 _LT_DECL([build_libtool_libs], [enable_shared], [0],
187 [Whether or not to build shared libraries])
188 ])# _LT_ENABLE_SHARED
189
190 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
193 # Old names:
194 AC_DEFUN([AC_ENABLE_SHARED],
195 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196 ])
197
198 AC_DEFUN([AC_DISABLE_SHARED],
199 [_LT_SET_OPTION([LT_INIT], [disable-shared])
200 ])
201
202 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
205 dnl aclocal-1.4 backwards compatibility:
206 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
209
210
211 # _LT_ENABLE_STATIC([DEFAULT])
212 # ----------------------------
213 # implement the --enable-static flag, and support the `static' and
214 # `disable-static' LT_INIT options.
215 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216 m4_define([_LT_ENABLE_STATIC],
217 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218 AC_ARG_ENABLE([static],
219 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221 [p=${PACKAGE-default}
222 case $enableval in
223 yes) enable_static=yes ;;
224 no) enable_static=no ;;
225 *)
226 enable_static=no
227 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
231 if test "X$pkg" = "X$p"; then
232 enable_static=yes
233 fi
234 done
235 IFS="$lt_save_ifs"
236 ;;
237 esac],
238 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
240 _LT_DECL([build_old_libs], [enable_static], [0],
241 [Whether or not to build static libraries])
242 ])# _LT_ENABLE_STATIC
243
244 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
247 # Old names:
248 AC_DEFUN([AC_ENABLE_STATIC],
249 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250 ])
251
252 AC_DEFUN([AC_DISABLE_STATIC],
253 [_LT_SET_OPTION([LT_INIT], [disable-static])
254 ])
255
256 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
259 dnl aclocal-1.4 backwards compatibility:
260 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
263
264
265 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266 # ----------------------------------
267 # implement the --enable-fast-install flag, and support the `fast-install'
268 # and `disable-fast-install' LT_INIT options.
269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270 m4_define([_LT_ENABLE_FAST_INSTALL],
271 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272 AC_ARG_ENABLE([fast-install],
273 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275 [p=${PACKAGE-default}
276 case $enableval in
277 yes) enable_fast_install=yes ;;
278 no) enable_fast_install=no ;;
279 *)
280 enable_fast_install=no
281 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
287 fi
288 done
289 IFS="$lt_save_ifs"
290 ;;
291 esac],
292 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
294 _LT_DECL([fast_install], [enable_fast_install], [0],
295 [Whether or not to optimize for fast installation])dnl
296 ])# _LT_ENABLE_FAST_INSTALL
297
298 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
301 # Old names:
302 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304 AC_DIAGNOSE([obsolete],
305 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306 the `fast-install' option into LT_INIT's first parameter.])
307 ])
308
309 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311 AC_DIAGNOSE([obsolete],
312 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313 the `disable-fast-install' option into LT_INIT's first parameter.])
314 ])
315
316 dnl aclocal-1.4 backwards compatibility:
317 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
320
321 # _LT_WITH_PIC([MODE])
322 # --------------------
323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
324 # LT_INIT options.
325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326 m4_define([_LT_WITH_PIC],
327 [AC_ARG_WITH([pic],
328 [AS_HELP_STRING([--with-pic],
329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330 [pic_mode="$withval"],
331 [pic_mode=default])
332
333 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
334
335 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
336 ])# _LT_WITH_PIC
337
338 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
339 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
340
341 # Old name:
342 AU_DEFUN([AC_LIBTOOL_PICMODE],
343 [_LT_SET_OPTION([LT_INIT], [pic-only])
344 AC_DIAGNOSE([obsolete],
345 [$0: Remove this warning and the call to _LT_SET_OPTION when you
346 put the `pic-only' option into LT_INIT's first parameter.])
347 ])
348
349 dnl aclocal-1.4 backwards compatibility:
350 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
351
352 ## ----------------- ##
353 ## LTDL_INIT Options ##
354 ## ----------------- ##
355
356 m4_define([_LTDL_MODE], [])
357 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
358 [m4_define([_LTDL_MODE], [nonrecursive])])
359 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
360 [m4_define([_LTDL_MODE], [recursive])])
361 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
362 [m4_define([_LTDL_MODE], [subproject])])
363
364 m4_define([_LTDL_TYPE], [])
365 LT_OPTION_DEFINE([LTDL_INIT], [installable],
366 [m4_define([_LTDL_TYPE], [installable])])
367 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
368 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3 # Written by Gary V. Vaughan, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 6 ltsugar.m4
10
11 # This is to help aclocal find these macros, as it can't see m4_define.
12 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
13
14
15 # lt_join(SEP, ARG1, [ARG2...])
16 # -----------------------------
17 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
18 # associated separator.
19 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
20 # versions in m4sugar had bugs.
21 m4_define([lt_join],
22 [m4_if([$#], [1], [],
23 [$#], [2], [[$2]],
24 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
25 m4_define([_lt_join],
26 [m4_if([$#$2], [2], [],
27 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
28
29
30 # lt_car(LIST)
31 # lt_cdr(LIST)
32 # ------------
33 # Manipulate m4 lists.
34 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 m4_define([lt_car], [[$1]])
37 m4_define([lt_cdr],
38 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
39 [$#], 1, [],
40 [m4_dquote(m4_shift($@))])])
41 m4_define([lt_unquote], $1)
42
43
44 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
45 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Note that neither SEPARATOR nor STRING are expanded; they are appended
48 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
49 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
50 # than defined and empty).
51 #
52 # This macro is needed until we can rely on Autoconf 2.62, since earlier
53 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
54 m4_define([lt_append],
55 [m4_define([$1],
56 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
57
58
59
60 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
61 # ----------------------------------------------------------
62 # Produce a SEP delimited list of all paired combinations of elements of
63 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
64 # has the form PREFIXmINFIXSUFFIXn.
65 # Needed until we can rely on m4_combine added in Autoconf 2.62.
66 m4_define([lt_combine],
67 [m4_if(m4_eval([$# > 3]), [1],
68 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
69 [[m4_foreach([_Lt_prefix], [$2],
70 [m4_foreach([_Lt_suffix],
71 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
72 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
73
74
75 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
76 # -----------------------------------------------------------------------
77 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
78 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
79 m4_define([lt_if_append_uniq],
80 [m4_ifdef([$1],
81 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
82 [lt_append([$1], [$2], [$3])$4],
83 [$5])],
84 [lt_append([$1], [$2], [$3])$4])])
85
86
87 # lt_dict_add(DICT, KEY, VALUE)
88 # -----------------------------
89 m4_define([lt_dict_add],
90 [m4_define([$1($2)], [$3])])
91
92
93 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94 # --------------------------------------------
95 m4_define([lt_dict_add_subkey],
96 [m4_define([$1($2:$3)], [$4])])
97
98
99 # lt_dict_fetch(DICT, KEY, [SUBKEY])
100 # ----------------------------------
101 m4_define([lt_dict_fetch],
102 [m4_ifval([$3],
103 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
104 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
105
106
107 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
108 # -----------------------------------------------------------------
109 m4_define([lt_if_dict_fetch],
110 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
111 [$5],
112 [$6])])
113
114
115 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
116 # --------------------------------------------------------------
117 m4_define([lt_dict_filter],
118 [m4_if([$5], [], [],
119 [lt_join(m4_quote(m4_default([$4], [[, ]])),
120 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
121 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
122 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # @configure_input@
10
11 # serial 3293 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4])
15 m4_define([LT_PACKAGE_REVISION], [1.3293])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4'
19 macro_revision='1.3293'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004.
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 5 lt~obsolete.m4
10
11 # These exist entirely to fool aclocal when bootstrapping libtool.
12 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # which have later been changed to m4_define as they aren't part of the
15 # exported API, or moved to Autoconf or Automake where they belong.
16 #
17 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
18 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
19 # using a macro with the same name in our local m4/libtool.m4 it'll
20 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
21 # and doesn't know about Autoconf macros at all.)
22 #
23 # So we provide this file, which has a silly filename so it's always
24 # included after everything else. This provides aclocal with the
25 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
26 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 #
29 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
30 # Yes, that means every name once taken will need to remain here until
31 # we give up compatibility with versions before 1.7, at which point
32 # we need to keep only those names which we still refer to.
33
34 # This is to help aclocal find these macros, as it can't see m4_define.
35 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
36
37 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
38 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
39 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
40 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
41 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
42 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
43 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
44 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
45 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
46 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
47 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
48 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
49 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
50 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
51 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
52 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
53 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
54 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
55 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
56 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
57 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
58 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
59 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
60 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
61 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
62 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
63 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
64 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
65 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
66 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
67 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
68 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
69 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
70 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
71 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
72 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
73 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
74 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
75 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
76 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
77 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
78 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
79 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
80 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
81 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
82 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
83 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
84 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
85 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
86 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
87 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
88 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
89 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
90 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
91 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
92 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
93 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
94 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
95 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
96 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
97 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
0 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1 #
2 # $Id: Makefile.am,v 1.85 2010/10/28 04:12:55 cm-msk Exp $
3
4 if FILTER_TESTS
5 SUBDIRS=tests
6 endif
7
8 dist_doc_DATA = opendmarc.conf.sample
9
10 sbin_PROGRAMS = opendmarc opendmarc-check
11
12 opendmarc_SOURCES = config.c config.h opendmarc.c opendmarc.h \
13 opendmarc-ar.c opendmarc-ar.h opendmarc-config.h \
14 opendmarc-dstring.c opendmarc-dstring.h \
15 parse.c parse.h test.c test.h util.c util.h
16 opendmarc_CC = $(PTHREAD_CC)
17 opendmarc_CFLAGS = $(PTHREAD_CFLAGS)
18 opendmarc_CPPFLAGS = $(LIBMILTER_INCDIRS) -I$(srcdir)/../libopendmarc
19 opendmarc_LDFLAGS = $(LIBMILTER_LIBDIRS) $(PTHREAD_CFLAGS)
20 opendmarc_LDADD = ../libopendmarc/libopendmarc.la $(LIBMILTER_LIBS) $(PTHREAD_LIBS) $(LIBRESOLV)
21
22 opendmarc_check_SOURCES = opendmarc-check.c
23 opendmarc_check_CPPFLAGS = -I$(srcdir)/../libopendmarc
24 opendmarc_check_LDADD = ../libopendmarc/libopendmarc.la $(LIBRESOLV)
25
26 man_MANS = opendmarc.conf.5 opendmarc.8 opendmarc-check.8
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
17 #
18 # $Id: Makefile.am,v 1.85 2010/10/28 04:12:55 cm-msk Exp $
19
20
21 VPATH = @srcdir@
22 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
23 am__make_running_with_option = \
24 case $${target_option-} in \
25 ?) ;; \
26 *) echo "am__make_running_with_option: internal error: invalid" \
27 "target option '$${target_option-}' specified" >&2; \
28 exit 1;; \
29 esac; \
30 has_opt=no; \
31 sane_makeflags=$$MAKEFLAGS; \
32 if $(am__is_gnu_make); then \
33 sane_makeflags=$$MFLAGS; \
34 else \
35 case $$MAKEFLAGS in \
36 *\\[\ \ ]*) \
37 bs=\\; \
38 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
39 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
40 esac; \
41 fi; \
42 skip_next=no; \
43 strip_trailopt () \
44 { \
45 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
46 }; \
47 for flg in $$sane_makeflags; do \
48 test $$skip_next = yes && { skip_next=no; continue; }; \
49 case $$flg in \
50 *=*|--*) continue;; \
51 -*I) strip_trailopt 'I'; skip_next=yes;; \
52 -*I?*) strip_trailopt 'I';; \
53 -*O) strip_trailopt 'O'; skip_next=yes;; \
54 -*O?*) strip_trailopt 'O';; \
55 -*l) strip_trailopt 'l'; skip_next=yes;; \
56 -*l?*) strip_trailopt 'l';; \
57 -[dEDm]) skip_next=yes;; \
58 -[JT]) skip_next=yes;; \
59 esac; \
60 case $$flg in \
61 *$$target_option*) has_opt=yes; break;; \
62 esac; \
63 done; \
64 test $$has_opt = yes
65 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
66 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
67 pkgdatadir = $(datadir)/@PACKAGE@
68 pkgincludedir = $(includedir)/@PACKAGE@
69 pkglibdir = $(libdir)/@PACKAGE@
70 pkglibexecdir = $(libexecdir)/@PACKAGE@
71 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
72 install_sh_DATA = $(install_sh) -c -m 644
73 install_sh_PROGRAM = $(install_sh) -c
74 install_sh_SCRIPT = $(install_sh) -c
75 INSTALL_HEADER = $(INSTALL_DATA)
76 transform = $(program_transform_name)
77 NORMAL_INSTALL = :
78 PRE_INSTALL = :
79 POST_INSTALL = :
80 NORMAL_UNINSTALL = :
81 PRE_UNINSTALL = :
82 POST_UNINSTALL = :
83 build_triplet = @build@
84 host_triplet = @host@
85 sbin_PROGRAMS = opendmarc$(EXEEXT) opendmarc-check$(EXEEXT)
86 subdir = opendmarc
87 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
88 $(srcdir)/opendmarc.conf.5.in $(srcdir)/opendmarc.8.in \
89 $(srcdir)/opendmarc-check.8.in $(top_srcdir)/build-aux/depcomp \
90 $(dist_doc_DATA) README
91 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
92 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
93 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
94 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
95 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
96 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
97 $(ACLOCAL_M4)
98 mkinstalldirs = $(install_sh) -d
99 CONFIG_HEADER = $(top_builddir)/build-config.h
100 CONFIG_CLEAN_FILES = opendmarc.conf.5 opendmarc.8 opendmarc-check.8
101 CONFIG_CLEAN_VPATH_FILES =
102 am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" \
103 "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"
104 PROGRAMS = $(sbin_PROGRAMS)
105 am_opendmarc_OBJECTS = opendmarc-config.$(OBJEXT) \
106 opendmarc-opendmarc.$(OBJEXT) opendmarc-opendmarc-ar.$(OBJEXT) \
107 opendmarc-opendmarc-dstring.$(OBJEXT) \
108 opendmarc-parse.$(OBJEXT) opendmarc-test.$(OBJEXT) \
109 opendmarc-util.$(OBJEXT)
110 opendmarc_OBJECTS = $(am_opendmarc_OBJECTS)
111 am__DEPENDENCIES_1 =
112 opendmarc_DEPENDENCIES = ../libopendmarc/libopendmarc.la \
113 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
114 $(am__DEPENDENCIES_1)
115 AM_V_lt = $(am__v_lt_@AM_V@)
116 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
117 am__v_lt_0 = --silent
118 am__v_lt_1 =
119 opendmarc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
120 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(opendmarc_CFLAGS) \
121 $(CFLAGS) $(opendmarc_LDFLAGS) $(LDFLAGS) -o $@
122 am_opendmarc_check_OBJECTS = \
123 opendmarc_check-opendmarc-check.$(OBJEXT)
124 opendmarc_check_OBJECTS = $(am_opendmarc_check_OBJECTS)
125 opendmarc_check_DEPENDENCIES = ../libopendmarc/libopendmarc.la \
126 $(am__DEPENDENCIES_1)
127 AM_V_P = $(am__v_P_@AM_V@)
128 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
129 am__v_P_0 = false
130 am__v_P_1 = :
131 AM_V_GEN = $(am__v_GEN_@AM_V@)
132 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
133 am__v_GEN_0 = @echo " GEN " $@;
134 am__v_GEN_1 =
135 AM_V_at = $(am__v_at_@AM_V@)
136 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
137 am__v_at_0 = @
138 am__v_at_1 =
139 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
140 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
141 am__depfiles_maybe = depfiles
142 am__mv = mv -f
143 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
144 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
145 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
146 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
147 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
148 $(AM_CFLAGS) $(CFLAGS)
149 AM_V_CC = $(am__v_CC_@AM_V@)
150 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
151 am__v_CC_0 = @echo " CC " $@;
152 am__v_CC_1 =
153 CCLD = $(CC)
154 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
155 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
156 $(AM_LDFLAGS) $(LDFLAGS) -o $@
157 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
158 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
159 am__v_CCLD_0 = @echo " CCLD " $@;
160 am__v_CCLD_1 =
161 SOURCES = $(opendmarc_SOURCES) $(opendmarc_check_SOURCES)
162 DIST_SOURCES = $(opendmarc_SOURCES) $(opendmarc_check_SOURCES)
163 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
164 ctags-recursive dvi-recursive html-recursive info-recursive \
165 install-data-recursive install-dvi-recursive \
166 install-exec-recursive install-html-recursive \
167 install-info-recursive install-pdf-recursive \
168 install-ps-recursive install-recursive installcheck-recursive \
169 installdirs-recursive pdf-recursive ps-recursive \
170 tags-recursive uninstall-recursive
171 am__can_run_installinfo = \
172 case $$AM_UPDATE_INFO_DIR in \
173 n|no|NO) false;; \
174 *) (install-info --version) >/dev/null 2>&1;; \
175 esac
176 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
177 am__vpath_adj = case $$p in \
178 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
179 *) f=$$p;; \
180 esac;
181 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
182 am__install_max = 40
183 am__nobase_strip_setup = \
184 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
185 am__nobase_strip = \
186 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
187 am__nobase_list = $(am__nobase_strip_setup); \
188 for p in $$list; do echo "$$p $$p"; done | \
189 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
190 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
191 if (++n[$$2] == $(am__install_max)) \
192 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
193 END { for (dir in files) print dir, files[dir] }'
194 am__base_list = \
195 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
196 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
197 am__uninstall_files_from_dir = { \
198 test -z "$$files" \
199 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
200 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
201 $(am__cd) "$$dir" && rm -f $$files; }; \
202 }
203 man5dir = $(mandir)/man5
204 man8dir = $(mandir)/man8
205 NROFF = nroff
206 MANS = $(man_MANS)
207 DATA = $(dist_doc_DATA)
208 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
209 distclean-recursive maintainer-clean-recursive
210 am__recursive_targets = \
211 $(RECURSIVE_TARGETS) \
212 $(RECURSIVE_CLEAN_TARGETS) \
213 $(am__extra_recursive_targets)
214 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
215 distdir
216 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
217 # Read a list of newline-separated strings from the standard input,
218 # and print each of them once, without duplicates. Input order is
219 # *not* preserved.
220 am__uniquify_input = $(AWK) '\
221 BEGIN { nonempty = 0; } \
222 { items[$$0] = 1; nonempty = 1; } \
223 END { if (nonempty) { for (i in items) print i; }; } \
224 '
225 # Make sure the list of sources is unique. This is necessary because,
226 # e.g., the same source file might be shared among _SOURCES variables
227 # for different programs/libraries.
228 am__define_uniq_tagged_files = \
229 list='$(am__tagged_files)'; \
230 unique=`for i in $$list; do \
231 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
232 done | $(am__uniquify_input)`
233 ETAGS = etags
234 CTAGS = ctags
235 DIST_SUBDIRS = tests
236 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
237 am__relativize = \
238 dir0=`pwd`; \
239 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
240 sed_rest='s,^[^/]*/*,,'; \
241 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
242 sed_butlast='s,/*[^/]*$$,,'; \
243 while test -n "$$dir1"; do \
244 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
245 if test "$$first" != "."; then \
246 if test "$$first" = ".."; then \
247 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
248 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
249 else \
250 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
251 if test "$$first2" = "$$first"; then \
252 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
253 else \
254 dir2="../$$dir2"; \
255 fi; \
256 dir0="$$dir0"/"$$first"; \
257 fi; \
258 fi; \
259 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
260 done; \
261 reldir="$$dir2"
262 ACLOCAL = @ACLOCAL@
263 AMTAR = @AMTAR@
264 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
265 AR = @AR@
266 AUTOCONF = @AUTOCONF@
267 AUTOHEADER = @AUTOHEADER@
268 AUTOMAKE = @AUTOMAKE@
269 AWK = @AWK@
270 CC = @CC@
271 CCDEPMODE = @CCDEPMODE@
272 CFLAGS = @CFLAGS@
273 CPP = @CPP@
274 CPPFLAGS = @CPPFLAGS@
275 CYGPATH_W = @CYGPATH_W@
276 DEFS = @DEFS@
277 DEPDIR = @DEPDIR@
278 DLLTOOL = @DLLTOOL@
279 DSYMUTIL = @DSYMUTIL@
280 DUMPBIN = @DUMPBIN@
281 ECHO_C = @ECHO_C@
282 ECHO_N = @ECHO_N@
283 ECHO_T = @ECHO_T@
284 EGREP = @EGREP@
285 EXEEXT = @EXEEXT@
286 FGREP = @FGREP@
287 GREP = @GREP@
288 HEX_VERSION = @HEX_VERSION@
289 INSTALL = @INSTALL@
290 INSTALL_DATA = @INSTALL_DATA@
291 INSTALL_PROGRAM = @INSTALL_PROGRAM@
292 INSTALL_SCRIPT = @INSTALL_SCRIPT@
293 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
294 LD = @LD@
295 LDFLAGS = @LDFLAGS@
296 LIBDMARC_DIR = @LIBDMARC_DIR@
297 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
298 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
299 LIBMILTER_LIBS = @LIBMILTER_LIBS@
300 LIBOBJS = @LIBOBJS@
301 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
302 LIBRESOLV = @LIBRESOLV@
303 LIBS = @LIBS@
304 LIBTOOL = @LIBTOOL@
305 LIPO = @LIPO@
306 LN_S = @LN_S@
307 LTLIBOBJS = @LTLIBOBJS@
308 MAKEINFO = @MAKEINFO@
309 MANIFEST_TOOL = @MANIFEST_TOOL@
310 MKDIR_P = @MKDIR_P@
311 NM = @NM@
312 NMEDIT = @NMEDIT@
313 OBJDUMP = @OBJDUMP@
314 OBJEXT = @OBJEXT@
315 OTOOL = @OTOOL@
316 OTOOL64 = @OTOOL64@
317 PACKAGE = @PACKAGE@
318 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
319 PACKAGE_NAME = @PACKAGE_NAME@
320 PACKAGE_STRING = @PACKAGE_STRING@
321 PACKAGE_TARNAME = @PACKAGE_TARNAME@
322 PACKAGE_URL = @PACKAGE_URL@
323 PACKAGE_VERSION = @PACKAGE_VERSION@
324 PATH_SEPARATOR = @PATH_SEPARATOR@
325 PKG_CONFIG = @PKG_CONFIG@
326 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
327 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
328 PTHREAD_CC = @PTHREAD_CC@
329 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
330 PTHREAD_LIBS = @PTHREAD_LIBS@
331 RANLIB = @RANLIB@
332 SED = @SED@
333 SET_MAKE = @SET_MAKE@
334 SHELL = @SHELL@
335 SQL_BACKEND = @SQL_BACKEND@
336 STRIP = @STRIP@
337 SYSCONFDIR = @SYSCONFDIR@
338 VERSION = @VERSION@
339 abs_builddir = @abs_builddir@
340 abs_srcdir = @abs_srcdir@
341 abs_top_builddir = @abs_top_builddir@
342 abs_top_srcdir = @abs_top_srcdir@
343 ac_aux_dir = @ac_aux_dir@
344 ac_ct_AR = @ac_ct_AR@
345 ac_ct_CC = @ac_ct_CC@
346 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
347 am__include = @am__include@
348 am__leading_dot = @am__leading_dot@
349 am__quote = @am__quote@
350 am__tar = @am__tar@
351 am__untar = @am__untar@
352 ax_pthread_config = @ax_pthread_config@
353 bindir = @bindir@
354 build = @build@
355 build_alias = @build_alias@
356 build_cpu = @build_cpu@
357 build_os = @build_os@
358 build_vendor = @build_vendor@
359 builddir = @builddir@
360 datadir = @datadir@
361 datarootdir = @datarootdir@
362 docdir = @docdir@
363 dvidir = @dvidir@
364 exec_prefix = @exec_prefix@
365 host = @host@
366 host_alias = @host_alias@
367 host_cpu = @host_cpu@
368 host_os = @host_os@
369 host_vendor = @host_vendor@
370 htmldir = @htmldir@
371 includedir = @includedir@
372 infodir = @infodir@
373 install_sh = @install_sh@
374 libdir = @libdir@
375 libexecdir = @libexecdir@
376 localedir = @localedir@
377 localstatedir = @localstatedir@
378 mandir = @mandir@
379 miltertest = @miltertest@
380 mkdir_p = @mkdir_p@
381 oldincludedir = @oldincludedir@
382 pdfdir = @pdfdir@
383 prefix = @prefix@
384 program_transform_name = @program_transform_name@
385 psdir = @psdir@
386 sbindir = @sbindir@
387 sharedstatedir = @sharedstatedir@
388 srcdir = @srcdir@
389 sysconfdir = @sysconfdir@
390 target_alias = @target_alias@
391 top_build_prefix = @top_build_prefix@
392 top_builddir = @top_builddir@
393 top_srcdir = @top_srcdir@
394 @FILTER_TESTS_TRUE@SUBDIRS = tests
395 dist_doc_DATA = opendmarc.conf.sample
396 opendmarc_SOURCES = config.c config.h opendmarc.c opendmarc.h \
397 opendmarc-ar.c opendmarc-ar.h opendmarc-config.h \
398 opendmarc-dstring.c opendmarc-dstring.h \
399 parse.c parse.h test.c test.h util.c util.h
400
401 opendmarc_CC = $(PTHREAD_CC)
402 opendmarc_CFLAGS = $(PTHREAD_CFLAGS)
403 opendmarc_CPPFLAGS = $(LIBMILTER_INCDIRS) -I$(srcdir)/../libopendmarc
404 opendmarc_LDFLAGS = $(LIBMILTER_LIBDIRS) $(PTHREAD_CFLAGS)
405 opendmarc_LDADD = ../libopendmarc/libopendmarc.la $(LIBMILTER_LIBS) $(PTHREAD_LIBS) $(LIBRESOLV)
406 opendmarc_check_SOURCES = opendmarc-check.c
407 opendmarc_check_CPPFLAGS = -I$(srcdir)/../libopendmarc
408 opendmarc_check_LDADD = ../libopendmarc/libopendmarc.la $(LIBRESOLV)
409 man_MANS = opendmarc.conf.5 opendmarc.8 opendmarc-check.8
410 all: all-recursive
411
412 .SUFFIXES:
413 .SUFFIXES: .c .lo .o .obj
414 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
415 @for dep in $?; do \
416 case '$(am__configure_deps)' in \
417 *$$dep*) \
418 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
419 && { if test -f $@; then exit 0; else break; fi; }; \
420 exit 1;; \
421 esac; \
422 done; \
423 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign opendmarc/Makefile'; \
424 $(am__cd) $(top_srcdir) && \
425 $(AUTOMAKE) --foreign opendmarc/Makefile
426 .PRECIOUS: Makefile
427 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
428 @case '$?' in \
429 *config.status*) \
430 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
431 *) \
432 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
433 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
434 esac;
435
436 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
437 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
438
439 $(top_srcdir)/configure: $(am__configure_deps)
440 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
441 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
442 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
443 $(am__aclocal_m4_deps):
444 opendmarc.conf.5: $(top_builddir)/config.status $(srcdir)/opendmarc.conf.5.in
445 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
446 opendmarc.8: $(top_builddir)/config.status $(srcdir)/opendmarc.8.in
447 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
448 opendmarc-check.8: $(top_builddir)/config.status $(srcdir)/opendmarc-check.8.in
449 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
450 install-sbinPROGRAMS: $(sbin_PROGRAMS)
451 @$(NORMAL_INSTALL)
452 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
453 if test -n "$$list"; then \
454 echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
455 $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
456 fi; \
457 for p in $$list; do echo "$$p $$p"; done | \
458 sed 's/$(EXEEXT)$$//' | \
459 while read p p1; do if test -f $$p \
460 || test -f $$p1 \
461 ; then echo "$$p"; echo "$$p"; else :; fi; \
462 done | \
463 sed -e 'p;s,.*/,,;n;h' \
464 -e 's|.*|.|' \
465 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
466 sed 'N;N;N;s,\n, ,g' | \
467 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
468 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
469 if ($$2 == $$4) files[d] = files[d] " " $$1; \
470 else { print "f", $$3 "/" $$4, $$1; } } \
471 END { for (d in files) print "f", d, files[d] }' | \
472 while read type dir files; do \
473 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
474 test -z "$$files" || { \
475 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
476 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
477 } \
478 ; done
479
480 uninstall-sbinPROGRAMS:
481 @$(NORMAL_UNINSTALL)
482 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
483 files=`for p in $$list; do echo "$$p"; done | \
484 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
485 -e 's/$$/$(EXEEXT)/' \
486 `; \
487 test -n "$$list" || exit 0; \
488 echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
489 cd "$(DESTDIR)$(sbindir)" && rm -f $$files
490
491 clean-sbinPROGRAMS:
492 @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
493 echo " rm -f" $$list; \
494 rm -f $$list || exit $$?; \
495 test -n "$(EXEEXT)" || exit 0; \
496 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
497 echo " rm -f" $$list; \
498 rm -f $$list
499
500 opendmarc$(EXEEXT): $(opendmarc_OBJECTS) $(opendmarc_DEPENDENCIES) $(EXTRA_opendmarc_DEPENDENCIES)
501 @rm -f opendmarc$(EXEEXT)
502 $(AM_V_CCLD)$(opendmarc_LINK) $(opendmarc_OBJECTS) $(opendmarc_LDADD) $(LIBS)
503
504 opendmarc-check$(EXEEXT): $(opendmarc_check_OBJECTS) $(opendmarc_check_DEPENDENCIES) $(EXTRA_opendmarc_check_DEPENDENCIES)
505 @rm -f opendmarc-check$(EXEEXT)
506 $(AM_V_CCLD)$(LINK) $(opendmarc_check_OBJECTS) $(opendmarc_check_LDADD) $(LIBS)
507
508 mostlyclean-compile:
509 -rm -f *.$(OBJEXT)
510
511 distclean-compile:
512 -rm -f *.tab.c
513
514 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc-config.Po@am__quote@
515 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc-opendmarc-ar.Po@am__quote@
516 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc-opendmarc-dstring.Po@am__quote@
517 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc-opendmarc.Po@am__quote@
518 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc-parse.Po@am__quote@
519 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc-test.Po@am__quote@
520 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc-util.Po@am__quote@
521 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendmarc_check-opendmarc-check.Po@am__quote@
522
523 .c.o:
524 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
525 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
526 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
527 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
528 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
529
530 .c.obj:
531 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
532 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
533 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
534 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
535 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
536
537 .c.lo:
538 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
539 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
540 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
541 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
542 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
543
544 opendmarc-config.o: config.c
545 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-config.o -MD -MP -MF $(DEPDIR)/opendmarc-config.Tpo -c -o opendmarc-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c
546 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-config.Tpo $(DEPDIR)/opendmarc-config.Po
547 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config.c' object='opendmarc-config.o' libtool=no @AMDEPBACKSLASH@
548 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
549 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c
550
551 opendmarc-config.obj: config.c
552 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-config.obj -MD -MP -MF $(DEPDIR)/opendmarc-config.Tpo -c -o opendmarc-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`
553 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-config.Tpo $(DEPDIR)/opendmarc-config.Po
554 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config.c' object='opendmarc-config.obj' libtool=no @AMDEPBACKSLASH@
555 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
556 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`
557
558 opendmarc-opendmarc.o: opendmarc.c
559 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-opendmarc.o -MD -MP -MF $(DEPDIR)/opendmarc-opendmarc.Tpo -c -o opendmarc-opendmarc.o `test -f 'opendmarc.c' || echo '$(srcdir)/'`opendmarc.c
560 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-opendmarc.Tpo $(DEPDIR)/opendmarc-opendmarc.Po
561 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opendmarc.c' object='opendmarc-opendmarc.o' libtool=no @AMDEPBACKSLASH@
562 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
563 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-opendmarc.o `test -f 'opendmarc.c' || echo '$(srcdir)/'`opendmarc.c
564
565 opendmarc-opendmarc.obj: opendmarc.c
566 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-opendmarc.obj -MD -MP -MF $(DEPDIR)/opendmarc-opendmarc.Tpo -c -o opendmarc-opendmarc.obj `if test -f 'opendmarc.c'; then $(CYGPATH_W) 'opendmarc.c'; else $(CYGPATH_W) '$(srcdir)/opendmarc.c'; fi`
567 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-opendmarc.Tpo $(DEPDIR)/opendmarc-opendmarc.Po
568 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opendmarc.c' object='opendmarc-opendmarc.obj' libtool=no @AMDEPBACKSLASH@
569 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
570 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-opendmarc.obj `if test -f 'opendmarc.c'; then $(CYGPATH_W) 'opendmarc.c'; else $(CYGPATH_W) '$(srcdir)/opendmarc.c'; fi`
571
572 opendmarc-opendmarc-ar.o: opendmarc-ar.c
573 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-opendmarc-ar.o -MD -MP -MF $(DEPDIR)/opendmarc-opendmarc-ar.Tpo -c -o opendmarc-opendmarc-ar.o `test -f 'opendmarc-ar.c' || echo '$(srcdir)/'`opendmarc-ar.c
574 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-opendmarc-ar.Tpo $(DEPDIR)/opendmarc-opendmarc-ar.Po
575 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opendmarc-ar.c' object='opendmarc-opendmarc-ar.o' libtool=no @AMDEPBACKSLASH@
576 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
577 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-opendmarc-ar.o `test -f 'opendmarc-ar.c' || echo '$(srcdir)/'`opendmarc-ar.c
578
579 opendmarc-opendmarc-ar.obj: opendmarc-ar.c
580 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-opendmarc-ar.obj -MD -MP -MF $(DEPDIR)/opendmarc-opendmarc-ar.Tpo -c -o opendmarc-opendmarc-ar.obj `if test -f 'opendmarc-ar.c'; then $(CYGPATH_W) 'opendmarc-ar.c'; else $(CYGPATH_W) '$(srcdir)/opendmarc-ar.c'; fi`
581 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-opendmarc-ar.Tpo $(DEPDIR)/opendmarc-opendmarc-ar.Po
582 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opendmarc-ar.c' object='opendmarc-opendmarc-ar.obj' libtool=no @AMDEPBACKSLASH@
583 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
584 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-opendmarc-ar.obj `if test -f 'opendmarc-ar.c'; then $(CYGPATH_W) 'opendmarc-ar.c'; else $(CYGPATH_W) '$(srcdir)/opendmarc-ar.c'; fi`
585
586 opendmarc-opendmarc-dstring.o: opendmarc-dstring.c
587 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-opendmarc-dstring.o -MD -MP -MF $(DEPDIR)/opendmarc-opendmarc-dstring.Tpo -c -o opendmarc-opendmarc-dstring.o `test -f 'opendmarc-dstring.c' || echo '$(srcdir)/'`opendmarc-dstring.c
588 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-opendmarc-dstring.Tpo $(DEPDIR)/opendmarc-opendmarc-dstring.Po
589 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opendmarc-dstring.c' object='opendmarc-opendmarc-dstring.o' libtool=no @AMDEPBACKSLASH@
590 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
591 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-opendmarc-dstring.o `test -f 'opendmarc-dstring.c' || echo '$(srcdir)/'`opendmarc-dstring.c
592
593 opendmarc-opendmarc-dstring.obj: opendmarc-dstring.c
594 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-opendmarc-dstring.obj -MD -MP -MF $(DEPDIR)/opendmarc-opendmarc-dstring.Tpo -c -o opendmarc-opendmarc-dstring.obj `if test -f 'opendmarc-dstring.c'; then $(CYGPATH_W) 'opendmarc-dstring.c'; else $(CYGPATH_W) '$(srcdir)/opendmarc-dstring.c'; fi`
595 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-opendmarc-dstring.Tpo $(DEPDIR)/opendmarc-opendmarc-dstring.Po
596 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opendmarc-dstring.c' object='opendmarc-opendmarc-dstring.obj' libtool=no @AMDEPBACKSLASH@
597 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
598 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-opendmarc-dstring.obj `if test -f 'opendmarc-dstring.c'; then $(CYGPATH_W) 'opendmarc-dstring.c'; else $(CYGPATH_W) '$(srcdir)/opendmarc-dstring.c'; fi`
599
600 opendmarc-parse.o: parse.c
601 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-parse.o -MD -MP -MF $(DEPDIR)/opendmarc-parse.Tpo -c -o opendmarc-parse.o `test -f 'parse.c' || echo '$(srcdir)/'`parse.c
602 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-parse.Tpo $(DEPDIR)/opendmarc-parse.Po
603 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse.c' object='opendmarc-parse.o' libtool=no @AMDEPBACKSLASH@
604 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
605 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-parse.o `test -f 'parse.c' || echo '$(srcdir)/'`parse.c
606
607 opendmarc-parse.obj: parse.c
608 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-parse.obj -MD -MP -MF $(DEPDIR)/opendmarc-parse.Tpo -c -o opendmarc-parse.obj `if test -f 'parse.c'; then $(CYGPATH_W) 'parse.c'; else $(CYGPATH_W) '$(srcdir)/parse.c'; fi`
609 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-parse.Tpo $(DEPDIR)/opendmarc-parse.Po
610 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse.c' object='opendmarc-parse.obj' libtool=no @AMDEPBACKSLASH@
611 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
612 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-parse.obj `if test -f 'parse.c'; then $(CYGPATH_W) 'parse.c'; else $(CYGPATH_W) '$(srcdir)/parse.c'; fi`
613
614 opendmarc-test.o: test.c
615 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-test.o -MD -MP -MF $(DEPDIR)/opendmarc-test.Tpo -c -o opendmarc-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c
616 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-test.Tpo $(DEPDIR)/opendmarc-test.Po
617 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test.c' object='opendmarc-test.o' libtool=no @AMDEPBACKSLASH@
618 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
619 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c
620
621 opendmarc-test.obj: test.c
622 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-test.obj -MD -MP -MF $(DEPDIR)/opendmarc-test.Tpo -c -o opendmarc-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi`
623 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-test.Tpo $(DEPDIR)/opendmarc-test.Po
624 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test.c' object='opendmarc-test.obj' libtool=no @AMDEPBACKSLASH@
625 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
626 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi`
627
628 opendmarc-util.o: util.c
629 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-util.o -MD -MP -MF $(DEPDIR)/opendmarc-util.Tpo -c -o opendmarc-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
630 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-util.Tpo $(DEPDIR)/opendmarc-util.Po
631 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='opendmarc-util.o' libtool=no @AMDEPBACKSLASH@
632 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
633 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
634
635 opendmarc-util.obj: util.c
636 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -MT opendmarc-util.obj -MD -MP -MF $(DEPDIR)/opendmarc-util.Tpo -c -o opendmarc-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
637 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc-util.Tpo $(DEPDIR)/opendmarc-util.Po
638 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='opendmarc-util.obj' libtool=no @AMDEPBACKSLASH@
639 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
640 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_CPPFLAGS) $(CPPFLAGS) $(opendmarc_CFLAGS) $(CFLAGS) -c -o opendmarc-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
641
642 opendmarc_check-opendmarc-check.o: opendmarc-check.c
643 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT opendmarc_check-opendmarc-check.o -MD -MP -MF $(DEPDIR)/opendmarc_check-opendmarc-check.Tpo -c -o opendmarc_check-opendmarc-check.o `test -f 'opendmarc-check.c' || echo '$(srcdir)/'`opendmarc-check.c
644 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc_check-opendmarc-check.Tpo $(DEPDIR)/opendmarc_check-opendmarc-check.Po
645 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opendmarc-check.c' object='opendmarc_check-opendmarc-check.o' libtool=no @AMDEPBACKSLASH@
646 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
647 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o opendmarc_check-opendmarc-check.o `test -f 'opendmarc-check.c' || echo '$(srcdir)/'`opendmarc-check.c
648
649 opendmarc_check-opendmarc-check.obj: opendmarc-check.c
650 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT opendmarc_check-opendmarc-check.obj -MD -MP -MF $(DEPDIR)/opendmarc_check-opendmarc-check.Tpo -c -o opendmarc_check-opendmarc-check.obj `if test -f 'opendmarc-check.c'; then $(CYGPATH_W) 'opendmarc-check.c'; else $(CYGPATH_W) '$(srcdir)/opendmarc-check.c'; fi`
651 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/opendmarc_check-opendmarc-check.Tpo $(DEPDIR)/opendmarc_check-opendmarc-check.Po
652 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opendmarc-check.c' object='opendmarc_check-opendmarc-check.obj' libtool=no @AMDEPBACKSLASH@
653 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
654 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opendmarc_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o opendmarc_check-opendmarc-check.obj `if test -f 'opendmarc-check.c'; then $(CYGPATH_W) 'opendmarc-check.c'; else $(CYGPATH_W) '$(srcdir)/opendmarc-check.c'; fi`
655
656 mostlyclean-libtool:
657 -rm -f *.lo
658
659 clean-libtool:
660 -rm -rf .libs _libs
661 install-man5: $(man_MANS)
662 @$(NORMAL_INSTALL)
663 @list1=''; \
664 list2='$(man_MANS)'; \
665 test -n "$(man5dir)" \
666 && test -n "`echo $$list1$$list2`" \
667 || exit 0; \
668 echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
669 $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
670 { for i in $$list1; do echo "$$i"; done; \
671 if test -n "$$list2"; then \
672 for i in $$list2; do echo "$$i"; done \
673 | sed -n '/\.5[a-z]*$$/p'; \
674 fi; \
675 } | while read p; do \
676 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
677 echo "$$d$$p"; echo "$$p"; \
678 done | \
679 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
680 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
681 sed 'N;N;s,\n, ,g' | { \
682 list=; while read file base inst; do \
683 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
684 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
685 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
686 fi; \
687 done; \
688 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
689 while read files; do \
690 test -z "$$files" || { \
691 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
692 $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
693 done; }
694
695 uninstall-man5:
696 @$(NORMAL_UNINSTALL)
697 @list=''; test -n "$(man5dir)" || exit 0; \
698 files=`{ for i in $$list; do echo "$$i"; done; \
699 l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
700 sed -n '/\.5[a-z]*$$/p'; \
701 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
702 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
703 dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
704 install-man8: $(man_MANS)
705 @$(NORMAL_INSTALL)
706 @list1=''; \
707 list2='$(man_MANS)'; \
708 test -n "$(man8dir)" \
709 && test -n "`echo $$list1$$list2`" \
710 || exit 0; \
711 echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
712 $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
713 { for i in $$list1; do echo "$$i"; done; \
714 if test -n "$$list2"; then \
715 for i in $$list2; do echo "$$i"; done \
716 | sed -n '/\.8[a-z]*$$/p'; \
717 fi; \
718 } | while read p; do \
719 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
720 echo "$$d$$p"; echo "$$p"; \
721 done | \
722 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
723 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
724 sed 'N;N;s,\n, ,g' | { \
725 list=; while read file base inst; do \
726 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
727 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
728 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
729 fi; \
730 done; \
731 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
732 while read files; do \
733 test -z "$$files" || { \
734 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
735 $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
736 done; }
737
738 uninstall-man8:
739 @$(NORMAL_UNINSTALL)
740 @list=''; test -n "$(man8dir)" || exit 0; \
741 files=`{ for i in $$list; do echo "$$i"; done; \
742 l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
743 sed -n '/\.8[a-z]*$$/p'; \
744 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
745 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
746 dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
747 install-dist_docDATA: $(dist_doc_DATA)
748 @$(NORMAL_INSTALL)
749 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
750 if test -n "$$list"; then \
751 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
752 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
753 fi; \
754 for p in $$list; do \
755 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
756 echo "$$d$$p"; \
757 done | $(am__base_list) | \
758 while read files; do \
759 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
760 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
761 done
762
763 uninstall-dist_docDATA:
764 @$(NORMAL_UNINSTALL)
765 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
766 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
767 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
768
769 # This directory's subdirectories are mostly independent; you can cd
770 # into them and run 'make' without going through this Makefile.
771 # To change the values of 'make' variables: instead of editing Makefiles,
772 # (1) if the variable is set in 'config.status', edit 'config.status'
773 # (which will cause the Makefiles to be regenerated when you run 'make');
774 # (2) otherwise, pass the desired values on the 'make' command line.
775 $(am__recursive_targets):
776 @fail=; \
777 if $(am__make_keepgoing); then \
778 failcom='fail=yes'; \
779 else \
780 failcom='exit 1'; \
781 fi; \
782 dot_seen=no; \
783 target=`echo $@ | sed s/-recursive//`; \
784 case "$@" in \
785 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
786 *) list='$(SUBDIRS)' ;; \
787 esac; \
788 for subdir in $$list; do \
789 echo "Making $$target in $$subdir"; \
790 if test "$$subdir" = "."; then \
791 dot_seen=yes; \
792 local_target="$$target-am"; \
793 else \
794 local_target="$$target"; \
795 fi; \
796 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
797 || eval $$failcom; \
798 done; \
799 if test "$$dot_seen" = "no"; then \
800 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
801 fi; test -z "$$fail"
802
803 ID: $(am__tagged_files)
804 $(am__define_uniq_tagged_files); mkid -fID $$unique
805 tags: tags-recursive
806 TAGS: tags
807
808 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
809 set x; \
810 here=`pwd`; \
811 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
812 include_option=--etags-include; \
813 empty_fix=.; \
814 else \
815 include_option=--include; \
816 empty_fix=; \
817 fi; \
818 list='$(SUBDIRS)'; for subdir in $$list; do \
819 if test "$$subdir" = .; then :; else \
820 test ! -f $$subdir/TAGS || \
821 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
822 fi; \
823 done; \
824 $(am__define_uniq_tagged_files); \
825 shift; \
826 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
827 test -n "$$unique" || unique=$$empty_fix; \
828 if test $$# -gt 0; then \
829 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
830 "$$@" $$unique; \
831 else \
832 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
833 $$unique; \
834 fi; \
835 fi
836 ctags: ctags-recursive
837
838 CTAGS: ctags
839 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
840 $(am__define_uniq_tagged_files); \
841 test -z "$(CTAGS_ARGS)$$unique" \
842 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
843 $$unique
844
845 GTAGS:
846 here=`$(am__cd) $(top_builddir) && pwd` \
847 && $(am__cd) $(top_srcdir) \
848 && gtags -i $(GTAGS_ARGS) "$$here"
849 cscopelist: cscopelist-recursive
850
851 cscopelist-am: $(am__tagged_files)
852 list='$(am__tagged_files)'; \
853 case "$(srcdir)" in \
854 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
855 *) sdir=$(subdir)/$(srcdir) ;; \
856 esac; \
857 for i in $$list; do \
858 if test -f "$$i"; then \
859 echo "$(subdir)/$$i"; \
860 else \
861 echo "$$sdir/$$i"; \
862 fi; \
863 done >> $(top_builddir)/cscope.files
864
865 distclean-tags:
866 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
867
868 distdir: $(DISTFILES)
869 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
870 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
871 list='$(DISTFILES)'; \
872 dist_files=`for file in $$list; do echo $$file; done | \
873 sed -e "s|^$$srcdirstrip/||;t" \
874 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
875 case $$dist_files in \
876 */*) $(MKDIR_P) `echo "$$dist_files" | \
877 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
878 sort -u` ;; \
879 esac; \
880 for file in $$dist_files; do \
881 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
882 if test -d $$d/$$file; then \
883 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
884 if test -d "$(distdir)/$$file"; then \
885 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
886 fi; \
887 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
888 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
889 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
890 fi; \
891 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
892 else \
893 test -f "$(distdir)/$$file" \
894 || cp -p $$d/$$file "$(distdir)/$$file" \
895 || exit 1; \
896 fi; \
897 done
898 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
899 if test "$$subdir" = .; then :; else \
900 $(am__make_dryrun) \
901 || test -d "$(distdir)/$$subdir" \
902 || $(MKDIR_P) "$(distdir)/$$subdir" \
903 || exit 1; \
904 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
905 $(am__relativize); \
906 new_distdir=$$reldir; \
907 dir1=$$subdir; dir2="$(top_distdir)"; \
908 $(am__relativize); \
909 new_top_distdir=$$reldir; \
910 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
911 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
912 ($(am__cd) $$subdir && \
913 $(MAKE) $(AM_MAKEFLAGS) \
914 top_distdir="$$new_top_distdir" \
915 distdir="$$new_distdir" \
916 am__remove_distdir=: \
917 am__skip_length_check=: \
918 am__skip_mode_fix=: \
919 distdir) \
920 || exit 1; \
921 fi; \
922 done
923 check-am: all-am
924 check: check-recursive
925 all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
926 installdirs: installdirs-recursive
927 installdirs-am:
928 for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"; do \
929 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
930 done
931 install: install-recursive
932 install-exec: install-exec-recursive
933 install-data: install-data-recursive
934 uninstall: uninstall-recursive
935
936 install-am: all-am
937 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
938
939 installcheck: installcheck-recursive
940 install-strip:
941 if test -z '$(STRIP)'; then \
942 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
943 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
944 install; \
945 else \
946 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
947 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
948 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
949 fi
950 mostlyclean-generic:
951
952 clean-generic:
953
954 distclean-generic:
955 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
956 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
957
958 maintainer-clean-generic:
959 @echo "This command is intended for maintainers to use"
960 @echo "it deletes files that may require special tools to rebuild."
961 clean: clean-recursive
962
963 clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
964 mostlyclean-am
965
966 distclean: distclean-recursive
967 -rm -rf ./$(DEPDIR)
968 -rm -f Makefile
969 distclean-am: clean-am distclean-compile distclean-generic \
970 distclean-tags
971
972 dvi: dvi-recursive
973
974 dvi-am:
975
976 html: html-recursive
977
978 html-am:
979
980 info: info-recursive
981
982 info-am:
983
984 install-data-am: install-dist_docDATA install-man
985
986 install-dvi: install-dvi-recursive
987
988 install-dvi-am:
989
990 install-exec-am: install-sbinPROGRAMS
991
992 install-html: install-html-recursive
993
994 install-html-am:
995
996 install-info: install-info-recursive
997
998 install-info-am:
999
1000 install-man: install-man5 install-man8
1001
1002 install-pdf: install-pdf-recursive
1003
1004 install-pdf-am:
1005
1006 install-ps: install-ps-recursive
1007
1008 install-ps-am:
1009
1010 installcheck-am:
1011
1012 maintainer-clean: maintainer-clean-recursive
1013 -rm -rf ./$(DEPDIR)
1014 -rm -f Makefile
1015 maintainer-clean-am: distclean-am maintainer-clean-generic
1016
1017 mostlyclean: mostlyclean-recursive
1018
1019 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1020 mostlyclean-libtool
1021
1022 pdf: pdf-recursive
1023
1024 pdf-am:
1025
1026 ps: ps-recursive
1027
1028 ps-am:
1029
1030 uninstall-am: uninstall-dist_docDATA uninstall-man \
1031 uninstall-sbinPROGRAMS
1032
1033 uninstall-man: uninstall-man5 uninstall-man8
1034
1035 .MAKE: $(am__recursive_targets) install-am install-strip
1036
1037 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
1038 check-am clean clean-generic clean-libtool clean-sbinPROGRAMS \
1039 cscopelist-am ctags ctags-am distclean distclean-compile \
1040 distclean-generic distclean-libtool distclean-tags distdir dvi \
1041 dvi-am html html-am info info-am install install-am \
1042 install-data install-data-am install-dist_docDATA install-dvi \
1043 install-dvi-am install-exec install-exec-am install-html \
1044 install-html-am install-info install-info-am install-man \
1045 install-man5 install-man8 install-pdf install-pdf-am \
1046 install-ps install-ps-am install-sbinPROGRAMS install-strip \
1047 installcheck installcheck-am installdirs installdirs-am \
1048 maintainer-clean maintainer-clean-generic mostlyclean \
1049 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
1050 pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
1051 uninstall-dist_docDATA uninstall-man uninstall-man5 \
1052 uninstall-man8 uninstall-sbinPROGRAMS
1053
1054
1055 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1056 # Otherwise a system limit (for SysV at least) may be exceeded.
1057 .NOEXPORT:
0 INTRODUCTION
1 ============
2
3 This document will walk you through the process of configuring and activating
4 the OpenDMARC filter once it has been compiled and installed. In doing so you
5 will:
6
7 o Choose a local socket interface between the filter and your MTA
8 o Configure your filter
9 o Activate your filter
10 o Test your filter
11
12
13 COMPILING AND INSTALLING
14 ========================
15
16 The INSTALL document in the root of the build directory covers the compilation
17 and software installation of opendmarc and its prerequisites. You should
18 complete that process before continuing with the next section.
19
20
21 CONFIGURING OPENDMARC
22 =====================
23
24 (1) Take a look at the opendmarc.conf.sample as an example configuration file
25 for your domain. If you wish to run with anything other than default
26 settings, copy that file to /etc/mail/opendmarc.conf and make your changes
27 there.
28
29 (6) Start opendmarc. You will need at least the "-p" option, unless you
30 specified it in opendmarc.conf above. If you did set up a configuration
31 file, you'll also need to tell opendmarc where to find it (if not
32 /etc/mail/opendmarc.conf) via the "-c" option. For example:
33
34 opendmarc -c CONFPATH
35
36 ...where CONFPATH is the path to the configuration file you wish to
37 use. One or more configuration example files are provided.
38
39 (7) Configure your MTA:
40
41 For Sendmail:
42
43 (a) Choose a socket at which the MTA and the filter will rendezvous
44 (see the documentation in libmilter for details)
45
46 (b) Add a line like this example to your sendmail.mc using your desired
47 socket specification:
48
49 INPUT_MAIL_FILTER(`opendmarc', `S=inet:8893@localhost')
50
51 Note that this must come after filters that do DKIM and SPF evaluation,
52 as this filter relies on the addition of authentication results data
53 to the header by upstream filters.
54
55 (c) Rebuild your sendmail.cf in the usual way
56
57 For Postfix:
58
59 (a) Choose a socket at which the MTA and the filter will rendezvous.
60 Be careful with UNIX domain sockets as on some distributions and setups
61 the smtpd process is running in a chroot environment. A UNIX socket
62 will need to be visible to the chrooted smtpd process.
63
64 (b) Add the following lines like this example to your postfix main.cf using
65 your desired socket specification:
66
67 smtpd_milters = inet:localhost:8893
68 non_smtpd_milters = inet:localhost:8893
69
70 Note that this must come after filters that do DKIM and SPF evaluation,
71 as this filter relies on the addition of authentication results data
72 to the header by upstream filters.
73
74 (c) If you have a content filter in master.cf that feeds it back into a
75 different smtpd process, you should alter the second smtpd process in
76 master.cf to contain '-o receive_override_options=no_milters' to
77 prevent messages being signed or verified twice. For tips on avoiding
78 DKIM signature breakage, see:
79 http://www.postfix.org/MILTER_README.html#workarounds
80
81 (8) Restart/reload your MTA.
82
83 For Sendmail:
84 kill -1 `head -1 /var/run/sendmail.pid`
85
86 For Postfix:
87 postfix reload
88
89 ...or the following if master.cf was changed:
90
91 /etc/init.d/postfix restart
92
93
94 TESTING AND DEBUGGING
95 =====================
96
97 This package is used for processing incoming mail. As such, evaluating
98 the efficacy and impact of the DMARC policy you publish in your DNS is
99 not covered here. These instructions are for checking your site's processing
100 of arriving mail using opendmarc.
101
102 The simplest thing to do to exercise your installation is to construct a test
103 message that claims to come from some domain (yours or another) and feed
104 it to opendmarc in test mode. The command to run the test is as follows:
105
106 opendmarc -t <msgfile> [-c <conffile>]
107
108 ...where <msgfile> is your test message and <conffile> is your configuration
109 file (if not the default). Make sure to set a HistoryFile in your test
110 configuration so that you can see the raw data the filter records about
111 messages it receives. You can add "-v" one or more times to this to get
112 verbose output, though understanding the output requires some understanding
113 of how the "milter" protocol works.
114
115 Test mode will not start the service; it will process your single input
116 message and exit. It will not affect the service if it is already running.
117 Test mode operates by simulating the arrival of the message via an MTA
118 talking to the filter. With enough "-v" options, you will see simulation
119 of each of the milter calls generated by your message. Some parameters
120 to the session have defaults you can override by setting environment variables,
121 as follows:
122
123 OPENDMARC_TEST_CLIENTHOST hostname of the SMTP client
124 sending the message (default
125 is "localhost")
126
127 OPENDMARC_TEST_CLIENTIP IP addressof the SMTP client
128 sending the message, as a string
129 (default is "127.0.0.1")
130
131 OPENDMARC_TEST_HELOHOST parameter passed by the SMTP client
132 with the HELO/EHLO command
133 (default is "localhost")
134
135 OPENDMARC_TEST_ENVFROM envelope sender, passed by the
136 SMTP client with the MAIL FROM
137 command (default is
138 "<sender@example.org">)
139
140 In essence, you want to see the result of the mlfi_eom() call, which will
141 be in the verbose output, and ensure that it matches the action your filter
142 should be taking in response to the message you've built.
143
144 You can also look at the history file produced by your message to ensure
145 that all the DKIM signatures and SPF results are recorded, and the DMARC
146 policy matching the From domain (if any) was properly extracted.
147 Understanding the contents of this file requires some knowledge of
148 their encodings, but there are only a few of them:
149
150 adkim, aspf published policy's alignment rule for DKIM and SPF
151 (114 = relaxed, 115 = strict)
152
153 align_dkim, align_spf
154 whether identifier alignment was established
155 for DKIM and SPF (4 = yes, 5 = no)
156
157 spf SPF evaluation (0 = pass, 2 = fail, 6 = none,
158 -1 = not evaluated)
159
160 dkim DKIM evaluation (same as SPF, followed by the signing
161 domain name)
162
163 pdomain policy domain (the "organizational" domain,
164 the one asserting policy)
165
166 from domain found in the From field
167
168 mfrom domain found in the MAIL FROM parameter
169
170 policy policy to enforce, as follows:
171 14 = unknown (no record found)
172 15 = pass
173 16 = reject
174 17 = quarantine
175 18 = none
176
177 SUPPORT
178 =======
179
180 There are two public mailing lists available for news and questions about
181 OpenDMARC. To keep up to date on the latest developments, please
182 subscribe to one or both of the following:
183
184 opendmarc-announce@trusteddomain.org (release announcements)
185 opendmarc-users@trusteddomain.org (general discussion)
186
187 These can be accessed via http://www.trusteddomain.org/mailman/listinfo.
188
189 To report bugs and feature requests, you can access the SourceForge "tracker"
190 facilities at http://sourceforge.net/projects/opendmarc.
0 /*
1 ** Copyright (c) 2006-2009 Sendmail, Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** Copyright (c) 2009-2014, The Trusted Domain Project. All rights reserved.
5 */
6
7 /* for Solaris */
8 #ifndef _REENTRANT
9 # define _REENTRANT
10 #endif /* _REENTRANT */
11
12 #include "build-config.h"
13
14 /* system includes */
15 #include <sys/types.h>
16 #include <string.h>
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <assert.h>
20
21 /* libbsd if found */
22 #ifdef USE_BSD_H
23 # include <bsd/string.h>
24 #endif /* USE_BSD_H */
25
26 /* libstrl if needed */
27 #ifdef USE_STRL_H
28 # include <strl.h>
29 #endif /* USE_STRL_H */
30
31 /* opendmarc_strl if needed */
32 #ifdef USE_DMARCSTRL_H
33 # include <opendmarc_strl.h>
34 #endif /* USE_DMARCSTRL_H */
35
36 /* opendmarc includes */
37 #include "config.h"
38
39 /* limits */
40 #define BUFRSZ 1024 /* generic buffer size */
41 #define MAXLEVEL 5 /* max. include recursion */
42
43 #ifndef FALSE
44 # define FALSE 0
45 #endif /* ! FALSE */
46 #ifndef TRUE
47 # define TRUE 1
48 #endif /* ! TRUE */
49
50 /* prototypes */
51 static void config_attach __P((struct config *, struct config **));
52
53 /* errors */
54 #define CONF_UNKNOWN (-1) /* unknown status */
55 #define CONF_SUCCESS 0 /* no error */
56 #define CONF_MISSING 1 /* required value missing */
57 #define CONF_UNRECOG 2 /* unrecognized parameter */
58 #define CONF_ILLEGAL 3 /* illegal value */
59 #define CONF_NESTING 4 /* "include" nesting too deep */
60 #define CONF_READING 5 /* error reading (see errno) */
61 #define CONF_NMEMORY 6 /* malloc() failure */
62
63 /* statics */
64 static int conf_error; /* configuration error number */
65
66 /*
67 ** CONFIG_ATTACH -- attach one config to another
68 **
69 ** Parameters:
70 ** c1 -- configuration to attach
71 ** c2 -- configuration to which to attach
72 **
73 ** Return value:
74 ** None.
75 */
76
77 static void
78 config_attach(struct config *c1, struct config **c2)
79 {
80 struct config *prev;
81 struct config *cur;
82
83 assert(c1 != NULL);
84
85 if (*c2 == NULL)
86 {
87 *c2 = c1;
88 }
89 else
90 {
91 prev = NULL;
92
93 for (cur = c1; cur != NULL; cur = cur->cfg_next)
94 prev = cur;
95
96 prev->cfg_next = *c2;
97 }
98 }
99
100 /*
101 ** CONFIG_LOAD_LEVEL -- load configuration from a file (internal version)
102 **
103 ** Parameters:
104 ** file -- path from which to load; NULL or "-" implies stdin
105 ** cd -- array of (struct configdef) elements containing the
106 ** configuration syntax to assert
107 ** line -- line number where an error occurred (updated)
108 ** outpath -- configuration file in which error occurred (updated)
109 ** outpathlen -- bytes available at "outpath"
110 ** level -- nesting level
111 **
112 ** Return value:
113 ** Pointer to a (struct config) which is the head of a list of
114 ** loaded configuration items, or NULL on error; if NULL, "line" is
115 ** updated to indicate which line number contained the error and,
116 ** if the configuration file being parsed was not the one referenced
117 ** by "in", then "path" will be updated to point to the filename
118 ** that was being processed.
119 */
120
121 static struct config *
122 config_load_level(char *file, struct configdef *def,
123 unsigned int *line, char *outpath, size_t outpathlen,
124 int level)
125 {
126 int n = -1;
127 int err = 0;
128 unsigned int myline = 0;
129 int value = -1;
130 FILE *in;
131 char *p;
132 char *s;
133 char *str = NULL;
134 struct config *new = NULL;
135 struct config *cur = NULL;
136 char buf[BUFRSZ + 1];
137
138 assert(def != NULL);
139
140 if (level > MAXLEVEL)
141 {
142 conf_error = CONF_NESTING;
143 return NULL;
144 }
145
146 memset(buf, '\0', sizeof buf);
147
148 if (file == NULL || (file[0] == '-' && file[1] == '\0'))
149 {
150 in = stdin;
151 file = "(stdin)";
152 }
153 else
154 {
155 in = fopen(file, "r");
156 if (in == NULL)
157 {
158 conf_error = CONF_READING;
159 if (line != NULL)
160 *line = myline;
161 if (outpath != NULL)
162 strlcpy(outpath, file, outpathlen);
163 return NULL;
164 }
165 }
166
167 while (fgets(buf, sizeof buf - 1, in) != NULL)
168 {
169 myline++;
170 str = NULL;
171
172 /* read a line; truncate at newline or "#" */
173 for (p = buf; *p != '\0'; p++)
174 {
175 if (*p == '#' || *p == '\n')
176 {
177 *p = '\0';
178 break;
179 }
180 }
181
182 /* break down the line */
183 p = strtok_r(buf, " \t", &s);
184 if (p != NULL)
185 {
186 /* recognize the directive? */
187 for (n = 0; ; n++)
188 {
189 /* nope */
190 if (def[n].cd_name == NULL)
191 {
192 conf_error = CONF_UNRECOG;
193 err = 1;
194 break;
195 }
196
197 if (strcasecmp(def[n].cd_name, p) == 0)
198 break;
199 }
200
201 if (!err)
202 {
203 char *q;
204
205 /* skip leading whitespace on value */
206 for (p = s; *p == ' ' || *p == '\t'; p++)
207 continue;
208
209 /* ...and trim trailing whitespace */
210 q = p + strlen(p) - 1;
211 while (p <= q && (*q == '\t' || *q == ' '))
212 *q-- = '\0';
213 }
214
215 if (*p == '\0' && !err)
216 {
217 conf_error = CONF_MISSING;
218 err = 1;
219 }
220
221 if (!err)
222 {
223 char *q;
224
225 switch (def[n].cd_type)
226 {
227 case CONFIG_TYPE_STRING:
228 case CONFIG_TYPE_INCLUDE:
229 str = p;
230 break;
231
232 case CONFIG_TYPE_BOOLEAN:
233 if (p[0] == 't' ||
234 p[0] == 'T' ||
235 p[0] == 'y' ||
236 p[0] == 'Y' ||
237 p[0] == '1')
238 {
239 value = 1;
240 }
241 else if (p[0] == 'f' ||
242 p[0] == 'F' ||
243 p[0] == 'n' ||
244 p[0] == 'N' ||
245 p[0] == '0')
246 {
247 value = 0;
248 }
249 else
250 {
251 conf_error = CONF_ILLEGAL;
252 err = 1;
253 }
254
255 break;
256
257 case CONFIG_TYPE_INTEGER:
258 value = (int) strtol(p, &q, 0);
259 if (*q != '\0')
260 {
261 conf_error = CONF_ILLEGAL;
262 err = 1;
263 }
264
265 str = p;
266
267 break;
268
269 default:
270 assert(0);
271 /* NOTREACHED */
272 return NULL;
273 }
274 }
275 }
276 else
277 {
278 continue; /* blank line */
279 }
280
281 /* a parse error, or only one argument, is no good */
282 if (err)
283 {
284 config_free(cur);
285
286 if (line != NULL)
287 *line = myline;
288 if (outpath != NULL)
289 strlcpy(outpath, file, outpathlen);
290
291 if (in != stdin)
292 fclose(in);
293
294 return NULL;
295 }
296
297 if (def[n].cd_type != CONFIG_TYPE_INCLUDE)
298 {
299 new = (struct config *) malloc(sizeof(struct config));
300 if (new == NULL)
301 {
302 config_free(cur);
303
304 conf_error = CONF_NMEMORY;
305
306 if (line != NULL)
307 *line = myline;
308 if (outpath != NULL)
309 strlcpy(outpath, file, outpathlen);
310
311 if (in != stdin)
312 fclose(in);
313
314 return NULL;
315 }
316
317 new->cfg_next = cur;
318 new->cfg_name = def[n].cd_name;
319 new->cfg_type = def[n].cd_type;
320 }
321
322 switch (def[n].cd_type)
323 {
324 case CONFIG_TYPE_INCLUDE:
325 {
326 struct config *incl;
327
328 incl = config_load_level(str, def, line, outpath,
329 outpathlen, level + 1);
330 if (incl == NULL)
331 {
332 if (in != stdin)
333 fclose(in);
334
335 return NULL;
336 }
337
338 config_attach(incl, &cur);
339 new = incl;
340
341 break;
342 }
343
344 case CONFIG_TYPE_STRING:
345 new->cfg_string = strdup(str);
346 break;
347
348 case CONFIG_TYPE_BOOLEAN:
349 new->cfg_bool = (_Bool) value;
350 break;
351
352 case CONFIG_TYPE_INTEGER:
353 new->cfg_int = value;
354 break;
355
356 default:
357 assert(0);
358 }
359
360 cur = new;
361 }
362
363 conf_error = CONF_SUCCESS;
364
365 if (in != stdin)
366 fclose(in);
367
368 if (myline == 0 || cur == NULL)
369 {
370 cur = (struct config *) malloc(sizeof *cur);
371 if (cur != NULL)
372 {
373 cur->cfg_bool = FALSE;
374 cur->cfg_type = CONFIG_TYPE_STRING;
375 cur->cfg_int = 0;
376 cur->cfg_name = "";
377 cur->cfg_string = NULL;
378 cur->cfg_next = NULL;
379
380 return cur;
381 }
382 else
383 {
384 conf_error = CONF_NMEMORY;
385
386 if (line != NULL)
387 *line = myline;
388 if (outpath != NULL)
389 strlcpy(outpath, file, outpathlen);
390
391 return NULL;
392 }
393 }
394 else
395 {
396 return cur;
397 }
398 }
399
400 /*
401 ** CONFIG_ERROR -- return a string describing a configuration error
402 **
403 ** Parameters:
404 ** None.
405 **
406 ** Return value:
407 ** Pointer to a NULL-terminated string explaining the last error.
408 */
409
410 char *
411 config_error(void)
412 {
413 switch (conf_error)
414 {
415 case CONF_SUCCESS:
416 return "no error";
417
418 case CONF_MISSING:
419 return "required value missing";
420
421 case CONF_UNRECOG:
422 return "unrecognized parameter";
423
424 case CONF_ILLEGAL:
425 return "illegal value";
426
427 case CONF_NESTING:
428 return "nesting too deep";
429
430 case CONF_READING:
431 return "error reading configuration file";
432
433 case CONF_NMEMORY:
434 return "memory allocation failure";
435
436 case CONF_UNKNOWN:
437 default:
438 return "unknown error";
439 }
440
441 /* NOTREACHED */
442 }
443
444 /*
445 ** CONFIG_FREE -- release memory associated with a config list
446 **
447 ** Parameters:
448 ** head -- head of the config list
449 **
450 ** Return value:
451 ** None.
452 */
453
454 void
455 config_free(struct config *head)
456 {
457 struct config *next;
458 struct config *cur;
459
460 cur = head;
461 while (cur != NULL)
462 {
463 next = cur->cfg_next;
464 if (cur->cfg_type == CONFIG_TYPE_STRING &&
465 cur->cfg_string != NULL)
466 free(cur->cfg_string);
467 free(cur);
468 cur = next;
469 }
470 }
471
472 /*
473 ** CONFIG_LOAD -- load configuration from a file
474 **
475 ** Parameters:
476 ** file -- path from which to load; NULL or "-" implies stdin
477 ** cd -- array of (struct configdef) elements containing the
478 ** configuration syntax to assert
479 ** line -- line number where an error occurred (updated)
480 ** path -- configuration file in which error occurred (updated)
481 ** pathlen -- number of bytes available at "path"
482 **
483 ** Return value:
484 ** Pointer to a (struct config) which is the head of a list of
485 ** loaded configuration items, or NULL on error; if NULL, "line" is
486 ** updated to indicate which line number contained the error and,
487 ** if the configuration file being parsed was not the one referenced
488 ** by "in", then "path" will be updated to point to the filename
489 ** that was being processed.
490 */
491
492 struct config *
493 config_load(char *file, struct configdef *def, unsigned int *line,
494 char *path, size_t pathlen)
495 {
496 conf_error = CONF_UNKNOWN;
497
498 return config_load_level(file, def, line, path, pathlen, 0);
499 }
500
501 /*
502 ** CONFIG_CHECK -- verify that stuff marked "required" is present
503 **
504 ** Parameters:
505 ** head -- head of config list
506 ** def -- definitions
507 **
508 ** Return value:
509 ** Name of the first parameter in "def" that was marked "required"
510 ** yet absent from the configuration parsed, or NULL if nothing
511 ** required was missing.
512 */
513
514 char *
515 config_check(struct config *head, struct configdef *def)
516 {
517 int n;
518 struct config *cur;
519
520 assert(head != NULL);
521 assert(def != NULL);
522
523 conf_error = CONF_UNKNOWN;
524
525 for (n = 0; ; n++)
526 {
527 if (def[n].cd_name == NULL)
528 {
529 conf_error = CONF_SUCCESS;
530 return NULL;
531 }
532 if (!def[n].cd_req)
533 continue;
534
535 for (cur = head; cur != NULL; cur = cur->cfg_next)
536 {
537 if (cur->cfg_name == def[n].cd_name)
538 break;
539 }
540
541 if (cur == NULL)
542 {
543 conf_error = CONF_MISSING;
544
545 return def[n].cd_name;
546 }
547 }
548
549 /* NOTREACHED */
550 }
551
552 /*
553 ** CONFIG_GET -- retrieve a parameter's value
554 **
555 ** Parameter:
556 ** head -- head of config list
557 ** name -- name of the parameter of interest
558 ** value -- where to write the result (returned)
559 ** size -- bytes available at "value"
560 **
561 ** Return value:
562 ** 1 if the data was found, 0 otherwise, -1 if the request was illegal
563 **
564 ** Notes:
565 ** "value" is a (void *). It can be used directly, such as:
566 **
567 ** int x;
568 **
569 ** (void) config_get(conflist, "MyInteger", (void *) &x);
570 */
571
572 int
573 config_get(struct config *head, const char *name, void *value, size_t size)
574 {
575 struct config *cur;
576
577 assert(head != NULL);
578 assert(name != NULL);
579 assert(value != NULL);
580 assert(size > 0);
581
582 conf_error = CONF_UNKNOWN;
583
584 for (cur = head; cur != NULL; cur = cur->cfg_next)
585 {
586 if (strcasecmp(cur->cfg_name, name) == 0)
587 {
588 switch (cur->cfg_type)
589 {
590 case CONFIG_TYPE_BOOLEAN:
591 if (size != sizeof(_Bool))
592 {
593 conf_error = CONF_ILLEGAL;
594 return -1;
595 }
596 memcpy(value, &cur->cfg_bool, size);
597 break;
598
599 case CONFIG_TYPE_INTEGER:
600 if (size != sizeof(int))
601 {
602 conf_error = CONF_ILLEGAL;
603 return -1;
604 }
605 memcpy(value, &cur->cfg_int, size);
606 break;
607
608 case CONFIG_TYPE_INCLUDE:
609 conf_error = CONF_ILLEGAL;
610 return -1;
611
612 default:
613 if (size != sizeof(char *))
614 {
615 conf_error = CONF_ILLEGAL;
616 return -1;
617 }
618 memcpy(value, &cur->cfg_string, size);
619 break;
620 }
621
622 return 1;
623 }
624 }
625
626 conf_error = CONF_SUCCESS;
627
628 return 0;
629 }
630
631 /*
632 ** CONFIG_VALIDNAME -- return True IFF the name provided was valid
633 **
634 ** Parameters:
635 ** def -- configuration definition
636 ** name -- name of value of interest
637 **
638 ** Return value:
639 ** True IFF "name" was defined inside "cd"
640 */
641
642 _Bool
643 config_validname(struct configdef *def, const char *name)
644 {
645 unsigned int n;
646
647 assert(def != NULL);
648 assert(name != NULL);
649
650 for (n = 0; ; n++)
651 {
652 if (def[n].cd_name == NULL)
653 return FALSE;
654
655 if (strcasecmp(name, def[n].cd_name) == 0)
656 return TRUE;
657 }
658
659 assert(0);
660 /* NOTREACHED */
661 }
662
663 /*
664 ** CONFIG_DUMP -- dump configuration contents
665 **
666 ** Parameters:
667 ** cfg -- head of assembled configuration values
668 ** out -- stream to which to write
669 ** name -- name of value of interest
670 **
671 ** Return value:
672 ** Number of items that matched.
673 */
674
675 unsigned int
676 config_dump(struct config *cfg, FILE *out, const char *name)
677 {
678 unsigned int nprinted = 0;
679 struct config *cur;
680
681 assert(cfg != NULL);
682 assert(out != NULL);
683
684 for (cur = cfg; cur != NULL; cur = cur->cfg_next)
685 {
686 if (name != NULL)
687 {
688 if (strcasecmp(name, cur->cfg_name) != 0)
689 continue;
690 }
691 else
692 {
693 fprintf(out, "%p: \"%s\" ", cur, cur->cfg_name);
694 }
695
696 switch (cur->cfg_type)
697 {
698 case CONFIG_TYPE_STRING:
699 fprintf(out, "%s\n", cur->cfg_string);
700 break;
701
702 case CONFIG_TYPE_INTEGER:
703 fprintf(out, "%d\n", cur->cfg_int);
704 break;
705
706 case CONFIG_TYPE_BOOLEAN:
707 fprintf(out, "%s\n", cur->cfg_bool ? "True" : "False");
708 break;
709
710 default:
711 assert(0);
712 }
713
714 nprinted++;
715 }
716
717 return nprinted;
718 }
0 /*
1 ** Copyright (c) 2006-2008 Sendmail, Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** Copyright (c) 2009-2012, The Trusted Domain Project. All rights reserved.
5 **
6 ** $Id: config.h,v 1.3.34.1 2010/10/27 21:43:09 cm-msk Exp $
7 */
8
9 #ifndef _CONFIG_H_
10 #define _CONFIG_H_
11
12 #include "build-config.h"
13
14 /* system includes */
15 #include <sys/types.h>
16 #ifdef HAVE_STDBOOL_H
17 # include <stdbool.h>
18 #endif /* HAVE_STDBOOL_H */
19 #include <stdio.h>
20
21 #ifdef __STDC__
22 # ifndef __P
23 # define __P(x) x
24 # endif /* ! __P */
25 #else /* __STDC__ */
26 # ifndef __P
27 # define __P(x) ()
28 # endif /* ! __P */
29 #endif /* __STDC__ */
30
31 /* types and things */
32 #define CONFIG_TYPE_STRING 0
33 #define CONFIG_TYPE_INTEGER 1
34 #define CONFIG_TYPE_BOOLEAN 2
35 #define CONFIG_TYPE_INCLUDE 3
36
37 struct config
38 {
39 _Bool cfg_bool;
40 u_int cfg_type;
41 int cfg_int;
42 char * cfg_name;
43 char * cfg_string;
44 struct config * cfg_next;
45 };
46
47 struct configdef
48 {
49 char * cd_name;
50 u_int cd_type;
51 u_int cd_req;
52 };
53
54 /* prototypes */
55 extern char *config_check __P((struct config *, struct configdef *));
56 extern unsigned int config_dump __P((struct config *, FILE *, const char *));
57 extern char *config_error __P((void));
58 extern void config_free __P((struct config *));
59 extern int config_get __P((struct config *, const char *, void *, size_t));
60 extern struct config *config_load __P((char *, struct configdef *,
61 unsigned int *, char *, size_t));
62 extern _Bool config_validname __P((struct configdef *, const char *));
63
64 #endif /* _CONFIG_H_ */
0 /*
1 ** Copyright (c) 2007-2009 Sendmail, Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** Copyright (c) 2009, 2011-2014, The Trusted Domain Project.
5 ** All rights reserved.
6 */
7
8 #include "build-config.h"
9
10 /* system includes */
11 #include <sys/types.h>
12 #include <sys/param.h>
13 #ifdef HAVE_STDBOOL_H
14 # include <stdbool.h>
15 #endif /* HAVE_STDBOOL_H */
16 #include <ctype.h>
17 #include <assert.h>
18 #include <string.h>
19 #ifdef ARTEST
20 # include <sysexits.h>
21 #endif /* ARTEST */
22
23 /* libbsd if found */
24 #ifdef USE_BSD_H
25 # include <bsd/string.h>
26 #endif /* USE_BSD_H */
27
28 /* libstrl if needed */
29 #ifdef USE_STRL_H
30 # include <strl.h>
31 #endif /* USE_STRL_H */
32
33 /* opendmarc_strl if needed */
34 #ifdef USE_DMARCSTRL_H
35 # include <opendmarc_strl.h>
36 #endif /* USE_DMARCSTRL_H */
37
38 /* opendmarc includes */
39 #include "opendmarc-ar.h"
40
41 /* macros */
42 #define ARES_ENDOF(x) ((x) + sizeof(x) - 1)
43 #define ARES_STRORNULL(x) ((x) == NULL ? "(null)" : (x))
44 #define ARES_TOKENS ";=."
45 #define ARES_TOKENS2 "=."
46
47 #define ARES_MAXTOKENS 512
48
49 /* tables */
50 struct lookup
51 {
52 char * str;
53 int code;
54 };
55
56 struct lookup methods[] =
57 {
58 { "auth", ARES_METHOD_AUTH },
59 { "dkim", ARES_METHOD_DKIM },
60 { "dkim-adsp", ARES_METHOD_DKIMADSP },
61 { "dkim-atps", ARES_METHOD_DKIMATPS },
62 { "domainkeys", ARES_METHOD_DOMAINKEYS },
63 { "iprev", ARES_METHOD_IPREV },
64 { "rrvs", ARES_METHOD_RRVS },
65 { "sender-id", ARES_METHOD_SENDERID },
66 { "smime", ARES_METHOD_SMIME },
67 { "spf", ARES_METHOD_SPF },
68 { NULL, ARES_METHOD_UNKNOWN }
69 };
70
71 struct lookup aresults[] =
72 {
73 { "none", ARES_RESULT_NONE },
74 { "pass", ARES_RESULT_PASS },
75 { "fail", ARES_RESULT_FAIL },
76 { "policy", ARES_RESULT_POLICY },
77 { "neutral", ARES_RESULT_NEUTRAL },
78 { "temperror", ARES_RESULT_TEMPERROR },
79 { "permerror", ARES_RESULT_PERMERROR },
80 { "nxdomain", ARES_RESULT_NXDOMAIN },
81 { "signed", ARES_RESULT_SIGNED },
82 { "unknown", ARES_RESULT_UNKNOWN },
83 { "discard", ARES_RESULT_DISCARD },
84 { "softfail", ARES_RESULT_SOFTFAIL },
85 { NULL, ARES_RESULT_UNDEFINED }
86 };
87
88 struct lookup ptypes[] =
89 {
90 { "smtp", ARES_PTYPE_SMTP },
91 { "header", ARES_PTYPE_HEADER },
92 { "body", ARES_PTYPE_BODY },
93 { "policy", ARES_PTYPE_POLICY },
94 { NULL, ARES_PTYPE_UNKNOWN }
95 };
96
97 /*
98 ** ARES_TOKENIZE -- tokenize a string
99 **
100 ** Parameters:
101 ** input -- input string
102 ** outbuf -- output buffer
103 ** outbuflen -- number of bytes available at "outbuf"
104 ** tokens -- array of token pointers
105 ** ntokens -- number of token pointers available at "tokens"
106 **
107 ** Return value:
108 ** -1 -- not enough space at "outbuf" for tokenizing
109 ** other -- number of tokens identified; may be greater than
110 ** "ntokens" if there were more tokens found than there were
111 ** pointers available.
112 */
113
114 static int
115 ares_tokenize(u_char *input, u_char *outbuf, size_t outbuflen,
116 u_char **tokens, int ntokens)
117 {
118 _Bool quoted = FALSE;
119 _Bool escaped = FALSE;
120 _Bool intok = FALSE;
121 int n = 0;
122 int parens = 0;
123 u_char *p;
124 u_char *q;
125 u_char *end;
126
127 assert(input != NULL);
128 assert(outbuf != NULL);
129 assert(outbuflen > 0);
130 assert(tokens != NULL);
131 assert(ntokens > 0);
132
133 q = outbuf;
134 end = outbuf + outbuflen - 1;
135
136 for (p = input; *p != '\0' && q <= end; p++)
137 {
138 if (escaped) /* escape */
139 {
140 if (!intok)
141 {
142 if (n < ntokens)
143 tokens[n] = q;
144 intok = TRUE;
145 }
146
147 *q = *p;
148 q++;
149 escaped = FALSE;
150 }
151 else if (*p == '\\') /* escape */
152 {
153 escaped = TRUE;
154 }
155 else if (*p == '"' && parens == 0) /* quoting */
156 {
157 quoted = !quoted;
158
159 if (!intok)
160 {
161 if (n < ntokens)
162 tokens[n] = q;
163 intok = TRUE;
164 }
165 }
166 else if (*p == '(' && !quoted) /* "(" (comment) */
167 {
168 parens++;
169
170 if (!intok)
171 {
172 if (n < ntokens)
173 tokens[n] = q;
174 intok = TRUE;
175 }
176
177 *q = *p;
178 q++;
179
180 }
181 else if (*p == ')' && !quoted) /* ")" (comment) */
182 {
183 if (parens > 0)
184 {
185 parens--;
186
187 if (parens == 0)
188 {
189 intok = FALSE;
190 n++;
191
192 *q = ')';
193 q++;
194 if (q <= end)
195 {
196 *q = '\0';
197 q++;
198 }
199 }
200 }
201 }
202 else if (quoted) /* quoted character */
203 {
204 *q = *p;
205 q++;
206 }
207 else if (isascii(*p) && isspace(*p)) /* whitespace */
208 {
209 if (quoted || parens > 0)
210 {
211 if (intok)
212 {
213 *q = *p;
214 q++;
215 }
216 }
217 else if (intok)
218 {
219 intok = FALSE;
220 *q = '\0';
221 q++;
222 n++;
223 }
224 }
225 else if (strchr(ARES_TOKENS, *p) != NULL) /* delimiter */
226 {
227 if (parens > 0)
228 {
229 *q = *p;
230 q++;
231 continue;
232 }
233
234 if (intok)
235 {
236 intok = FALSE;
237 *q = '\0';
238 q++;
239 n++;
240 }
241
242 if (q <= end)
243 {
244 *q = *p;
245 if (n < ntokens)
246 {
247 tokens[n] = q;
248 n++;
249 }
250 q++;
251 }
252
253 if (q <= end)
254 {
255 *q = '\0';
256 q++;
257 }
258 }
259 else /* other */
260 {
261 if (!intok)
262 {
263 if (n < ntokens)
264 tokens[n] = q;
265 intok = TRUE;
266 }
267
268 *q = *p;
269 q++;
270 }
271 }
272
273 if (q >= end)
274 return -1;
275
276 if (intok)
277 {
278 *q = '\0';
279 n++;
280 }
281
282 return n;
283 }
284
285 /*
286 ** ARES_CONVERT -- convert a string to its code
287 **
288 ** Parameters:
289 ** table -- in which table to look up
290 ** str -- string to find
291 **
292 ** Return value:
293 ** A code translation of "str".
294 */
295
296 static int
297 ares_convert(struct lookup *table, char *str)
298 {
299 int c;
300
301 assert(table != NULL);
302 assert(str != NULL);
303
304 for (c = 0; ; c++)
305 {
306 if (table[c].str == NULL ||
307 strcasecmp(table[c].str, str) == 0)
308 return table[c].code;
309 }
310
311 /* NOTREACHED */
312 }
313
314 #ifdef ARTEST
315 /*
316 ** ARES_XCONVERT -- convert a code to its string
317 **
318 ** Parameters:
319 ** table -- in which table to look up
320 ** code -- code to find
321 **
322 ** Return value:
323 ** A string translation of "code".
324 */
325
326 static char *
327 ares_xconvert(struct lookup *table, int code)
328 {
329 int c;
330
331 assert(table != NULL);
332
333 for (c = 0; ; c++)
334 {
335 if (table[c].str == NULL || table[c].code == code)
336 return table[c].str;
337 }
338
339 /* NOTREACHED */
340 }
341 #endif /* ARTEST */
342
343 /*
344 ** AUTHRES_PARSE -- parse an Authentication-Results: header, return a
345 ** structure containing a parsed result
346 **
347 ** Parameters:
348 ** hdr -- NULL-terminated contents of an Authentication-Results:
349 ** header field
350 ** ar -- a pointer to a (struct authres) loaded by values after parsing
351 **
352 ** Return value:
353 ** 0 on success, -1 on failure.
354 */
355
356 int
357 ares_parse(u_char *hdr, struct authres *ar)
358 {
359 _Bool quoted;
360 int n;
361 int ntoks;
362 int c;
363 int r = 0;
364 int state;
365 int prevstate;
366 u_char tmp[MAXHEADER + 2];
367 u_char *tokens[ARES_MAXTOKENS];
368
369 assert(hdr != NULL);
370 assert(ar != NULL);
371
372 memset(ar, '\0', sizeof *ar);
373 memset(tmp, '\0', sizeof tmp);
374
375 ntoks = ares_tokenize(hdr, tmp, sizeof tmp, tokens, ARES_MAXTOKENS);
376 if (ntoks == -1 || ntoks > ARES_MAXTOKENS)
377 return -1;
378
379 prevstate = -1;
380 state = 0;
381 n = 0;
382
383 quoted = FALSE;
384
385 for (c = 0; c < ntoks; c++)
386 {
387 if (tokens[c][0] == '(') /* comment */
388 continue;
389
390 switch (state)
391 {
392 case 0: /* authserv-id */
393 if (!isascii(tokens[c][0]) ||
394 !isalnum(tokens[c][0]))
395 return -1;
396
397 strlcat((char *) ar->ares_host, (char *) tokens[c],
398 sizeof ar->ares_host);
399
400 prevstate = state;
401 state = 1;
402
403 break;
404
405 case 1: /* [version] */
406 if (tokens[c][0] == '.' &&
407 tokens[c][1] == '\0' && prevstate == 0)
408 {
409 strlcat((char *) ar->ares_host,
410 (char *) tokens[c],
411 sizeof ar->ares_host);
412
413 prevstate = state;
414 state = 0;
415
416 break;
417 }
418
419 if (tokens[c][0] == ';')
420 {
421 prevstate = state;
422 state = 3;
423 }
424 else if (isascii(tokens[c][0]) &&
425 isdigit(tokens[c][0]))
426 {
427 strlcpy((char *) ar->ares_version,
428 (char *) tokens[c],
429 sizeof ar->ares_version);
430
431 prevstate = state;
432 state = 2;
433 }
434 else
435 {
436 return -1;
437 }
438
439 break;
440
441 case 2: /* ; */
442 if (tokens[c][0] != ';' ||
443 tokens[c][1] != '\0')
444 return -1;
445
446 prevstate = state;
447 state = 3;
448
449 break;
450
451 case 3: /* method */
452 n++;
453 r = 0;
454
455 ar->ares_result[n - 1].result_method = ares_convert(methods,
456 (char *) tokens[c]);
457 prevstate = state;
458 state = 4;
459
460 break;
461
462 case 4: /* = */
463 if (tokens[c][0] != '=' ||
464 tokens[c][1] != '\0')
465 return -1;
466
467 prevstate = state;
468 state = 5;
469
470 break;
471
472 case 5: /* result */
473 ar->ares_result[n - 1].result_result = ares_convert(aresults,
474 (char *) tokens[c]);
475 prevstate = state;
476 state = 6;
477
478 break;
479
480 case 7: /* = (reason) */
481 if (tokens[c][0] != '=' ||
482 tokens[c][1] != '\0')
483 return -1;
484
485 prevstate = state;
486 state = 8;
487
488 break;
489
490 case 8:
491 strlcpy((char *) ar->ares_result[n - 1].result_reason,
492 (char *) tokens[c],
493 sizeof ar->ares_result[n - 1].result_reason);
494
495 prevstate = state;
496 state = 9;
497
498 break;
499
500 case 6: /* reason/propspec */
501 if (tokens[c][0] == ';' && /* neither */
502 tokens[c][1] == '\0')
503 {
504 prevstate = state;
505 state = 3;
506
507 continue;
508 }
509
510 if (strcasecmp((char *) tokens[c], "reason") == 0)
511 { /* reason */
512 prevstate = state;
513 state = 7;
514
515 continue;
516 }
517 else
518 {
519 prevstate = state;
520 state = 9;
521 }
522
523 /* FALLTHROUGH */
524
525 case 9: /* ptype */
526 if (prevstate == 13 &&
527 strchr(ARES_TOKENS2, tokens[c][0]) != NULL &&
528 tokens[c][1] == '\0')
529 {
530 r--;
531
532 strlcat((char *) ar->ares_result[n - 1].result_value[r],
533 (char *) tokens[c],
534 sizeof ar->ares_result[n - 1].result_value[r]);
535
536 prevstate = state;
537 state = 13;
538
539 continue;
540 }
541
542 if (tokens[c][0] == ';' &&
543 tokens[c][1] == '\0')
544 {
545 prevstate = state;
546 state = 3;
547
548 continue;
549 }
550 else
551 {
552 ares_ptype_t x;
553
554 x = ares_convert(ptypes, (char *) tokens[c]);
555 if (x == ARES_PTYPE_UNKNOWN)
556 return -1;
557
558 ar->ares_result[n - 1].result_ptype[r] = x;
559
560 prevstate = state;
561 state = 10;
562 }
563
564 break;
565
566 case 10: /* . */
567 if (tokens[c][0] != '.' ||
568 tokens[c][1] != '\0')
569 return -1;
570
571 prevstate = state;
572 state = 11;
573
574 break;
575
576 case 11: /* property */
577 strlcpy((char *) ar->ares_result[n - 1].result_property[r],
578 (char *) tokens[c],
579 sizeof ar->ares_result[n - 1].result_property[r]);
580
581 prevstate = state;
582 state = 12;
583
584 break;
585
586 case 12: /* = */
587 if (tokens[c][0] != '=' ||
588 tokens[c][1] != '\0')
589 return -1;
590
591 prevstate = state;
592 state = 13;
593
594 break;
595
596 case 13: /* value */
597 strlcat((char *) ar->ares_result[n - 1].result_value[r],
598 (char *) tokens[c],
599 sizeof ar->ares_result[n - 1].result_value[r]);
600 r++;
601 ar->ares_result[n - 1].result_props = r;
602
603 prevstate = state;
604 state = 9;
605
606 break;
607 }
608 }
609
610 /* error out on non-terminal states */
611 if (state == 4 || state == 7 || state == 10 ||
612 state == 11 || state == 12)
613 return -1;
614
615 ar->ares_count = n;
616
617 return 0;
618 }
619
620 #ifdef ARTEST
621 /*
622 ** MAIN -- program mainline
623 **
624 ** Parameters:
625 ** argc, argv -- the usual
626 **
627 ** Return value:
628 ** EX_USAGE or EX_OK
629 */
630
631 # define NTOKENS 256
632
633 int
634 main(int argc, char **argv)
635 {
636 int c;
637 int d;
638 int status;
639 char *p;
640 char *progname;
641 struct authres ar;
642 u_char buf[1024];
643 u_char *toks[NTOKENS];
644
645 progname = (p = strrchr(argv[0], '/')) == NULL ? argv[0] : p + 1;
646
647 if (argc != 2)
648 {
649 printf("%s: usage: %s header-value\n", progname, progname);
650 return EX_USAGE;
651 }
652
653 c = ares_tokenize(argv[1], buf, sizeof buf, toks, NTOKENS);
654 for (d = 0; d < c; d++)
655 printf("token %d = '%s'\n", d, toks[d]);
656
657 printf("\n");
658
659 status = ares_parse(argv[1], &ar);
660 if (status == -1)
661 {
662 printf("%s: ares_parse() returned -1\n", progname);
663 return EX_OK;
664 }
665
666 printf("%d result%s found\n", ar.ares_count,
667 ar.ares_count == 1 ? "" : "s");
668
669 printf("authserv-id '%s'\n", ar.ares_host);
670 printf("version '%s'\n", ar.ares_version);
671
672 for (c = 0; c < ar.ares_count; c++)
673 {
674 printf("result #%d, %d propert%s\n", c,
675 ar.ares_result[c].result_props,
676 ar.ares_result[c].result_props == 1 ? "y" : "ies");
677
678 printf("\tmethod \"%s\"\n",
679 ares_xconvert(methods,
680 ar.ares_result[c].result_method));
681 printf("\tresult \"%s\"\n",
682 ares_xconvert(aresults,
683 ar.ares_result[c].result_result));
684 printf("\treason \"%s\"\n", ar.ares_result[c].result_reason);
685
686 for (d = 0; d < ar.ares_result[c].result_props; d++)
687 {
688 printf("\tproperty #%d\n", d);
689 printf("\t\tptype \"%s\"\n",
690 ares_xconvert(ptypes,
691 ar.ares_result[c].result_ptype[d]));
692 printf("\t\tproperty \"%s\"\n",
693 ar.ares_result[c].result_property[d]);
694 printf("\t\tvalue \"%s\"\n",
695 ar.ares_result[c].result_value[d]);
696 }
697 }
698 }
699 #endif /* ARTEST */
0 /*
1 ** Copyright (c) 2007-2009 Sendmail, Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** Copyright (c) 2009, 2012, 2014, The Trusted Domain Project.
5 ** All rights reserved.
6 */
7
8 #ifndef _OPENDMARC_AR_H_
9 #define _OPENDMARC_AR_H_
10
11 /* system includes */
12 #include <sys/types.h>
13
14 /* opendmarc includes */
15 #include "opendmarc.h"
16 #include "dmarc.h"
17
18 /* limits */
19 #define AUTHRESHDRNAME "Authentication-Results"
20 #define MAXARESULTS 16
21 #define MAXPROPS 16
22 #define MAXAVALUE 256
23
24 /* ARES_METHOD_T -- type for specifying an authentication method */
25 typedef int ares_method_t;
26
27 #define ARES_METHOD_UNKNOWN (-1)
28 #define ARES_METHOD_AUTH 0
29 #define ARES_METHOD_DKIM 1
30 #define ARES_METHOD_DOMAINKEYS 2
31 #define ARES_METHOD_SENDERID 3
32 #define ARES_METHOD_SPF 4
33 #define ARES_METHOD_DKIMADSP 5
34 #define ARES_METHOD_IPREV 6
35 #define ARES_METHOD_DKIMATPS 7
36 #define ARES_METHOD_SMIME 8
37 #define ARES_METHOD_RRVS 9
38
39 /* ARES_RESULT_T -- type for specifying an authentication result */
40 typedef int ares_result_t;
41
42 #define ARES_RESULT_UNDEFINED (-1)
43 #define ARES_RESULT_PASS 0
44 #define ARES_RESULT_UNUSED 1
45 #define ARES_RESULT_SOFTFAIL 2
46 #define ARES_RESULT_NEUTRAL 3
47 #define ARES_RESULT_TEMPERROR 4
48 #define ARES_RESULT_PERMERROR 5
49 #define ARES_RESULT_NONE 6
50 #define ARES_RESULT_FAIL 7
51 #define ARES_RESULT_POLICY 8
52 #define ARES_RESULT_NXDOMAIN 9
53 #define ARES_RESULT_SIGNED 10
54 #define ARES_RESULT_UNKNOWN 11
55 #define ARES_RESULT_DISCARD 12
56
57 /* ARES_PTYPE_T -- type for specifying an authentication property */
58 typedef int ares_ptype_t;
59
60 #define ARES_PTYPE_UNKNOWN (-1)
61 #define ARES_PTYPE_SMTP 0
62 #define ARES_PTYPE_HEADER 1
63 #define ARES_PTYPE_BODY 2
64 #define ARES_PTYPE_POLICY 3
65
66 /* RESULT structure -- a single result */
67 struct result
68 {
69 int result_props;
70 ares_method_t result_method;
71 ares_result_t result_result;
72 ares_ptype_t result_ptype[MAXPROPS];
73 unsigned char result_reason[MAXAVALUE + 1];
74 unsigned char result_property[MAXPROPS][MAXAVALUE + 1];
75 unsigned char result_value[MAXPROPS][MAXAVALUE + 1];
76 };
77
78 /* AUTHRES structure -- the entire header parsed */
79 struct authres
80 {
81 int ares_count;
82 unsigned char ares_host[DMARC_MAXHOSTNAMELEN + 1];
83 unsigned char ares_version[MAXAVALUE + 1];
84 struct result ares_result[MAXARESULTS];
85 };
86
87 /*
88 ** ARES_PARSE -- parse an Authentication-Results: header, return a
89 ** structure containing a parsed result
90 **
91 ** Parameters:
92 ** hdr -- NULL-terminated contents of an Authentication-Results:
93 ** header field
94 ** ar -- a pointer to a (struct authres) loaded by values after parsing
95 **
96 ** Return value:
97 ** 0 on success, -1 on failure.
98 */
99
100 extern int ares_parse __P((u_char *hdr, struct authres *ar));
101
102 #endif /* _OPENDMARC_AR_H_ */
0 .TH opendmarc-check 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-check
3 \- DMARC record check tool
4 .SH SYNOPSIS
5 .B opendmarc-check
6 domain [domain [...]]
7 .SH DESCRIPTION
8 .B opendmarc-check
9 queries the DNS for a DMARC record for the named domain(s) and then translates
10 the content found to a human-readable form. This can be used to ensure that
11 the DMARC policy you have placed in the nameserver is what you intended for
12 others to see.
13 .SH VERSION
14 This man page covers version @VERSION@ of
15 .I opendmarc.
16 .SH COPYRIGHT
17 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
18 .SH SEE ALSO
19 .I opendmarc.conf(5), opendmarc(8)
0 /*
1 ** Copyright (c) 2012, 2014, 2016, The Trusted Domain Project.
2 ** All rights reserved.
3 */
4
5 #include "build-config.h"
6
7 /* system includes */
8 #include <sys/param.h>
9 #include <sys/types.h>
10 #include <sysexits.h>
11 #include <stdio.h>
12 #include <string.h>
13
14 /* libbsd if found */
15 #ifdef USE_BSD_H
16 # include <bsd/string.h>
17 #endif /* USE_BSD_H */
18
19 /* libstrl if needed */
20 #ifdef USE_STRL_H
21 # include <strl.h>
22 #endif /* USE_STRL_H */
23
24 /* opendmarc_strl if needed */
25 #ifdef USE_DMARCSTRL_H
26 # include <opendmarc_strl.h>
27 #endif /* USE_DMARCSTRL_H */
28
29 /* libopendmarc */
30 #include <dmarc.h>
31
32 #define LOCALHOST "127.0.0.1"
33
34 #ifndef TRUE
35 # define TRUE 1
36 #endif /* ! TRUE */
37 #ifndef FALSE
38 # define FALSE 0
39 #endif /* ! FALSE */
40
41 /* globals */
42 char *progname;
43
44 /*
45 ** MAIN -- program mainline
46 **
47 ** Parameters:
48 ** argc, argv -- the usual
49 **
50 ** Return value:
51 ** Exit status.
52 */
53
54 int
55 main(int argc, char **argv)
56 {
57 int c;
58 int n;
59 int pct;
60 OPENDMARC_STATUS_T status;
61 char *p;
62 char *sp;
63 char *adkim;
64 char *aspf;
65 unsigned char **rua;
66 unsigned char **ruf;
67 DMARC_POLICY_T *dmarc;
68 OPENDMARC_LIB_T lib;
69
70 progname = (p = strrchr(argv[0], '/')) == NULL ? argv[0] : p + 1;
71
72 if (argc == 1)
73 {
74 fprintf(stderr, "%s: usage: %s [domain [...]]\n", progname,
75 progname);
76
77 return EX_USAGE;
78 }
79
80 memset(&lib, '\0', sizeof lib);
81 lib.tld_type = OPENDMARC_TLD_TYPE_NONE;
82 lib.nscount = 0;
83
84 status = opendmarc_policy_library_init(&lib);
85 if (status != DMARC_PARSE_OKAY)
86 {
87 fprintf(stderr, "%s: opendmarc_policy_library_init(): %s\n",
88 progname,
89 opendmarc_policy_status_to_str(status));
90
91 return EX_SOFTWARE;
92 }
93
94 dmarc = opendmarc_policy_connect_init(LOCALHOST, FALSE);
95 if (dmarc == NULL)
96 {
97 fprintf(stderr, "%s: opendmarc_policy_connect_init() failed\n",
98 progname);
99
100 return EX_SOFTWARE;
101 }
102
103 for (c = 1; c < argc; c++)
104 {
105 (void) opendmarc_policy_connect_rset(dmarc);
106
107 status = opendmarc_policy_store_from_domain(dmarc, argv[c]);
108 if (status != DMARC_PARSE_OKAY)
109 {
110 fprintf(stderr,
111 "%s: opendmarc_policy_store_from_domain(%s): %s\n",
112 progname, argv[c],
113 opendmarc_policy_status_to_str(status));
114
115 return EX_SOFTWARE;
116 }
117
118 status = opendmarc_policy_query_dmarc(dmarc, NULL);
119 if (status != DMARC_PARSE_OKAY)
120 {
121 fprintf(stderr,
122 "%s: opendmarc_policy_query_dmarc(%s): %s\n",
123 progname, argv[c],
124 opendmarc_policy_status_to_str(status));
125
126 return EX_SOFTWARE;
127 }
128
129 if (c != 1)
130 fprintf(stdout, "\n");
131
132 (void) opendmarc_policy_fetch_pct(dmarc, &pct);
133
134 (void) opendmarc_policy_fetch_adkim(dmarc, &n);
135 switch (n)
136 {
137 case DMARC_RECORD_A_UNSPECIFIED:
138 adkim = "unspecified";
139 break;
140
141 case DMARC_RECORD_A_STRICT:
142 adkim = "strict";
143 break;
144
145 case DMARC_RECORD_A_RELAXED:
146 adkim = "relaxed";
147 break;
148
149 default:
150 adkim = "unknown";
151 break;
152 }
153
154 (void) opendmarc_policy_fetch_aspf(dmarc, &n);
155 switch (n)
156 {
157 case DMARC_RECORD_A_UNSPECIFIED:
158 aspf = "unspecified";
159 break;
160
161 case DMARC_RECORD_A_STRICT:
162 aspf = "strict";
163 break;
164
165 case DMARC_RECORD_A_RELAXED:
166 aspf = "relaxed";
167 break;
168
169 default:
170 aspf = "unknown";
171 break;
172 }
173
174 (void) opendmarc_policy_fetch_p(dmarc, &n);
175 switch (n)
176 {
177 case DMARC_RECORD_P_UNSPECIFIED:
178 p = "unspecified";
179 break;
180
181 case DMARC_RECORD_P_NONE:
182 p = "none";
183 break;
184
185 case DMARC_RECORD_P_QUARANTINE:
186 p = "quarantine";
187 break;
188
189 case DMARC_RECORD_P_REJECT:
190 p = "reject";
191 break;
192
193 default:
194 p = "unknown";
195 break;
196 }
197
198 (void) opendmarc_policy_fetch_sp(dmarc, &n);
199 switch (n)
200 {
201 case DMARC_RECORD_P_UNSPECIFIED:
202 sp = "unspecified";
203 break;
204
205 case DMARC_RECORD_P_NONE:
206 sp = "none";
207 break;
208
209 case DMARC_RECORD_P_QUARANTINE:
210 sp = "quarantine";
211 break;
212
213 case DMARC_RECORD_P_REJECT:
214 sp = "reject";
215 break;
216
217 default:
218 sp = "unknown";
219 break;
220 }
221
222 rua = opendmarc_policy_fetch_rua(dmarc, NULL, 0, 1);
223 ruf = opendmarc_policy_fetch_ruf(dmarc, NULL, 0, 1);
224
225 fprintf(stdout, "DMARC record for %s:\n", argv[1]);
226 fprintf(stdout, "\tSample percentage: %d\n", pct);
227 fprintf(stdout, "\tDKIM alignment: %s\n", adkim);
228 fprintf(stdout, "\tSPF alignment: %s\n", aspf);
229 fprintf(stdout, "\tDomain policy: %s\n", p);
230 fprintf(stdout, "\tSubdomain policy: %s\n", sp);
231 fprintf(stdout, "\tAggregate report URIs:\n");
232 for (n = 0; rua != NULL && rua[n] != NULL; n++)
233 fprintf(stdout, "\t\t%s\n", rua[n]);
234 if (n == 0)
235 fprintf(stdout, "\t\t(none)\n");
236 fprintf(stdout, "\tFailure report URIs:\n");
237 for (n = 0; ruf != NULL && ruf[n] != NULL; n++)
238 fprintf(stdout, "\t\t%s\n", ruf[n]);
239 if (n == 0)
240 fprintf(stdout, "\t\t(none)\n");
241 }
242
243 (void) opendmarc_policy_connect_shutdown(dmarc);
244 (void) opendmarc_policy_library_shutdown(&lib);
245
246 return EX_OK;
247 }
0 /*
1 ** Copyright (c) 2012-2015, The Trusted Domain Project. All rights reserved.
2 */
3
4 #ifndef _OPENDMARC_CONFIG_H_
5 #define _OPENDMARC_CONFIG_H_
6
7 /* macros */
8 #ifndef FALSE
9 # define FALSE 0
10 #endif /* ! FALSE */
11 #ifndef TRUE
12 # define TRUE 1
13 #endif /* ! TRUE */
14
15 /* config definition */
16 struct configdef dmarcf_config[] =
17 {
18 { "AuthservID", CONFIG_TYPE_STRING, FALSE },
19 { "AuthservIDWithJobID", CONFIG_TYPE_BOOLEAN, FALSE },
20 { "AutoRestart", CONFIG_TYPE_BOOLEAN, FALSE },
21 { "AutoRestartCount", CONFIG_TYPE_INTEGER, FALSE },
22 { "AutoRestartRate", CONFIG_TYPE_STRING, FALSE },
23 { "Background", CONFIG_TYPE_BOOLEAN, FALSE },
24 { "BaseDirectory", CONFIG_TYPE_STRING, FALSE },
25 { "ChangeRootDirectory", CONFIG_TYPE_STRING, FALSE },
26 { "CopyFailuresTo", CONFIG_TYPE_STRING, FALSE },
27 { "DNSTimeout", CONFIG_TYPE_INTEGER, FALSE },
28 { "EnableCoredumps", CONFIG_TYPE_BOOLEAN, FALSE },
29 { "FailureReports", CONFIG_TYPE_BOOLEAN, FALSE },
30 { "FailureReportsBcc", CONFIG_TYPE_STRING, FALSE },
31 { "FailureReportsOnNone", CONFIG_TYPE_BOOLEAN, FALSE },
32 { "FailureReportsSentBy", CONFIG_TYPE_STRING, FALSE },
33 { "HistoryFile", CONFIG_TYPE_STRING, FALSE },
34 { "IgnoreAuthenticatedClients", CONFIG_TYPE_BOOLEAN, FALSE },
35 { "IgnoreHosts", CONFIG_TYPE_STRING, FALSE },
36 { "IgnoreMailFrom", CONFIG_TYPE_STRING, FALSE },
37 { "MilterDebug", CONFIG_TYPE_INTEGER, FALSE },
38 { "PidFile", CONFIG_TYPE_STRING, FALSE },
39 { "PublicSuffixList", CONFIG_TYPE_STRING, FALSE },
40 { "RecordAllMessages", CONFIG_TYPE_BOOLEAN, FALSE },
41 { "RequiredHeaders", CONFIG_TYPE_BOOLEAN, FALSE },
42 { "RejectFailures", CONFIG_TYPE_BOOLEAN, FALSE },
43 { "ReportCommand", CONFIG_TYPE_STRING, FALSE },
44 { "Socket", CONFIG_TYPE_STRING, FALSE },
45 { "SoftwareHeader", CONFIG_TYPE_BOOLEAN, FALSE },
46 { "SPFIgnoreResults", CONFIG_TYPE_BOOLEAN, FALSE },
47 { "SPFSelfValidate", CONFIG_TYPE_BOOLEAN, FALSE },
48 { "Syslog", CONFIG_TYPE_BOOLEAN, FALSE },
49 { "SyslogFacility", CONFIG_TYPE_STRING, FALSE },
50 { "TestDNSData", CONFIG_TYPE_STRING, FALSE },
51 { "TrustedAuthservIDs", CONFIG_TYPE_STRING, FALSE },
52 { "UMask", CONFIG_TYPE_INTEGER, FALSE },
53 { "Userid", CONFIG_TYPE_STRING, FALSE },
54 { NULL, (u_int) -1, FALSE }
55 };
56
57 #endif /* _OPENDMARC_CONFIG_H_ */
0 /*
1 ** Copyright (c) 2005-2009 Sendmail, Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** Copyright (c) 2009-2012, 2014, The Trusted Domain Project.
5 ** All rights reserved.
6 */
7
8 #include "build-config.h"
9
10 /* system includes */
11 #include <sys/param.h>
12 #include <sys/types.h>
13 #ifdef HAVE_ISO_LIMITS_ISO_H
14 # include <iso/limits_iso.h>
15 #endif /* HAVE_ISO_LIMITS_ISO_H */
16 #include <assert.h>
17 #include <string.h>
18 #include <stdlib.h>
19 #include <stdarg.h>
20 #include <stdio.h>
21
22 /* libbsd if found */
23 #ifdef USE_BSD_H
24 # include <bsd/string.h>
25 #endif /* USE_BSD_H */
26
27 /* libstrl if needed */
28 #ifdef USE_STRL_H
29 # include <strl.h>
30 #endif /* USE_STRL_H */
31
32 /* opendmarc_strl if needed */
33 #ifdef USE_DMARCSTRL_H
34 # include <opendmarc_strl.h>
35 #endif /* USE_DMARCSTRL_H */
36
37 /* opendmarc includes */
38 #include "opendmarc.h"
39 #include "opendmarc-dstring.h"
40
41 /* struct dmarcf_dstring -- a dynamically-sized string */
42 struct dmarcf_dstring
43 {
44 int ds_alloc;
45 int ds_max;
46 int ds_len;
47 u_char * ds_buf;
48 };
49
50 /*
51 ** DMARCF_DSTRING_RESIZE -- resize a dynamic string (dstring)
52 **
53 ** Parameters:
54 ** dstr -- DMARCF_DSTRING handle
55 ** len -- number of bytes desired
56 **
57 ** Return value:
58 ** TRUE iff the resize worked (or wasn't needed)
59 **
60 ** Notes:
61 ** This will actually ensure that there are "len" bytes available.
62 ** The caller must account for the NULL byte when requesting a
63 ** specific size.
64 */
65
66 static _Bool
67 dmarcf_dstring_resize(struct dmarcf_dstring *dstr, int len)
68 {
69 int newsz;
70 u_char *new;
71
72 assert(dstr != NULL);
73 assert(len > 0);
74
75 if (dstr->ds_alloc >= len)
76 return TRUE;
77
78 /* must resize */
79 for (newsz = dstr->ds_alloc * 2;
80 newsz < len;
81 newsz *= 2)
82 {
83 /* impose ds_max limit, if specified */
84 if (dstr->ds_max > 0 && newsz > dstr->ds_max)
85 {
86 if (len <= dstr->ds_max)
87 {
88 newsz = len;
89 break;
90 }
91
92 return FALSE;
93 }
94
95 /* check for overflow */
96 if (newsz > INT_MAX / 2)
97 {
98 /* next iteration will overflow "newsz" */
99 return FALSE;
100 }
101 }
102
103 new = malloc(newsz);
104 if (new == NULL)
105 return FALSE;
106
107 memcpy(new, dstr->ds_buf, dstr->ds_alloc);
108
109 free(dstr->ds_buf);
110
111 dstr->ds_alloc = newsz;
112 dstr->ds_buf = new;
113
114 return TRUE;
115 }
116
117 /*
118 ** DMARCF_DSTRING_NEW -- make a new dstring
119 **
120 ** Parameters:
121 ** dkim -- DKIM handle
122 ** len -- initial number of bytes
123 ** maxlen -- maximum allowed length (0 == unbounded)
124 **
125 ** Return value:
126 ** A DMARCF_DSTRING handle, or NULL on failure.
127 */
128
129 struct dmarcf_dstring *
130 dmarcf_dstring_new(int len, int maxlen)
131 {
132 struct dmarcf_dstring *new;
133
134 /* fail on invalid parameters */
135 if ((maxlen > 0 && len > maxlen) || len == 0)
136 return NULL;
137
138 if (len < BUFRSZ)
139 len = BUFRSZ;
140
141 new = malloc(sizeof(struct dmarcf_dstring));
142 if (new == NULL)
143 return NULL;
144
145 new->ds_buf = malloc(len);
146 if (new->ds_buf == NULL)
147 {
148 free(new);
149 return NULL;
150 }
151
152 memset(new->ds_buf, '\0', len);
153 new->ds_alloc = len;
154 new->ds_len = 0;
155 new->ds_max = maxlen;
156
157 return new;
158 }
159
160 /*
161 ** DMARCF_DSTRING_FREE -- destroy an existing dstring
162 **
163 ** Parameters:
164 ** dstr -- DMARCF_DSTRING handle to be destroyed
165 **
166 ** Return value:
167 ** None.
168 */
169
170 void
171 dmarcf_dstring_free(struct dmarcf_dstring *dstr)
172 {
173 assert(dstr != NULL);
174
175 free(dstr->ds_buf);
176 free(dstr);
177 }
178
179 /*
180 ** DMARCF_DSTRING_COPY -- copy data into a dstring
181 **
182 ** Parameters:
183 ** dstr -- DMARCF_DSTRING handle to update
184 ** str -- input string
185 **
186 ** Return value:
187 ** TRUE iff the copy succeeded.
188 **
189 ** Side effects:
190 ** The dstring may be resized.
191 */
192
193 _Bool
194 dmarcf_dstring_copy(struct dmarcf_dstring *dstr, u_char *str)
195 {
196 int len;
197
198 assert(dstr != NULL);
199 assert(str != NULL);
200
201 len = strlen((char *) str);
202
203 /* too big? */
204 if (dstr->ds_max > 0 && len >= dstr->ds_max)
205 return FALSE;
206
207 /* fits now? */
208 if (dstr->ds_alloc <= len)
209 {
210 /* nope; try to resize */
211 if (!dmarcf_dstring_resize(dstr, len + 1))
212 return FALSE;
213 }
214
215 /* copy */
216 dstr->ds_len = strlcpy((char *) dstr->ds_buf, (char *) str,
217 dstr->ds_alloc);
218
219 return TRUE;
220 }
221
222 /*
223 ** DMARCF_DSTRING_CAT -- append data onto a dstring
224 **
225 ** Parameters:
226 ** dstr -- DMARCF_DSTRING handle to update
227 ** str -- input string
228 **
229 ** Return value:
230 ** TRUE iff the update succeeded.
231 **
232 ** Side effects:
233 ** The dstring may be resized.
234 */
235
236 _Bool
237 dmarcf_dstring_cat(struct dmarcf_dstring *dstr, u_char *str)
238 {
239 int len;
240
241 assert(dstr != NULL);
242 assert(str != NULL);
243
244 len = strlen((char *) str) + dstr->ds_len;
245
246 /* too big? */
247 if (dstr->ds_max > 0 && len >= dstr->ds_max)
248 return FALSE;
249
250 /* fits now? */
251 if (dstr->ds_alloc <= len)
252 {
253 /* nope; try to resize */
254 if (!dmarcf_dstring_resize(dstr, len + 1))
255 return FALSE;
256 }
257
258 /* append */
259 dstr->ds_len = strlcat((char *) dstr->ds_buf, (char *) str,
260 dstr->ds_alloc);
261
262 return TRUE;
263 }
264
265 /*
266 ** DMARCF_DSTRING_CAT1 -- append one byte onto a dstring
267 **
268 ** Parameters:
269 ** dstr -- DMARCF_DSTRING handle to update
270 ** c -- input character
271 **
272 ** Return value:
273 ** TRUE iff the update succeeded.
274 **
275 ** Side effects:
276 ** The dstring may be resized.
277 */
278
279 _Bool
280 dmarcf_dstring_cat1(struct dmarcf_dstring *dstr, int c)
281 {
282 int len;
283
284 assert(dstr != NULL);
285
286 len = dstr->ds_len + 1;
287
288 /* too big? */
289 if (dstr->ds_max > 0 && len >= dstr->ds_max)
290 return FALSE;
291
292 /* fits now? */
293 if (dstr->ds_alloc <= len)
294 {
295 /* nope; try to resize */
296 if (!dmarcf_dstring_resize(dstr, len + 1))
297 return FALSE;
298 }
299
300 /* append */
301 dstr->ds_buf[dstr->ds_len++] = c;
302 dstr->ds_buf[dstr->ds_len] = '\0';
303
304 return TRUE;
305 }
306
307 /*
308 ** DMARCF_DSTRING_CATN -- append 'n' bytes onto a dstring
309 **
310 ** Parameters:
311 ** dstr -- DMARCF_DSTRING handle to update
312 ** str -- input string
313 ** nbytes -- number of bytes to append
314 **
315 ** Return value:
316 ** TRUE iff the update succeeded.
317 **
318 ** Side effects:
319 ** The dstring may be resized.
320 */
321
322 _Bool
323 dmarcf_dstring_catn(struct dmarcf_dstring *dstr, unsigned char *str,
324 size_t nbytes)
325 {
326 size_t needed;
327
328 assert(dstr != NULL);
329 assert(str != NULL);
330
331 needed = dstr->ds_len + nbytes;
332
333 /* too big? */
334 if (dstr->ds_max > 0 && needed >= dstr->ds_max)
335 return FALSE;
336
337 /* fits now? */
338 if (dstr->ds_alloc <= needed)
339 {
340 /* nope; try to resize */
341 if (!dmarcf_dstring_resize(dstr, needed + 1))
342 return FALSE;
343 }
344
345 /* append */
346 memcpy(dstr->ds_buf + dstr->ds_len, str, nbytes);
347 dstr->ds_len += nbytes;
348 dstr->ds_buf[dstr->ds_len] = '\0';
349
350 return TRUE;
351 }
352
353 /*
354 ** DMARCF_DSTRING_GET -- retrieve data in a dstring
355 **
356 ** Parameters:
357 ** dstr -- DMARCF_DSTRING handle whose string should be retrieved
358 **
359 ** Return value:
360 ** Pointer to the NULL-terminated contents of "dstr".
361 */
362
363 u_char *
364 dmarcf_dstring_get(struct dmarcf_dstring *dstr)
365 {
366 assert(dstr != NULL);
367
368 return dstr->ds_buf;
369 }
370
371 /*
372 ** DMARCF_DSTRING_LEN -- retrieve length of data in a dstring
373 **
374 ** Parameters:
375 ** dstr -- DMARCF_DSTRING handle whose string should be retrieved
376 **
377 ** Return value:
378 ** Number of bytes in a dstring.
379 */
380
381 int
382 dmarcf_dstring_len(struct dmarcf_dstring *dstr)
383 {
384 assert(dstr != NULL);
385
386 return dstr->ds_len;
387 }
388
389 /*
390 ** DMARCF_DSTRING_BLANK -- clear out the contents of a dstring
391 **
392 ** Parameters:
393 ** dstr -- DMARCF_DSTRING handle whose string should be cleared
394 **
395 ** Return value:
396 ** None.
397 */
398
399 void
400 dmarcf_dstring_blank(struct dmarcf_dstring *dstr)
401 {
402 assert(dstr != NULL);
403
404 dstr->ds_len = 0;
405 dstr->ds_buf[0] = '\0';
406 }
407
408 /*
409 ** DMARCF_DSTRING_CHOP -- truncate contents of a dstring
410 **
411 ** Parameters:
412 ** dstr -- DMARCF_DSTRING handle whose string should be cleared
413 ** len -- length after which to clobber
414 **
415 ** Return value:
416 ** None.
417 */
418
419 void
420 dmarcf_dstring_chop(struct dmarcf_dstring *dstr, int len)
421 {
422 assert(dstr != NULL);
423
424 if (len < dstr->ds_len)
425 {
426 dstr->ds_len = len;
427 dstr->ds_buf[len] = '\0';
428 }
429 }
430
431 /*
432 ** DMARCF_DSTRING_PRINTF -- write variable length formatted output to a
433 ** dstring
434 **
435 ** Parameters:
436 ** dstr -- DMARCF_STRING handle to be updated
437 ** fmt -- format
438 ** ... -- variable arguments
439 **
440 ** Return value:
441 ** New size, or -1 on error.
442 */
443
444 size_t
445 dmarcf_dstring_printf(struct dmarcf_dstring *dstr, char *fmt, ...)
446 {
447 size_t len;
448 size_t rem;
449 va_list ap;
450 va_list ap2;
451
452 assert(dstr != NULL);
453 assert(fmt != NULL);
454
455 va_start(ap, fmt);
456 va_copy(ap2, ap);
457 rem = dstr->ds_alloc - dstr->ds_len;
458 len = vsnprintf((char *) dstr->ds_buf + dstr->ds_len, rem, fmt, ap);
459 va_end(ap);
460
461 if (len > rem)
462 {
463 if (!dmarcf_dstring_resize(dstr, dstr->ds_len + len + 1))
464 {
465 va_end(ap2);
466 return (size_t) -1;
467 }
468
469 rem = dstr->ds_alloc - dstr->ds_len;
470 len = vsnprintf((char *) dstr->ds_buf + dstr->ds_len, rem,
471 fmt, ap2);
472 }
473
474 va_end(ap2);
475
476 dstr->ds_len += len;
477
478 return dstr->ds_len;
479 }
0 /*
1 ** Copyright (c) 2004, 2005, 2007-2009 Sendmail, Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** Copyright (c) 2009, 2010, 2012, The Trusted Domain Project.
5 ** All rights reserved.
6 */
7
8 #ifndef _DSTRING_H_
9 #define _DSTRING_H_
10
11 /* system includes */
12 #include <sys/types.h>
13
14 /* TYPES */
15 struct dmarcf_dstring;
16
17 /* PROTOTYPES */
18 extern struct dmarcf_dstring *dmarcf_dstring_new __P((int, int));
19 extern void dmarcf_dstring_free __P((struct dmarcf_dstring *));
20 extern _Bool dmarcf_dstring_copy __P((struct dmarcf_dstring *, u_char *));
21 extern _Bool dmarcf_dstring_cat __P((struct dmarcf_dstring *, u_char *));
22 extern _Bool dmarcf_dstring_cat1 __P((struct dmarcf_dstring *, int));
23 extern _Bool dmarcf_dstring_catn __P((struct dmarcf_dstring *, u_char *, size_t));
24 extern void dmarcf_dstring_chop __P((struct dmarcf_dstring *, int));
25 extern u_char *dmarcf_dstring_get __P((struct dmarcf_dstring *));
26 extern int dmarcf_dstring_len __P((struct dmarcf_dstring *));
27 extern void dmarcf_dstring_blank __P((struct dmarcf_dstring *));
28 extern size_t dmarcf_dstring_printf __P((struct dmarcf_dstring *, char *, ...));
29
30 #endif /* _DSTRING_H_ */
0 .TH opendmarc 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc
3 \- DMARC email policy filter for MTAs
4 .SH SYNOPSIS
5 .B opendmarc
6 [\-A]
7 [\-c configfile]
8 [\-f]
9 [\-l]
10 [\-n]
11 [\-p socketspec]
12 [\-P pidfile]
13 [\-t file[,file[...]]]
14 [\-u userid[:group]]
15 [\-v]
16 [\-V]
17 .SH DESCRIPTION
18 .B opendmarc
19 implements the proposed
20 .B DMARC
21 specification for authentication of message and reporting of observed
22 traffic.
23
24 .B opendmarc
25 uses the
26 .I milter
27 interface, originally distributed as part of version 8.11 of
28 .B sendmail(8),
29 to provide a DMARC processing service for mail transiting
30 a milter-aware MTA.
31
32 Most, if not all, of the command line options listed below can also be set
33 using a configuration file. See the
34 .I \-c
35 option for details.
36
37 .B opendmarc
38 relies on addition of Authentication-Results fields by upsteam filters on
39 trusted hosts to collect input to the DMARC algorithm. It does not itself
40 do DKIM or SPF evaluation.
41 .SH OPTIONS
42 .TP
43 .I \-A
44 Automatically re-start on failures. Use with caution; if the filter
45 fails instantly after it starts, this can cause a tight
46 .I fork(2)
47 loop. This can be mitigated using some values in the configuration file
48 to limit restarting. See
49 .I opendmarc.conf(5).
50 .TP
51 .I \-c configfile
52 Read the named configuration file. See the
53 .I opendmarc.conf(5)
54 man page for details. Values in the configuration file are overridden
55 when their equivalents are provided on the command line until a configuration
56 reload occurs. The OPERATION section describes how reloads are triggered.
57 The default is to read a configuration file from
58 .I @SYSCONFDIR@/opendmarc.conf
59 if one exists, or otherwise to apply defaults to all values.
60 .TP
61 .I \-f
62 Normally
63 .I opendmarc
64 forks and exits immediately, leaving the service running in the background.
65 This flag suppresses that behaviour so that it runs in the foreground.
66 .TP
67 .I \-l
68 Log via calls to
69 .I syslog(3)
70 any interesting activity.
71 .TP
72 .I \-n
73 Parse the configuration file and command line arguments, reporting any
74 errors found, and then exit. The exit value will be 0 if the filter would
75 start up without complaint, or non-zero otherwise.
76 .TP
77 .I \-p socketspec
78 Specifies the socket that should be established by the filter to receive
79 connections from
80 .I sendmail(8)
81 in order to provide service.
82 .I socketspec
83 is in one of two forms:
84 .I local:path
85 which creates a UNIX domain socket at the specified
86 .I path,
87 or
88 .I inet:port[@host]
89 or
90 .I inet6:port[@host]
91 which creates a TCP socket on the specified
92 .I port
93 within the specified protocol family. If the
94 .I host
95 is not given as either a hostname or an IP address, the socket will be
96 listening on all interfaces. If neither socket type is specified,
97 .I local
98 is assumed, meaning the parameter is interpreted as a path at which
99 the socket should be created. If an IP address is used, it must be enclosed
100 in square brackets. This parameter is mandatory.
101 .TP
102 .I \-P pidfile
103 Specifies a file into which the filter should write its process ID at startup.
104 .TP
105 .I \-t file[,file[,...]]
106 Reads email messages from the named files and processes them as if they were
107 received by the filter. The service is not started, and actions normally
108 sent back to the MTA will instead be printed on standard output.
109 .TP
110 .I \-u userid[:group]
111 Attempts to be come the specified
112 .I userid
113 before starting operations. The process will be assigned all of the groups
114 and primary group ID of the named
115 .I userid
116 unless an alternate
117 .I group
118 is specified. See the FILE PERMISSIONS section for more information.
119 .TP
120 .I \-v
121 Increase verbose output during test mode (see
122 .I \-t
123 above). May be specified more than once to request increasing amounts of
124 output.
125 .TP
126 .I \-V
127 Print the version number and supported canonicalization and signature
128 algorithms, and then exit without doing anything else.
129 .SH SIGNALS
130 Upon receiving SIGUSR1, if the filter was started with a configuration
131 file, it will be re-read and the new values used. Note that any
132 command line overrides provided at startup time will be lost when this is
133 done. Also, the following configuration file values (and their corresponding
134 command line items, if any) are not reloaded through this process:
135 AutoRestart (\-A),
136 AutoRestartCount,
137 AutoRestartRate,
138 Background,
139 MilterDebug,
140 PidFile (\-P),
141 Socket (\-p),
142 UMask,
143 UserID (\-u). The filter does not automatically check the configuration
144 file for changes and reload.
145 .SH VERSION
146 This man page covers version @VERSION@ of
147 .I opendmarc.
148 .SH COPYRIGHT
149 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
150 .SH SEE ALSO
151 .I opendmarc.conf(5), sendmail(8)
152 .P
153 Sendmail Operations Guide
154 .P
155 RFC4408 \- Sender Policy Framework
156 .P
157 RFC5321 \- Simple Mail Transfer Protocol
158 .P
159 RFC5322 \- Internet Messages
160 .P
161 RFC5451 \- Message Header Field for Indicating Message Authentication Status
162 .P
163 RFC6376 \- DomainKeys Identified Mail
164 .P
165 RFC6591 \- Authentication Failure Reporting Using the Abuse Reporting Format
0 /*
1 ** Copyright (c) 2012-2017, The Trusted Domain Project. All rights reserved.
2 */
3
4 #include "build-config.h"
5
6 #ifndef _POSIX_PTHREAD_SEMANTICS
7 # define _POSIX_PTHREAD_SEMANTICS
8 #endif /* ! _POSIX_PTHREAD_SEMANTICS */
9
10 /* system includes */
11 #include <sys/param.h>
12 #include <sys/types.h>
13 #include <sys/file.h>
14 #ifdef __linux__
15 # include <sys/prctl.h>
16 #endif /* __linux__ */
17 #include <sys/stat.h>
18 #include <sys/wait.h>
19 #include <sys/socket.h>
20 #include <netinet/in.h>
21 #include <arpa/inet.h>
22 #ifdef HAVE_STDBOOL_H
23 # include <stdbool.h>
24 #endif /* HAVE_STDBOOL_H */
25 #ifdef HAVE_PATHS_H
26 # include <paths.h>
27 #endif /* HAVE_PATHS_H */
28 #include <fcntl.h>
29 #include <pwd.h>
30 #include <grp.h>
31 #include <sysexits.h>
32 #include <string.h>
33 #include <unistd.h>
34 #include <ctype.h>
35 #include <stdio.h>
36 #include <signal.h>
37 #include <pthread.h>
38 #include <syslog.h>
39 #include <stdlib.h>
40 #include <limits.h>
41 #include <errno.h>
42 #include <assert.h>
43 #ifdef HAVE_NETDB_H
44 # include <netdb.h>
45 #endif
46 /* libbsd if found */
47 #ifdef USE_BSD_H
48 # include <bsd/string.h>
49 #endif /* USE_BSD_H */
50
51 /* libstrl if needed */
52 #ifdef USE_STRL_H
53 # include <strl.h>
54 #endif /* USE_STRL_H */
55
56 /* opendmarc_strl if needed */
57 #ifdef USE_DMARCSTRL_H
58 # include <opendmarc_strl.h>
59 #endif /* USE_DMARCSTRL_H */
60
61 /* libmilter */
62 #include <libmilter/mfapi.h>
63
64 /* libopendmarc */
65 #include <dmarc.h>
66
67 /* opendmarc includes */
68 #include "opendmarc.h"
69 #include "config.h"
70 #include "parse.h"
71 #include "test.h"
72 #include "util.h"
73 #include "opendmarc-ar.h"
74 #include "opendmarc-config.h"
75 #include "opendmarc-dstring.h"
76
77 /* macros */
78 #define CMDLINEOPTS "Ac:flnp:P:t:u:vV"
79 #define DEFTIMEOUT 5
80 #define MAXSPFRESULT 16
81 #define RECEIVEDSPF "Received-SPF"
82
83 #ifndef _PATH_DEVNULL
84 # define _PATH_DEVNULL "/dev/null"
85 #endif /* ! _PATH_DEVNULL */
86 #ifndef _PATH_SENDMAIL
87 # define _PATH_SENDMAIL "/usr/sbin/sendmail"
88 #endif /* ! _PATH_SENDMAIL */
89
90 #define TRYFREE(x) do { \
91 if ((x) != NULL) \
92 { \
93 free(x); \
94 (x) = NULL; \
95 } \
96 } while (0)
97
98 /* data types */
99 /* DMARCF_HEADER -- a linked list of header fields */
100 struct dmarcf_header
101 {
102 char * hdr_name;
103 char * hdr_value;
104 struct dmarcf_header * hdr_next;
105 struct dmarcf_header * hdr_prev;
106 };
107
108 /* DMARCF_MSGCTX -- message-specific context */
109 struct dmarcf_msgctx
110 {
111 int mctx_spfresult;
112 char * mctx_jobid;
113 struct dmarcf_header * mctx_hqhead;
114 struct dmarcf_header * mctx_hqtail;
115 struct dmarcf_dstring * mctx_histbuf;
116 struct dmarcf_dstring * mctx_afrf;
117 unsigned char mctx_envfrom[BUFRSZ + 1];
118 unsigned char mctx_envdomain[BUFRSZ + 1];
119 unsigned char mctx_fromdomain[BUFRSZ + 1];
120 };
121 typedef struct dmarcf_msgctx * DMARCF_MSGCTX;
122
123 /* DMARCF_CONNCTX -- connection-specific context */
124 struct dmarcf_connctx
125 {
126 _Bool cctx_milterv2;
127 DMARCF_MSGCTX cctx_msg;
128 DMARC_POLICY_T * cctx_dmarc;
129 struct dmarcf_config * cctx_config;
130 struct sockaddr_storage cctx_ip;
131 char cctx_ipstr[BUFRSZ + 1];
132 char cctx_host[MAXHOSTNAMELEN + 1];
133 #if WITH_SPF
134 char cctx_helo[MAXHOSTNAMELEN + 1];
135 char cctx_rawmfrom[BUFRSZ + 1];
136 #endif
137 };
138 typedef struct dmarcf_connctx * DMARCF_CONNCTX;
139
140 /* DMARCF_CONFIG -- configuration object */
141 struct dmarcf_config
142 {
143 _Bool conf_reqhdrs;
144 _Bool conf_afrf;
145 _Bool conf_afrfnone;
146 _Bool conf_rejectfail;
147 _Bool conf_dolog;
148 _Bool conf_enablecores;
149 _Bool conf_addswhdr;
150 _Bool conf_authservidwithjobid;
151 _Bool conf_recordall;
152 #if WITH_SPF
153 _Bool conf_spfignoreresults;
154 _Bool conf_spfselfvalidate;
155 #endif /* WITH_SPF */
156 _Bool conf_ignoreauthclients;
157 unsigned int conf_refcnt;
158 unsigned int conf_dnstimeout;
159 struct config * conf_data;
160 char * conf_afrfas;
161 char * conf_afrfbcc;
162 char * conf_copyfailsto;
163 char * conf_reportcmd;
164 char * conf_authservid;
165 char * conf_historyfile;
166 char * conf_pslist;
167 char * conf_ignorelist;
168 char ** conf_trustedauthservids;
169 char ** conf_ignoredomains;
170 };
171
172 /* LIST -- basic linked list of strings */
173 struct list
174 {
175 char * list_str;
176 struct list * list_next;
177 };
178
179 /* LOOKUP -- lookup table */
180 struct lookup
181 {
182 char * str;
183 int code;
184 };
185
186 /* table of syslog facilities mapped to names */
187 struct lookup log_facilities[] =
188 {
189 { "auth", LOG_AUTH },
190 { "cron", LOG_CRON },
191 { "daemon", LOG_DAEMON },
192 { "kern", LOG_KERN },
193 { "lpr", LOG_LPR },
194 { "mail", LOG_MAIL },
195 { "news", LOG_NEWS },
196 { "security", LOG_AUTH }, /* DEPRECATED */
197 { "syslog", LOG_SYSLOG },
198 { "user", LOG_USER },
199 { "uucp", LOG_UUCP },
200 { "local0", LOG_LOCAL0 },
201 { "local1", LOG_LOCAL1 },
202 { "local2", LOG_LOCAL2 },
203 { "local3", LOG_LOCAL3 },
204 { "local4", LOG_LOCAL4 },
205 { "local5", LOG_LOCAL5 },
206 { "local6", LOG_LOCAL6 },
207 { "local7", LOG_LOCAL7 },
208 { NULL, -1 }
209 };
210
211 /* prototypes */
212 sfsistat mlfi_abort __P((SMFICTX *));
213 sfsistat mlfi_close __P((SMFICTX *));
214 sfsistat mlfi_connect __P((SMFICTX *, char *, _SOCK_ADDR *));
215 #if WITH_SPF
216 sfsistat mlfi_helo __P((SMFICTX *, char *));
217 #endif
218 sfsistat mlfi_envfrom __P((SMFICTX *, char **));
219 sfsistat mlfi_eom __P((SMFICTX *));
220 sfsistat mlfi_header __P((SMFICTX *, char *, char *));
221 sfsistat mlfi_negotiate __P((SMFICTX *, unsigned long, unsigned long,
222 unsigned long, unsigned long,
223 unsigned long *, unsigned long *,
224 unsigned long *, unsigned long *));
225
226 static void dmarcf_config_free __P((struct dmarcf_config *));
227 static struct dmarcf_config *dmarcf_config_new __P((void));
228 sfsistat dmarcf_insheader __P((SMFICTX *, int, char *, char *));
229 sfsistat dmarcf_setreply __P((SMFICTX *, char *, char *, char *));
230
231 /* globals */
232 _Bool dolog;
233 _Bool die;
234 _Bool reload;
235 _Bool no_i_whine;
236 _Bool testmode;
237 int diesig;
238 struct dmarcf_config *curconf;
239 struct list *ignore;
240 char *progname;
241 char *conffile;
242 char *sock;
243 char *myname;
244 char myhostname[MAXHOSTNAMELEN + 1];
245 pthread_mutex_t conf_lock;
246
247 /*
248 ** DMARCF_ADDRCPT -- wrapper for smfi_addrcpt()
249 **
250 ** Parameters:
251 ** ctx -- milter (or test) context
252 ** addr -- address to add
253 **
254 ** Return value:
255 ** An sfsistat.
256 */
257
258 sfsistat
259 dmarcf_addrcpt(SMFICTX *ctx, char *addr)
260 {
261 assert(ctx != NULL);
262
263 if (testmode)
264 return dmarcf_test_addrcpt(ctx, addr);
265 else
266 return smfi_addrcpt(ctx, addr);
267 }
268
269 /*
270 ** DMARCF_SETREPLY -- wrapper for smfi_setreply()
271 **
272 ** Parameters:
273 ** ctx -- milter (or test) context
274 ** rcode -- SMTP reply code
275 ** xcode -- SMTP enhanced status code
276 ** replytxt -- reply text
277 **
278 ** Return value:
279 ** An sfsistat.
280 */
281
282 sfsistat
283 dmarcf_setreply(SMFICTX *ctx, char *rcode, char *xcode, char *replytxt)
284 {
285 assert(ctx != NULL);
286
287 if (testmode)
288 return dmarcf_test_setreply(ctx, rcode, xcode, replytxt);
289 else
290 return smfi_setreply(ctx, rcode, xcode, replytxt);
291 }
292
293 /*
294 ** DMARCF_INSHEADER -- wrapper for smfi_insheader()
295 **
296 ** Parameters:
297 ** ctx -- milter (or test) context
298 ** idx -- index at which to insert
299 ** hname -- header name
300 ** hvalue -- header value
301 **
302 ** Return value:
303 ** An sfsistat.
304 */
305
306 sfsistat
307 dmarcf_insheader(SMFICTX *ctx, int idx, char *hname, char *hvalue)
308 {
309 assert(ctx != NULL);
310 assert(hname != NULL);
311 assert(hvalue != NULL);
312
313 if (testmode)
314 return dmarcf_test_insheader(ctx, idx, hname, hvalue);
315 else
316 #ifdef HAVE_SMFI_INSHEADER
317 return smfi_insheader(ctx, idx, hname, hvalue);
318 #else /* HAVE_SMFI_INSHEADER */
319 return smfi_addheader(ctx, hname, hvalue);
320 #endif /* HAVE_SMFI_INSHEADER */
321 }
322
323 /*
324 ** DMARCF_GETPRIV -- wrapper for smfi_getpriv()
325 **
326 ** Parameters:
327 ** ctx -- milter (or test) context
328 **
329 ** Return value:
330 ** The stored private pointer, or NULL.
331 */
332
333 void *
334 dmarcf_getpriv(SMFICTX *ctx)
335 {
336 assert(ctx != NULL);
337
338 if (testmode)
339 return dmarcf_test_getpriv((void *) ctx);
340 else
341 return smfi_getpriv(ctx);
342 }
343
344 /*
345 ** DMARCF_SETPRIV -- wrapper for smfi_setpriv()
346 **
347 ** Parameters:
348 ** ctx -- milter (or test) context
349 **
350 ** Return value:
351 ** An sfsistat.
352 */
353
354 sfsistat
355 dmarcf_setpriv(SMFICTX *ctx, void *ptr)
356 {
357 assert(ctx != NULL);
358
359 if (testmode)
360 return dmarcf_test_setpriv((void *) ctx, ptr);
361 else
362 return smfi_setpriv(ctx, ptr);
363 }
364
365 /*
366 ** DMARCF_GETSYMVAL -- wrapper for smfi_getsymval()
367 **
368 ** Parameters:
369 ** ctx -- milter (or test) context
370 ** sym -- symbol to retrieve
371 **
372 ** Return value:
373 ** Pointer to the value of the requested MTA symbol.
374 */
375
376 char *
377 dmarcf_getsymval(SMFICTX *ctx, char *sym)
378 {
379 assert(ctx != NULL);
380 assert(sym != NULL);
381
382 if (testmode)
383 return dmarcf_test_getsymval(ctx, sym);
384 else
385 return smfi_getsymval(ctx, sym);
386 }
387
388 /*
389 ** DMARCF_PARSE_RECEIVED_SPF -- try to extract a result from a Received-SPF
390 ** header field
391 **
392 ** Parameters:
393 ** str -- the value of the Received-SPF field to analyze
394 **
395 ** Return value:
396 ** A ARES_RESULT_* constant.
397 */
398
399 int
400 dmarcf_parse_received_spf(char *str)
401 {
402 _Bool copying = FALSE;
403 _Bool escaped = FALSE;
404 int parens = 0;
405 char *p;
406 char *r;
407 char *end;
408 char result[MAXSPFRESULT + 1];
409
410 assert(str != NULL);
411
412 memset(result, '\0', sizeof result);
413 r = result;
414 end = &result[sizeof result - 1];
415
416 for (p = str; *p != '\0'; p++)
417 {
418 if (escaped)
419 {
420 if (copying)
421 {
422 if (r < end)
423 *r++ = *p;
424 }
425
426 escaped = FALSE;
427 }
428 else if (copying)
429 {
430 if (!escaped && *p == '\\')
431 {
432 escaped = TRUE;
433 }
434 else if (*p == '(')
435 {
436 copying = FALSE;
437 parens++;
438 }
439 else if (isascii(*p) && isspace(*p))
440 {
441 copying = FALSE;
442 }
443 else if (r < end)
444 {
445 *r++ = *p;
446 }
447 }
448 else if (*p == '(')
449 {
450 parens++;
451 }
452 else if (*p == ')' && parens > 0)
453 {
454 parens--;
455 }
456 else if (parens == 0)
457 {
458 if (isascii(*p) && isspace(*p))
459 continue;
460
461 if (!copying)
462 {
463 if (result[0] != '\0')
464 break;
465
466 copying = TRUE;
467 if (r < end)
468 *r++ = *p;
469 }
470 }
471 }
472
473 if (strcasecmp(result, "pass") == 0)
474 return ARES_RESULT_PASS;
475 else if (strcasecmp(result, "fail") == 0)
476 return ARES_RESULT_FAIL;
477 else if (strcasecmp(result, "softfail") == 0)
478 return ARES_RESULT_SOFTFAIL;
479 else if (strcasecmp(result, "neutral") == 0)
480 return ARES_RESULT_NEUTRAL;
481 else if (strcasecmp(result, "temperror") == 0)
482 return ARES_RESULT_TEMPERROR;
483 else if (strcasecmp(result, "none") == 0)
484 return ARES_RESULT_NONE;
485 else
486 return ARES_RESULT_PERMERROR;
487 }
488
489 /*
490 ** DMARCF_ADDLIST -- add an entry to a singly-linked list
491 **
492 ** Parameters:
493 ** str -- string to add
494 ** head -- address of list head pointer (updated)
495 **
496 ** Return value:
497 ** None.
498 */
499
500 void
501 dmarcf_addlist(const char *str, struct list **head)
502 {
503 struct list *new;
504
505 assert(str != NULL);
506 assert(head != NULL);
507
508 new = malloc(sizeof(struct list));
509 if (new != NULL)
510 {
511 new->list_next = *head;
512 new->list_str = strdup(str);
513 *head = new;
514 }
515 }
516
517 /*
518 ** DMARCF_LOAD_DNSDATA -- load fake DNS data into the library
519 **
520 ** Parameters:
521 ** path -- path to file to read
522 **
523 ** Return value:
524 ** FALSE iff load wasn't possible; caller should check errno
525 */
526
527 _Bool
528 dmarcf_load_dnsdata(char *path)
529 {
530 _Bool gapfound;
531 const char *key;
532 const char *value;
533 char *p;
534 FILE *f;
535 char buf[BUFRSZ];
536
537 assert(path != NULL);
538
539 f = fopen(path, "r");
540 if (f == NULL)
541 return FALSE;
542
543 memset(buf, '\0', sizeof buf);
544
545 while (fgets(buf, sizeof buf - 1, f) != NULL)
546 {
547 key = NULL;
548 value = NULL;
549 gapfound = FALSE;
550
551 for (p = buf; *p != '\0'; p++)
552 {
553 if (*p == '\n' || *p == '#')
554 {
555 *p = '\0';
556 break;
557 }
558 else if (!isspace(*p))
559 {
560 if (key == NULL)
561 key = p;
562 else if (gapfound && value == NULL)
563 value = p;
564 }
565 else
566 {
567 if (!gapfound)
568 {
569 *p = '\0';
570 gapfound = TRUE;
571 }
572 }
573 }
574
575 opendmarc_dns_fake_record(key, value);
576 }
577
578 fclose(f);
579
580 return TRUE;
581 }
582
583 /*
584 ** DMARCF_LOADLIST -- add a file's worth of entries to a singly-linked list
585 **
586 ** Parameters:
587 ** path -- path to file to read
588 ** head -- address of list head pointer (updated)
589 **
590 ** Return value:
591 ** FALSE iff there was an error; caller should check errno.
592 */
593
594 _Bool
595 dmarcf_loadlist(char *path, struct list **head)
596 {
597 int spaces;
598 int datalen;
599 struct list *new;
600 char *p;
601 FILE *f;
602 char buf[BUFRSZ + 1];
603
604 assert(path != NULL);
605 assert(head != NULL);
606
607 f = fopen(path, "r");
608 if (f == NULL)
609 return FALSE;
610
611 memset(buf, '\0', sizeof buf);
612
613 while (fgets(buf, sizeof buf - 1, f) != NULL)
614 {
615 spaces = 0;
616 datalen = 0;
617
618 for (p = buf; *p != '\0'; p++)
619 {
620 if (*p == '\n' || *p == '#')
621 {
622 *p = '\0';
623 break;
624 }
625 else if (isspace(*p))
626 {
627 if (datalen > 0)
628 {
629 *p = '\0';
630 break;
631 }
632
633 spaces++;
634 }
635 else
636 {
637 datalen++;
638 }
639 }
640
641 if (datalen == 0)
642 continue;
643
644 if (spaces > 0)
645 memmove(&buf[spaces], buf, datalen + 1);
646
647 new = malloc(sizeof(struct list));
648 if (new != NULL)
649 {
650 new->list_next = *head;
651 new->list_str = strdup(buf);
652 *head = new;
653 }
654 }
655
656 fclose(f);
657
658 return TRUE;
659 }
660
661 /*
662 ** DMARCF_FREELIST -- destroy a singly-linked list
663 **
664 ** Parameters:
665 ** head -- list to free
666 **
667 ** Return value:
668 ** None.
669 */
670
671 void
672 dmarcf_freelist(struct list *head)
673 {
674 struct list *cur;
675 struct list *next;
676
677 cur = head;
678 while (cur != NULL)
679 {
680 free(cur->list_str);
681
682 next = cur->list_next;
683
684 free(cur);
685
686 cur = next;
687 }
688 }
689
690 /*
691 ** DMARCF_EATSPACES -- chomp spaces at the front and end of a string
692 **
693 ** Parameters:
694 ** str -- string to crush
695 **
696 ** Return value:
697 ** None.
698 */
699
700 void
701 dmarcf_eatspaces(char *str)
702 {
703 int content = 0;
704 int spaces = 0;
705 int len = 0;
706 char *p;
707
708 assert(str != NULL);
709
710 for (p = str; *p != '\0'; p++)
711 {
712 len++;
713
714 if (isascii(*p) && isspace(*p))
715 {
716 if (content == 0)
717 {
718 spaces++;
719 }
720 else
721 {
722 *p = '\0';
723 break;
724 }
725 }
726 else
727 {
728 content++;
729 }
730 }
731
732 if (len != content)
733 memmove(str, &str[spaces], content + 1);
734 }
735
736 /*
737 ** DMARCF_FREEARRAY -- destroy an array of strings
738 **
739 ** Parameters:
740 ** a -- array to destroy
741 **
742 ** Return vaule:
743 ** None.
744 */
745
746 void
747 dmarcf_freearray(char **a)
748 {
749 assert(a != NULL);
750
751 free(a);
752 }
753
754 /*
755 ** DMARCF_MKARRAY -- convert a comma-separated string into an array
756 **
757 ** Parameters:
758 ** str -- input string
759 ** array -- output array
760 **
761 ** Return value:
762 ** Array length, or -1 on error.
763 */
764
765 int
766 dmarcf_mkarray(char *str, char ***array)
767 {
768 int n = 0;
769 int a = 0;
770 int ns;
771 char *p;
772 char *ctx;
773 char **out = NULL;
774
775 for (p = strtok_r(str, ",", &ctx);
776 p != NULL;
777 p = strtok_r(NULL, ",", &ctx))
778 {
779 dmarcf_eatspaces(p);
780
781 if (n + 1 >= a)
782 {
783 if (a == 0)
784 {
785 ns = 4;
786
787 out = malloc(sizeof(char *) * ns);
788
789 if (out == NULL)
790 return -1;
791 }
792 else
793 {
794 char **new;
795
796 ns = a * 2;
797
798 new = realloc(out, sizeof(char *) * ns);
799 if (new == NULL)
800 {
801 free(out);
802 return -1;
803 }
804
805 out = new;
806 }
807
808 memset(&out[a], '\0', sizeof(char *) * (ns - a));
809
810 a = ns;
811 }
812
813 out[n++] = p;
814 out[n] = NULL;
815 }
816
817 *array = out;
818
819 return n;
820 }
821
822 /*
823 ** DMARCF_MATCH -- match a string to an array
824 **
825 ** Parameters:
826 ** str -- input string
827 ** array -- input array
828 ** icase -- ignore case?
829 **
830 ** Return value:
831 ** TRUE iff "str" appears in "array".
832 */
833
834 _Bool
835 dmarcf_match(const char *str, char **array, _Bool icase)
836 {
837 int c;
838
839 for (c = 0; array[c] != NULL; c++)
840 {
841 if ((!icase && strcmp(str, array[c]) == 0) ||
842 ( icase && strcasecmp(str, array[c]) == 0))
843 return TRUE;
844 }
845
846 return FALSE;
847 }
848
849 /*
850 ** DMARCF_CHECKLIST -- search a linked list for an entry
851 **
852 ** Parameters:
853 ** str -- string to find
854 ** list -- list to search
855 **
856 ** Return value:
857 ** TRUE iff "str" was found in "list"
858 */
859
860 _Bool
861 dmarcf_checklist(const char *str, struct list *list)
862 {
863 struct list *cur;
864
865 assert(str != NULL);
866 assert(list != NULL);
867
868 for (cur = list; cur != NULL; cur = cur->list_next)
869 {
870 if (strcasecmp(str, cur->list_str) == 0)
871 return TRUE;
872 }
873
874 return FALSE;
875 }
876
877 /*
878 ** DMARCF_CHECKHOST -- check a list for a hostname
879 **
880 ** Parameters:
881 ** host -- hostname to find
882 ** list -- list to search
883 **
884 ** Return value:
885 ** TRUE if there's a match, FALSE otherwise.
886 */
887
888 _Bool
889 dmarcf_checkhost(const char *host, struct list *list)
890 {
891 const char *p;
892 char buf[BUFRSZ + 1];
893
894 assert(host != NULL);
895
896 /* short circuit */
897 if (list == NULL)
898 return FALSE;
899
900 /* iterate over the possibilities */
901 for (p = host;
902 p != NULL;
903 p = (p == host ? strchr(host, '.') : strchr(p + 1, '.')))
904 {
905 snprintf(buf, sizeof buf, "!%s", p);
906
907 /* try the negative case */
908 if (dmarcf_checklist(buf, list))
909 return FALSE;
910
911 /* ...and now the positive case */
912 if (dmarcf_checklist(&buf[1], list))
913 return TRUE;
914 }
915
916 return FALSE;
917 }
918
919 /*
920 ** DMARCF_CHECKIP -- check a list an IP address or its matching wildcards
921 **
922 ** Parameters:
923 ** ip -- IP address to find, as a _SOCK_ADDR
924 ** list -- list to check
925 **
926 ** Return value:
927 ** TRUE if there's a match, FALSE otherwise.
928 */
929
930 _Bool
931 dmarcf_checkip(_SOCK_ADDR *ip, struct list *list)
932 {
933 char ipbuf[MAXHOSTNAMELEN + 1];
934
935 assert(ip != NULL);
936
937 /* short circuit */
938 if (list == NULL)
939 return FALSE;
940
941 #if AF_INET6
942 if (ip->sa_family == AF_INET6)
943 {
944 int bits;
945 size_t dst_len;
946 char *dst;
947 struct sockaddr_in6 sin6;
948 struct in6_addr addr;
949
950 memcpy(&sin6, ip, sizeof sin6);
951
952 memcpy(&addr, &sin6.sin6_addr, sizeof addr);
953
954 memset(ipbuf, '\0', sizeof ipbuf);
955 ipbuf[0] = '!';
956
957 dst = &ipbuf[1];
958 dst_len = sizeof ipbuf - 1;
959
960 inet_ntop(AF_INET6, &addr, dst, dst_len);
961 dmarcf_lowercase((u_char *) dst);
962
963 if (dmarcf_checklist(ipbuf, list))
964 return FALSE;
965
966 if (dmarcf_checklist(&ipbuf[1], list))
967 return TRUE;
968
969 /* iterate over possible bitwise expressions */
970 for (bits = 0; bits <= 128; bits++)
971 {
972 size_t sz;
973
974 /* try this one */
975 memset(ipbuf, '\0', sizeof ipbuf);
976 ipbuf[0] = '!';
977
978 dst = &ipbuf[1];
979 dst_len = sizeof ipbuf - 1;
980
981 inet_ntop(AF_INET6, &addr, dst, dst_len);
982 dmarcf_lowercase((u_char *) dst);
983
984 sz = strlcat(ipbuf, "/", sizeof ipbuf);
985 if (sz >= sizeof ipbuf)
986 return FALSE;
987
988 dst = &ipbuf[sz];
989 dst_len = sizeof ipbuf - sz;
990
991 sz = snprintf(dst, dst_len, "%d", 128 - bits);
992 if (sz >= sizeof ipbuf)
993 return FALSE;
994
995 if (dmarcf_checklist(ipbuf, list))
996 return FALSE;
997
998 if (dmarcf_checklist(&ipbuf[1], list))
999 return TRUE;
1000
1001 /* flip off a bit */
1002 if (bits != 128)
1003 {
1004 int idx;
1005 int bit;
1006
1007 idx = 15 - (bits / 8);
1008 bit = bits % 8;
1009 addr.s6_addr[idx] &= ~(1 << bit);
1010 }
1011 }
1012 }
1013 #endif /* AF_INET6 */
1014
1015 if (ip->sa_family == AF_INET)
1016 {
1017 _Bool exists;
1018 int c;
1019 int bits;
1020 struct in_addr addr;
1021 struct in_addr mask;
1022 struct sockaddr_in sin;
1023
1024 memcpy(&sin, ip, sizeof sin);
1025 memcpy(&addr.s_addr, &sin.sin_addr, sizeof addr.s_addr);
1026
1027 /* try the IP address directly */
1028 exists = FALSE;
1029
1030 ipbuf[0] = '!';
1031 (void) dmarcf_inet_ntoa(addr, &ipbuf[1], sizeof ipbuf - 1);
1032
1033 if (dmarcf_checklist(ipbuf, list))
1034 return FALSE;
1035
1036 if (dmarcf_checklist(&ipbuf[1], list))
1037 return TRUE;
1038
1039 /* iterate over possible bitwise expressions */
1040 for (bits = 32; bits >= 0; bits--)
1041 {
1042 if (bits == 32)
1043 {
1044 mask.s_addr = 0xffffffff;
1045 }
1046 else
1047 {
1048 mask.s_addr = 0;
1049 for (c = 0; c < bits; c++)
1050 mask.s_addr |= htonl(1 << (31 - c));
1051 }
1052
1053 addr.s_addr = addr.s_addr & mask.s_addr;
1054
1055 memset(ipbuf, '\0', sizeof ipbuf);
1056 ipbuf[0] = '!';
1057 (void) dmarcf_inet_ntoa(addr, &ipbuf[1],
1058 sizeof ipbuf - 1);
1059 c = strlen(ipbuf);
1060 ipbuf[c] = '/';
1061 c++;
1062
1063 snprintf(&ipbuf[c], sizeof ipbuf - c, "%d", bits);
1064
1065 if (dmarcf_checklist(ipbuf, list))
1066 return FALSE;
1067
1068 if (dmarcf_checklist(&ipbuf[1], list))
1069 return TRUE;
1070
1071 (void) dmarcf_inet_ntoa(mask, &ipbuf[c],
1072 sizeof ipbuf - c);
1073
1074 if (dmarcf_checklist(ipbuf, list))
1075 return FALSE;
1076
1077 if (dmarcf_checklist(&ipbuf[1], list))
1078 return TRUE;
1079 }
1080 }
1081
1082 return FALSE;
1083 }
1084
1085 /*
1086 ** DMARCF_INIT_SYSLOG -- initialize syslog()
1087 **
1088 ** Parameters:
1089 ** facility -- name of the syslog facility to use when logging;
1090 ** can be NULL to request the default
1091 **
1092 ** Return value:
1093 ** None.
1094 */
1095
1096 static void
1097 dmarcf_init_syslog(char *facility)
1098 {
1099 #ifdef LOG_MAIL
1100 int code;
1101 struct lookup *p = NULL;
1102
1103 closelog();
1104
1105 code = LOG_MAIL;
1106 if (facility != NULL)
1107 {
1108 for (p = log_facilities; p->str != NULL; p++)
1109 {
1110 if (strcasecmp(p->str, facility) == 0)
1111 {
1112 code = p->code;
1113 break;
1114 }
1115 }
1116 }
1117
1118 openlog(progname, LOG_PID, code);
1119 #else /* LOG_MAIL */
1120 closelog();
1121
1122 openlog(progname, LOG_PID);
1123 #endif /* LOG_MAIL */
1124 }
1125
1126 /*
1127 ** DMARCF_FINDHEADER -- find a header
1128 **
1129 ** Parameters:
1130 ** dfc -- filter context
1131 ** hname -- name of the header of interest
1132 ** instance -- which instance is wanted (0 = first)
1133 **
1134 ** Return value:
1135 ** Header field handle, or NULL if not found.
1136 **
1137 ** Notes:
1138 ** Negative values of "instance" search backwards from the end.
1139 */
1140
1141 static struct dmarcf_header *
1142 dmarcf_findheader(DMARCF_MSGCTX dfc, char *hname, int instance)
1143 {
1144 struct dmarcf_header *hdr;
1145
1146 assert(dfc != NULL);
1147 assert(hname != NULL);
1148
1149 if (instance < 0)
1150 hdr = dfc->mctx_hqtail;
1151 else
1152 hdr = dfc->mctx_hqhead;
1153
1154 while (hdr != NULL)
1155 {
1156 if (strcasecmp(hdr->hdr_name, hname) == 0)
1157 {
1158 if (instance == 0 || instance == -1)
1159 return hdr;
1160 else if (instance > 0)
1161 instance--;
1162 else
1163 instance++;
1164 }
1165
1166 if (instance < 0)
1167 hdr = hdr->hdr_prev;
1168 else
1169 hdr = hdr->hdr_next;
1170 }
1171
1172 return NULL;
1173 }
1174
1175 /*
1176 ** DMARCF_CONFIG_LOAD -- load a configuration handle based on file content
1177 **
1178 ** Paramters:
1179 ** data -- configuration data loaded from config file
1180 ** conf -- configuration structure to load
1181 ** err -- where to write errors
1182 ** errlen -- bytes available at "err"
1183 **
1184 ** Return value:
1185 ** 0 -- success
1186 ** !0 -- error
1187 **
1188 ** Side effects:
1189 ** openlog() may be called by this function
1190 */
1191
1192 static int
1193 dmarcf_config_load(struct config *data, struct dmarcf_config *conf,
1194 char *err, size_t errlen)
1195 {
1196 char *str;
1197 char confstr[BUFRSZ + 1];
1198 char basedir[MAXPATHLEN + 1];
1199
1200 assert(conf != NULL);
1201 assert(err != NULL);
1202
1203 memset(basedir, '\0', sizeof basedir);
1204 memset(confstr, '\0', sizeof confstr);
1205
1206 if (data != NULL)
1207 {
1208 str = NULL;
1209 (void) config_get(data, "AuthservID", &str, sizeof str);
1210 if (str != NULL)
1211 {
1212 if (strcmp(str, "HOSTNAME") == 0)
1213 conf->conf_authservid = strdup(myhostname);
1214 else
1215 conf->conf_authservid = strdup(str);
1216 }
1217
1218 str = NULL;
1219 (void) config_get(data, "TrustedAuthservIDs", &str, sizeof str);
1220 if (str != NULL)
1221 dmarcf_mkarray(str, &conf->conf_trustedauthservids);
1222
1223 str = NULL;
1224 (void) config_get(data, "IgnoreMailFrom", &str, sizeof str);
1225 if (str != NULL)
1226 dmarcf_mkarray(str, &conf->conf_ignoredomains);
1227
1228 (void) config_get(data, "AuthservIDWithJobID",
1229 &conf->conf_authservidwithjobid,
1230 sizeof conf->conf_authservidwithjobid);
1231
1232 memset(basedir, '\0', sizeof basedir);
1233 str = NULL;
1234 (void) config_get(data, "BaseDirectory", &str, sizeof str);
1235 if (str != NULL)
1236 strncpy(basedir, str, sizeof basedir - 1);
1237
1238 (void) config_get(data, "CopyFailuresTo",
1239 &conf->conf_copyfailsto,
1240 sizeof conf->conf_copyfailsto);
1241
1242 if (conf->conf_dnstimeout == DEFTIMEOUT)
1243 {
1244 (void) config_get(data, "DNSTimeout",
1245 &conf->conf_dnstimeout,
1246 sizeof conf->conf_dnstimeout);
1247 }
1248
1249 (void) config_get(data, "EnableCoredumps",
1250 &conf->conf_enablecores,
1251 sizeof conf->conf_enablecores);
1252
1253 #if WITH_SPF
1254 (void) config_get(data, "SPFIgnoreResults",
1255 &conf->conf_spfignoreresults,
1256 sizeof conf->conf_spfignoreresults);
1257
1258 (void) config_get(data, "SPFSelfValidate",
1259 &conf->conf_spfselfvalidate,
1260 sizeof conf->conf_spfselfvalidate);
1261 #endif /* WITH_SPF */
1262
1263 (void) config_get(data, "RejectFailures",
1264 &conf->conf_rejectfail,
1265 sizeof conf->conf_rejectfail);
1266
1267 (void) config_get(data, "RequiredHeaders",
1268 &conf->conf_reqhdrs,
1269 sizeof conf->conf_reqhdrs);
1270
1271 (void) config_get(data, "FailureReports",
1272 &conf->conf_afrf,
1273 sizeof conf->conf_afrf);
1274
1275 (void) config_get(data, "FailureReportsOnNone",
1276 &conf->conf_afrfnone,
1277 sizeof conf->conf_afrfnone);
1278
1279 (void) config_get(data, "FailureReportsSentBy",
1280 &conf->conf_afrfas,
1281 sizeof conf->conf_afrfas);
1282
1283 (void) config_get(data, "FailureReportsBcc",
1284 &conf->conf_afrfbcc,
1285 sizeof conf->conf_afrfbcc);
1286
1287 (void) config_get(data, "RecordAllMessages",
1288 &conf->conf_recordall,
1289 sizeof conf->conf_recordall);
1290
1291 (void) config_get(data, "IgnoreAuthenticatedClients",
1292 &conf->conf_ignoreauthclients,
1293 sizeof conf->conf_ignoreauthclients);
1294
1295 (void) config_get(data, "ReportCommand",
1296 &conf->conf_reportcmd,
1297 sizeof conf->conf_reportcmd);
1298
1299 (void) config_get(data, "PublicSuffixList",
1300 &conf->conf_pslist,
1301 sizeof conf->conf_pslist);
1302
1303 if (!conf->conf_dolog)
1304 {
1305 (void) config_get(data, "Syslog", &conf->conf_dolog,
1306 sizeof conf->conf_dolog);
1307 }
1308
1309 if (!conf->conf_addswhdr)
1310 {
1311 (void) config_get(data, "SoftwareHeader",
1312 &conf->conf_addswhdr,
1313 sizeof conf->conf_addswhdr);
1314 }
1315
1316 (void) config_get(data, "HistoryFile",
1317 &conf->conf_historyfile,
1318 sizeof conf->conf_historyfile);
1319
1320 str = NULL;
1321 (void) config_get(data, "TestDNSData", &str, sizeof str);
1322 if (str != NULL)
1323 {
1324 if (!dmarcf_load_dnsdata(str))
1325 {
1326 snprintf(err, errlen,
1327 "%s: can't load fake DNS data: %s",
1328 str, strerror(errno));
1329 return -1;
1330 }
1331 }
1332 }
1333
1334 if (conf->conf_trustedauthservids == NULL &&
1335 conf->conf_authservid != NULL)
1336 {
1337 dmarcf_mkarray(conf->conf_authservid,
1338 &conf->conf_trustedauthservids);
1339 }
1340
1341 if (basedir[0] != '\0')
1342 {
1343 if (chdir(basedir) != 0)
1344 {
1345 snprintf(err, errlen, "%s: chdir(): %s",
1346 basedir, strerror(errno));
1347 return -1;
1348 }
1349 }
1350
1351 /* activate logging if requested */
1352 if (conf->conf_dolog)
1353 {
1354 char *log_facility = NULL;
1355
1356 if (data != NULL)
1357 {
1358 (void) config_get(data, "SyslogFacility", &log_facility,
1359 sizeof log_facility);
1360 }
1361
1362 dmarcf_init_syslog(log_facility);
1363 }
1364
1365 return 0;
1366 }
1367
1368 /*
1369 ** DMARCF_CONFIG_RELOAD -- reload configuration if requested
1370 **
1371 ** Parameters:
1372 ** None.
1373 **
1374 ** Return value:
1375 ** None.
1376 **
1377 ** Side effects:
1378 ** If a reload was requested and is successful, "curconf" now points
1379 ** to a new configuration handle.
1380 */
1381
1382 static void
1383 dmarcf_config_reload(void)
1384 {
1385 struct dmarcf_config *new;
1386 char errbuf[BUFRSZ + 1];
1387
1388 pthread_mutex_lock(&conf_lock);
1389
1390 if (!reload)
1391 {
1392 pthread_mutex_unlock(&conf_lock);
1393 return;
1394 }
1395
1396 if (conffile == NULL)
1397 {
1398 if (curconf->conf_dolog)
1399 syslog(LOG_ERR, "ignoring reload signal");
1400
1401 reload = FALSE;
1402
1403 pthread_mutex_unlock(&conf_lock);
1404 return;
1405 }
1406
1407 new = dmarcf_config_new();
1408 if (new == NULL)
1409 {
1410 if (curconf->conf_dolog)
1411 syslog(LOG_ERR, "malloc(): %s", strerror(errno));
1412 }
1413 else
1414 {
1415 _Bool err = FALSE;
1416 u_int line;
1417 struct config *cfg;
1418 char *missing;
1419 char path[MAXPATHLEN + 1];
1420
1421 memset(path, '\0', sizeof path);
1422 strncpy(path, conffile, sizeof path - 1);
1423
1424 cfg = config_load(conffile, dmarcf_config, &line,
1425 path, sizeof path);
1426
1427 if (cfg == NULL)
1428 {
1429 if (curconf->conf_dolog)
1430 {
1431 syslog(LOG_ERR,
1432 "%s: configuration error at line %u: %s",
1433 path, line, config_error());
1434 }
1435 dmarcf_config_free(new);
1436 err = TRUE;
1437 }
1438
1439 if (!err)
1440 {
1441 missing = config_check(cfg, dmarcf_config);
1442 if (missing != NULL)
1443 {
1444 if (curconf->conf_dolog)
1445 {
1446 syslog(LOG_ERR,
1447 "%s: required parameter \"%s\" missing",
1448 conffile, missing);
1449 }
1450 config_free(cfg);
1451 dmarcf_config_free(new);
1452 err = TRUE;
1453 }
1454 }
1455
1456 if (!err && dmarcf_config_load(cfg, new, errbuf,
1457 sizeof errbuf) != 0)
1458 {
1459 if (curconf->conf_dolog)
1460 syslog(LOG_ERR, "%s: %s", conffile, errbuf);
1461 config_free(cfg);
1462 dmarcf_config_free(new);
1463 err = TRUE;
1464 }
1465
1466 if (!err && new->conf_pslist != NULL)
1467 {
1468 if (opendmarc_tld_read_file(new->conf_pslist, "//",
1469 "*.", "!") != 0)
1470 {
1471 if (curconf->conf_dolog)
1472 {
1473 syslog(LOG_ERR, "%s: read/parse error",
1474 new->conf_pslist);
1475 }
1476
1477 config_free(cfg);
1478 dmarcf_config_free(new);
1479 err = TRUE;
1480 }
1481 }
1482
1483 if (!err)
1484 {
1485 if (curconf->conf_refcnt == 0)
1486 dmarcf_config_free(curconf);
1487
1488 dolog = new->conf_dolog;
1489 curconf = new;
1490 new->conf_data = cfg;
1491
1492 if (new->conf_dolog)
1493 {
1494 syslog(LOG_INFO,
1495 "configuration reloaded from %s",
1496 conffile);
1497 }
1498 }
1499 }
1500
1501 reload = FALSE;
1502
1503 pthread_mutex_unlock(&conf_lock);
1504
1505 return;
1506 }
1507
1508 /*
1509 ** DMARCF_CLEANUP -- release local resources related to a message
1510 **
1511 ** Parameters:
1512 ** ctx -- milter context
1513 **
1514 ** Return value:
1515 ** None.
1516 */
1517
1518 static void
1519 dmarcf_cleanup(SMFICTX *ctx)
1520 {
1521 DMARCF_MSGCTX dfc;
1522 DMARCF_CONNCTX cc;
1523
1524 assert(ctx != NULL);
1525
1526 cc = (DMARCF_CONNCTX) dmarcf_getpriv(ctx);
1527
1528 if (cc == NULL)
1529 return;
1530
1531 dfc = cc->cctx_msg;
1532
1533 /* release memory, reset state */
1534 if (dfc != NULL)
1535 {
1536 if (dfc->mctx_histbuf != NULL)
1537 dmarcf_dstring_free(dfc->mctx_histbuf);
1538 if (dfc->mctx_afrf != NULL)
1539 dmarcf_dstring_free(dfc->mctx_afrf);
1540
1541 if (dfc->mctx_hqhead != NULL)
1542 {
1543 struct dmarcf_header *hdr;
1544 struct dmarcf_header *prev;
1545
1546 hdr = dfc->mctx_hqhead;
1547 while (hdr != NULL)
1548 {
1549 TRYFREE(hdr->hdr_name);
1550 TRYFREE(hdr->hdr_value);
1551 prev = hdr;
1552 hdr = hdr->hdr_next;
1553 TRYFREE(prev);
1554 }
1555 }
1556
1557 free(dfc);
1558 cc->cctx_msg = NULL;
1559 }
1560 }
1561
1562 #if SMFI_VERSION >= 0x01000000
1563 /*
1564 ** MLFI_NEGOTIATE -- handler called on new SMTP connection to negotiate
1565 ** MTA options
1566 **
1567 ** Parameters:
1568 ** ctx -- milter context
1569 ** f0 -- actions offered by the MTA
1570 ** f1 -- protocol steps offered by the MTA
1571 ** f2 -- reserved for future extensions
1572 ** f3 -- reserved for future extensions
1573 ** pf0 -- actions requested by the milter
1574 ** pf1 -- protocol steps requested by the milter
1575 ** pf2 -- reserved for future extensions
1576 ** pf3 -- reserved for future extensions
1577 **
1578 ** Return value:
1579 ** An SMFIS_* constant.
1580 */
1581
1582 sfsistat
1583 mlfi_negotiate(SMFICTX *ctx,
1584 unsigned long f0, unsigned long f1,
1585 unsigned long f2, unsigned long f3,
1586 unsigned long *pf0, unsigned long *pf1,
1587 unsigned long *pf2, unsigned long *pf3)
1588 {
1589 unsigned long reqactions = SMFIF_ADDHDRS|SMFIF_QUARANTINE;
1590 unsigned long wantactions = 0;
1591 unsigned long protosteps = (
1592 #if !WITH_SPF
1593 SMFIP_NOHELO |
1594 #endif /* !WITH_SPF */
1595 SMFIP_NOUNKNOWN |
1596 SMFIP_NOBODY |
1597 SMFIP_NODATA |
1598 SMFIP_SKIP );
1599 DMARCF_CONNCTX cc;
1600 struct dmarcf_config *conf;
1601
1602 dmarcf_config_reload();
1603
1604 /* initialize connection context */
1605 cc = malloc(sizeof(struct dmarcf_connctx));
1606 if (cc == NULL)
1607 {
1608 if (curconf->conf_dolog)
1609 {
1610 syslog(LOG_ERR, "mlfi_negotiate(): malloc(): %s",
1611 strerror(errno));
1612 }
1613
1614 return SMFIS_TEMPFAIL;
1615 }
1616
1617 memset(cc, '\0', sizeof(struct dmarcf_connctx));
1618
1619 pthread_mutex_lock(&conf_lock);
1620
1621 cc->cctx_config = curconf;
1622 curconf->conf_refcnt++;
1623 conf = curconf;
1624
1625 pthread_mutex_unlock(&conf_lock);
1626
1627 if (conf->conf_copyfailsto != NULL)
1628 reqactions |= SMFIF_ADDRCPT;
1629
1630 /* verify the actions we need are available */
1631 if ((f0 & reqactions) != reqactions)
1632 {
1633 if (conf->conf_dolog)
1634 {
1635 syslog(LOG_ERR,
1636 "mlfi_negotiate(): required milter action(s) not available (got 0x%lx, need 0x%lx)",
1637 f0, reqactions);
1638 }
1639
1640 pthread_mutex_lock(&conf_lock);
1641 conf->conf_refcnt--;
1642 pthread_mutex_unlock(&conf_lock);
1643
1644 free(cc);
1645
1646 return SMFIS_REJECT;
1647 }
1648
1649 /* also try to get some nice features */
1650 wantactions = (wantactions & f0);
1651
1652 /* set the actions we want */
1653 *pf0 = (reqactions | wantactions);
1654
1655 /* disable as many protocol steps we don't need as are available */
1656 *pf1 = (protosteps & f1);
1657 *pf2 = 0;
1658 *pf3 = 0;
1659
1660 /* set "milterv2" flag if SMFIP_SKIP was available */
1661 if ((f1 & SMFIP_SKIP) != 0)
1662 cc->cctx_milterv2 = TRUE;
1663
1664 (void) dmarcf_setpriv(ctx, cc);
1665
1666 return SMFIS_CONTINUE;
1667 }
1668 #endif /* SMFI_VERSION >= 0x01000000 */
1669
1670 /*
1671 ** MLFI_CONNECT -- connection handler
1672 **
1673 ** Parameters:
1674 ** ctx -- milter context
1675 ** host -- hostname
1676 ** ip -- address, in in_addr form
1677 **
1678 ** Return value:
1679 ** An SMFIS_* constant.
1680 */
1681
1682 sfsistat
1683 mlfi_connect(SMFICTX *ctx, char *host, _SOCK_ADDR *ip)
1684 {
1685 DMARCF_CONNCTX cc;
1686 struct dmarcf_config *conf;
1687
1688 dmarcf_config_reload();
1689
1690 if (dmarcf_checkhost(host, ignore) ||
1691 (ip != NULL && dmarcf_checkip(ip, ignore)))
1692 {
1693 if (curconf->conf_dolog)
1694 syslog(LOG_INFO, "ignoring connection from %s", host);
1695 return SMFIS_ACCEPT;
1696 }
1697
1698 /* copy hostname and IP information to a connection context */
1699 cc = dmarcf_getpriv(ctx);
1700 if (cc == NULL)
1701 {
1702 cc = malloc(sizeof(struct dmarcf_connctx));
1703 if (cc == NULL)
1704 {
1705 pthread_mutex_lock(&conf_lock);
1706
1707 if (curconf->conf_dolog)
1708 {
1709 syslog(LOG_ERR, "%s malloc(): %s", host,
1710 strerror(errno));
1711 }
1712
1713 pthread_mutex_unlock(&conf_lock);
1714
1715 return SMFIS_TEMPFAIL;
1716 }
1717
1718 memset(cc, '\0', sizeof(struct dmarcf_connctx));
1719
1720 pthread_mutex_lock(&conf_lock);
1721
1722 cc->cctx_config = curconf;
1723 curconf->conf_refcnt++;
1724
1725 conf = curconf;
1726
1727 pthread_mutex_unlock(&conf_lock);
1728
1729 dmarcf_setpriv(ctx, cc);
1730 }
1731 else
1732 {
1733 conf = cc->cctx_config;
1734 }
1735
1736 if (host != NULL)
1737 strncpy(cc->cctx_host, host, sizeof cc->cctx_host - 1);
1738
1739 if (ip == NULL)
1740 {
1741 struct sockaddr_in sa;
1742
1743 memset(&sa, '\0', sizeof sa);
1744 sa.sin_family = AF_INET;
1745 sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
1746
1747 memcpy(&cc->cctx_ip, &sa, sizeof sa);
1748 (void) inet_ntop(AF_INET, &sa.sin_addr, cc->cctx_ipstr,
1749 sizeof cc->cctx_ipstr);
1750 cc->cctx_dmarc = opendmarc_policy_connect_init(cc->cctx_ipstr,
1751 FALSE);
1752 }
1753 else if (ip->sa_family == AF_INET)
1754 {
1755 struct sockaddr_in sa;
1756
1757 memcpy(&sa, ip, sizeof(struct sockaddr_in));
1758 (void) inet_ntop(AF_INET, &sa.sin_addr, cc->cctx_ipstr,
1759 sizeof cc->cctx_ipstr);
1760 cc->cctx_dmarc = opendmarc_policy_connect_init(cc->cctx_ipstr,
1761 FALSE);
1762
1763 memcpy(&cc->cctx_ip, ip, sizeof(struct sockaddr_in));
1764 }
1765 #ifdef AF_INET6
1766 else if (ip->sa_family == AF_INET6)
1767 {
1768 struct sockaddr_in6 sa;
1769
1770 memcpy(&sa, ip, sizeof(struct sockaddr_in6));
1771 (void) inet_ntop(AF_INET6, &sa.sin6_addr, cc->cctx_ipstr,
1772 sizeof cc->cctx_ipstr);
1773 cc->cctx_dmarc = opendmarc_policy_connect_init(cc->cctx_ipstr,
1774 TRUE);
1775
1776 memcpy(&cc->cctx_ip, ip, sizeof(struct sockaddr_in6));
1777 }
1778 #endif /* AF_INET6 */
1779
1780 if (cc->cctx_dmarc == NULL)
1781 {
1782 if (curconf->conf_dolog)
1783 {
1784 syslog(LOG_ERR,
1785 "%s: DMARC context initialization failed",
1786 host);
1787 }
1788 }
1789
1790 cc->cctx_msg = NULL;
1791
1792 return SMFIS_CONTINUE;
1793 }
1794
1795 #if WITH_SPF
1796 /*
1797 ** MLFI_HELO -- handler for HELO/EHLO command; only used for spf checks if configured.
1798 **
1799 ** Parameters:
1800 ** ctx -- milter context
1801 ** helo_domain -- possible helo domain
1802 **
1803 ** Return value:
1804 ** An SMFIS_* constant.
1805 */
1806
1807 sfsistat
1808 mlfi_helo(SMFICTX *ctx, char *helo_domain)
1809 {
1810 DMARCF_CONNCTX cc;
1811 struct dmarcf_config *conf;
1812
1813 assert(ctx != NULL);
1814
1815 cc = (DMARCF_CONNCTX) dmarcf_getpriv(ctx);
1816 if (cc != NULL)
1817 {
1818 conf = cc->cctx_config;
1819 if (!conf->conf_spfselfvalidate)
1820 return SMFIS_CONTINUE;
1821
1822 if (helo_domain != NULL)
1823 {
1824 strncpy(cc->cctx_helo, helo_domain,
1825 sizeof cc->cctx_helo - 1);
1826 }
1827 }
1828 return SMFIS_CONTINUE;
1829 }
1830 #endif /* WITH_SPF */
1831
1832 /*
1833 ** MLFI_ENVFROM -- handler for MAIL FROM command; used to reset for a message
1834 **
1835 ** Parameters:
1836 ** ctx -- milter context
1837 ** envfrom -- array of arguments
1838 **
1839 ** Return value:
1840 ** An SMFIS_* constant.
1841 */
1842
1843 sfsistat
1844 mlfi_envfrom(SMFICTX *ctx, char **envfrom)
1845 {
1846 DMARCF_MSGCTX dfc;
1847 DMARCF_CONNCTX cc;
1848 struct dmarcf_config *conf;
1849
1850 assert(ctx != NULL);
1851
1852 cc = (DMARCF_CONNCTX) dmarcf_getpriv(ctx);
1853 assert(cc != NULL);
1854 conf = cc->cctx_config;
1855
1856 if (cc->cctx_msg != NULL)
1857 dmarcf_cleanup(ctx);
1858
1859 if (conf->conf_ignoreauthclients &&
1860 dmarcf_getsymval(ctx, "{auth_authen}") != NULL)
1861 return SMFIS_ACCEPT;
1862
1863 dfc = (DMARCF_MSGCTX) malloc(sizeof(struct dmarcf_msgctx));
1864 if (dfc == NULL)
1865 {
1866 if (conf->conf_dolog)
1867 syslog(LOG_ERR, "malloc(): %s", strerror(errno));
1868
1869 return SMFIS_TEMPFAIL;
1870 }
1871
1872 memset(dfc, '\0', sizeof(struct dmarcf_msgctx));
1873
1874 cc->cctx_msg = dfc;
1875
1876 dfc->mctx_jobid = JOBIDUNKNOWN;
1877 dfc->mctx_spfresult = -1;
1878
1879 dfc->mctx_histbuf = dmarcf_dstring_new(BUFRSZ, 0);
1880 if (dfc->mctx_histbuf == NULL)
1881 {
1882 if (conf->conf_dolog)
1883 syslog(LOG_ERR, "malloc(): %s", strerror(errno));
1884
1885 return SMFIS_TEMPFAIL;
1886 }
1887
1888 if (cc->cctx_dmarc != NULL)
1889 (void) opendmarc_policy_connect_rset(cc->cctx_dmarc);
1890
1891 if (envfrom[0] != NULL)
1892 {
1893 size_t len;
1894 unsigned char *p;
1895 unsigned char *q;
1896
1897 #if WITH_SPF
1898 strncpy(cc->cctx_rawmfrom, envfrom[0],
1899 sizeof cc->cctx_rawmfrom - 1);
1900 #endif
1901 strncpy(dfc->mctx_envfrom, envfrom[0],
1902 sizeof dfc->mctx_envfrom - 1);
1903
1904 len = strlen(dfc->mctx_envfrom);
1905 p = dfc->mctx_envfrom;
1906 q = dfc->mctx_envfrom + len - 1;
1907
1908 while (len >= 2 && *p == '<' && *q == '>')
1909 {
1910 p++;
1911 q--;
1912 len -= 2;
1913 }
1914
1915 if (p != dfc->mctx_envfrom)
1916 {
1917 *(q + 1) = '\0';
1918 memmove(dfc->mctx_envfrom, p, len + 1);
1919 }
1920
1921 p = strchr(dfc->mctx_envfrom, '@');
1922 if (p != NULL)
1923 strncpy(dfc->mctx_envdomain, p + 1, strlen(p + 1));
1924 }
1925
1926 return SMFIS_CONTINUE;
1927 }
1928
1929 /*
1930 ** MLFI_HEADER -- handler for mail headers; stores the header in a vector
1931 ** of headers for later perusal, removing RFC822 comment
1932 ** substrings
1933 **
1934 ** Parameters:
1935 ** ctx -- milter context
1936 ** headerf -- header
1937 ** headerv -- value
1938 **
1939 ** Return value:
1940 ** An SMFIS_* constant.
1941 */
1942
1943 sfsistat
1944 mlfi_header(SMFICTX *ctx, char *headerf, char *headerv)
1945 {
1946 DMARCF_MSGCTX dfc;
1947 DMARCF_CONNCTX cc;
1948 struct dmarcf_header *newhdr;
1949 struct dmarcf_config *conf;
1950
1951 assert(ctx != NULL);
1952 assert(headerf != NULL);
1953 assert(headerv != NULL);
1954
1955 cc = (DMARCF_CONNCTX) dmarcf_getpriv(ctx);
1956 assert(cc != NULL);
1957 dfc = cc->cctx_msg;
1958 assert(dfc != NULL);
1959 conf = cc->cctx_config;
1960
1961 newhdr = (struct dmarcf_header *) malloc(sizeof(struct dmarcf_header));
1962 if (newhdr == NULL)
1963 {
1964 if (conf->conf_dolog)
1965 syslog(LOG_ERR, "malloc(): %s", strerror(errno));
1966
1967 dmarcf_cleanup(ctx);
1968 return SMFIS_TEMPFAIL;
1969 }
1970
1971 (void) memset(newhdr, '\0', sizeof(struct dmarcf_header));
1972
1973 newhdr->hdr_name = strdup(headerf);
1974 newhdr->hdr_value = strdup(headerv);
1975 newhdr->hdr_next = NULL;
1976 newhdr->hdr_prev = dfc->mctx_hqtail;
1977
1978 if (newhdr->hdr_name == NULL || newhdr->hdr_value == NULL)
1979 {
1980 if (conf->conf_dolog)
1981 syslog(LOG_ERR, "malloc(): %s", strerror(errno));
1982
1983 TRYFREE(newhdr->hdr_name);
1984 TRYFREE(newhdr->hdr_value);
1985 TRYFREE(newhdr);
1986 dmarcf_cleanup(ctx);
1987 return SMFIS_TEMPFAIL;
1988 }
1989
1990 if (dfc->mctx_hqhead == NULL)
1991 dfc->mctx_hqhead = newhdr;
1992
1993 if (dfc->mctx_hqtail != NULL)
1994 dfc->mctx_hqtail->hdr_next = newhdr;
1995
1996 dfc->mctx_hqtail = newhdr;
1997
1998 return SMFIS_CONTINUE;
1999 }
2000
2001 /*
2002 ** MLFI_EOM -- handler called at the end of the message; we can now decide
2003 ** based on the configuration if and how to add the text
2004 ** to this message, then release resources
2005 **
2006 ** Parameters:
2007 ** ctx -- milter context
2008 **
2009 ** Return value:
2010 ** An SMFIS_* constant.
2011 */
2012
2013 sfsistat
2014 mlfi_eom(SMFICTX *ctx)
2015 {
2016 _Bool wspf = FALSE;
2017 int c;
2018 int pc;
2019 int policy;
2020 int status;
2021 int adkim;
2022 int aspf;
2023 int pct;
2024 int p;
2025 int sp;
2026 int align_dkim;
2027 int align_spf;
2028 int result;
2029 sfsistat ret = SMFIS_CONTINUE;
2030 OPENDMARC_STATUS_T ostatus;
2031 OPENDMARC_STATUS_T apused;
2032 char *apolicy = NULL;
2033 char *aresult = NULL;
2034 char *adisposition = NULL;
2035 char *hostname = NULL;
2036 char *authservid = NULL;
2037 char *spfaddr;
2038 DMARCF_CONNCTX cc;
2039 DMARCF_MSGCTX dfc;
2040 struct dmarcf_config *conf;
2041 struct dmarcf_header *hdr;
2042 struct dmarcf_header *from;
2043 u_char *reqhdrs_error = NULL;
2044 u_char *user;
2045 u_char *domain;
2046 u_char *bang;
2047 u_char **ruv;
2048 unsigned char header[MAXHEADER + 1];
2049 unsigned char addrbuf[BUFRSZ + 1];
2050 unsigned char replybuf[BUFRSZ + 1];
2051 unsigned char pdomain[MAXHOSTNAMELEN + 1];
2052 struct authres ar;
2053
2054 assert(ctx != NULL);
2055
2056 cc = (DMARCF_CONNCTX) dmarcf_getpriv(ctx);
2057 assert(cc != NULL);
2058 dfc = cc->cctx_msg;
2059 assert(dfc != NULL);
2060 conf = cc->cctx_config;
2061
2062 /*
2063 ** If necessary, try again to get the job ID in case it came down
2064 ** later than expected (e.g. postfix).
2065 */
2066
2067 if (strcmp((char *) dfc->mctx_jobid, JOBIDUNKNOWN) == 0)
2068 {
2069 dfc->mctx_jobid = (u_char *) dmarcf_getsymval(ctx, "i");
2070 if (dfc->mctx_jobid == NULL)
2071 {
2072 if (no_i_whine && conf->conf_dolog)
2073 {
2074 syslog(LOG_WARNING,
2075 "WARNING: symbol 'i' not available");
2076 no_i_whine = FALSE;
2077 }
2078 dfc->mctx_jobid = (u_char *) JOBIDUNKNOWN;
2079 }
2080 }
2081
2082 /* get hostname; used in software header and new MIME boundaries */
2083 hostname = dmarcf_getsymval(ctx, "j");
2084 if (hostname == NULL)
2085 hostname = myhostname;
2086
2087 /* select authserv-id to use when generating result headers */
2088 authservid = conf->conf_authservid;
2089 if (authservid == NULL)
2090 {
2091 authservid = hostname;
2092
2093 if (conf->conf_dolog)
2094 {
2095 syslog(LOG_INFO, "implicit authentication service: %s",
2096 authservid);
2097 }
2098 }
2099
2100 /* ensure there was a From field */
2101 from = dmarcf_findheader(dfc, "From", 0);
2102
2103 /* verify RFC5322-required headers (RFC5322 3.6) */
2104 if (from == NULL ||
2105 dmarcf_findheader(dfc, "From", 1) != NULL)
2106 reqhdrs_error = "not exactly one From field";
2107
2108 if (dmarcf_findheader(dfc, "Date", 0) == NULL ||
2109 dmarcf_findheader(dfc, "Date", 1) != NULL)
2110 reqhdrs_error = "not exactly one Date field";
2111
2112 if (dmarcf_findheader(dfc, "Reply-To", 1) != NULL)
2113 reqhdrs_error = "multiple Reply-To fields";
2114
2115 if (dmarcf_findheader(dfc, "To", 1) != NULL)
2116 reqhdrs_error = "multiple To fields";
2117
2118 if (dmarcf_findheader(dfc, "Cc", 1) != NULL)
2119 reqhdrs_error = "multiple Cc fields";
2120
2121 if (dmarcf_findheader(dfc, "Bcc", 1) != NULL)
2122 reqhdrs_error = "multiple Bcc fields";
2123
2124 if (dmarcf_findheader(dfc, "Message-Id", 1) != NULL)
2125 reqhdrs_error = "multiple Message-Id fields";
2126
2127 if (dmarcf_findheader(dfc, "In-Reply-To", 1) != NULL)
2128 reqhdrs_error = "multiple In-Reply-To fields";
2129
2130 if (dmarcf_findheader(dfc, "References", 1) != NULL)
2131 reqhdrs_error = "multiple References fields";
2132
2133 if (dmarcf_findheader(dfc, "Subject", 1) != NULL)
2134 reqhdrs_error = "multiple Subject fields";
2135
2136 if (conf->conf_reqhdrs && reqhdrs_error != NULL)
2137 {
2138 if (conf->conf_dolog)
2139 {
2140 syslog(LOG_INFO,
2141 "%s: RFC5322 requirement error: %s",
2142 dfc->mctx_jobid, reqhdrs_error);
2143 }
2144
2145 return SMFIS_REJECT;
2146 }
2147
2148 /* if there was no From:, there's nothing to process past here */
2149 if (from == NULL)
2150 {
2151 if (conf->conf_dolog)
2152 {
2153 syslog(LOG_INFO,
2154 "%s: RFC5322 requirement error: missing From field; accepting",
2155 dfc->mctx_jobid);
2156 }
2157
2158 return SMFIS_ACCEPT;
2159 }
2160
2161 /* extract From: domain */
2162 memset(addrbuf, '\0', sizeof addrbuf);
2163 strncpy(addrbuf, from->hdr_value, sizeof addrbuf - 1);
2164 status = dmarcf_mail_parse(addrbuf, &user, &domain);
2165 if (status != 0 || user == NULL || domain == NULL)
2166 {
2167 if (conf->conf_dolog)
2168 {
2169 syslog(LOG_ERR,
2170 "%s: unable to parse From header field",
2171 dfc->mctx_jobid);
2172 }
2173
2174 if (conf->conf_reqhdrs)
2175 return SMFIS_REJECT;
2176 else
2177 return SMFIS_ACCEPT;
2178 }
2179
2180 if (conf->conf_ignoredomains != NULL &&
2181 dmarcf_match(domain, conf->conf_ignoredomains, TRUE))
2182 {
2183 if (conf->conf_dolog)
2184 {
2185 syslog(LOG_INFO, "%s: ignoring mail from %s",
2186 dfc->mctx_jobid, domain);
2187 }
2188
2189 return SMFIS_ACCEPT;
2190 }
2191
2192 strncpy(dfc->mctx_fromdomain, domain, sizeof dfc->mctx_fromdomain - 1);
2193
2194 ostatus = opendmarc_policy_store_from_domain(cc->cctx_dmarc,
2195 from->hdr_value);
2196 if (ostatus != DMARC_PARSE_OKAY)
2197 {
2198 if (conf->conf_dolog)
2199 {
2200 syslog(LOG_ERR,
2201 "%s: opendmarc_policy_store_from_domain() returned status %d",
2202 dfc->mctx_jobid, ostatus);
2203 }
2204
2205 return SMFIS_TEMPFAIL;
2206 }
2207
2208 /* first part of the history buffer */
2209 dmarcf_dstring_printf(dfc->mctx_histbuf, "job %s\n", dfc->mctx_jobid);
2210 dmarcf_dstring_printf(dfc->mctx_histbuf, "reporter %s\n", hostname);
2211 dmarcf_dstring_printf(dfc->mctx_histbuf, "received %ld\n", time(NULL));
2212 dmarcf_dstring_printf(dfc->mctx_histbuf, "ipaddr %s\n", cc->cctx_ipstr);
2213 dmarcf_dstring_printf(dfc->mctx_histbuf, "from %s\n",
2214 dfc->mctx_fromdomain);
2215 dmarcf_dstring_printf(dfc->mctx_histbuf, "mfrom %s\n",
2216 dfc->mctx_envdomain);
2217
2218 /*
2219 ** Walk through Authentication-Results fields and pull out data.
2220 */
2221
2222 for (hdr = dfc->mctx_hqhead, c = 0;
2223 hdr != NULL;
2224 hdr = hdr->hdr_next, c++)
2225 {
2226 /* skip it if it's not Authentication-Results */
2227 if (strcasecmp(hdr->hdr_name, AUTHRESHDRNAME) != 0)
2228 continue;
2229
2230 /* parse it */
2231 memset(&ar, '\0', sizeof ar);
2232 if (ares_parse(hdr->hdr_value, &ar) != 0)
2233 continue;
2234
2235 /* skip it if it's not one of ours */
2236 if (strcasecmp(ar.ares_host, authservid) != 0 &&
2237 (conf->conf_trustedauthservids == NULL ||
2238 !dmarcf_match(ar.ares_host, conf->conf_trustedauthservids,
2239 FALSE)))
2240 {
2241 unsigned char *slash;
2242
2243 if (!conf->conf_authservidwithjobid)
2244 {
2245 if (conf->conf_dolog)
2246 {
2247 syslog(LOG_DEBUG,
2248 "%s ignoring Authentication-Results at %d from %s",
2249 dfc->mctx_jobid, c,
2250 ar.ares_host);
2251 }
2252
2253 continue;
2254 }
2255
2256 slash = (unsigned char *) strchr(ar.ares_host, '/');
2257 if (slash == NULL)
2258 {
2259 if (conf->conf_dolog)
2260 {
2261 syslog(LOG_DEBUG,
2262 "%s ignoring Authentication-Results at %d from %s",
2263 dfc->mctx_jobid, c,
2264 ar.ares_host);
2265 }
2266
2267 continue;
2268 }
2269
2270 *slash = '\0';
2271 if ((strcasecmp(ar.ares_host, authservid) != 0 &&
2272 (conf->conf_trustedauthservids == NULL ||
2273 !dmarcf_match(ar.ares_host,
2274 conf->conf_trustedauthservids,
2275 FALSE))) ||
2276 strcmp(slash + 1, dfc->mctx_jobid) != 0)
2277 {
2278 *slash = '/';
2279
2280 if (conf->conf_dolog)
2281 {
2282 syslog(LOG_DEBUG,
2283 "%s ignoring Authentication-Results at %d from %s",
2284 dfc->mctx_jobid, c,
2285 ar.ares_host);
2286 }
2287
2288 continue;
2289 }
2290
2291 *slash = '/';
2292 }
2293
2294 /* walk through what was found */
2295 for (c = 0; c < ar.ares_count; c++)
2296 {
2297 if (ar.ares_result[c].result_method == ARES_METHOD_SPF
2298 #if WITH_SPF
2299 && !conf->conf_spfignoreresults
2300 #endif
2301 )
2302 {
2303 int spfmode;
2304
2305 dfc->mctx_spfresult = ar.ares_result[c].result_result;
2306
2307 if (ar.ares_result[c].result_result != ARES_RESULT_PASS)
2308 continue;
2309
2310 spfaddr = NULL;
2311 spfmode = DMARC_POLICY_SPF_ORIGIN_HELO;
2312
2313 memset(addrbuf, '\0', sizeof addrbuf);
2314
2315 for (pc = 0;
2316 pc < ar.ares_result[c].result_props;
2317 pc++)
2318 {
2319 if (ar.ares_result[c].result_ptype[pc] == ARES_PTYPE_SMTP)
2320 {
2321 if (strcasecmp(ar.ares_result[c].result_property[pc],
2322 "mailfrom") == 0)
2323 {
2324 spfaddr = ar.ares_result[c].result_value[pc];
2325 if (strchr(spfaddr, '@') != NULL)
2326 {
2327 strncpy(addrbuf,
2328 spfaddr,
2329 sizeof addrbuf - 1);
2330 }
2331 else
2332 {
2333 snprintf(addrbuf,
2334 sizeof addrbuf,
2335 "UNKNOWN@%s",
2336 spfaddr);
2337 }
2338
2339 spfmode = DMARC_POLICY_SPF_ORIGIN_MAILFROM;
2340 }
2341 else if (strcasecmp(ar.ares_result[c].result_property[pc],
2342 "helo") == 0 &&
2343 addrbuf[0] == '\0')
2344 {
2345 spfaddr = ar.ares_result[c].result_value[pc];
2346 snprintf(addrbuf,
2347 sizeof addrbuf,
2348 "UNKNOWN@%s",
2349 spfaddr);
2350 spfmode = DMARC_POLICY_SPF_ORIGIN_HELO;
2351 }
2352 }
2353 }
2354
2355 if (spfaddr == NULL)
2356 {
2357 if (conf->conf_dolog)
2358 {
2359 syslog(LOG_ERR,
2360 "%s: can't extract SPF address from Authentication-Results",
2361 dfc->mctx_jobid);
2362 }
2363
2364 continue;
2365 }
2366
2367 status = dmarcf_mail_parse(addrbuf, &user,
2368 &domain);
2369 if (status != 0 || domain == NULL ||
2370 domain[0] == '\0')
2371 {
2372 if (conf->conf_dolog)
2373 {
2374 syslog(LOG_ERR,
2375 "%s: unable to parse validated SPF address <%s>",
2376 dfc->mctx_jobid,
2377 spfaddr);
2378 }
2379
2380 continue;
2381 }
2382
2383 ostatus = opendmarc_policy_store_spf(cc->cctx_dmarc,
2384 domain,
2385 DMARC_POLICY_SPF_OUTCOME_PASS,
2386 spfmode,
2387 NULL);
2388
2389 if (ostatus != DMARC_PARSE_OKAY)
2390 {
2391 if (conf->conf_dolog)
2392 {
2393 syslog(LOG_ERR,
2394 "%s: opendmarc_policy_store_spf() returned status %d",
2395 dfc->mctx_jobid, ostatus);
2396 }
2397
2398 return SMFIS_TEMPFAIL;
2399 }
2400
2401 dmarcf_dstring_printf(dfc->mctx_histbuf,
2402 "spf %d\n",
2403 dfc->mctx_spfresult);
2404 wspf = TRUE;
2405 }
2406 else if (ar.ares_result[c].result_method == ARES_METHOD_DKIM)
2407 {
2408 domain = NULL;
2409
2410 for (pc = 0;
2411 pc < ar.ares_result[c].result_props;
2412 pc++)
2413 {
2414 if (ar.ares_result[c].result_ptype[pc] == ARES_PTYPE_HEADER)
2415 {
2416 if (ar.ares_result[c].result_property[pc][0] == 'd')
2417 {
2418 domain = ar.ares_result[c].result_value[pc];
2419 }
2420 }
2421 }
2422
2423 if (domain == NULL)
2424 continue;
2425
2426 dmarcf_dstring_printf(dfc->mctx_histbuf,
2427 "dkim %s %d\n", domain,
2428 ar.ares_result[c].result_result);
2429
2430 if (ar.ares_result[c].result_result != ARES_RESULT_PASS)
2431 continue;
2432
2433
2434 ostatus = opendmarc_policy_store_dkim(cc->cctx_dmarc,
2435 domain,
2436 DMARC_POLICY_DKIM_OUTCOME_PASS,
2437 NULL);
2438
2439 if (ostatus != DMARC_PARSE_OKAY)
2440 {
2441 if (conf->conf_dolog)
2442 {
2443 syslog(LOG_ERR,
2444 "%s: opendmarc_policy_store_from_dkim() returned status %d",
2445 dfc->mctx_jobid, ostatus);
2446 }
2447
2448 return SMFIS_TEMPFAIL;
2449 }
2450 }
2451 }
2452 }
2453
2454 /*
2455 ** If we didn't get Authentication-Results for SPF, parse any
2456 ** Received-SPF we might have.
2457 */
2458
2459 if (!wspf
2460 #if WITH_SPF
2461 && !conf->conf_spfignoreresults
2462 #endif
2463 )
2464 {
2465 for (hdr = dfc->mctx_hqhead;
2466 hdr != NULL && !wspf;
2467 hdr = hdr->hdr_next)
2468 {
2469 if (strcasecmp(hdr->hdr_name, RECEIVEDSPF) == 0)
2470 {
2471 int spfres;
2472 int spfmode;
2473
2474 if (dfc->mctx_fromdomain[0] == '\0')
2475 spfmode = DMARC_POLICY_SPF_ORIGIN_HELO;
2476 else
2477 spfmode = DMARC_POLICY_SPF_ORIGIN_MAILFROM;
2478
2479 spfres = dmarcf_parse_received_spf(hdr->hdr_value);
2480
2481 dmarcf_dstring_printf(dfc->mctx_histbuf,
2482 "spf %d\n", spfres);
2483
2484 dfc->mctx_spfresult = spfres;
2485
2486 switch (dfc->mctx_spfresult)
2487 {
2488 case ARES_RESULT_PASS:
2489 spfres = DMARC_POLICY_SPF_OUTCOME_PASS;
2490 break;
2491
2492 case ARES_RESULT_NONE:
2493 spfres = DMARC_POLICY_SPF_OUTCOME_NONE;
2494 break;
2495
2496 case ARES_RESULT_TEMPERROR:
2497 spfres = DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
2498 break;
2499
2500 case ARES_RESULT_FAIL:
2501 case ARES_RESULT_NEUTRAL:
2502 case ARES_RESULT_SOFTFAIL:
2503 spfres = DMARC_POLICY_SPF_OUTCOME_FAIL;
2504 break;
2505
2506 default: /* e.g. ARES_RESULT_PERMERROR */
2507 spfres = DMARC_POLICY_SPF_OUTCOME_NONE;
2508 break;
2509 }
2510
2511 /* use the MAIL FROM domain */
2512 ostatus = opendmarc_policy_store_spf(cc->cctx_dmarc,
2513 dfc->mctx_envdomain,
2514 spfres,
2515 spfmode,
2516 NULL);
2517 wspf = TRUE;
2518 }
2519 }
2520 }
2521
2522 /*
2523 ** Interact with libopendmarc.
2524 */
2525
2526 if (!wspf)
2527 {
2528 #if WITH_SPF
2529 if (conf->conf_spfselfvalidate)
2530 {
2531 int spf_result;
2532 char human[512];
2533 int used_mfrom;
2534 char *use_domain;
2535 int spf_mode;
2536 char *pass_fail;
2537
2538 # if HAVE_SPF2_H
2539 spf_result = opendmarc_spf2_test(
2540 # else /* HAVE_SPF2_H */
2541 spf_result = opendmarc_spf_test(
2542 # endif /* HAVE_SPF2_H */
2543 cc->cctx_ipstr,
2544 cc->cctx_rawmfrom,
2545 cc->cctx_helo,
2546 NULL,
2547 FALSE,
2548 human,
2549 sizeof human,
2550 &used_mfrom);
2551 if (used_mfrom == TRUE)
2552 {
2553 use_domain = dfc->mctx_envfrom;
2554 spf_mode = DMARC_POLICY_SPF_ORIGIN_MAILFROM;
2555 }
2556 else
2557 {
2558 use_domain = cc->cctx_helo;
2559 spf_mode = DMARC_POLICY_SPF_ORIGIN_HELO;
2560 }
2561 ostatus = opendmarc_policy_store_spf(cc->cctx_dmarc,
2562 use_domain,
2563 spf_result,
2564 spf_mode,
2565 human);
2566 switch (spf_result)
2567 {
2568 case DMARC_POLICY_SPF_OUTCOME_PASS:
2569 pass_fail = "pass";
2570 dfc->mctx_spfresult = ARES_RESULT_PASS;
2571 break;
2572
2573 case DMARC_POLICY_SPF_OUTCOME_NONE:
2574 pass_fail = "none";
2575 dfc->mctx_spfresult = ARES_RESULT_NONE;
2576 break;
2577
2578 case DMARC_POLICY_SPF_OUTCOME_TMPFAIL:
2579 pass_fail = "tempfail";
2580 dfc->mctx_spfresult = ARES_RESULT_TEMPERROR;
2581 break;
2582
2583 case DMARC_POLICY_SPF_OUTCOME_FAIL:
2584 dfc->mctx_spfresult = ARES_RESULT_FAIL;
2585 pass_fail = "fail";
2586 break;
2587
2588 default:
2589 dfc->mctx_spfresult = ARES_RESULT_PERMERROR;
2590 pass_fail = "permerror";
2591 break;
2592 }
2593
2594 if (spf_mode == DMARC_POLICY_SPF_ORIGIN_HELO)
2595 {
2596 snprintf(header, sizeof header,
2597 "%s; spf=%s smtp.helo=%s",
2598 authservid, pass_fail, use_domain);
2599 }
2600 else
2601 {
2602 snprintf(header, sizeof header,
2603 "%s; spf=%s smtp.mailfrom=%s",
2604 authservid, pass_fail, use_domain);
2605 }
2606
2607 if (dmarcf_insheader(ctx, 1, AUTHRESULTSHDR,
2608 header) == MI_FAILURE)
2609 {
2610 if (conf->conf_dolog)
2611 {
2612 syslog(LOG_ERR,
2613 "%s: %s header add failed",
2614 dfc->mctx_jobid,
2615 AUTHRESULTSHDR);
2616 }
2617 }
2618
2619 if (conf->conf_dolog)
2620 {
2621 char *mode;
2622
2623 if (spf_mode == DMARC_POLICY_SPF_ORIGIN_HELO)
2624 mode = "helo";
2625 else
2626 mode = "mailfrom";
2627
2628 syslog(LOG_INFO,
2629 "%s: SPF(%s): %s %s",
2630 dfc->mctx_jobid,
2631 mode,
2632 use_domain,
2633 pass_fail);
2634 }
2635 }
2636 #endif /* WITH_SPF */
2637
2638 dmarcf_dstring_printf(dfc->mctx_histbuf, "spf %d\n",
2639 dfc->mctx_spfresult);
2640 }
2641
2642 ostatus = opendmarc_policy_query_dmarc(cc->cctx_dmarc,
2643 dfc->mctx_fromdomain);
2644 if (ostatus == DMARC_PARSE_ERROR_NULL_CTX ||
2645 ostatus == DMARC_PARSE_ERROR_EMPTY)
2646 {
2647 if (conf->conf_dolog)
2648 {
2649 syslog(LOG_ERR,
2650 "%s: opendmarc_policy_query_dmarc(%s) returned status %d",
2651 dfc->mctx_jobid, dfc->mctx_fromdomain, ostatus);
2652 }
2653
2654 return SMFIS_TEMPFAIL;
2655 }
2656 else if (ostatus == DMARC_PARSE_ERROR_BAD_VERSION ||
2657 ostatus == DMARC_PARSE_ERROR_BAD_VALUE ||
2658 ostatus == DMARC_PARSE_ERROR_NO_REQUIRED_P ||
2659 ostatus == DMARC_PARSE_ERROR_NO_DOMAIN)
2660 {
2661 if (conf->conf_dolog)
2662 {
2663 syslog(LOG_ERR,
2664 "%s: opendmarc_policy_query_dmarc(%s) returned status %d",
2665 dfc->mctx_jobid, dfc->mctx_fromdomain, ostatus);
2666 }
2667
2668 snprintf(header, sizeof header,
2669 "%s; dmarc=permerror header.from=%s",
2670 authservid, dfc->mctx_fromdomain);
2671
2672 if (dmarcf_insheader(ctx, 1, AUTHRESULTSHDR,
2673 header) == MI_FAILURE)
2674 {
2675 if (conf->conf_dolog)
2676 {
2677 syslog(LOG_ERR,
2678 "%s: %s header add failed",
2679 dfc->mctx_jobid,
2680 AUTHRESULTSHDR);
2681 }
2682 }
2683
2684 return SMFIS_ACCEPT;
2685 }
2686
2687 memset(pdomain, '\0', sizeof pdomain);
2688 opendmarc_policy_fetch_utilized_domain(cc->cctx_dmarc,
2689 pdomain, sizeof pdomain);
2690 dmarcf_dstring_printf(dfc->mctx_histbuf, "pdomain %s\n", pdomain);
2691
2692 policy = opendmarc_get_policy_to_enforce(cc->cctx_dmarc);
2693 if (ostatus == DMARC_DNS_ERROR_NO_RECORD)
2694 policy = DMARC_POLICY_ABSENT;
2695 dmarcf_dstring_printf(dfc->mctx_histbuf, "policy %d\n", policy);
2696
2697 ruv = opendmarc_policy_fetch_rua(cc->cctx_dmarc, NULL, 0, TRUE);
2698 if (ruv != NULL)
2699 {
2700 for (c = 0; ruv[c] != NULL; c++)
2701 {
2702 dmarcf_dstring_printf(dfc->mctx_histbuf, "rua %s\n",
2703 ruv[c]);
2704 }
2705 }
2706 else
2707 {
2708 dmarcf_dstring_printf(dfc->mctx_histbuf, "rua -\n");
2709 }
2710
2711 opendmarc_policy_fetch_pct(cc->cctx_dmarc, &pct);
2712 dmarcf_dstring_printf(dfc->mctx_histbuf, "pct %d\n", pct);
2713
2714 opendmarc_policy_fetch_adkim(cc->cctx_dmarc, &adkim);
2715 dmarcf_dstring_printf(dfc->mctx_histbuf, "adkim %d\n", adkim);
2716
2717 opendmarc_policy_fetch_aspf(cc->cctx_dmarc, &aspf);
2718 dmarcf_dstring_printf(dfc->mctx_histbuf, "aspf %d\n", aspf);
2719
2720 opendmarc_policy_fetch_p(cc->cctx_dmarc, &p);
2721 dmarcf_dstring_printf(dfc->mctx_histbuf, "p %d\n", p);
2722
2723 opendmarc_policy_fetch_sp(cc->cctx_dmarc, &sp);
2724 dmarcf_dstring_printf(dfc->mctx_histbuf, "sp %d\n", sp);
2725
2726 opendmarc_policy_fetch_alignment(cc->cctx_dmarc, &align_dkim,
2727 &align_spf);
2728 dmarcf_dstring_printf(dfc->mctx_histbuf, "align_dkim %d\n",
2729 align_dkim);
2730 dmarcf_dstring_printf(dfc->mctx_histbuf, "align_spf %d\n", align_spf);
2731
2732 /* prepare human readable policy string for later processing */
2733 apused = opendmarc_get_policy_token_used(cc->cctx_dmarc);
2734 switch (apused == DMARC_USED_POLICY_IS_SP ? sp : p)
2735 {
2736 case DMARC_RECORD_P_QUARANTINE:
2737 apolicy = "quarantine";
2738 break;
2739
2740 case DMARC_RECORD_P_REJECT:
2741 apolicy = "reject";
2742 break;
2743
2744 case DMARC_RECORD_P_UNSPECIFIED:
2745 case DMARC_RECORD_P_NONE:
2746 default:
2747 apolicy = "none";
2748 break;
2749 }
2750
2751 /*
2752 ** Generate a failure report.
2753 */
2754
2755 ruv = opendmarc_policy_fetch_ruf(cc->cctx_dmarc, NULL, 0, TRUE);
2756 if ((policy == DMARC_POLICY_REJECT ||
2757 policy == DMARC_POLICY_QUARANTINE ||
2758 (conf->conf_afrfnone && policy == DMARC_POLICY_NONE)) &&
2759 conf->conf_afrf &&
2760 (conf->conf_afrfbcc != NULL || ruv != NULL))
2761 {
2762 _Bool first = TRUE;
2763
2764 if (dfc->mctx_afrf == NULL)
2765 {
2766 dfc->mctx_afrf = dmarcf_dstring_new(BUFRSZ, 0);
2767
2768 if (dfc->mctx_afrf == NULL)
2769 {
2770 if (conf->conf_dolog)
2771 {
2772 syslog(LOG_ERR,
2773 "%s: unable to create buffer for failure report",
2774 dfc->mctx_jobid);
2775 }
2776
2777 return SMFIS_TEMPFAIL;
2778 }
2779 }
2780 else
2781 {
2782 dmarcf_dstring_blank(dfc->mctx_afrf);
2783 }
2784
2785 if (conf->conf_afrfas != NULL)
2786 {
2787 dmarcf_dstring_printf(dfc->mctx_afrf,
2788 "From: %s\n",
2789 conf->conf_afrfas);
2790 }
2791 else
2792 {
2793 dmarcf_dstring_printf(dfc->mctx_afrf,
2794 "From: %s <%s@%s>\n",
2795 DMARCF_PRODUCT,
2796 myname, hostname);
2797 }
2798
2799 for (c = 0; ruv != NULL && ruv[c] != NULL; c++)
2800 {
2801 if (strncasecmp(ruv[c], "mailto:", 7) != 0)
2802 continue;
2803
2804 bang = strchr(ruv[c], '!');
2805 if (bang != NULL)
2806 *bang = '\0';
2807
2808 if (ruv[c][7] == '\0')
2809 continue;
2810
2811 if (first)
2812 {
2813 dmarcf_dstring_cat(dfc->mctx_afrf, "To: ");
2814 first = FALSE;
2815 }
2816 else
2817 {
2818 dmarcf_dstring_cat(dfc->mctx_afrf, ", ");
2819 }
2820
2821 dmarcf_dstring_cat(dfc->mctx_afrf, &ruv[c][7]);
2822 }
2823
2824 if (conf->conf_afrfbcc != NULL)
2825 {
2826 if (first)
2827 {
2828 dmarcf_dstring_cat(dfc->mctx_afrf, "To: ");
2829 dmarcf_dstring_cat(dfc->mctx_afrf,
2830 conf->conf_afrfbcc);
2831 first = FALSE;
2832 }
2833 }
2834
2835 if (!first)
2836 {
2837 time_t now;
2838 struct dmarcf_header *h;
2839 struct tm *tm;
2840 FILE *out;
2841 char timebuf[BUFRSZ];
2842
2843 /* finish To: from above */
2844 dmarcf_dstring_cat(dfc->mctx_afrf, "\n");
2845
2846 /* Bcc: */
2847 if (ruv != NULL && conf->conf_afrfbcc != NULL)
2848 {
2849 dmarcf_dstring_cat(dfc->mctx_afrf, "Bcc: ");
2850 dmarcf_dstring_cat(dfc->mctx_afrf,
2851 conf->conf_afrfbcc);
2852 dmarcf_dstring_cat(dfc->mctx_afrf, "\n");
2853 }
2854
2855 /* Date: */
2856 (void) time(&now);
2857 tm = localtime(&now);
2858 (void) strftime(timebuf, sizeof timebuf,
2859 "%a, %e %b %Y %H:%M:%S %z (%Z)", tm);
2860 dmarcf_dstring_printf(dfc->mctx_afrf, "Date: %s\n",
2861 timebuf);
2862
2863 h = dmarcf_findheader(dfc, "subject", 0);
2864 if (h == NULL)
2865 {
2866 dmarcf_dstring_printf(dfc->mctx_afrf,
2867 "Subject: DMARC failure report for job %s\n",
2868 dfc->mctx_jobid);
2869 }
2870 else
2871 {
2872 dmarcf_dstring_printf(dfc->mctx_afrf,
2873 "Subject: FW: %s\n",
2874 h->hdr_value);
2875 }
2876
2877 dmarcf_dstring_cat(dfc->mctx_afrf,
2878 "MIME-Version: 1.0\n");
2879
2880 dmarcf_dstring_printf(dfc->mctx_afrf,
2881 "Content-Type: multipart/report;"
2882 "\n\treport-type=feedback-report;"
2883 "\n\tboundary=\"%s:%s\"\n",
2884 hostname, dfc->mctx_jobid);
2885
2886 dmarcf_dstring_cat(dfc->mctx_afrf, "\n");
2887
2888 dmarcf_dstring_printf(dfc->mctx_afrf,
2889 "--%s:%s\n"
2890 "Content-Type: text/plain\n\n",
2891 hostname, dfc->mctx_jobid);
2892
2893 dmarcf_dstring_printf(dfc->mctx_afrf,
2894 "This is an authentication "
2895 "failure report for an email "
2896 "message received from IP\n"
2897 "%s on %s.\n\n",
2898 cc->cctx_ipstr, timebuf);
2899
2900 dmarcf_dstring_printf(dfc->mctx_afrf,
2901 "--%s:%s\n"
2902 "Content-Type: message/feedback-report\n\n",
2903 hostname, dfc->mctx_jobid);
2904
2905 dmarcf_dstring_cat(dfc->mctx_afrf,
2906 "Feedback-Type: auth-failure\n"
2907 "Version: 1\n");
2908
2909 dmarcf_dstring_printf(dfc->mctx_afrf,
2910 "User-Agent: %s/%s\n",
2911 DMARCF_PRODUCTNS, VERSION);
2912
2913 dmarcf_dstring_cat(dfc->mctx_afrf,
2914 "Auth-Failure: dmarc\n");
2915
2916 dmarcf_dstring_printf(dfc->mctx_afrf,
2917 "Authentication-Results: %s; dmarc=fail header.from=%s\n",
2918 authservid,
2919 dfc->mctx_fromdomain);
2920
2921 dmarcf_dstring_printf(dfc->mctx_afrf,
2922 "Original-Envelope-Id: %s\n",
2923 dfc->mctx_jobid);
2924
2925 dmarcf_dstring_printf(dfc->mctx_afrf,
2926 "Original-Mail-From: %s\n",
2927 dfc->mctx_envfrom);
2928
2929 dmarcf_dstring_printf(dfc->mctx_afrf,
2930 "Source-IP: %s (%s)\n",
2931 cc->cctx_ipstr,
2932 cc->cctx_host);
2933
2934 dmarcf_dstring_printf(dfc->mctx_afrf,
2935 "Reported-Domain: %s\n\n",
2936 dfc->mctx_fromdomain);
2937
2938 dmarcf_dstring_printf(dfc->mctx_afrf,
2939 "--%s:%s\n"
2940 "Content-Type: text/rfc822-headers\n\n",
2941 hostname, dfc->mctx_jobid);
2942
2943 for (h = dfc->mctx_hqhead; h != NULL; h = h->hdr_next)
2944 {
2945 dmarcf_dstring_printf(dfc->mctx_afrf,
2946 "%s: %s\n",
2947 h->hdr_name,
2948 h->hdr_value);
2949 }
2950
2951 dmarcf_dstring_printf(dfc->mctx_afrf,
2952 "\n--%s:%s--\n",
2953 hostname, dfc->mctx_jobid);
2954
2955 out = popen(conf->conf_reportcmd, "w");
2956 if (out == NULL)
2957 {
2958 if (conf->conf_dolog)
2959 {
2960 syslog(LOG_ERR, "%s: popen(): %s",
2961 dfc->mctx_jobid,
2962 strerror(errno));
2963 }
2964 }
2965 else
2966 {
2967 fwrite(dmarcf_dstring_get(dfc->mctx_afrf),
2968 1, dmarcf_dstring_len(dfc->mctx_afrf),
2969 out);
2970
2971 status = pclose(out);
2972 if (status != 0 && conf->conf_dolog)
2973 {
2974 int val;
2975 const char *how;
2976
2977 if (WIFEXITED(status))
2978 {
2979 how = "exited with status";
2980 val = WEXITSTATUS(status);
2981 }
2982 else if (WIFSIGNALED(status))
2983 {
2984 how = "killed with signal";
2985 val = WTERMSIG(status);
2986 }
2987 else
2988 {
2989 how = "returned status";
2990 val = status;
2991 }
2992
2993 syslog(LOG_ERR, "%s: pclose() %s %d",
2994 dfc->mctx_jobid, how, val);
2995 }
2996 }
2997 }
2998 }
2999
3000 /*
3001 ** Enact policy based on DMARC results.
3002 */
3003
3004 result = DMARC_RESULT_ACCEPT;
3005
3006 switch (policy)
3007 {
3008 case DMARC_POLICY_ABSENT: /* No DMARC record found */
3009 case DMARC_FROM_DOMAIN_ABSENT: /* No From: domain */
3010 aresult = "none";
3011 ret = SMFIS_ACCEPT;
3012 result = DMARC_RESULT_ACCEPT;
3013 break;
3014
3015 case DMARC_POLICY_NONE: /* Alignment failed, but policy is none: */
3016 aresult = "fail"; /* Accept and report */
3017 ret = SMFIS_ACCEPT;
3018 result = DMARC_RESULT_ACCEPT;
3019 break;
3020
3021 case DMARC_POLICY_PASS: /* Explicit accept */
3022 aresult = "pass";
3023 ret = SMFIS_ACCEPT;
3024 result = DMARC_RESULT_ACCEPT;
3025 break;
3026
3027 case DMARC_POLICY_REJECT: /* Explicit reject */
3028 aresult = "fail";
3029
3030 if (conf->conf_rejectfail && random() % 100 < pct)
3031 {
3032 snprintf(replybuf, sizeof replybuf,
3033 "rejected by DMARC policy for %s", pdomain);
3034
3035 status = dmarcf_setreply(ctx, DMARC_REJECT_SMTP,
3036 DMARC_REJECT_ESC, replybuf);
3037 if (status != MI_SUCCESS && conf->conf_dolog)
3038 {
3039 syslog(LOG_ERR, "%s: smfi_setreply() failed",
3040 dfc->mctx_jobid);
3041 }
3042
3043 ret = SMFIS_REJECT;
3044 result = DMARC_RESULT_REJECT;
3045 }
3046
3047 if (conf->conf_copyfailsto != NULL)
3048 {
3049 status = dmarcf_addrcpt(ctx, conf->conf_copyfailsto);
3050 if (status != MI_SUCCESS && conf->conf_dolog)
3051 {
3052 syslog(LOG_ERR, "%s: smfi_addrcpt() failed",
3053 dfc->mctx_jobid);
3054 }
3055 }
3056
3057 break;
3058
3059 case DMARC_POLICY_QUARANTINE: /* Explicit quarantine */
3060 aresult = "fail";
3061
3062 if (conf->conf_rejectfail && random() % 100 < pct)
3063 {
3064 snprintf(replybuf, sizeof replybuf,
3065 "quarantined by DMARC policy for %s",
3066 pdomain);
3067
3068 status = smfi_quarantine(ctx, replybuf);
3069 if (status != MI_SUCCESS && conf->conf_dolog)
3070 {
3071 syslog(LOG_ERR, "%s: smfi_quarantine() failed",
3072 dfc->mctx_jobid);
3073 }
3074
3075 ret = SMFIS_ACCEPT;
3076 result = DMARC_RESULT_QUARANTINE;
3077 }
3078
3079 if (conf->conf_copyfailsto != NULL)
3080 {
3081 status = dmarcf_addrcpt(ctx, conf->conf_copyfailsto);
3082 if (status != MI_SUCCESS && conf->conf_dolog)
3083 {
3084 syslog(LOG_ERR, "%s: smfi_addrcpt() failed",
3085 dfc->mctx_jobid);
3086 }
3087 }
3088
3089 break;
3090
3091 default:
3092 aresult = "temperror";
3093 ret = SMFIS_TEMPFAIL;
3094 result = DMARC_RESULT_TEMPFAIL;
3095 break;
3096 }
3097
3098 /* prepare human readable dispositon string for later processing */
3099 switch (result)
3100 {
3101 case DMARC_RESULT_REJECT:
3102 adisposition = "reject";
3103 break;
3104
3105 case DMARC_RESULT_QUARANTINE:
3106 adisposition = "quarantine";
3107 break;
3108
3109 default:
3110 adisposition = "none";
3111 break;
3112 }
3113
3114 if (conf->conf_dolog)
3115 {
3116 syslog(LOG_INFO, "%s: %s %s", dfc->mctx_jobid,
3117 dfc->mctx_fromdomain, aresult);
3118 }
3119
3120 /* if the final action isn't TEMPFAIL or REJECT, add an A-R field */
3121 if (ret != SMFIS_TEMPFAIL && ret != SMFIS_REJECT)
3122 {
3123 snprintf(header, sizeof header,
3124 "%s%s%s; dmarc=%s (p=%s dis=%s) header.from=%s",
3125 authservid,
3126 conf->conf_authservidwithjobid ? "/" : "",
3127 conf->conf_authservidwithjobid ? dfc->mctx_jobid : "",
3128 aresult, apolicy, adisposition, dfc->mctx_fromdomain);
3129
3130 if (dmarcf_insheader(ctx, 1, AUTHRESULTSHDR,
3131 header) == MI_FAILURE)
3132 {
3133 if (conf->conf_dolog)
3134 {
3135 syslog(LOG_ERR,
3136 "%s: %s header add failed",
3137 dfc->mctx_jobid,
3138 AUTHRESULTSHDR);
3139 }
3140 }
3141 }
3142
3143 dmarcf_dstring_printf(dfc->mctx_histbuf, "action %d\n", result);
3144
3145 /*
3146 ** Record activity in the history file.
3147 */
3148
3149 if (conf->conf_historyfile != NULL &&
3150 (conf->conf_recordall || ostatus != DMARC_DNS_ERROR_NO_RECORD))
3151 {
3152 FILE *f;
3153
3154 f = fopen(conf->conf_historyfile, "a");
3155 if (f == NULL)
3156 {
3157 if (conf->conf_dolog)
3158 {
3159 syslog(LOG_ERR, "%s: %s: fopen(): %s",
3160 dfc->mctx_jobid,
3161 conf->conf_historyfile,
3162 strerror(errno));
3163 }
3164
3165 return SMFIS_TEMPFAIL;
3166 }
3167
3168 #ifdef LOCK_EX
3169 if (flock(fileno(f), LOCK_EX) != 0)
3170 {
3171 syslog(LOG_WARNING, "%s: %s: flock(LOCK_EX): %s",
3172 #else
3173 # ifdef F_LOCK
3174 if (lockf(fileno(f), F_LOCK, 0) != 0)
3175 {
3176 syslog(LOG_WARNING, "%s: %s: lockf(F_LOCK): %s",
3177 # endif
3178 #endif /* LOCK_EX */
3179 dfc->mctx_jobid,
3180 conf->conf_historyfile,
3181 strerror(errno));
3182 }
3183
3184 /* write out the buffer */
3185 clearerr(f);
3186 fwrite(dmarcf_dstring_get(dfc->mctx_histbuf), 1,
3187 dmarcf_dstring_len(dfc->mctx_histbuf), f);
3188 if (ferror(f) && conf->conf_dolog)
3189 {
3190 syslog(LOG_ERR, "%s: %s: fwrite(): %s",
3191 dfc->mctx_jobid,
3192 conf->conf_historyfile,
3193 strerror(errno));
3194 }
3195
3196 #ifdef LOCK_EX
3197 if (flock(fileno(f), LOCK_UN) != 0)
3198 {
3199 syslog(LOG_WARNING, "%s: %s: flock(LOCK_UN): %s",
3200 #else
3201 # ifdef F_LOCK
3202 if (lockf(fileno(f), F_ULOCK, 0) != 0)
3203 {
3204 syslog(LOG_WARNING, "%s: %s: lockf(F_ULOCK): %s",
3205 # endif
3206 #endif /* LOCK_EX */
3207 dfc->mctx_jobid,
3208 conf->conf_historyfile,
3209 strerror(errno));
3210 }
3211
3212 fclose(f);
3213 }
3214
3215 if (conf->conf_addswhdr)
3216 {
3217 snprintf(header, sizeof header, "%s v%s %s %s",
3218 DMARCF_PRODUCT, VERSION, hostname,
3219 dfc->mctx_jobid != NULL ? dfc->mctx_jobid
3220 : JOBIDUNKNOWN);
3221
3222 if (dmarcf_insheader(ctx, 1, SWHEADERNAME,
3223 header) == MI_FAILURE)
3224 {
3225 if (conf->conf_dolog)
3226 {
3227 syslog(LOG_ERR,
3228 "%s: %s header add failed",
3229 dfc->mctx_jobid,
3230 SWHEADERNAME);
3231 }
3232 }
3233 }
3234
3235 dmarcf_cleanup(ctx);
3236
3237 return ret;
3238 }
3239
3240 /*
3241 ** MLFI_ABORT -- handler called if an earlier filter in the filter process
3242 ** rejects the message
3243 **
3244 ** Parameters:
3245 ** ctx -- milter context
3246 **
3247 ** Return value:
3248 ** An SMFIS_* constant.
3249 */
3250
3251 sfsistat
3252 mlfi_abort(SMFICTX *ctx)
3253 {
3254 dmarcf_cleanup(ctx);
3255 return SMFIS_CONTINUE;
3256 }
3257
3258 /*
3259 ** MLFI_CLOSE -- handler called on connection shutdown
3260 **
3261 ** Parameters:
3262 ** ctx -- milter context
3263 **
3264 ** Return value:
3265 ** An SMFIS_* constant.
3266 */
3267
3268 sfsistat
3269 mlfi_close(SMFICTX *ctx)
3270 {
3271 DMARCF_CONNCTX cc;
3272
3273 dmarcf_cleanup(ctx);
3274
3275 cc = (DMARCF_CONNCTX) dmarcf_getpriv(ctx);
3276 if (cc != NULL)
3277 {
3278 pthread_mutex_lock(&conf_lock);
3279
3280 cc->cctx_config->conf_refcnt--;
3281
3282 if (cc->cctx_config->conf_refcnt == 0 &&
3283 cc->cctx_config != curconf)
3284 dmarcf_config_free(cc->cctx_config);
3285
3286 pthread_mutex_unlock(&conf_lock);
3287
3288 (void) opendmarc_policy_connect_shutdown(cc->cctx_dmarc);
3289
3290 free(cc);
3291 dmarcf_setpriv(ctx, NULL);
3292 }
3293
3294 return SMFIS_CONTINUE;
3295 }
3296
3297 /*
3298 ** smfilter -- the milter module description
3299 */
3300
3301 struct smfiDesc smfilter =
3302 {
3303 DMARCF_PRODUCT, /* filter name */
3304 SMFI_VERSION, /* version code -- do not change */
3305 0, /* flags; updated in main() */
3306 mlfi_connect, /* connection info filter */
3307 #if WITH_SPF
3308 mlfi_helo, /* SMTP HELO command filter */
3309 #else
3310 NULL, /* SMTP HELO command filter */
3311 #endif
3312 mlfi_envfrom, /* envelope sender filter */
3313 NULL, /* envelope recipient filter */
3314 mlfi_header, /* header filter */
3315 NULL, /* end of header */
3316 NULL, /* body block filter */
3317 mlfi_eom, /* end of message */
3318 mlfi_abort, /* message aborted */
3319 mlfi_close, /* shutdown */
3320 #if SMFI_VERSION > 2
3321 NULL, /* unrecognised command */
3322 #endif
3323 #if SMFI_VERSION > 3
3324 NULL, /* DATA */
3325 #endif
3326 #if SMFI_VERSION >= 0x01000000
3327 mlfi_negotiate /* negotiation callback */
3328 #endif
3329 };
3330
3331 /*
3332 ** DMARCF_SIGHANDLER -- signal handler
3333 **
3334 ** Parameters:
3335 ** sig -- signal received
3336 **
3337 ** Return value:
3338 ** None.
3339 */
3340
3341 static void
3342 dmarcf_sighandler(int sig)
3343 {
3344 if (sig == SIGINT || sig == SIGTERM || sig == SIGHUP)
3345 {
3346 diesig = sig;
3347 die = TRUE;
3348 }
3349 else if (sig == SIGUSR1)
3350 {
3351 if (conffile != NULL)
3352 reload = TRUE;
3353 }
3354 }
3355
3356 /*
3357 ** DMARCF_RELOADER -- reload signal thread
3358 **
3359 ** Parameters:
3360 ** vp -- void pointer required by thread API but not used
3361 **
3362 ** Return value:
3363 ** NULL.
3364 */
3365
3366 static void *
3367 dmarcf_reloader(/* UNUSED */ void *vp)
3368 {
3369 int sig;
3370 sigset_t mask;
3371
3372 (void) pthread_detach(pthread_self());
3373
3374 sigemptyset(&mask);
3375 sigaddset(&mask, SIGUSR1);
3376
3377 while (!die)
3378 {
3379 (void) sigwait(&mask, &sig);
3380
3381 if (conffile != NULL)
3382 reload = TRUE;
3383 }
3384
3385 return NULL;
3386 }
3387
3388 /*
3389 ** DMARCF_KILLCHILD -- kill child process
3390 **
3391 ** Parameters:
3392 ** pid -- process ID to signal
3393 ** sig -- signal to use
3394 ** dolog -- log it?
3395 **
3396 ** Return value:
3397 ** None.
3398 */
3399
3400 static void
3401 dmarcf_killchild(pid_t pid, int sig, _Bool dolog)
3402 {
3403 if (kill(pid, sig) == -1 && dolog)
3404 {
3405 syslog(LOG_ERR, "kill(%d, %d): %s", pid, sig,
3406 strerror(errno));
3407 }
3408 }
3409
3410 /*
3411 ** DMARCF_RESTART_CHECK -- initialize/check restart rate information
3412 **
3413 ** Parameters:
3414 ** n -- size of restart rate array to initialize/enforce
3415 ** t -- maximum time range for restarts (0 == init)
3416 **
3417 ** Return value:
3418 ** TRUE -- OK to continue
3419 ** FALSE -- error
3420 */
3421
3422 static _Bool
3423 dmarcf_restart_check(int n, time_t t)
3424 {
3425 static int idx; /* last filled slot */
3426 static int alen; /* allocated length */
3427 static time_t *list;
3428
3429 if (t == 0)
3430 {
3431 alen = n * sizeof(time_t);
3432
3433 list = (time_t *) malloc(alen);
3434
3435 if (list == NULL)
3436 return FALSE;
3437
3438 memset(list, '\0', alen);
3439
3440 idx = 0;
3441 alen = n;
3442
3443 return TRUE;
3444 }
3445 else
3446 {
3447 int which;
3448
3449 time_t now;
3450
3451 (void) time(&now);
3452
3453 which = (idx - 1) % alen;
3454 if (which == -1)
3455 which = alen - 1;
3456
3457 if (list[which] != 0 &&
3458 list[which] + t > now)
3459 return FALSE;
3460
3461 list[which] = t;
3462 idx++;
3463
3464 return TRUE;
3465 }
3466 }
3467
3468 /*
3469 ** DMARCF_STDIO -- set up the base descriptors to go nowhere
3470 **
3471 ** Parameters:
3472 ** None.
3473 **
3474 ** Return value:
3475 ** None.
3476 */
3477
3478 static void
3479 dmarcf_stdio(void)
3480 {
3481 int devnull;
3482
3483 /* this only fails silently, but that's OK */
3484 devnull = open(_PATH_DEVNULL, O_RDWR, 0);
3485 if (devnull != -1)
3486 {
3487 (void) dup2(devnull, 0);
3488 (void) dup2(devnull, 1);
3489 (void) dup2(devnull, 2);
3490 if (devnull > 2)
3491 (void) close(devnull);
3492 }
3493
3494 (void) setsid();
3495 }
3496
3497 /*
3498 ** DMARCF_CONFIG_NEW -- get a new configuration handle
3499 **
3500 ** Parameters:
3501 ** None.
3502 **
3503 ** Return value:
3504 ** A new configuration handle, or NULL on error.
3505 */
3506
3507 static struct dmarcf_config *
3508 dmarcf_config_new(void)
3509 {
3510 struct dmarcf_config *new;
3511
3512 new = (struct dmarcf_config *) malloc(sizeof(struct dmarcf_config));
3513 if (new == NULL)
3514 return NULL;
3515
3516 memset(new, '\0', sizeof(struct dmarcf_config));
3517
3518 new->conf_reportcmd = DEFREPORTCMD;
3519
3520 return new;
3521 }
3522
3523 /*
3524 ** DMARCF_CONFIG_FREE -- destroy a configuration handle
3525 **
3526 ** Parameters:
3527 ** conf -- pointer to the configuration handle to be destroyed
3528 **
3529 ** Return value:
3530 ** None.
3531 */
3532
3533 static void
3534 dmarcf_config_free(struct dmarcf_config *conf)
3535 {
3536 assert(conf != NULL);
3537 assert(conf->conf_refcnt == 0);
3538
3539 if (conf->conf_data != NULL)
3540 config_free(conf->conf_data);
3541
3542 if (conf->conf_ignoredomains != NULL)
3543 dmarcf_freearray(conf->conf_ignoredomains);
3544
3545 if (conf->conf_trustedauthservids != NULL)
3546 dmarcf_freearray(conf->conf_trustedauthservids);
3547
3548 if (conf->conf_authservid != NULL)
3549 free(conf->conf_authservid);
3550
3551 free(conf);
3552 }
3553
3554 /*
3555 ** USAGE -- print a usage message and exit
3556 **
3557 ** Parameters:
3558 ** None.
3559 **
3560 ** Return value:
3561 ** EX_USAGE
3562 */
3563
3564 int
3565 usage(void)
3566 {
3567 fprintf(stderr, "%s: usage: %s [options]\n"
3568 "\t-A \tenable auto-restart\n"
3569 "\t-c file \tconfiguration file\n"
3570 "\t-f \trun in the foreground\n"
3571 "\t-l \tlog to syslog\n"
3572 "\t-n \ttest configuration and exit\n"
3573 "\t-p sockspec\tspecify milter socket\n"
3574 "\t-P file \twrite process ID to specified file\n"
3575 "\t-t file \tevaluate a single message\n"
3576 "\t-u user \ttry to become the named user\n"
3577 "\t-v \tincrease verbose output\n"
3578 "\t-V \tprint version and exit\n",
3579 progname, progname);
3580
3581 return EX_USAGE;
3582 }
3583
3584 /*
3585 ** MAIN -- program mainline
3586 **
3587 ** Parameters:
3588 ** argc, argv -- the usual
3589 **
3590 ** Return value:
3591 ** Exit status.
3592 */
3593
3594 int
3595 main(int argc, char **argv)
3596 {
3597 _Bool autorestart = FALSE;
3598 _Bool gotp = FALSE;
3599 _Bool dofork = TRUE;
3600 _Bool stricttest = FALSE;
3601 _Bool configonly = FALSE;
3602 int c;
3603 int status;
3604 int n;
3605 int verbose = 0;
3606 int maxrestarts = 0;
3607 int maxrestartrate_n = 0;
3608 int filemask = -1;
3609 int mdebug = 0;
3610 #ifdef HAVE_SMFI_VERSION
3611 u_int mvmajor;
3612 u_int mvminor;
3613 u_int mvrelease;
3614 #endif /* HAVE_SMFI_VERSION */
3615 time_t now;
3616 gid_t gid = (gid_t) -1;
3617 sigset_t sigset;
3618 time_t maxrestartrate_t = 0;
3619 pthread_t rt;
3620 const char *args = CMDLINEOPTS;
3621 FILE *f;
3622 struct passwd *pw = NULL;
3623 struct group *gr = NULL;
3624 char *become = NULL;
3625 char *chrootdir = NULL;
3626 char *extract = NULL;
3627 char *ignorefile = NULL;
3628 char *p;
3629 char *pidfile = NULL;
3630 char *testfile = NULL;
3631 struct config *cfg = NULL;
3632 char *end;
3633 char argstr[MAXARGV];
3634 char err[BUFRSZ + 1];
3635 OPENDMARC_LIB_T libopendmarc;
3636
3637 /* initialize */
3638 testmode = FALSE;
3639 reload = FALSE;
3640 sock = NULL;
3641 no_i_whine = TRUE;
3642 conffile = NULL;
3643 ignore = NULL;
3644
3645 memset(myhostname, '\0', sizeof myhostname);
3646 (void) gethostname(myhostname, sizeof myhostname);
3647
3648 progname = (p = strrchr(argv[0], '/')) == NULL ? argv[0] : p + 1;
3649
3650 (void) time(&now);
3651 srandom(now);
3652
3653 curconf = dmarcf_config_new();
3654 if (curconf == NULL)
3655 {
3656 fprintf(stderr, "%s: malloc(): %s\n", progname,
3657 strerror(errno));
3658
3659 return EX_OSERR;
3660 }
3661
3662 /* process command line options */
3663 while ((c = getopt(argc, argv, args)) != -1)
3664 {
3665 switch (c)
3666 {
3667 case 'A':
3668 autorestart = TRUE;
3669 break;
3670
3671 case 'c':
3672 if (optarg == NULL || *optarg == '\0')
3673 return usage();
3674 conffile = optarg;
3675 break;
3676
3677 case 'f':
3678 dofork = FALSE;
3679 break;
3680
3681 case 'l':
3682 curconf->conf_dolog = TRUE;
3683 break;
3684
3685 case 'n':
3686 configonly = TRUE;
3687 break;
3688
3689 case 'p':
3690 if (optarg == NULL || *optarg == '\0')
3691 return usage();
3692 sock = optarg;
3693 (void) smfi_setconn(optarg);
3694 gotp = TRUE;
3695 break;
3696
3697 case 'P':
3698 if (optarg == NULL || *optarg == '\0')
3699 return usage();
3700 pidfile = optarg;
3701 break;
3702
3703 case 't':
3704 if (optarg == NULL || *optarg == '\0')
3705 return usage();
3706 testmode = TRUE;
3707 testfile = optarg;
3708 break;
3709
3710 case 'u':
3711 if (optarg == NULL || *optarg == '\0')
3712 return usage();
3713 become = optarg;
3714 break;
3715
3716 case 'v':
3717 verbose++;
3718 break;
3719
3720 case 'V':
3721 printf("%s: %s v%s\n", progname, DMARCF_PRODUCT,
3722 VERSION);
3723 printf("\tSMFI_VERSION 0x%x\n", SMFI_VERSION);
3724 #ifdef HAVE_SMFI_VERSION
3725 (void) smfi_version(&mvmajor, &mvminor, &mvrelease);
3726 printf("\tlibmilter version %d.%d.%d\n",
3727 mvmajor, mvminor, mvrelease);
3728 #endif /* HAVE_SMFI_VERSION */
3729 dmarcf_optlist(stdout);
3730 return EX_OK;
3731
3732 default:
3733 return usage();
3734 }
3735 }
3736
3737 if (optind != argc)
3738 return usage();
3739
3740 /* if there's a default config file readable, use it */
3741 if (conffile == NULL && access(DEFCONFFILE, R_OK) == 0)
3742 conffile = DEFCONFFILE;
3743
3744 if (conffile != NULL)
3745 {
3746 u_int line = 0;
3747 char *missing;
3748 char path[MAXPATHLEN + 1];
3749
3750 cfg = config_load(conffile, dmarcf_config,
3751 &line, path, sizeof path);
3752
3753 if (cfg == NULL)
3754 {
3755 fprintf(stderr,
3756 "%s: %s: configuration error at line %u: %s\n",
3757 progname, path, line,
3758 config_error());
3759 dmarcf_config_free(curconf);
3760 return EX_CONFIG;
3761 }
3762
3763 #ifdef DEBUG
3764 (void) config_dump(cfg, stdout, NULL);
3765 #endif /* DEBUG */
3766
3767 missing = config_check(cfg, dmarcf_config);
3768 if (missing != NULL)
3769 {
3770 fprintf(stderr,
3771 "%s: %s: required parameter \"%s\" missing\n",
3772 progname, conffile, missing);
3773 config_free(cfg);
3774 dmarcf_config_free(curconf);
3775 return EX_CONFIG;
3776 }
3777 }
3778
3779 if (dmarcf_config_load(cfg, curconf, err, sizeof err) != 0)
3780 {
3781 if (conffile == NULL)
3782 conffile = "(stdin)";
3783 fprintf(stderr, "%s: %s: %s\n", progname, conffile, err);
3784 config_free(cfg);
3785 dmarcf_config_free(curconf);
3786 return EX_CONFIG;
3787 }
3788
3789 if (configonly)
3790 {
3791 config_free(cfg);
3792 dmarcf_config_free(curconf);
3793 return EX_OK;
3794 }
3795
3796 if (extract)
3797 {
3798 int ret = EX_OK;
3799
3800 if (cfg != NULL)
3801 {
3802 if (!config_validname(dmarcf_config, extract))
3803 ret = EX_DATAERR;
3804 else if (config_dump(cfg, stdout, extract) == 0)
3805 ret = EX_CONFIG;
3806 config_free(cfg);
3807 dmarcf_config_free(curconf);
3808 }
3809 return ret;
3810 }
3811
3812 dolog = curconf->conf_dolog;
3813 curconf->conf_data = cfg;
3814
3815 /*
3816 ** Use values found in the configuration file, if any. Note that
3817 ** these are operational parameters for the filter (e.g which socket
3818 ** to use which userid to become, etc.) and aren't reloaded upon a
3819 ** reload signal. Reloadable values are handled via the
3820 ** dmarcf_config_load() function, which has already been called.
3821 */
3822
3823 if (cfg != NULL)
3824 {
3825 if (!autorestart)
3826 {
3827 (void) config_get(cfg, "AutoRestart", &autorestart,
3828 sizeof autorestart);
3829 }
3830
3831 if (autorestart)
3832 {
3833 char *rate = NULL;
3834
3835 (void) config_get(cfg, "AutoRestartCount",
3836 &maxrestarts, sizeof maxrestarts);
3837
3838 (void) config_get(cfg, "AutoRestartRate", &rate,
3839 sizeof rate);
3840
3841 if (rate != NULL)
3842 {
3843 time_t t;
3844 char *q;
3845
3846 p = strchr(rate, '/');
3847 if (p == NULL)
3848 {
3849 fprintf(stderr,
3850 "%s: AutoRestartRate invalid\n",
3851 progname);
3852 config_free(cfg);
3853 return EX_CONFIG;
3854 }
3855
3856 *p = '\0';
3857 n = strtol(rate, &q, 10);
3858 if (n < 0 || *q != '\0')
3859 {
3860 fprintf(stderr,
3861 "%s: AutoRestartRate invalid\n",
3862 progname);
3863 config_free(cfg);
3864 return EX_CONFIG;
3865 }
3866
3867 t = (time_t) strtoul(p + 1, &q, 10);
3868 switch (*q)
3869 {
3870 case 'd':
3871 case 'D':
3872 t *= 86400;
3873 break;
3874
3875 case 'h':
3876 case 'H':
3877 t *= 3600;
3878 break;
3879
3880 case 'm':
3881 case 'M':
3882 t *= 60;
3883 break;
3884
3885 case '\0':
3886 case 's':
3887 case 'S':
3888 break;
3889
3890 default:
3891 t = 0;
3892 break;
3893 }
3894
3895 if (*q != '\0' && *(q + 1) != '\0')
3896 t = 0;
3897
3898 if (t == 0)
3899 {
3900 fprintf(stderr,
3901 "%s: AutoRestartRate invalid\n",
3902 progname);
3903 config_free(cfg);
3904 return EX_CONFIG;
3905 }
3906
3907 maxrestartrate_n = n;
3908 maxrestartrate_t = t;
3909 }
3910 }
3911
3912 if (dofork)
3913 {
3914 (void) config_get(cfg, "Background", &dofork,
3915 sizeof dofork);
3916 }
3917
3918 (void) config_get(cfg, "MilterDebug", &mdebug, sizeof mdebug);
3919
3920 if (!gotp)
3921 {
3922 (void) config_get(cfg, "Socket", &sock, sizeof sock);
3923 if (sock != NULL)
3924 {
3925 gotp = TRUE;
3926 (void) smfi_setconn(sock);
3927 }
3928 }
3929
3930 if (pidfile == NULL)
3931 {
3932 (void) config_get(cfg, "PidFile", &pidfile,
3933 sizeof pidfile);
3934 }
3935
3936 (void) config_get(cfg, "UMask", &filemask, sizeof filemask);
3937
3938 if (become == NULL)
3939 {
3940 (void) config_get(cfg, "Userid", &become,
3941 sizeof become);
3942 }
3943
3944 (void) config_get(cfg, "ChangeRootDirectory", &chrootdir,
3945 sizeof chrootdir);
3946
3947 (void) config_get(cfg, "IgnoreHosts", &ignorefile,
3948 sizeof ignorefile);
3949 }
3950
3951 if (ignorefile != NULL)
3952 {
3953 if (!dmarcf_loadlist(ignorefile, &ignore))
3954 {
3955 fprintf(stderr,
3956 "%s: can't load ignore list from %s: %s\n",
3957 progname, ignorefile, strerror(errno));
3958 return EX_DATAERR;
3959 }
3960 }
3961 else if (!testmode)
3962 {
3963 dmarcf_addlist("127.0.0.1", &ignore);
3964 }
3965
3966 if (!gotp && !testmode)
3967 {
3968 fprintf(stderr, "%s: milter socket must be specified\n",
3969 progname);
3970 if (argc == 1)
3971 fprintf(stderr, "\t(use \"-?\" for help)\n");
3972 return EX_CONFIG;
3973 }
3974
3975 /* suppress a bunch of things if we're in test mode */
3976 if (testmode)
3977 {
3978 curconf->conf_dolog = FALSE;
3979 autorestart = FALSE;
3980 dofork = FALSE;
3981 become = NULL;
3982 pidfile = NULL;
3983 chrootdir = NULL;
3984 }
3985
3986 dmarcf_setmaxfd();
3987
3988 /* prepare to change user if appropriate */
3989 if (become != NULL)
3990 {
3991 char *colon;
3992
3993 /* see if there was a group specified; if so, validate */
3994 colon = strchr(become, ':');
3995 if (colon != NULL)
3996 {
3997 *colon = '\0';
3998
3999 gr = getgrnam(colon + 1);
4000 if (gr == NULL)
4001 {
4002 char *q;
4003
4004 gid = (gid_t) strtol(colon + 1, &q, 10);
4005 if (*q == '\0')
4006 gr = getgrgid(gid);
4007
4008 if (gr == NULL)
4009 {
4010 if (curconf->conf_dolog)
4011 {
4012 syslog(LOG_ERR,
4013 "no such group or gid '%s'",
4014 colon + 1);
4015 }
4016
4017 fprintf(stderr,
4018 "%s: no such group '%s'\n",
4019 progname, colon + 1);
4020
4021 return EX_DATAERR;
4022 }
4023 }
4024 }
4025
4026 /* validate the user */
4027 pw = getpwnam(become);
4028 if (pw == NULL)
4029 {
4030 char *q;
4031 uid_t uid;
4032
4033 uid = (uid_t) strtoul(become, &q, 10);
4034 if (*q == '\0')
4035 pw = getpwuid(uid);
4036
4037 if (pw == NULL)
4038 {
4039 if (curconf->conf_dolog)
4040 {
4041 syslog(LOG_ERR,
4042 "no such user or uid '%s'",
4043 become);
4044 }
4045
4046 fprintf(stderr, "%s: no such user '%s'\n",
4047 progname, become);
4048
4049 return EX_DATAERR;
4050 }
4051 }
4052
4053 if (gr == NULL)
4054 gid = pw->pw_gid;
4055 else
4056 gid = gr->gr_gid;
4057 }
4058
4059 /* change root if requested */
4060 if (chrootdir != NULL)
4061 {
4062 /* warn if doing so as root without then giving up root */
4063 if (become == NULL && getuid() == 0)
4064 {
4065 if (curconf->conf_dolog)
4066 {
4067 syslog(LOG_WARNING,
4068 "using ChangeRootDirectory without Userid not advised");
4069 }
4070
4071 fprintf(stderr,
4072 "%s: use of ChangeRootDirectory without Userid not advised\n",
4073 progname);
4074 }
4075
4076 /* change to the new root first */
4077 if (chdir(chrootdir) != 0)
4078 {
4079 if (curconf->conf_dolog)
4080 {
4081 syslog(LOG_ERR, "%s: chdir(): %s",
4082 chrootdir, strerror(errno));
4083 }
4084
4085 fprintf(stderr, "%s: %s: chdir(): %s\n", progname,
4086 chrootdir, strerror(errno));
4087 return EX_OSERR;
4088 }
4089
4090 /* now change the root */
4091 if (chroot(chrootdir) != 0)
4092 {
4093 if (curconf->conf_dolog)
4094 {
4095 syslog(LOG_ERR, "%s: chroot(): %s",
4096 chrootdir, strerror(errno));
4097 }
4098
4099 fprintf(stderr, "%s: %s: chroot(): %s\n", progname,
4100 chrootdir, strerror(errno));
4101 return EX_OSERR;
4102 }
4103 }
4104
4105 /* now enact the user change */
4106 if (become != NULL)
4107 {
4108 /* make all the process changes */
4109 if (getuid() != pw->pw_uid)
4110 {
4111 if (initgroups(pw->pw_name, gid) != 0)
4112 {
4113 if (curconf->conf_dolog)
4114 {
4115 syslog(LOG_ERR, "initgroups(): %s",
4116 strerror(errno));
4117 }
4118
4119 fprintf(stderr, "%s: initgroups(): %s\n",
4120 progname, strerror(errno));
4121
4122 return EX_NOPERM;
4123 }
4124 else if (setgid(gid) != 0)
4125 {
4126 if (curconf->conf_dolog)
4127 {
4128 syslog(LOG_ERR, "setgid(): %s",
4129 strerror(errno));
4130 }
4131
4132 fprintf(stderr, "%s: setgid(): %s\n", progname,
4133 strerror(errno));
4134
4135 return EX_NOPERM;
4136 }
4137 else if (setuid(pw->pw_uid) != 0)
4138 {
4139 if (curconf->conf_dolog)
4140 {
4141 syslog(LOG_ERR, "setuid(): %s",
4142 strerror(errno));
4143 }
4144
4145 fprintf(stderr, "%s: setuid(): %s\n", progname,
4146 strerror(errno));
4147
4148 return EX_NOPERM;
4149 }
4150 }
4151
4152 (void) endpwent();
4153 }
4154 else
4155 {
4156 }
4157
4158 if (curconf->conf_enablecores)
4159 {
4160 _Bool enabled = FALSE;
4161
4162 #ifdef __linux__
4163 if (prctl(PR_SET_DUMPABLE, 1) == -1)
4164 {
4165 if (curconf->conf_dolog)
4166 {
4167 syslog(LOG_ERR, "prctl(): %s",
4168 strerror(errno));
4169 }
4170
4171 fprintf(stderr, "%s: prctl(): %s\n",
4172 progname, strerror(errno));
4173 }
4174 else
4175 {
4176 enabled = TRUE;
4177 }
4178 #endif /* __linux__ */
4179
4180 if (!enabled)
4181 {
4182 if (curconf->conf_dolog)
4183 {
4184 syslog(LOG_WARNING,
4185 "can't enable coredumps; continuing");
4186 }
4187
4188 fprintf(stderr,
4189 "%s: can't enable coredumps; continuing\n",
4190 progname);
4191 }
4192 }
4193
4194 die = FALSE;
4195
4196 if (autorestart)
4197 {
4198 _Bool quitloop = FALSE;
4199 int restarts = 0;
4200 int status;
4201 pid_t pid;
4202 pid_t wpid;
4203 struct sigaction sa;
4204
4205 if (dofork)
4206 {
4207 pid = fork();
4208 switch (pid)
4209 {
4210 case -1:
4211 if (curconf->conf_dolog)
4212 {
4213 int saveerrno;
4214
4215 saveerrno = errno;
4216
4217 syslog(LOG_ERR, "fork(): %s",
4218 strerror(errno));
4219
4220 errno = saveerrno;
4221 }
4222
4223 fprintf(stderr, "%s: fork(): %s\n",
4224 progname, strerror(errno));
4225
4226 return EX_OSERR;
4227
4228 case 0:
4229 dmarcf_stdio();
4230 break;
4231
4232 default:
4233 return EX_OK;
4234 }
4235 }
4236
4237 if (pidfile != NULL)
4238 {
4239 f = fopen(pidfile, "w");
4240 if (f != NULL)
4241 {
4242 fprintf(f, "%ld\n", (long) getpid());
4243 (void) fclose(f);
4244 }
4245 else
4246 {
4247 if (curconf->conf_dolog)
4248 {
4249 syslog(LOG_ERR,
4250 "can't write pid to %s: %s",
4251 pidfile, strerror(errno));
4252 }
4253 }
4254 }
4255
4256 sa.sa_handler = dmarcf_sighandler;
4257 sigemptyset(&sa.sa_mask);
4258 sigaddset(&sa.sa_mask, SIGHUP);
4259 sigaddset(&sa.sa_mask, SIGINT);
4260 sigaddset(&sa.sa_mask, SIGTERM);
4261 sigaddset(&sa.sa_mask, SIGUSR1);
4262 sa.sa_flags = 0;
4263
4264 if (sigaction(SIGHUP, &sa, NULL) != 0 ||
4265 sigaction(SIGINT, &sa, NULL) != 0 ||
4266 sigaction(SIGTERM, &sa, NULL) != 0 ||
4267 sigaction(SIGUSR1, &sa, NULL) != 0)
4268 {
4269 if (curconf->conf_dolog)
4270 {
4271 syslog(LOG_ERR, "[parent] sigaction(): %s",
4272 strerror(errno));
4273 }
4274 }
4275
4276 if (maxrestartrate_n > 0)
4277 dmarcf_restart_check(maxrestartrate_n, 0);
4278
4279 while (!quitloop)
4280 {
4281 status = dmarcf_socket_cleanup(sock);
4282 if (status != 0)
4283 {
4284 if (curconf->conf_dolog)
4285 {
4286 syslog(LOG_ERR,
4287 "[parent] socket cleanup failed: %s",
4288 strerror(status));
4289 }
4290 return EX_UNAVAILABLE;
4291 }
4292
4293 pid = fork();
4294 switch (pid)
4295 {
4296 case -1:
4297 if (curconf->conf_dolog)
4298 {
4299 syslog(LOG_ERR, "fork(): %s",
4300 strerror(errno));
4301 }
4302
4303 return EX_OSERR;
4304
4305 case 0:
4306 sa.sa_handler = SIG_DFL;
4307
4308 if (sigaction(SIGHUP, &sa, NULL) != 0 ||
4309 sigaction(SIGINT, &sa, NULL) != 0 ||
4310 sigaction(SIGTERM, &sa, NULL) != 0)
4311 {
4312 if (curconf->conf_dolog)
4313 {
4314 syslog(LOG_ERR,
4315 "[child] sigaction(): %s",
4316 strerror(errno));
4317 }
4318 }
4319
4320 quitloop = TRUE;
4321 break;
4322
4323 default:
4324 for (;;)
4325 {
4326 wpid = wait(&status);
4327
4328 if (wpid == -1 && errno == EINTR)
4329 {
4330 if (die)
4331 {
4332 dmarcf_killchild(pid,
4333 diesig,
4334 curconf->conf_dolog);
4335 while (wpid != pid)
4336 wpid = wait(&status);
4337
4338 if (pidfile != NULL)
4339 (void) unlink(pidfile);
4340
4341 exit(EX_OK);
4342 }
4343 else if (reload)
4344 {
4345 dmarcf_killchild(pid,
4346 SIGUSR1,
4347 curconf->conf_dolog);
4348
4349 reload = FALSE;
4350
4351 continue;
4352 }
4353 }
4354
4355 if (pid != wpid)
4356 continue;
4357
4358 if (wpid != -1 && curconf->conf_dolog)
4359 {
4360 if (WIFSIGNALED(status))
4361 {
4362 syslog(LOG_NOTICE,
4363 "terminated with signal %d, restarting",
4364 WTERMSIG(status));
4365 }
4366 else if (WIFEXITED(status))
4367 {
4368 if (WEXITSTATUS(status) == EX_CONFIG ||
4369 WEXITSTATUS(status) == EX_SOFTWARE)
4370 {
4371 syslog(LOG_NOTICE,
4372 "exited with status %d",
4373 WEXITSTATUS(status));
4374 quitloop = TRUE;
4375 }
4376 else
4377 {
4378 syslog(LOG_NOTICE,
4379 "exited with status %d, restarting",
4380 WEXITSTATUS(status));
4381 }
4382 }
4383 }
4384
4385 if (conffile != NULL)
4386 reload = TRUE;
4387
4388 break;
4389 }
4390 break;
4391 }
4392
4393 if (maxrestarts > 0 && restarts >= maxrestarts)
4394 {
4395 if (curconf->conf_dolog)
4396 {
4397 syslog(LOG_ERR,
4398 "maximum restart count exceeded");
4399 }
4400
4401 return EX_UNAVAILABLE;
4402 }
4403
4404 if (maxrestartrate_n > 0 &&
4405 maxrestartrate_t > 0 &&
4406 !dmarcf_restart_check(0, maxrestartrate_t))
4407 {
4408 if (curconf->conf_dolog)
4409 {
4410 syslog(LOG_ERR,
4411 "maximum restart rate exceeded");
4412 }
4413
4414 return EX_UNAVAILABLE;
4415 }
4416
4417 restarts++;
4418 }
4419 }
4420
4421 if (filemask != -1)
4422 (void) umask((mode_t) filemask);
4423
4424 if (mdebug > 0)
4425 (void) smfi_setdbg(mdebug);
4426
4427 if (!testmode)
4428 {
4429 /* try to clean up the socket */
4430 status = dmarcf_socket_cleanup(sock);
4431 if (status != 0)
4432 {
4433 if (curconf->conf_dolog)
4434 {
4435 syslog(LOG_ERR, "socket cleanup failed: %s",
4436 strerror(status));
4437 }
4438
4439 fprintf(stderr, "%s: socket cleanup failed: %s\n",
4440 progname, strerror(status));
4441
4442 if (!autorestart && pidfile != NULL)
4443 (void) unlink(pidfile);
4444
4445 return EX_UNAVAILABLE;
4446 }
4447
4448 smfilter.xxfi_flags = SMFIF_ADDHDRS|SMFIF_QUARANTINE;
4449 #ifdef SMFIF_SETSYMLIST
4450 smfilter.xxfi_flags |= SMFIF_SETSYMLIST;
4451 #endif /* SMFIF_SETSYMLIST */
4452
4453 /* register with the milter interface */
4454 if (smfi_register(smfilter) == MI_FAILURE)
4455 {
4456 if (curconf->conf_dolog)
4457 syslog(LOG_ERR, "smfi_register() failed");
4458
4459 fprintf(stderr, "%s: smfi_register() failed\n",
4460 progname);
4461
4462 if (!autorestart && pidfile != NULL)
4463 (void) unlink(pidfile);
4464
4465 return EX_UNAVAILABLE;
4466 }
4467
4468 #ifdef HAVE_SMFI_OPENSOCKET
4469 /* try to establish the milter socket */
4470 if (smfi_opensocket(FALSE) == MI_FAILURE)
4471 {
4472 if (curconf->conf_dolog)
4473 syslog(LOG_ERR, "smfi_opensocket() failed");
4474
4475 fprintf(stderr, "%s: smfi_opensocket() failed\n",
4476 progname);
4477
4478 return EX_UNAVAILABLE;
4479 }
4480 #endif /* HAVE_SMFI_OPENSOCKET */
4481 }
4482
4483 if (!autorestart && dofork)
4484 {
4485 pid_t pid;
4486
4487 pid = fork();
4488 switch (pid)
4489 {
4490 case -1:
4491 if (curconf->conf_dolog)
4492 {
4493 int saveerrno;
4494
4495 saveerrno = errno;
4496
4497 syslog(LOG_ERR, "fork(): %s", strerror(errno));
4498
4499 errno = saveerrno;
4500 }
4501
4502 fprintf(stderr, "%s: fork(): %s\n", progname,
4503 strerror(errno));
4504
4505 return EX_OSERR;
4506
4507 case 0:
4508 dmarcf_stdio();
4509 break;
4510
4511 default:
4512 return EX_OK;
4513 }
4514 }
4515
4516 /* write out the pid */
4517 if (!autorestart && pidfile != NULL)
4518 {
4519 f = fopen(pidfile, "w");
4520 if (f != NULL)
4521 {
4522 fprintf(f, "%ld\n", (long) getpid());
4523 (void) fclose(f);
4524 }
4525 else
4526 {
4527 if (curconf->conf_dolog)
4528 {
4529 syslog(LOG_ERR, "can't write pid to %s: %s",
4530 pidfile, strerror(errno));
4531 }
4532 }
4533 }
4534
4535 /*
4536 ** Block SIGUSR1 for use of our reload thread, and SIGHUP, SIGINT
4537 ** and SIGTERM for use of libmilter's signal handling thread.
4538 */
4539
4540 sigemptyset(&sigset);
4541 sigaddset(&sigset, SIGUSR1);
4542 sigaddset(&sigset, SIGHUP);
4543 sigaddset(&sigset, SIGTERM);
4544 sigaddset(&sigset, SIGINT);
4545 status = pthread_sigmask(SIG_BLOCK, &sigset, NULL);
4546 if (status != 0)
4547 {
4548 if (curconf->conf_dolog)
4549 {
4550 syslog(LOG_ERR, "pthread_sigprocmask(): %s",
4551 strerror(status));
4552 }
4553
4554 fprintf(stderr, "%s: pthread_sigprocmask(): %s\n", progname,
4555 strerror(status));
4556
4557 return EX_OSERR;
4558 }
4559
4560 pthread_mutex_init(&conf_lock, NULL);
4561
4562 /* initialize libopendmarc */
4563 (void) memset(&libopendmarc, '\0', sizeof libopendmarc);
4564 if (curconf->conf_pslist != NULL)
4565 {
4566 libopendmarc.tld_type = OPENDMARC_TLD_TYPE_MOZILLA;
4567 strncpy(libopendmarc.tld_source_file, curconf->conf_pslist,
4568 sizeof libopendmarc.tld_source_file - 1);
4569 }
4570
4571 if (opendmarc_policy_library_init(&libopendmarc) != 0)
4572 {
4573 if (curconf->conf_dolog)
4574 {
4575 syslog(LOG_ERR,
4576 "opendmarc_policy_library_init() failed");
4577 }
4578
4579 if (!autorestart && pidfile != NULL)
4580 (void) unlink(pidfile);
4581
4582 return EX_OSERR;
4583 }
4584
4585 /* figure out who I am */
4586 if (pw == NULL)
4587 pw = getpwuid(getuid());
4588 if (pw == NULL)
4589 myname = "postmaster";
4590 else
4591 myname = pw->pw_name;
4592
4593 /* perform test mode */
4594 if (testfile != NULL)
4595 {
4596 status = dmarcf_testfiles(testfile, stricttest, verbose);
4597 return status;
4598 }
4599
4600 if (curconf->conf_dolog)
4601 {
4602 memset(argstr, '\0', sizeof argstr);
4603 end = &argstr[sizeof argstr - 1];
4604 n = sizeof argstr;
4605 for (c = 1, p = argstr; c < argc && p < end; c++)
4606 {
4607 if (strchr(argv[c], ' ') != NULL)
4608 {
4609 status = snprintf(p, n, "%s \"%s\"",
4610 c == 1 ? "args:" : "",
4611 argv[c]);
4612 }
4613 else
4614 {
4615 status = snprintf(p, n, "%s %s",
4616 c == 1 ? "args:" : "",
4617 argv[c]);
4618 }
4619
4620 p += status;
4621 n -= status;
4622 }
4623
4624 syslog(LOG_INFO, "%s v%s starting (%s)", DMARCF_PRODUCT,
4625 VERSION, argstr);
4626
4627 memset(argstr, '\0', sizeof argstr);
4628 strlcpy(argstr, "(none)", sizeof argstr);
4629 n = sizeof argstr;
4630 for (c = 0;
4631 curconf->conf_trustedauthservids != NULL &&
4632 curconf->conf_trustedauthservids[c] != NULL;
4633 c++)
4634 {
4635 if (c == 0)
4636 {
4637 strlcpy(argstr,
4638 curconf->conf_trustedauthservids[c],
4639 n);
4640 }
4641 else
4642 {
4643 strlcat(argstr, ", ", n);
4644 strlcat(argstr,
4645 curconf->conf_trustedauthservids[c],
4646 n);
4647 }
4648 }
4649
4650 syslog(LOG_INFO,
4651 "additional trusted authentication services: %s",
4652 argstr);
4653 }
4654
4655 /* spawn the SIGUSR1 handler */
4656 status = pthread_create(&rt, NULL, dmarcf_reloader, NULL);
4657 if (status != 0)
4658 {
4659 if (curconf->conf_dolog)
4660 {
4661 syslog(LOG_ERR, "pthread_create(): %s",
4662 strerror(status));
4663 }
4664
4665 if (!autorestart && pidfile != NULL)
4666 (void) unlink(pidfile);
4667
4668 return EX_OSERR;
4669 }
4670
4671 /* call the milter mainline */
4672 errno = 0;
4673 status = smfi_main();
4674
4675 /* shut down libopendmarc */
4676 (void) opendmarc_policy_library_shutdown(&libopendmarc);
4677
4678 if (curconf->conf_dolog)
4679 {
4680 syslog(LOG_INFO,
4681 "%s v%s terminating with status %d, errno = %d",
4682 DMARCF_PRODUCT, VERSION, status, errno);
4683 }
4684
4685 /* release memory */
4686 dmarcf_config_free(curconf);
4687 if (ignore != NULL)
4688 dmarcf_freelist(ignore);
4689
4690 /* tell the reloader thread to die */
4691 die = TRUE;
4692 (void) raise(SIGUSR1);
4693
4694 if (!autorestart && pidfile != NULL)
4695 (void) unlink(pidfile);
4696
4697 return status;
4698 }
0 .TH opendmarc.conf 5 "The Trusted Domain Project"
1
2 .SH NAME
3 .B opendmarc.conf
4 \- Configuration file for opendmarc
5
6 .SH LOCATION
7 .I @SYSCONFDIR@/opendmarc.conf
8
9 .SH DESCRIPTION
10 .I opendmarc(8)
11 implements the proposed
12 .B DMARC
13 specification for message authentication, policy enforcement, and reporting.
14 This file is its configuration file.
15
16 Blank lines are ignored. Lines containing a hash ("#") character are
17 truncated at the hash character to allow for comments in the file.
18
19 Other content should be the name of a parameter, followed by white space,
20 followed by the value of that parameter, each on a separate line.
21
22 For parameters that are Boolean in nature, only the first byte of
23 the value is processed. For positive values, the following are accepted:
24 "T", "t", "Y", "y", "1". For negative values, the following are accepted:
25 "F", "f", "N", "n", "0".
26
27 Some, but not all, of these parameters are also available as command
28 line options to
29 .I opendmarc(8).
30 However, new parameters are generally not added as command line options
31 so the complete set of options is available here, and thus use of the
32 configuration file is encouraged. In some future release, the
33 set of available command line options is likely to get trimmed.
34
35 See the
36 .I opendmarc(8)
37 man page for details about how and when the configuration file contents
38 are reloaded.
39
40 Unless otherwise stated, Boolean values default to "false", integer values
41 default to 0, and string and dataset values default to being undefined.
42
43 .SH PARAMETERS
44 .TP
45 .I AuthservID (string)
46 Sets the "authserv-id" to use when generating the Authentication-Results:
47 header field after verifying a message. The default is to use the name of
48 the MTA processing the message. If the string "HOSTNAME" is provided, the
49 name of the host running the filter (as returned by the
50 .I gethostname(3)
51 function) will be used.
52
53 .TP
54 .I AuthservIDWithJobID (Boolean)
55 If "true", requests that the authserv-id portion of the added
56 Authentication-Results: header fields contain the job ID of the message being
57 evaluated.
58
59 .TP
60 .I AutoRestart (Boolean)
61 Automatically re-start on failures. Use with caution; if the filter
62 fails instantly after it starts, this can cause a tight
63 .I fork(2)
64 loop.
65
66 .TP
67 .I AutoRestartCount (integer)
68 Sets the maximum automatic restart count. After this number of
69 automatic restarts, the filter will give up and terminate.
70 A value of 0 implies no limit; this is the default.
71
72 .TP
73 .I AutoRestartRate (string)
74 Sets the maximum automatic restart rate. If the filter begins restarting
75 faster than the rate defined here, it will give up and terminate.
76 This is a string of the form
77 .I n/t[u]
78 where
79 .I n
80 is an integer limiting the count of restarts in the given interval and
81 .I t[u]
82 defines the time interval through which the rate is calculated;
83 .I t
84 is an integer and
85 .I u
86 defines the units thus represented ("s" or "S" for seconds, the default;
87 "m" or "M" for minutes; "h" or "H" for hours; "d" or "D" for days). For
88 example, a value of "10/1h" limits the restarts to 10 in one hour. There
89 is no default, meaning restart rate is not limited.
90
91 .TP
92 .I Background (Boolean)
93 Causes
94 .I opendmarc
95 to fork and exits immediately, leaving the service running in the background.
96 The default is "true".
97
98 .TP
99 .I BaseDirectory (string)
100 If set, instructs the filter to change to the specified directory using
101 .I chdir(2)
102 before doing anything else. This means any files referenced elsewhere
103 in the configuration file can be specified relative to this directory.
104 It's also useful for arranging that any crash dumps will be saved to
105 a specific location.
106
107 .TP
108 .I ChangeRootDirectory (string)
109 Requests that the operating system change the effective root directory
110 of the process to the one specified here prior to beginning execution.
111 .B chroot (2)
112 requires superuser access. A warning will be generated if
113 .I UserID
114 is not also set.
115
116 .TP
117 .I CopyFailuresTo (string)
118 Adds the specified recipient to the message's envelope if it fails the DMARC
119 evaluation.
120
121 .TP
122 .I DNSTimeout (integer)
123 Sets the DNS timeout in seconds. A value of 0 causes an infinite wait.
124 The default is 5. Ignored if not using an asynchronous resolver package.
125
126 .TP
127 .I EnableCoredumps (Boolean)
128 On systems that have such support, make an explicit request to the kernel
129 to dump cores when the filter crashes for some reason. Some modern UNIX
130 systems suppress core dumps during crashes for security reasons if the
131 user ID has changed during the lifetime of the process. Currently only
132 supported on Linux.
133
134 .TP
135 .I FailureReports (Boolean)
136 Enables generation of failure reports when the DMARC test fails and the
137 purported sender of the message has requested such reports. Reports are
138 formatted per RFC6591.
139
140 .TP
141 .I FailureReportsBcc (string)
142 When failure reports are enabled and one is to be generated, always send one
143 to the address(es) specified here. If a failure report is requested by
144 the domain owner, the address(es) are added in a Bcc: field. If no request
145 is made, they address(es) are used in a To: field. There is no default.
146
147 .TP
148 .I FailureReportsOnNone (Boolean)
149 Supplementary to the previous setting, enables generation of failure reports
150 for sending domains that publish a "none" policy.
151
152 .TP
153 .I FailureReportsSentBy (string)
154 Sets the value of the From: field to be used when sending failure reports
155 (see above). The default is to use the userid of the user executing the
156 filter and the local host name to construct an email address.
157
158 .TP
159 .I HistoryFile (string)
160 If set, specifies the location of a text file to which records are written
161 that can be used to generate DMARC aggregate reports. Records are
162 batches of rows containing information about a single received message,
163 and include all relevant information needed to generate a DMARC aggregate
164 report. It is expected that this will not be used in its raw form, but
165 rather periodically imported into a relational database from which the
166 aggregate reports can be extracted.
167
168 .TP
169 .I IgnoreAuthenticatedClients (Boolean)
170 If set, causes mail from authenticated clients (i.e., those that used
171 SMTP AUTH) to be ignored by the filter. The default is "false".
172
173 .TP
174 .I IgnoreHosts (string)
175 Specifies the path to a file that contains a list of hostnames, IP addresses,
176 and/or CIDR expressions identifying hosts whose SMTP connections are to be
177 ignored by the filter. If not specified, defaults to "127.0.0.1" only.
178
179 .TP
180 .I IgnoreMailFrom (string)
181 Gives a list of domain names whose mail (based on the From: domain) is to
182 be ignored by the filter. The list should be comma-separated. Matching
183 against this list is case-insensitive. The default is an empty list, meaning
184 no mail is ignored.
185
186 .TP
187 .I MilterDebug (integer)
188 Sets the debug level to be requested from the milter library. The
189 default is 0.
190
191 .TP
192 .I PidFile (string)
193 Specifies the path to a file that should be created at process start
194 containing the process ID.
195
196 .TP
197 .I PublicSuffixList (string)
198 Specifies the path to a file that contains top-level domains (TLDs) that
199 will be used to compute the Organizational Domain for a given domain name,
200 as described in the DMARC specification. If not provided, the filter will
201 not be able to determine the Organizational Domain and only the presented
202 domain will be evaluated.
203
204 .TP
205 .I RecordAllMessages (Boolean)
206 If set and
207 .I HistoryFile
208 is in use, all received messages are recorded to the history file. If not set
209 (the default), only messages for which the From: domain published a DMARC
210 record will be recorded in the history file.
211
212 .TP
213 .I RejectFailures (Boolean)
214 If set, messages will be rejected if they fail the DMARC evaluation, or
215 temp-failed if evaluation could not be completed. By default, no message will
216 be rejected or temp-failed regardless of the outcome of the DMARC evaluation of
217 the message. Instead, an Authentication-Results header field will be added.
218 The default is "false".
219
220 .TP
221 .I ReportCommand (string)
222 Indicates the shell command to which failure reports should be passed for
223 delivery when
224 .I FailureReports
225 is enabled. Defaults to
226 .I /usr/sbin/sendmail.
227
228 .TP
229 .I RequiredHeaders (Boolean)
230 If set, the filter will ensure the header of the message conforms to the basic
231 header field count restrictions laid out in RFC5322, Section 3.6. Messages
232 failing this test are rejected without further processing. A From:
233 field from which no domain name could be extracted will also be rejected.
234
235 .TP
236 .I Socket (string)
237 Specifies the socket that should be established by the filter to receive
238 connections from
239 .I sendmail(8)
240 in order to provide service.
241 .I socketspec
242 is in one of two forms:
243 .I local:path,
244 which creates a UNIX domain socket at the specified
245 .I path,
246 or
247 .I inet:port[@host]
248 or
249 .I inet6:port[@host]
250 which creates a TCP socket on the specified
251 .I port
252 for the appropriate protocol family. If the
253 .I host
254 is not given as either a hostname or an IP address, the socket will be
255 listening on all interfaces. This option is mandatory either in the
256 configuration file or on the command line. If an IP address is used,
257 it must be enclosed in square brackets.
258
259 .TP
260 .I SoftwareHeader (Boolean)
261 Causes
262 .I opendmarc
263 to add a "DMARC-Filter" header field indicating the presence of this filter in
264 the path of the message from injection to delivery. The product's name,
265 version, and the job ID are included in the header field's contents.
266
267 .TP
268 .I SPFIgnoreResults (Boolean)
269 Causes the filter to ignore any SPF results in the header of the
270 message. This is useful if you want the filter to perfrom SPF checks
271 itself, or because you don't trust the arriving header. The default is "false".
272
273 .TP
274 .I SPFSelfValidate (Boolean)
275 Causes the filter to perform a fallback SPF check itself when
276 it can find no SPF results in the message header. If SPFIgnoreResults
277 is also set, it never looks for SPF results in headers and
278 always performs the SPF check itself when this is set. The default is "false".
279
280 .TP
281 .I Syslog (Boolean)
282 Log via calls to
283 .I syslog(3)
284 any interesting activity.
285
286 .TP
287 .I SyslogFacility (string)
288 Log via calls to
289 .I syslog(3)
290 using the named facility. The facility names are the same as the ones
291 allowed in
292 .I syslog.conf(5).
293 The default is "mail".
294
295 .TP
296 .I TrustedAuthservIDs (string)
297 Provides a list of authserv-ids that are to be used to identify
298 Authentication-Results header fields whose contents are to be assumed as valid
299 input for the DMARC assessment. To provide a list, separate values by commas.
300 If the string "HOSTNAME" is provided, the name of the host running the filter
301 (as returned by the
302 .I gethostname(3)
303 function) will be used. Matching against this list is case-insensitive. The
304 default is to use the value of
305 .I AuthservID.
306
307 .TP
308 .I UMask (integer)
309 Requests a specific permissions mask to be used for file creation.
310 This only really applies to creation of the socket when
311 .I Socket
312 specifies a UNIX domain socket, and to the
313 .I PidFile
314 (if any); temporary files are created by the
315 .I mkstemp(3)
316 function that enforces a specific file mode on creation regardless
317 of the process umask. See
318 .I umask(2)
319 for more information.
320
321 .TP
322 .I UserID (string)
323 Attempts to become the specified userid before starting operations.
324 The value is of the form
325 .I userid[:group].
326 The process will be assigned all of the groups and primary group ID of
327 the named
328 .I userid
329 unless an alternate
330 .I group
331 is specified.
332 .SH FILES
333 .TP
334 .I @SYSCONFDIR@/opendmarc.conf
335 Default location of this file.
336 .SH VERSION
337 This man page covers version @VERSION@ of
338 .I opendmarc.
339
340 .SH COPYRIGHT
341 Copyright (c) 2012-2015, The Trusted Domain Project. All rights reserved.
342 .SH SEE ALSO
343 .I opendmarc(8), sendmail(8)
344 .P
345 RFC4408 \- Sender Policy Framework
346 .P
347 RFC5451 \- Message Header Field for Indicating Message Authentication Status
348 .P
349 RFC5965 \- An Extensible Format for Email Feedback Reports
350 .P
351 RFC6376 \- DomainKeys Identified Mail
352 .P
353 RFC6591 \- Authentication Failure Reporting Using the Abuse Reporting Format
0 ## opendmarc.conf -- configuration file for OpenDMARC filter
1 ##
2 ## Copyright (c) 2012-2015, The Trusted Domain Project. All rights reserved.
3
4 ## DEPRECATED CONFIGURATION OPTIONS
5 ##
6 ## The following configuration options are no longer valid. They should be
7 ## removed from your existing configuration file to prevent potential issues.
8 ## Failure to do so may result in opendmarc being unable to start.
9 ##
10 ## Renamed in 1.3.0:
11 ## ForensicReports became FailureReports
12 ## ForensicReportsBcc became FailureReportsBcc
13 ## ForensicReportsOnNone became FailureReportsOnNone
14 ## ForensicReportsSentBy became FailureReportsSentBy
15
16 ## CONFIGURATION OPTIONS
17
18 ## AuthservID (string)
19 ## defaults to MTA name
20 ##
21 ## Sets the "authserv-id" to use when generating the Authentication-Results:
22 ## header field after verifying a message. If the string "HOSTNAME" is
23 ## provided, the name of the host running the filter (as returned by the
24 ## gethostname(3) function) will be used.
25 #
26 # AuthservID name
27
28 ## AuthservIDWithJobID { true | false }
29 ## default "false"
30 ##
31 ## If "true", requests that the authserv-id portion of the added
32 ## Authentication-Results header fields contain the job ID of the message
33 ## being evaluated.
34 #
35 # AuthservIDWithJobID false
36
37 ## AutoRestart { true | false }
38 ## default "false"
39 ##
40 ## Automatically re-start on failures. Use with caution; if the filter fails
41 ## instantly after it starts, this can cause a tight fork(2) loop.
42 #
43 # AutoRestart false
44
45 ## AutoRestartCount n
46 ## default 0
47 ##
48 ## Sets the maximum automatic restart count. After this number of automatic
49 ## restarts, the filter will give up and terminate. A value of 0 implies no
50 ## limit.
51 #
52 # AutoRestartCount 0
53
54 ## AutoRestartRate n/t[u]
55 ## default (no limit)
56 ##
57 ## Sets the maximum automatic restart rate. If the filter begins restarting
58 ## faster than the rate defined here, it will give up and terminate. This
59 ## is a string of the form n/t[u] where n is an integer limiting the count
60 ## of restarts in the given interval and t[u] defines the time interval
61 ## through which the rate is calculated; t is an integer and u defines the
62 ## units thus represented ("s" or "S" for seconds, the default; "m" or "M"
63 ## for minutes; "h" or "H" for hours; "d" or "D" for days). For example, a
64 ## value of "10/1h" limits the restarts to 10 in one hour. There is no
65 ## default, meaning restart rate is not limited.
66 #
67 # AutoRestartRate n/t[u]
68
69 ## Background { true | false }
70 ## default "true"
71 ##
72 ## Causes opendmarc to fork and exits immediately, leaving the service
73 ## running in the background.
74 #
75 # Background true
76
77 ## BaseDirectory (string)
78 ## default (none)
79 ##
80 ## If set, instructs the filter to change to the specified directory using
81 ## chdir(2) before doing anything else. This means any files referenced
82 ## elsewhere in the configuration file can be specified relative to this
83 ## directory. It's also useful for arranging that any crash dumps will be
84 ## saved to a specific location.
85 #
86 # BaseDirectory /var/run/opendmarc
87
88 ## ChangeRootDirectory (string)
89 ## default (none)
90 ##
91 ## Requests that the operating system change the effective root directory of
92 ## the process to the one specified here prior to beginning execution.
93 ## chroot(2) requires superuser access. A warning will be generated if
94 ## UserID is not also set.
95 #
96 # ChangeRootDirectory /var/chroot/opendmarc
97
98 ## CopyFailuresTo (string)
99 ## default (none)
100 ##
101 ## Requests addition of the specified email address to the envelope of
102 ## any message that fails the DMARC evaluation.
103 #
104 # CopyFailuresTo postmaster@localhost
105
106 ## DNSTimeout (integer)
107 ## default 5
108 ##
109 ## Sets the DNS timeout in seconds. A value of 0 causes an infinite wait.
110 ## (NOT YET IMPLEMENTED)
111 #
112 # DNSTimeout 5
113
114 ## EnableCoredumps { true | false }
115 ## default "false"
116 ##
117 ## On systems that have such support, make an explicit request to the kernel
118 ## to dump cores when the filter crashes for some reason. Some modern UNIX
119 ## systems suppress core dumps during crashes for security reasons if the
120 ## user ID has changed during the lifetime of the process. Currently only
121 ## supported on Linux.
122 #
123 # EnableCoreDumps false
124
125 ## FailureReports { true | false }
126 ## default "false"
127 ##
128 ## Enables generation of failure reports when the DMARC test fails and the
129 ## purported sender of the message has requested such reports. Reports are
130 ## formatted per RFC6591.
131 #
132 # FailureReports false
133
134 ## FailureReportsBcc (string)
135 ## default (none)
136 ##
137 ## When failure reports are enabled and one is to be generated, always
138 ## send one to the address(es) specified here. If a failure report is
139 ## requested by the domain owner, the address(es) are added in a Bcc: field.
140 ## If no request is made, they address(es) are used in a To: field. There
141 ## is no default.
142 #
143 # FailureReportsBcc postmaster@example.coom
144
145 ## FailureReportsOnNone { true | false }
146 ## default "false"
147 ##
148 ## Supplements the "FailureReports" setting by generating reports for
149 ## domains that advertise "none" policies. By default, reports are only
150 ## generated (when enabled) for sending domains advertising a "quarantine"
151 ## or "reject" policy.
152 #
153 # FailureReportsOnNone false
154
155 ## FailureReportsSentBy string
156 ## default "USER@HOSTNAME"
157 ##
158 ## Specifies the email address to use in the From: field of failure
159 ## reports generated by the filter. The default is to use the userid of
160 ## the user running the filter and the local hostname to construct an
161 ## email address. "postmaster" is used in place of the userid if a name
162 ## could not be determined.
163 #
164 # FailureReportsSentBy USER@HOSTNAME
165
166 ## HistoryFile path
167 ## default (none)
168 ##
169 ## If set, specifies the location of a text file to which records are written
170 ## that can be used to generate DMARC aggregate reports. Records are groups
171 ## of rows containing information about a single received message, and
172 ## include all relevant information needed to generate a DMARC aggregate
173 ## report. It is expected that this will not be used in its raw form, but
174 ## rather periodically imported into a relational database from which the
175 ## aggregate reports can be extracted by a tool such as opendmarc-import(8).
176 #
177 # HistoryFile /var/run/opendmarc.dat
178
179 ## IgnoreAuthenticatedClients { true | false }
180 ## default "false"
181 ##
182 ## If set, causes mail from authenticated clients (i.e., those that used
183 ## SMTP AUTH) to be ignored by the filter.
184 #
185 # IgnoreAuthenticatedClients false
186
187 ## IgnoreHosts path
188 ## default (internal)
189 ##
190 ## Specifies the path to a file that contains a list of hostnames, IP
191 ## addresses, and/or CIDR expressions identifying hosts whose SMTP
192 ## connections are to be ignored by the filter. If not specified, defaults
193 ## to "127.0.0.1" only.
194 #
195 # IgnoreHosts /usr/local/etc/opendmarc/ignore.hosts
196
197 ## IgnoreMailFrom domain[,...]
198 ## default (none)
199 ##
200 ## Gives a list of domain names whose mail (based on the From: domain) is to
201 ## be ignored by the filter. The list should be comma-separated. Matching
202 ## against this list is case-insensitive. The default is an empty list,
203 ## meaning no mail is ignored.
204 #
205 # IgnoreMailFrom example.com
206
207 ## MilterDebug (integer)
208 ## default 0
209 ##
210 ## Sets the debug level to be requested from the milter library.
211 #
212 # MilterDebug 0
213
214 ## PidFile path
215 ## default (none)
216 ##
217 ## Specifies the path to a file that should be created at process start
218 ## containing the process ID.
219 #
220 # PidFile /var/run/opendmarc.pid
221
222 ## PublicSuffixList path
223 ## default (none)
224 ##
225 ## Specifies the path to a file that contains top-level domains (TLDs) that
226 ## will be used to compute the Organizational Domain for a given domain name,
227 ## as described in the DMARC specification. If not provided, the filter will
228 ## not be able to determine the Organizational Domain and only the presented
229 ## domain will be evaluated.
230 #
231 # PublicSuffixList path
232
233 ## RecordAllMessages { true | false }
234 ## default "false"
235 ##
236 ## If set and "HistoryFile" is in use, all received messages are recorded
237 ## to the history file. If not set (the default), only messages for which
238 ## the From: domain published a DMARC record will be recorded in the
239 ## history file.
240 #
241 # RecordAllMessages false
242
243 ## RejectFailures { true | false }
244 ## default "false"
245 ##
246 ## If set, messages will be rejected if they fail the DMARC evaluation, or
247 ## temp-failed if evaluation could not be completed. By default, no message
248 ## will be rejected or temp-failed regardless of the outcome of the DMARC
249 ## evaluation of the message. Instead, an Authentication-Results header
250 ## field will be added.
251 #
252 # RejectFailures false
253
254 ## ReportCommand string
255 ## default "/usr/sbin/sendmail -t"
256 ##
257 ## Indicates the shell command to which failure reports should be passed for
258 ## delivery when "FailureReports" is enabled.
259 #
260 # ReportCommand /usr/sbin/sendmail -t
261
262 ## RequiredHeaders { true | false }
263 ## default "false"
264 ##
265 ## If set, the filter will ensure the header of the message conforms to the
266 ## basic header field count restrictions laid out in RFC5322, Section 3.6.
267 ## Messages failing this test are rejected without further processing. A
268 ## From: field from which no domain name could be extracted will also be
269 ## rejected.
270 #
271 # RequiredHeaders false
272
273 ## Socket socketspec
274 ## default (none)
275 ##
276 ## Specifies the socket that should be established by the filter to receive
277 ## connections from sendmail(8) in order to provide service. socketspec is
278 ## in one of two forms: local:path, which creates a UNIX domain socket at
279 ## the specified path, or inet:port[@host] or inet6:port[@host] which creates
280 ## a TCP socket on the specified port for the appropriate protocol family.
281 ## If the host is not given as either a hostname or an IP address, the
282 ## socket will be listening on all interfaces. This option is mandatory
283 ## either in the configuration file or on the command line. If an IP
284 ## address is used, it must be enclosed in square brackets.
285 #
286 # Socket inet:8893@localhost
287
288 ## SoftwareHeader { true | false }
289 ## default "false"
290 ##
291 ## Causes the filter to add a "DMARC-Filter" header field indicating the
292 ## presence of this filter in the path of the message from injection to
293 ## delivery. The product's name, version, and the job ID are included in
294 ## the header field's contents.
295 #
296 # SoftwareHeader false
297
298 ## SPFIgnoreResults { true | false }
299 ## default "false"
300 ##
301 ## Causes the filter to ignore any SPF results in the header of the
302 ## message. This is useful if you want the filter to perfrom SPF checks
303 ## itself, or because you don't trust the arriving header.
304 #
305 # SPFIgnoreResults false
306
307 ## SPFSelfValidate { true | false }
308 ## default false
309 ##
310 ## Enable internal spf checking with --with-spf
311 ## To use libspf2 instead: --with-spf --with-spf2-include=path --with-spf2-lib=path
312 ##
313 ## Causes the filter to perform a fallback SPF check itself when
314 ## it can find no SPF results in the message header. If SPFIgnoreResults
315 ## is also set, it never looks for SPF results in headers and
316 ## always performs the SPF check itself when this is set.
317 #
318 # SPFSelfValidate false
319
320 ## Syslog { true | false }
321 ## default "false"
322 ##
323 ## Log via calls to syslog(3) any interesting activity.
324 #
325 # Syslog false
326
327 ## SyslogFacility facility-name
328 ## default "mail"
329 ##
330 ## Log via calls to syslog(3) using the named facility. The facility names
331 ## are the same as the ones allowed in syslog.conf(5).
332 #
333 # SyslogFacility mail
334
335 ## TrustedAuthservIDs string
336 ## default HOSTNAME
337 ##
338 ## Specifies one or more "authserv-id" values to trust as relaying true
339 ## upstream DKIM and SPF results. The default is to use the name of
340 ## the MTA processing the message. To specify a list, separate each entry
341 ## with a comma. The key word "HOSTNAME" will be replaced by the name of
342 ## the host running the filter as reported by the gethostname(3) function.
343 #
344 # TrustedAuthservIDs HOSTNAME
345
346 ## UMask mask
347 ## default (none)
348 ##
349 ## Requests a specific permissions mask to be used for file creation. This
350 ## only really applies to creation of the socket when Socket specifies a
351 ## UNIX domain socket, and to the HistoryFile and PidFile (if any); temporary
352 ## files are normally created by the mkstemp(3) function that enforces a
353 ## specific file mode on creation regardless of the process umask. See
354 ## umask(2) for more information.
355 #
356 # UMask 077
357
358 ## UserID user[:group]
359 ## default (none)
360 ##
361 ## Attempts to become the specified userid before starting operations.
362 ## The process will be assigned all of the groups and primary group ID of
363 ## the named userid unless an alternate group is specified.
364 #
365 # UserID opendmarc
0 /*
1 ** Copyright (c) 2012, 2013, 2015, The Trusted Domain Project.
2 ** All rights reserved.
3 */
4
5 #ifndef _OPENDMARC_H_
6 #define _OPENDMARC_H_
7
8 #define DMARCF_PRODUCT "OpenDMARC Filter"
9 #define DMARCF_PRODUCTNS "OpenDMARC-Filter"
10
11 #include "build-config.h"
12
13 /* system includes */
14 #include <sys/types.h>
15 #ifdef HAVE_STDBOOL_H
16 # include <stdbool.h>
17 #endif /* HAVE_STDBOOL_H */
18
19 /* libmilter */
20 #include <libmilter/mfapi.h>
21
22 #include "dmarc.h"
23
24 /* make sure we have TRUE and FALSE */
25 #ifndef FALSE
26 # define FALSE 0
27 #endif /* !FALSE */
28 #ifndef TRUE
29 # define TRUE 1
30 #endif /* !TRUE */
31
32 /* defaults, limits, etc. */
33 #define BUFRSZ 2048
34 #define DEFCONFFILE CONFIG_BASE "/opendmarc.conf"
35 #define DEFREPORTCMD "/usr/sbin/sendmail -t -odq"
36 #define JOBIDUNKNOWN "(unknown-jobid)"
37 #define MAXARGV 65536
38 #define MAXHEADER 1024
39 #define TEMPFILE "/var/tmp/dmarcXXXXXX"
40
41 #define AUTHRESULTSHDR "Authentication-Results"
42 #define SWHEADERNAME "DMARC-Filter"
43
44 #define DMARC_TEMPFAIL_SMTP "451"
45 #define DMARC_TEMPFAIL_ESC "4.7.1"
46 #define DMARC_REJECT_SMTP "550"
47 #define DMARC_REJECT_ESC "5.7.1"
48
49 #define DMARC_RESULT_REJECT 0
50 #define DMARC_RESULT_DISCARD 1
51 #define DMARC_RESULT_ACCEPT 2
52 #define DMARC_RESULT_TEMPFAIL 3
53 #define DMARC_RESULT_QUARANTINE 4
54
55 /* prototypes, etc., exported for test.c */
56 extern char *progname;
57
58 extern sfsistat mlfi_connect __P((SMFICTX *, char *, _SOCK_ADDR *));
59 #ifdef WITH_SPF
60 extern sfsistat mlfi_helo __P((SMFICTX *, char *));
61 #endif /* WITH_SPF */
62 extern sfsistat mlfi_envfrom __P((SMFICTX *, char **));
63 extern sfsistat mlfi_header __P((SMFICTX *, char *, char *));
64 extern sfsistat mlfi_eoh __P((SMFICTX *));
65 extern sfsistat mlfi_eom __P((SMFICTX *));
66 extern sfsistat mlfi_abort __P((SMFICTX *));
67 extern sfsistat mlfi_close __P((SMFICTX *));
68
69 #endif /* _OPENDMARC_H_ */
0 /*
1 ** Copyright (c) 2005, 2007, 2008 Sendmail, Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** Copyright (c) 2009, 2010, 2012, The Trusted Domain Project.
5 ** All rights reserved.
6 */
7
8 /* system inludes */
9 #include <sys/types.h>
10 #include <ctype.h>
11 #include <string.h>
12 #include <limits.h>
13 #include <stdio.h>
14
15 /* opendmarc includes */
16 #include "util.h"
17
18 /* types */
19 typedef unsigned long cmap_elem_type;
20
21 /* symbolic names */
22 #define MAILPARSE_OK 0 /* success */
23 #define MAILPARSE_ERR_PUNBALANCED 1 /* unbalanced parentheses */
24 #define MAILPARSE_ERR_QUNBALANCED 2 /* unbalanced quotes */
25 #define MAILPARSE_ERR_SUNBALANCED 3 /* unbalanced sq. brackets */
26
27 /* a bitmap for the "specials" character class */
28 #define CMAP_NBITS (sizeof(cmap_elem_type) * CHAR_BIT)
29 #define CMAP_NELEMS ((1 + UCHAR_MAX) / CMAP_NBITS)
30 #define CMAP_INDEX(i) ((unsigned char)(i) / CMAP_NBITS)
31 #define CMAP_BIT(i) (1L << (unsigned char)(i) % CMAP_NBITS)
32 #define CMAP_TST(ar, c) ((ar)[CMAP_INDEX(c)] & CMAP_BIT(c))
33 #define CMAP_SET(ar, c) ((ar)[CMAP_INDEX(c)] |= CMAP_BIT(c))
34
35 static unsigned char const SPECIALS[] = "<>@,;:\\\"/[]?=";
36
37 #ifdef MAILPARSE_TEST
38 /*
39 ** DMARCF_MAIL_UNESCAPE -- remove escape characters from a string
40 **
41 ** Parameters:
42 ** s -- the string to be unescaped
43 **
44 ** Return value:
45 ** s.
46 */
47
48 static char *
49 dmarcf_mail_unescape(char *s)
50 {
51 char *w;
52 char const *r, *p, *e;
53
54 if (s == NULL)
55 return NULL;
56
57 r = w = s;
58 e = s + strlen(s);
59
60 while ((p = memchr(r, '\\', e - s)) != NULL)
61 {
62 if (p > s)
63 {
64 if (r != w)
65 memmove(w, r, p - r);
66 w += p - r;
67 }
68
69 if (p[1] == '\0')
70 {
71 r = p + 1;
72 }
73 else
74 {
75 *w++ = p[1];
76 r = p + 2;
77 }
78 }
79
80 if (r > w)
81 {
82 if (e > r)
83 {
84 memmove(w, r, e - r);
85 w += e - r;
86 }
87 *w = '\0';
88 }
89
90 return s;
91 }
92 #endif /* MAILPARSE_TEST */
93
94 /*
95 ** DMARCF_MAIL_MATCHING_PAREN -- return the location past matching opposite
96 ** parentheses
97 **
98 ** Parameters:
99 ** s -- start of string to be processed
100 ** e -- end of string to be processed
101 ** open_paren -- open parenthesis character
102 ** close_paren -- close parenthesis character
103 **
104 ** Return value:
105 ** Location of the final close parenthesis character in the string.
106 ** For example, given "xxx((yyyy)zz)aaaa", would return the location
107 ** of the second ")". There may be more beyond that, but at that point
108 ** everything is balanced.
109 */
110
111 static u_char *
112 dmarcf_mail_matching_paren(u_char *s, u_char *e, int open_paren, int close_paren)
113 {
114 int paren = 1;
115
116 for (; s < e; s++)
117 {
118 if (*s == close_paren)
119 {
120 if (--paren == 0)
121 break;
122 }
123 else if (*s == open_paren)
124 {
125 paren++;
126 }
127 else if (*s == '\\')
128 {
129 if (s[1] != '\0')
130 s++;
131 }
132 }
133
134 return s;
135 }
136
137 /*
138 ** DMARCF_FIRST_SPECIAL -- find the first "special" character
139 **
140 ** Parameters:
141 ** p -- input string
142 ** e -- end of input string
143 ** special_out -- pointer to the first special character found
144 **
145 ** Return value:
146 ** 0 on success, or an MAILPARSE_ERR_* on failure.
147 */
148
149 static int
150 dmarcf_mail_first_special(u_char *p, u_char *e, u_char **special_out)
151 {
152 size_t i;
153 cmap_elem_type is_special[CMAP_NELEMS] = { 0 };
154 u_char *at_ptr = NULL;
155
156 /* set up special finder */
157 for (i = 0; SPECIALS[i] != '\0'; i++)
158 CMAP_SET(is_special, SPECIALS[i]);
159
160 for (; p < e && *p != '\0'; p++)
161 {
162 /* skip white space between tokens */
163 while (p < e && (*p == '(' ||
164 (isascii(*p) && isspace(*p))))
165 {
166 if (*p != '(')
167 {
168 p++;
169 }
170 else
171 {
172 p = dmarcf_mail_matching_paren(p + 1, e,
173 '(', ')');
174 if (*p == '\0')
175 return MAILPARSE_ERR_PUNBALANCED;
176 else
177 p++;
178 }
179 }
180
181 if (*p == '\0')
182 break;
183
184 if (*p == '"')
185 {
186 p = dmarcf_mail_matching_paren(p + 1, e, '\0', '"');
187 if (*p == '\0')
188 return MAILPARSE_ERR_QUNBALANCED;
189 }
190 else if (*p == '[')
191 {
192 p = dmarcf_mail_matching_paren(p + 1, e, '\0', ']');
193 if (*p == '\0')
194 return MAILPARSE_ERR_SUNBALANCED;
195 }
196 else if (CMAP_TST(is_special, *p))
197 {
198 if (*p == '<')
199 {
200 *special_out = p;
201 return 0;
202 }
203 else if (*p == ':' || *p == ';' || *p == ',')
204 {
205 if (at_ptr != NULL)
206 *special_out = at_ptr;
207 else
208 *special_out = p;
209 return 0;
210 }
211 else if (*p == '@')
212 {
213 at_ptr = p;
214 }
215 }
216 else
217 {
218 while (*p != '\0' &&
219 !CMAP_TST(is_special, *p) &&
220 (!isascii(*p) ||
221 !isspace((unsigned char) *p)) &&
222 *p != '(')
223 p++;
224 p--;
225 }
226 }
227
228 *special_out = p;
229 return 0;
230 }
231
232 /*
233 ** DMARCF_MAIL_TOKEN -- find the next token
234 **
235 ** Parameters:
236 ** s -- start of input string
237 ** e -- end of input string
238 ** type_out -- type of token (returned)
239 ** start_out -- start of token (returned)
240 ** end_out -- start of token (returned)
241 ** uncommented_whitespace -- set to TRUE if uncommented whitespace is
242 ** discovered (returned)
243 **
244 ** Return value:
245 ** 0 on success, or an MAILPARSE_ERR_* on failure.
246 */
247
248 static int
249 dmarcf_mail_token(u_char *s, u_char *e, int *type_out, u_char **start_out,
250 u_char **end_out, int *uncommented_whitespace)
251 {
252 u_char *p;
253 int err = 0;
254 size_t i;
255 int token_type;
256 cmap_elem_type is_special[CMAP_NELEMS] = { 0 };
257 u_char *token_start, *token_end;
258
259 *start_out = NULL;
260 *end_out = NULL;
261 *type_out = 0;
262
263 err = 0;
264
265 /* set up special finder */
266 for (i = 0; SPECIALS[i] != '\0'; i++)
267 CMAP_SET(is_special, SPECIALS[i]);
268
269 p = s;
270
271 /* skip white space between tokens */
272 while (p < e && (*p == '(' ||
273 (isascii((unsigned char) *p) &&
274 isspace((unsigned char) *p))))
275 {
276 if (*p != '(')
277 {
278 *uncommented_whitespace = 1;
279 p++;
280 }
281 else
282 {
283 p = dmarcf_mail_matching_paren(p + 1, e, '(', ')');
284 if (*p == '\0')
285 return MAILPARSE_ERR_PUNBALANCED;
286 else
287 p++;
288 }
289 }
290
291 if (p >= e || *p == '\0')
292 return 0;
293
294 /* our new token starts here */
295 token_start = p;
296
297 /* fill in the token contents and type */
298 if (*p == '"')
299 {
300 token_end = dmarcf_mail_matching_paren(p + 1, e, '\0', '"');
301 token_type = '"';
302 if (*token_end != '\0')
303 token_end++;
304 else
305 err = MAILPARSE_ERR_QUNBALANCED;
306 }
307 else if (*p == '[')
308 {
309 token_end = p = dmarcf_mail_matching_paren(p + 1, e, '\0', ']');
310 token_type = '[';
311 if (*token_end != '\0')
312 token_end++;
313 else
314 err = MAILPARSE_ERR_SUNBALANCED;
315 }
316 else if (CMAP_TST(is_special, *p))
317 {
318 token_end = p + 1;
319 token_type = *p;
320 }
321 else
322 {
323 while (p < e && *p != '\0' && !CMAP_TST(is_special, *p) &&
324 (!isascii(*p) || !isspace((unsigned char) *p)) &&
325 *p != '(')
326 p++;
327
328 token_end = p;
329 token_type = 'x';
330 }
331
332 *start_out = token_start;
333 *end_out = token_end;
334 *type_out = token_type;
335
336 return err;
337 }
338
339 /*
340 ** DMARCF_MAIL_PARSE -- extract the local-part and hostname from a mail
341 ** header field, e.g. "From:"
342 **
343 ** Parameters:
344 ** line -- input line
345 ** user_out -- pointer to "local-part" (returned)
346 ** domain_out -- pointer to hostname (returned)
347 **
348 ** Return value:
349 ** 0 on success, or an MAILPARSE_ERR_* on failure.
350 **
351 ** Notes:
352 ** Input string is modified.
353 */
354
355 int
356 dmarcf_mail_parse(unsigned char *line, unsigned char **user_out,
357 unsigned char **domain_out)
358 {
359 int type;
360 int ws;
361 int err;
362 u_char *e, *special;
363 u_char *tok_s, *tok_e;
364 u_char *w;
365
366 *user_out = NULL;
367 *domain_out = NULL;
368
369 err = 0;
370 w = line;
371 e = line + strlen((char *) line);
372 ws = 0;
373
374 for (;;)
375 {
376 err = dmarcf_mail_first_special(line, e, &special);
377 if (err != 0)
378 return err;
379
380 /* given the construct we're looking at, do the right thing */
381 switch (*special)
382 {
383 case '<':
384 /* display name <address> */
385 line = special + 1;
386 for (;;)
387 {
388 err = dmarcf_mail_token(line, e, &type, &tok_s,
389 &tok_e, &ws);
390 if (err != 0)
391 return err;
392
393 if (type == '>' || type == '\0')
394 {
395 *w = '\0';
396 return 0;
397 }
398 else if (type == '@')
399 {
400 *w++ = '\0';
401 *domain_out = w;
402 }
403 else if (type == ',' || type == ':')
404 {
405 /* source route punctuation */
406 *user_out = NULL;
407 *domain_out = NULL;
408 }
409 else
410 {
411 if (*user_out == NULL)
412 *user_out = w;
413 memmove(w, tok_s, tok_e - tok_s);
414 w += tok_e - tok_s;
415 }
416 line = tok_e;
417 }
418
419 case ';':
420 case ':':
421 case ',':
422 /* skip a group name or result */
423 line = special + 1;
424 break;
425
426 default:
427 /* (display name) addr(display name)ess */
428 ws = 0;
429 for (;;)
430 {
431 err = dmarcf_mail_token(line, e, &type, &tok_s,
432 &tok_e, &ws);
433 if (err != 0)
434 return err;
435
436 if (type == '\0' || type == ',' || type == ';')
437 {
438 *w = '\0';
439 break;
440 }
441 else if (type == '@')
442 {
443 *w++ = '\0';
444 *domain_out = w;
445 ws = 0;
446 }
447 else
448 {
449
450 if (*user_out == NULL)
451 *user_out = w;
452 else if (type == 'x' && ws == 1)
453 *w++ = ' ';
454
455 memmove(w, tok_s, tok_e - tok_s);
456 w += tok_e - tok_s;
457
458 ws = 0;
459 }
460
461 line = tok_e;
462 }
463 return 0;
464 }
465 }
466 }
467
468 #ifdef MAILPARSE_TEST
469 int
470 main(int argc, char **argv)
471 {
472 int err;
473 char *domain, *user;
474
475 if (argc != 2)
476 {
477 fprintf(stderr, "Usage: %s mailheader\n", argv[0]);
478 exit(64);
479 }
480
481 err = dmarcf_mail_parse(argv[1], &user, &domain);
482
483 if (err)
484 {
485 printf("error %d\n", err);
486 }
487 else
488 {
489 printf("user: '%s'\ndomain: '%s'\n",
490 user ? dmarcf_mail_unescape(user) : "null",
491 domain ? dmarcf_mail_unescape(domain) : "null");
492 }
493
494 return 0;
495 }
496 #endif /* MAILPARSE_TEST */
0 /*
1 ** Copyright (c) 2004 Sendmail, Inc. and its suppliers.
2 ** All rights reserved.
3 **
4 ** Copyright (c) 2009, 2010, 2012, The Trusted Domain Project.
5 ** All rights reserved.
6 */
7
8 #ifndef _DMARCF_MAILPARSE_H_
9 #define _DMARCF_MAILPARSE_H_
10
11 #ifdef __STDC__
12 # ifndef __P
13 # define __P(x) x
14 # endif /* ! __P */
15 #else /* __STDC__ */
16 # ifndef __P
17 # define __P(x) ()
18 # endif /* ! __P */
19 #endif /* __STDC__ */
20
21 /* prototypes */
22 extern int dmarcf_mail_parse __P((unsigned char *, unsigned char **,
23 unsigned char **));
24
25 #endif /* ! _DMARCF_MAILPARSE_H_ */
0 /*
1 ** Copyright (c) 2012, 2014-2016, The Trusted Domain Project.
2 ** All rights reserved.
3 */
4
5 #include "build-config.h"
6
7 /* system includes */
8 #include <sys/param.h>
9 #include <sys/types.h>
10 #include <netinet/in.h>
11 #include <sys/socket.h>
12 #include <arpa/inet.h>
13 #include <string.h>
14 #include <errno.h>
15 #include <stdio.h>
16 #include <sysexits.h>
17 #include <stdlib.h>
18 #include <time.h>
19 #include <assert.h>
20 #include <netdb.h>
21
22 /* libbsd if found */
23 #ifdef USE_BSD_H
24 # include <bsd/string.h>
25 #endif /* USE_BSD_H */
26
27 /* libstrl if needed */
28 #ifdef USE_STRL_H
29 # include <strl.h>
30 #endif /* USE_STRL_H */
31
32 /* opendmarc_strl if needed */
33 #ifdef USE_DMARCSTRL_H
34 # include <opendmarc_strl.h>
35 #endif /* USE_DMARCSTRL_H */
36
37 /* libmilter includes */
38 #include <libmilter/mfapi.h>
39
40 /* opendmarc includes */
41 #include "test.h"
42 #include "opendmarc.h"
43
44 /* local types and definitions*/
45 #define CRLF "\r\n"
46
47 struct test_context
48 {
49 void * tc_priv; /* private data pointer */
50 };
51
52 char *milter_status[] =
53 {
54 "SMFIS_CONTINUE",
55 "SMFIS_REJECT",
56 "SMFIS_DISCARD",
57 "SMFIS_ACCEPT",
58 "SMFIS_TEMPFAIL"
59 };
60
61 #define FCLOSE(x) if ((x) != stdin) \
62 fclose((x));
63 #define MLFI_OUTPUT(x,y) ((y) > 1 || ((y) == 1 && (x) != SMFIS_CONTINUE))
64 #define STRORNULL(x) ((x) == NULL ? "(null)" : (x))
65
66 /* globals */
67 static int tverbose = 0;
68
69 /*
70 ** DMARCF_TEST_ENVCHECK -- get environment variable or use default
71 **
72 ** Parameters:
73 ** evname -- environment variable name
74 ** dflt -- default to apply
75 **
76 ** Return value:
77 ** Value of "evname" if set, otherwise "default".
78 */
79
80 static char *
81 dmarcf_test_envcheck(char *evname, char *dflt)
82 {
83 char *v;
84
85 v = getenv(evname);
86 return (v == NULL ? dflt : v);
87 }
88
89 /*
90 ** DMARCF_TEST_SETPRIV -- store private pointer
91 **
92 ** Parameters:
93 ** ctx -- context pointer
94 ** ptr -- pointer to store
95 **
96 ** Return value:
97 ** MI_SUCCESS
98 */
99
100 int
101 dmarcf_test_setpriv(void *ctx, void *ptr)
102 {
103 struct test_context *tc;
104
105 assert(ctx != NULL);
106
107 tc = ctx;
108 tc->tc_priv = ptr;
109
110 return MI_SUCCESS;
111 }
112
113 /*
114 ** DMARCF_TEST_GETPRIV -- retrieve private pointer
115 **
116 ** Parameters:
117 ** ctx -- context pointer
118 **
119 ** Return value:
120 ** The private pointer.
121 */
122
123 void *
124 dmarcf_test_getpriv(void *ctx)
125 {
126 struct test_context *tc;
127
128 assert(ctx != NULL);
129
130 tc = ctx;
131
132 return tc->tc_priv;
133 }
134
135 /*
136 ** DMARCF_TEST_PROGRESS -- send progress message
137 **
138 ** Parameters:
139 ** ctx -- context pointer
140 **
141 ** Return value:
142 ** MI_SUCCESS
143 */
144
145 int
146 dmarcf_test_progress(void *ctx)
147 {
148 assert(ctx != NULL);
149
150 if (tverbose > 1)
151 fprintf(stdout, "### PROGRESS\n");
152
153 return MI_SUCCESS;
154 }
155
156 /*
157 ** DMARCF_TEST_SETREPLY -- set reply to use
158 **
159 ** Parameters:
160 ** ctx -- context pointer
161 ** rcode -- SMTP reply code
162 ** xcode -- SMTP enhanced reply code
163 ** replytxt -- SMTP reply text
164 **
165 ** Return value:
166 ** MI_SUCCESS
167 */
168
169 int
170 dmarcf_test_setreply(void *ctx, char *rcode, char *xcode, char *replytxt)
171 {
172 assert(ctx != NULL);
173
174 if (tverbose > 1)
175 {
176 fprintf(stdout,
177 "### SETREPLY: rcode='%s' xcode='%s' replytxt='%s'\n",
178 STRORNULL(rcode), STRORNULL(xcode),
179 STRORNULL(replytxt));
180 }
181
182 return MI_SUCCESS;
183 }
184
185 /*
186 ** DMARCF_TEST_INSHEADER -- insert a header
187 **
188 ** Parameters:
189 ** ctx -- context pointer
190 ** idx -- insertion index
191 ** hname -- header name
192 ** hvalue -- header value
193 **
194 ** Return value:
195 ** MI_SUCCESS
196 */
197
198 int
199 dmarcf_test_insheader(void *ctx, int idx, char *hname, char *hvalue)
200 {
201 assert(ctx != NULL);
202
203 if (tverbose > 1)
204 {
205 fprintf(stdout,
206 "### INSHEADER: idx=%d hname='%s' hvalue='%s'\n",
207 idx, STRORNULL(hname), STRORNULL(hvalue));
208 }
209
210 return MI_SUCCESS;
211 }
212
213 /*
214 ** DMARCF_TEST_CHGHEADER -- change a header
215 **
216 ** Parameters:
217 ** ctx -- context pointer
218 ** hname -- header name
219 ** idx -- header index
220 ** hvalue -- header value
221 **
222 ** Return value:
223 ** MI_SUCCESS
224 */
225
226 int
227 dmarcf_test_chgheader(void *ctx, char *hname, int idx, char *hvalue)
228 {
229 assert(ctx != NULL);
230
231 if (tverbose > 1)
232 {
233 fprintf(stdout,
234 "### CHGHEADER: hname='%s' idx=%d hvalue='%s'\n",
235 STRORNULL(hname), idx, STRORNULL(hvalue));
236 }
237
238 return MI_SUCCESS;
239 }
240
241 /*
242 ** DMARCF_TEST_QUARANTINE -- request message quarantine
243 **
244 ** Parameters:
245 ** ctx -- context pointer
246 ** reason -- reason string
247 **
248 ** Return value:
249 ** MI_SUCCESS
250 */
251
252 int
253 dmarcf_test_quarantine(void *ctx, char *reason)
254 {
255 assert(ctx != NULL);
256
257 if (tverbose > 1)
258 {
259 fprintf(stdout,
260 "### QUARANTINE: reason='%s'\n", STRORNULL(reason));
261 }
262
263 return MI_SUCCESS;
264 }
265
266 /*
267 ** DMARCF_TEST_ADDHEADER -- append a header
268 **
269 ** Parameters:
270 ** ctx -- context pointer
271 ** hname -- header name
272 ** hvalue -- header value
273 **
274 ** Return value:
275 ** MI_SUCCESS
276 */
277
278 int
279 dmarcf_test_addheader(void *ctx, char *hname, char *hvalue)
280 {
281 assert(ctx != NULL);
282
283 if (tverbose > 1)
284 {
285 fprintf(stdout,
286 "### ADDHEADER: hname='%s' hvalue='%s'\n",
287 STRORNULL(hname), STRORNULL(hvalue));
288 }
289
290 return MI_SUCCESS;
291 }
292
293 /*
294 ** DMARCF_TEST_DELRCPT -- request recipient delete
295 **
296 ** Parameters:
297 ** ctx -- context pointer
298 ** addr -- address
299 **
300 ** Return value:
301 ** MI_SUCCESS
302 */
303
304 int
305 dmarcf_test_delrcpt(void *ctx, char *addr)
306 {
307 assert(ctx != NULL);
308 assert(addr != NULL);
309
310 if (tverbose > 1)
311 fprintf(stdout, "### DELRCPT: '%s'\n", addr);
312
313 return MI_SUCCESS;
314 }
315
316 /*
317 ** DMARCF_TEST_ADDRCPT -- request recipient add
318 **
319 ** Parameters:
320 ** ctx -- context pointer
321 ** addr -- address
322 **
323 ** Return value:
324 ** MI_SUCCESS
325 */
326
327 int
328 dmarcf_test_addrcpt(void *ctx, char *addr)
329 {
330 assert(ctx != NULL);
331 assert(addr != NULL);
332
333 if (tverbose > 1)
334 fprintf(stdout, "### ADDRCPT: '%s'\n", addr);
335
336 return MI_SUCCESS;
337 }
338
339 /*
340 ** DMARCF_TEST_GETSYMVAL -- retrieve a symbol value
341 **
342 ** Parameters:
343 ** ctx -- context pointer
344 ** sym -- symbol name
345 **
346 ** Return value:
347 ** Pointer to (static) string name.
348 **
349 ** Note:
350 ** This isn't thread-safe, but test mode is single-threaded anyway.
351 ** This is also a memory leak, but it's a short-lived test program
352 ** anyway.
353 */
354
355 char *
356 dmarcf_test_getsymval(void *ctx, char *sym)
357 {
358 static char symout[BUFRSZ];
359
360 assert(ctx != NULL);
361 assert(sym != NULL);
362
363 snprintf(symout, sizeof symout, "DEBUG-%s", sym);
364
365 return strdup(symout);
366 }
367
368 /*
369 ** DMARCF_TESTFILE -- read a message and test it
370 **
371 ** Parameters:
372 ** tctx -- test context handle
373 ** file -- input file path
374 ** strict -- strict CRLF mode?
375 ** verbose -- verbose level
376 **
377 ** Return value:
378 ** An EX_* constant (see sysexits.h)
379 */
380
381 static int
382 dmarcf_testfile(struct test_context *tctx, FILE *f, char *file,
383 _Bool strict, int tverbose)
384 {
385 bool inheaders = TRUE;
386 int lineno = 0;
387 int hslineno = 0;
388 int c;
389 char *p;
390 sfsistat ms;
391 char buf[BUFRSZ];
392 char line[BUFRSZ];
393 char *envfrom[2];
394
395 assert(tctx != NULL);
396 assert(f != NULL);
397
398 memset(buf, '\0', sizeof buf);
399 memset(line, '\0', sizeof buf);
400
401 envfrom[0] = dmarcf_test_envcheck("OPENDMARC_TEST_ENVFROM",
402 "<sender@example.org>");
403 envfrom[1] = NULL;
404
405 ms = mlfi_envfrom((SMFICTX *) tctx, envfrom);
406 if (MLFI_OUTPUT(ms, tverbose))
407 {
408 fprintf(stderr, "%s: %s: mlfi_envfrom() returned %s\n",
409 progname, file, milter_status[ms]);
410 }
411 if (ms != SMFIS_CONTINUE)
412 return EX_SOFTWARE;
413
414 while (!feof(f))
415 {
416 if (fgets(line, sizeof line, f) == NULL)
417 break;
418
419 lineno++;
420
421 c = '\0';
422 for (p = line; *p != '\0'; p++)
423 {
424 if (*p == '\n')
425 {
426 *p = '\0';
427 break;
428 }
429
430 c = *p;
431 }
432
433 if (c != '\r')
434 {
435 if (strict) /* error */
436 {
437 fprintf(stderr,
438 "%s: %s: line %d: not CRLF-terminated\n",
439 progname, file, lineno);
440 return EX_DATAERR;
441 }
442 }
443 else if (p != line) /* eat the CR */
444 {
445 *(p - 1) = '\0';
446 }
447
448 if (inheaders)
449 {
450 if (line[0] == '\0')
451 {
452 if (buf[0] != '\0')
453 {
454 char *colon;
455
456 colon = strchr(buf, ':');
457 if (colon == NULL)
458 {
459 fprintf(stderr,
460 "%s: %s: line %d: header malformed\n",
461 progname, file,
462 lineno);
463 return EX_DATAERR;
464 }
465
466 *colon = '\0';
467 if (*(colon + 1) == ' ')
468 colon++;
469
470 ms = mlfi_header((SMFICTX *) tctx, buf,
471 colon + 1);
472 if (MLFI_OUTPUT(ms, tverbose))
473 {
474 fprintf(stderr,
475 "%s: %s: line %d: mlfi_header() returned %s\n",
476 progname, file,
477 hslineno,
478 milter_status[ms]);
479 }
480
481 if (ms != SMFIS_CONTINUE)
482 return EX_SOFTWARE;
483 }
484
485 inheaders = FALSE;
486 memset(buf, '\0', sizeof buf);
487 memset(line, '\0', sizeof buf);
488
489 continue;
490 }
491
492 if (line[0] == ' ' || line[0] == '\t')
493 {
494 (void) strlcat(buf, CRLF, sizeof buf);
495
496 if (strlcat(buf, line,
497 sizeof buf) >= sizeof buf)
498 {
499 fprintf(stderr,
500 "%s: %s: line %d: header '%*s...' too large\n",
501 progname, file, lineno,
502 20, buf);
503 return EX_DATAERR;
504 }
505 }
506 else
507 {
508 if (buf[0] != '\0')
509 {
510 char *colon;
511
512 colon = strchr(buf, ':');
513 if (colon == NULL)
514 {
515 fprintf(stderr,
516 "%s: %s: line %d: header malformed\n",
517 progname, file,
518 lineno);
519 return EX_DATAERR;
520 }
521
522 *colon = '\0';
523 if (*(colon + 1) == ' ')
524 colon++;
525
526 ms = mlfi_header((SMFICTX *) tctx, buf,
527 colon + 1);
528 if (MLFI_OUTPUT(ms, tverbose))
529 {
530 fprintf(stderr,
531 "%s: %s: line %d: mlfi_header() returned %s\n",
532 progname, file,
533 hslineno,
534 milter_status[ms]);
535 }
536 if (ms != SMFIS_CONTINUE)
537 return EX_SOFTWARE;
538 hslineno = 0;
539 }
540
541 if (hslineno == 0)
542 hslineno = lineno;
543
544 strlcpy(buf, line, sizeof buf);
545 }
546 }
547 }
548
549 /* unprocessed partial header? */
550 if (inheaders && buf[0] != '\0')
551 {
552 char *colon;
553
554 colon = strchr(buf, ':');
555 if (colon == NULL)
556 {
557 fprintf(stderr,
558 "%s: %s: line %d: header malformed\n",
559 progname, file, lineno);
560 return EX_DATAERR;
561 }
562
563 *colon = '\0';
564 if (*(colon + 1) == ' ')
565 colon++;
566
567 ms = mlfi_header((SMFICTX *) tctx, buf, colon + 1);
568 if (MLFI_OUTPUT(ms, tverbose))
569 {
570 fprintf(stderr,
571 "%s: %s: line %d: mlfi_header() returned %s\n",
572 progname, file, lineno, milter_status[ms]);
573 }
574 if (ms != SMFIS_CONTINUE)
575 return EX_SOFTWARE;
576
577 inheaders = FALSE;
578 memset(buf, '\0', sizeof buf);
579 }
580
581 /* no headers found */
582 if (inheaders)
583 {
584 fprintf(stderr, "%s: %s: warning: no headers on input\n",
585 progname, file);
586 }
587
588 ms = mlfi_eom((SMFICTX *) tctx);
589 if (MLFI_OUTPUT(ms, tverbose))
590 {
591 fprintf(stderr, "%s: %s: mlfi_eom() returned %s\n",
592 progname, file, milter_status[ms]);
593 }
594
595 return EX_OK;
596 }
597
598 /*
599 ** DMARCF_TESTFILES -- test one or more input messages
600 **
601 ** Parameters:
602 ** flist -- input file list
603 ** strict -- strict CRLF mode?
604 ** verbose -- verbose level
605 **
606 ** Return value:
607 ** An EX_* constant (see sysexits.h)
608 */
609
610 int
611 dmarcf_testfiles(char *flist, bool strict, int verbose)
612 {
613 char *file;
614 char *ctx;
615 char *addr;
616 FILE *f;
617 int status;
618 int retval;
619 sfsistat ms;
620 struct test_context *tctx;
621 struct sockaddr_in sin;
622 struct addrinfo *ain;
623
624 assert(flist != NULL);
625
626 tverbose = verbose;
627
628 /* set up a fake SMFICTX */
629 tctx = (struct test_context *) malloc(sizeof(struct test_context));
630 if (tctx == NULL)
631 {
632 fprintf(stderr, "%s: malloc(): %s\n", progname,
633 strerror(errno));
634 return EX_OSERR;
635 }
636 tctx->tc_priv = NULL;
637
638 (void) memset(&sin, '\0', sizeof sin);
639
640 addr = dmarcf_test_envcheck("OPENDMARC_TEST_CLIENTIP", NULL);
641
642 if (addr == NULL)
643 {
644 retval = getaddrinfo("127.0.0.1", NULL, NULL, &ain);
645 }
646 else
647 {
648 retval = getaddrinfo(addr, NULL, NULL, &ain);
649 }
650
651 if (retval != 0)
652 {
653 fprintf(stderr, "%s: getaddrinfo: %s\n", progname,
654 gai_strerror(retval));
655 return EX_NOHOST;
656 }
657
658 ms = mlfi_connect((SMFICTX *) tctx,
659 dmarcf_test_envcheck("OPENDMARC_TEST_CLIENTHOST",
660 "localhost"),
661 ain->ai_addr);
662 if (MLFI_OUTPUT(ms, tverbose))
663 {
664 fprintf(stderr, "%s: mlfi_connect() returned %s\n",
665 progname, milter_status[ms]);
666 }
667 if (ms != SMFIS_CONTINUE)
668 return EX_SOFTWARE;
669
670 #ifdef WITH_SPF
671 ms = mlfi_helo((SMFICTX *) tctx,
672 dmarcf_test_envcheck("OPENDMARC_TEST_HELOHOST",
673 "localhost"));
674 if (MLFI_OUTPUT(ms, tverbose))
675 {
676 fprintf(stderr, "%s: mlfi_helo() returned %s\n",
677 progname, milter_status[ms]);
678 }
679 if (ms != SMFIS_CONTINUE)
680 return EX_SOFTWARE;
681 #endif /* WITH_SPF */
682
683 /* loop through inputs */
684 for (file = strtok_r(flist, ",", &ctx);
685 file != NULL;
686 file = strtok_r(NULL, ",", &ctx))
687 {
688 /* open the input */
689 if (strcmp(file, "-") == 0)
690 {
691 f = stdin;
692 file = "(stdin)";
693 }
694 else
695 {
696 f = fopen(file, "r");
697 if (f == NULL)
698 {
699 fprintf(stderr, "%s: %s: fopen(): %s\n",
700 progname, file, strerror(errno));
701 return EX_UNAVAILABLE;
702 }
703 }
704
705 status = dmarcf_testfile(tctx, f, file, strict, tverbose);
706
707 FCLOSE(f);
708
709 if (status != EX_OK)
710 return status;
711 }
712
713 ms = mlfi_close((SMFICTX *) tctx);
714 if (MLFI_OUTPUT(ms, tverbose))
715 {
716 fprintf(stderr, "%s: mlfi_close() returned %s\n",
717 progname, milter_status[ms]);
718 }
719
720 return EX_OK;
721 }
0 /*
1 ** Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
2 */
3
4 #ifndef _TEST_H_
5 #define _TEST_H_
6
7 /* system includes */
8 #include <sys/param.h>
9 #include <sys/types.h>
10
11 /* libmilter includes */
12 #include <libmilter/mfapi.h>
13
14 /* libopendmarc includes */
15 #include "dmarc.h"
16
17 /* PROTOTYPES */
18 extern int dmarcf_testfiles __P((char *, bool, int));
19
20 extern int dmarcf_test_addheader __P((void *, char *, char *));
21 extern int dmarcf_test_addrcpt __P((void *, char *));
22 extern int dmarcf_test_chgheader __P((void *, char *, int, char *));
23 extern int dmarcf_test_delrcpt __P((void *, char *));
24 extern void *dmarcf_test_getpriv __P((void *));
25 extern char *dmarcf_test_getsymval __P((void *, char *));
26 extern int dmarcf_test_insheader __P((void *, int, char *, char *));
27 extern int dmarcf_test_progress __P((void *));
28 extern int dmarcf_test_quarantine __P((void *, char *));
29 extern int dmarcf_test_setpriv __P((void *, void *));
30 extern int dmarcf_test_setreply __P((void *, char *, char *, char *));
31
32 #endif /* _TEST_H_ */
0 # $Id: Makefile.am,v 1.30 2010/09/13 05:32:21 cm-msk Exp $
1
2 check_SCRIPTS =
3
4 if LIVE_TESTS
5 check_SCRIPTS += t-verify-nodata t-verify-nodata-reject t-verify-unspec
6 endif
7
8 TESTS = $(check_SCRIPTS)
9
10 EXTRA_DIST = \
11 t-verify-nodata t-verify-nodata.conf t-verify-nodata.lua \
12 t-verify-nodata-reject t-verify-nodata-reject.conf \
13 t-verify-nodata-reject.lua \
14 t-verify-unspec t-verify-unspec.conf t-verify-unspec.lua
15
16 MOSTLYCLEANFILES=
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # $Id: Makefile.am,v 1.30 2010/09/13 05:32:21 cm-msk Exp $
17 VPATH = @srcdir@
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
19 am__make_running_with_option = \
20 case $${target_option-} in \
21 ?) ;; \
22 *) echo "am__make_running_with_option: internal error: invalid" \
23 "target option '$${target_option-}' specified" >&2; \
24 exit 1;; \
25 esac; \
26 has_opt=no; \
27 sane_makeflags=$$MAKEFLAGS; \
28 if $(am__is_gnu_make); then \
29 sane_makeflags=$$MFLAGS; \
30 else \
31 case $$MAKEFLAGS in \
32 *\\[\ \ ]*) \
33 bs=\\; \
34 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
35 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
36 esac; \
37 fi; \
38 skip_next=no; \
39 strip_trailopt () \
40 { \
41 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
42 }; \
43 for flg in $$sane_makeflags; do \
44 test $$skip_next = yes && { skip_next=no; continue; }; \
45 case $$flg in \
46 *=*|--*) continue;; \
47 -*I) strip_trailopt 'I'; skip_next=yes;; \
48 -*I?*) strip_trailopt 'I';; \
49 -*O) strip_trailopt 'O'; skip_next=yes;; \
50 -*O?*) strip_trailopt 'O';; \
51 -*l) strip_trailopt 'l'; skip_next=yes;; \
52 -*l?*) strip_trailopt 'l';; \
53 -[dEDm]) skip_next=yes;; \
54 -[JT]) skip_next=yes;; \
55 esac; \
56 case $$flg in \
57 *$$target_option*) has_opt=yes; break;; \
58 esac; \
59 done; \
60 test $$has_opt = yes
61 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
62 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
63 pkgdatadir = $(datadir)/@PACKAGE@
64 pkgincludedir = $(includedir)/@PACKAGE@
65 pkglibdir = $(libdir)/@PACKAGE@
66 pkglibexecdir = $(libexecdir)/@PACKAGE@
67 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
68 install_sh_DATA = $(install_sh) -c -m 644
69 install_sh_PROGRAM = $(install_sh) -c
70 install_sh_SCRIPT = $(install_sh) -c
71 INSTALL_HEADER = $(INSTALL_DATA)
72 transform = $(program_transform_name)
73 NORMAL_INSTALL = :
74 PRE_INSTALL = :
75 POST_INSTALL = :
76 NORMAL_UNINSTALL = :
77 PRE_UNINSTALL = :
78 POST_UNINSTALL = :
79 build_triplet = @build@
80 host_triplet = @host@
81 @LIVE_TESTS_TRUE@am__append_1 = t-verify-nodata t-verify-nodata-reject t-verify-unspec
82 subdir = opendmarc/tests
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(top_srcdir)/build-aux/test-driver
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
87 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
88 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
89 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = $(top_builddir)/build-config.h
94 CONFIG_CLEAN_FILES =
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 am__can_run_installinfo = \
111 case $$AM_UPDATE_INFO_DIR in \
112 n|no|NO) false;; \
113 *) (install-info --version) >/dev/null 2>&1;; \
114 esac
115 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
116 am__tty_colors_dummy = \
117 mgn= red= grn= lgn= blu= brg= std=; \
118 am__color_tests=no
119 am__tty_colors = { \
120 $(am__tty_colors_dummy); \
121 if test "X$(AM_COLOR_TESTS)" = Xno; then \
122 am__color_tests=no; \
123 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
124 am__color_tests=yes; \
125 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
126 am__color_tests=yes; \
127 fi; \
128 if test $$am__color_tests = yes; then \
129 red=''; \
130 grn=''; \
131 lgn=''; \
132 blu=''; \
133 mgn=''; \
134 brg=''; \
135 std=''; \
136 fi; \
137 }
138 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
139 am__vpath_adj = case $$p in \
140 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
141 *) f=$$p;; \
142 esac;
143 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
144 am__install_max = 40
145 am__nobase_strip_setup = \
146 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
147 am__nobase_strip = \
148 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
149 am__nobase_list = $(am__nobase_strip_setup); \
150 for p in $$list; do echo "$$p $$p"; done | \
151 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
152 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
153 if (++n[$$2] == $(am__install_max)) \
154 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
155 END { for (dir in files) print dir, files[dir] }'
156 am__base_list = \
157 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
158 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
159 am__uninstall_files_from_dir = { \
160 test -z "$$files" \
161 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
162 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
163 $(am__cd) "$$dir" && rm -f $$files; }; \
164 }
165 am__recheck_rx = ^[ ]*:recheck:[ ]*
166 am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
167 am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
168 # A command that, given a newline-separated list of test names on the
169 # standard input, print the name of the tests that are to be re-run
170 # upon "make recheck".
171 am__list_recheck_tests = $(AWK) '{ \
172 recheck = 1; \
173 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
174 { \
175 if (rc < 0) \
176 { \
177 if ((getline line2 < ($$0 ".log")) < 0) \
178 recheck = 0; \
179 break; \
180 } \
181 else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
182 { \
183 recheck = 0; \
184 break; \
185 } \
186 else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
187 { \
188 break; \
189 } \
190 }; \
191 if (recheck) \
192 print $$0; \
193 close ($$0 ".trs"); \
194 close ($$0 ".log"); \
195 }'
196 # A command that, given a newline-separated list of test names on the
197 # standard input, create the global log from their .trs and .log files.
198 am__create_global_log = $(AWK) ' \
199 function fatal(msg) \
200 { \
201 print "fatal: making $@: " msg | "cat >&2"; \
202 exit 1; \
203 } \
204 function rst_section(header) \
205 { \
206 print header; \
207 len = length(header); \
208 for (i = 1; i <= len; i = i + 1) \
209 printf "="; \
210 printf "\n\n"; \
211 } \
212 { \
213 copy_in_global_log = 1; \
214 global_test_result = "RUN"; \
215 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
216 { \
217 if (rc < 0) \
218 fatal("failed to read from " $$0 ".trs"); \
219 if (line ~ /$(am__global_test_result_rx)/) \
220 { \
221 sub("$(am__global_test_result_rx)", "", line); \
222 sub("[ ]*$$", "", line); \
223 global_test_result = line; \
224 } \
225 else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
226 copy_in_global_log = 0; \
227 }; \
228 if (copy_in_global_log) \
229 { \
230 rst_section(global_test_result ": " $$0); \
231 while ((rc = (getline line < ($$0 ".log"))) != 0) \
232 { \
233 if (rc < 0) \
234 fatal("failed to read from " $$0 ".log"); \
235 print line; \
236 }; \
237 printf "\n"; \
238 }; \
239 close ($$0 ".trs"); \
240 close ($$0 ".log"); \
241 }'
242 # Restructured Text title.
243 am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
244 # Solaris 10 'make', and several other traditional 'make' implementations,
245 # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
246 # by disabling -e (using the XSI extension "set +e") if it's set.
247 am__sh_e_setup = case $$- in *e*) set +e;; esac
248 # Default flags passed to test drivers.
249 am__common_driver_flags = \
250 --color-tests "$$am__color_tests" \
251 --enable-hard-errors "$$am__enable_hard_errors" \
252 --expect-failure "$$am__expect_failure"
253 # To be inserted before the command running the test. Creates the
254 # directory for the log if needed. Stores in $dir the directory
255 # containing $f, in $tst the test, in $log the log. Executes the
256 # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
257 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that
258 # will run the test scripts (or their associated LOG_COMPILER, if
259 # thy have one).
260 am__check_pre = \
261 $(am__sh_e_setup); \
262 $(am__vpath_adj_setup) $(am__vpath_adj) \
263 $(am__tty_colors); \
264 srcdir=$(srcdir); export srcdir; \
265 case "$@" in \
266 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
267 *) am__odir=.;; \
268 esac; \
269 test "x$$am__odir" = x"." || test -d "$$am__odir" \
270 || $(MKDIR_P) "$$am__odir" || exit $$?; \
271 if test -f "./$$f"; then dir=./; \
272 elif test -f "$$f"; then dir=; \
273 else dir="$(srcdir)/"; fi; \
274 tst=$$dir$$f; log='$@'; \
275 if test -n '$(DISABLE_HARD_ERRORS)'; then \
276 am__enable_hard_errors=no; \
277 else \
278 am__enable_hard_errors=yes; \
279 fi; \
280 case " $(XFAIL_TESTS) " in \
281 *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
282 am__expect_failure=yes;; \
283 *) \
284 am__expect_failure=no;; \
285 esac; \
286 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
287 # A shell command to get the names of the tests scripts with any registered
288 # extension removed (i.e., equivalently, the names of the test logs, with
289 # the '.log' extension removed). The result is saved in the shell variable
290 # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
291 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
292 # since that might cause problem with VPATH rewrites for suffix-less tests.
293 # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
294 am__set_TESTS_bases = \
295 bases='$(TEST_LOGS)'; \
296 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
297 bases=`echo $$bases`
298 RECHECK_LOGS = $(TEST_LOGS)
299 AM_RECURSIVE_TARGETS = check recheck
300 TEST_SUITE_LOG = test-suite.log
301 TEST_EXTENSIONS = @EXEEXT@ .test
302 LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
303 LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
304 am__set_b = \
305 case '$@' in \
306 */*) \
307 case '$*' in \
308 */*) b='$*';; \
309 *) b=`echo '$@' | sed 's/\.log$$//'`; \
310 esac;; \
311 *) \
312 b='$*';; \
313 esac
314 am__test_logs1 = $(TESTS:=.log)
315 am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
316 TEST_LOGS = $(am__test_logs2:.test.log=.log)
317 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
318 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
319 $(TEST_LOG_FLAGS)
320 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
321 ACLOCAL = @ACLOCAL@
322 AMTAR = @AMTAR@
323 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
324 AR = @AR@
325 AUTOCONF = @AUTOCONF@
326 AUTOHEADER = @AUTOHEADER@
327 AUTOMAKE = @AUTOMAKE@
328 AWK = @AWK@
329 CC = @CC@
330 CCDEPMODE = @CCDEPMODE@
331 CFLAGS = @CFLAGS@
332 CPP = @CPP@
333 CPPFLAGS = @CPPFLAGS@
334 CYGPATH_W = @CYGPATH_W@
335 DEFS = @DEFS@
336 DEPDIR = @DEPDIR@
337 DLLTOOL = @DLLTOOL@
338 DSYMUTIL = @DSYMUTIL@
339 DUMPBIN = @DUMPBIN@
340 ECHO_C = @ECHO_C@
341 ECHO_N = @ECHO_N@
342 ECHO_T = @ECHO_T@
343 EGREP = @EGREP@
344 EXEEXT = @EXEEXT@
345 FGREP = @FGREP@
346 GREP = @GREP@
347 HEX_VERSION = @HEX_VERSION@
348 INSTALL = @INSTALL@
349 INSTALL_DATA = @INSTALL_DATA@
350 INSTALL_PROGRAM = @INSTALL_PROGRAM@
351 INSTALL_SCRIPT = @INSTALL_SCRIPT@
352 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
353 LD = @LD@
354 LDFLAGS = @LDFLAGS@
355 LIBDMARC_DIR = @LIBDMARC_DIR@
356 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
357 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
358 LIBMILTER_LIBS = @LIBMILTER_LIBS@
359 LIBOBJS = @LIBOBJS@
360 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
361 LIBRESOLV = @LIBRESOLV@
362 LIBS = @LIBS@
363 LIBTOOL = @LIBTOOL@
364 LIPO = @LIPO@
365 LN_S = @LN_S@
366 LTLIBOBJS = @LTLIBOBJS@
367 MAKEINFO = @MAKEINFO@
368 MANIFEST_TOOL = @MANIFEST_TOOL@
369 MKDIR_P = @MKDIR_P@
370 NM = @NM@
371 NMEDIT = @NMEDIT@
372 OBJDUMP = @OBJDUMP@
373 OBJEXT = @OBJEXT@
374 OTOOL = @OTOOL@
375 OTOOL64 = @OTOOL64@
376 PACKAGE = @PACKAGE@
377 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
378 PACKAGE_NAME = @PACKAGE_NAME@
379 PACKAGE_STRING = @PACKAGE_STRING@
380 PACKAGE_TARNAME = @PACKAGE_TARNAME@
381 PACKAGE_URL = @PACKAGE_URL@
382 PACKAGE_VERSION = @PACKAGE_VERSION@
383 PATH_SEPARATOR = @PATH_SEPARATOR@
384 PKG_CONFIG = @PKG_CONFIG@
385 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
386 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
387 PTHREAD_CC = @PTHREAD_CC@
388 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
389 PTHREAD_LIBS = @PTHREAD_LIBS@
390 RANLIB = @RANLIB@
391 SED = @SED@
392 SET_MAKE = @SET_MAKE@
393 SHELL = @SHELL@
394 SQL_BACKEND = @SQL_BACKEND@
395 STRIP = @STRIP@
396 SYSCONFDIR = @SYSCONFDIR@
397 VERSION = @VERSION@
398 abs_builddir = @abs_builddir@
399 abs_srcdir = @abs_srcdir@
400 abs_top_builddir = @abs_top_builddir@
401 abs_top_srcdir = @abs_top_srcdir@
402 ac_aux_dir = @ac_aux_dir@
403 ac_ct_AR = @ac_ct_AR@
404 ac_ct_CC = @ac_ct_CC@
405 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
406 am__include = @am__include@
407 am__leading_dot = @am__leading_dot@
408 am__quote = @am__quote@
409 am__tar = @am__tar@
410 am__untar = @am__untar@
411 ax_pthread_config = @ax_pthread_config@
412 bindir = @bindir@
413 build = @build@
414 build_alias = @build_alias@
415 build_cpu = @build_cpu@
416 build_os = @build_os@
417 build_vendor = @build_vendor@
418 builddir = @builddir@
419 datadir = @datadir@
420 datarootdir = @datarootdir@
421 docdir = @docdir@
422 dvidir = @dvidir@
423 exec_prefix = @exec_prefix@
424 host = @host@
425 host_alias = @host_alias@
426 host_cpu = @host_cpu@
427 host_os = @host_os@
428 host_vendor = @host_vendor@
429 htmldir = @htmldir@
430 includedir = @includedir@
431 infodir = @infodir@
432 install_sh = @install_sh@
433 libdir = @libdir@
434 libexecdir = @libexecdir@
435 localedir = @localedir@
436 localstatedir = @localstatedir@
437 mandir = @mandir@
438 miltertest = @miltertest@
439 mkdir_p = @mkdir_p@
440 oldincludedir = @oldincludedir@
441 pdfdir = @pdfdir@
442 prefix = @prefix@
443 program_transform_name = @program_transform_name@
444 psdir = @psdir@
445 sbindir = @sbindir@
446 sharedstatedir = @sharedstatedir@
447 srcdir = @srcdir@
448 sysconfdir = @sysconfdir@
449 target_alias = @target_alias@
450 top_build_prefix = @top_build_prefix@
451 top_builddir = @top_builddir@
452 top_srcdir = @top_srcdir@
453 check_SCRIPTS = $(am__append_1)
454 TESTS = $(check_SCRIPTS)
455 EXTRA_DIST = \
456 t-verify-nodata t-verify-nodata.conf t-verify-nodata.lua \
457 t-verify-nodata-reject t-verify-nodata-reject.conf \
458 t-verify-nodata-reject.lua \
459 t-verify-unspec t-verify-unspec.conf t-verify-unspec.lua
460
461 MOSTLYCLEANFILES =
462 all: all-am
463
464 .SUFFIXES:
465 .SUFFIXES: .log .test .test$(EXEEXT) .trs
466 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
467 @for dep in $?; do \
468 case '$(am__configure_deps)' in \
469 *$$dep*) \
470 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
471 && { if test -f $@; then exit 0; else break; fi; }; \
472 exit 1;; \
473 esac; \
474 done; \
475 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign opendmarc/tests/Makefile'; \
476 $(am__cd) $(top_srcdir) && \
477 $(AUTOMAKE) --foreign opendmarc/tests/Makefile
478 .PRECIOUS: Makefile
479 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
480 @case '$?' in \
481 *config.status*) \
482 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
483 *) \
484 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
485 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
486 esac;
487
488 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
489 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
490
491 $(top_srcdir)/configure: $(am__configure_deps)
492 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
493 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
494 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
495 $(am__aclocal_m4_deps):
496
497 mostlyclean-libtool:
498 -rm -f *.lo
499
500 clean-libtool:
501 -rm -rf .libs _libs
502 tags TAGS:
503
504 ctags CTAGS:
505
506 cscope cscopelist:
507
508
509 # Recover from deleted '.trs' file; this should ensure that
510 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
511 # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
512 # to avoid problems with "make -n".
513 .log.trs:
514 rm -f $< $@
515 $(MAKE) $(AM_MAKEFLAGS) $<
516
517 # Leading 'am--fnord' is there to ensure the list of targets does not
518 # expand to empty, as could happen e.g. with make check TESTS=''.
519 am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
520 am--force-recheck:
521 @:
522
523 $(TEST_SUITE_LOG): $(TEST_LOGS)
524 @$(am__set_TESTS_bases); \
525 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
526 redo_bases=`for i in $$bases; do \
527 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
528 done`; \
529 if test -n "$$redo_bases"; then \
530 redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
531 redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
532 if $(am__make_dryrun); then :; else \
533 rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
534 fi; \
535 fi; \
536 if test -n "$$am__remaking_logs"; then \
537 echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
538 "recursion detected" >&2; \
539 else \
540 am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
541 fi; \
542 if $(am__make_dryrun); then :; else \
543 st=0; \
544 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
545 for i in $$redo_bases; do \
546 test -f $$i.trs && test -r $$i.trs \
547 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
548 test -f $$i.log && test -r $$i.log \
549 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
550 done; \
551 test $$st -eq 0 || exit 1; \
552 fi
553 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
554 ws='[ ]'; \
555 results=`for b in $$bases; do echo $$b.trs; done`; \
556 test -n "$$results" || results=/dev/null; \
557 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
558 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
559 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
560 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
561 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
562 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
563 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
564 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
565 success=true; \
566 else \
567 success=false; \
568 fi; \
569 br='==================='; br=$$br$$br$$br$$br; \
570 result_count () \
571 { \
572 if test x"$$1" = x"--maybe-color"; then \
573 maybe_colorize=yes; \
574 elif test x"$$1" = x"--no-color"; then \
575 maybe_colorize=no; \
576 else \
577 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
578 fi; \
579 shift; \
580 desc=$$1 count=$$2; \
581 if test $$maybe_colorize = yes && test $$count -gt 0; then \
582 color_start=$$3 color_end=$$std; \
583 else \
584 color_start= color_end=; \
585 fi; \
586 echo "$${color_start}# $$desc $$count$${color_end}"; \
587 }; \
588 create_testsuite_report () \
589 { \
590 result_count $$1 "TOTAL:" $$all "$$brg"; \
591 result_count $$1 "PASS: " $$pass "$$grn"; \
592 result_count $$1 "SKIP: " $$skip "$$blu"; \
593 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
594 result_count $$1 "FAIL: " $$fail "$$red"; \
595 result_count $$1 "XPASS:" $$xpass "$$red"; \
596 result_count $$1 "ERROR:" $$error "$$mgn"; \
597 }; \
598 { \
599 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
600 $(am__rst_title); \
601 create_testsuite_report --no-color; \
602 echo; \
603 echo ".. contents:: :depth: 2"; \
604 echo; \
605 for b in $$bases; do echo $$b; done \
606 | $(am__create_global_log); \
607 } >$(TEST_SUITE_LOG).tmp || exit 1; \
608 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
609 if $$success; then \
610 col="$$grn"; \
611 else \
612 col="$$red"; \
613 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
614 fi; \
615 echo "$${col}$$br$${std}"; \
616 echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
617 echo "$${col}$$br$${std}"; \
618 create_testsuite_report --maybe-color; \
619 echo "$$col$$br$$std"; \
620 if $$success; then :; else \
621 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
622 if test -n "$(PACKAGE_BUGREPORT)"; then \
623 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
624 fi; \
625 echo "$$col$$br$$std"; \
626 fi; \
627 $$success || exit 1
628
629 check-TESTS:
630 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
631 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
632 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
633 @set +e; $(am__set_TESTS_bases); \
634 log_list=`for i in $$bases; do echo $$i.log; done`; \
635 trs_list=`for i in $$bases; do echo $$i.trs; done`; \
636 log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
637 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
638 exit $$?;
639 recheck: all $(check_SCRIPTS)
640 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
641 @set +e; $(am__set_TESTS_bases); \
642 bases=`for i in $$bases; do echo $$i; done \
643 | $(am__list_recheck_tests)` || exit 1; \
644 log_list=`for i in $$bases; do echo $$i.log; done`; \
645 log_list=`echo $$log_list`; \
646 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
647 am__force_recheck=am--force-recheck \
648 TEST_LOGS="$$log_list"; \
649 exit $$?
650 t-verify-nodata.log: t-verify-nodata
651 @p='t-verify-nodata'; \
652 b='t-verify-nodata'; \
653 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
654 --log-file $$b.log --trs-file $$b.trs \
655 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
656 "$$tst" $(AM_TESTS_FD_REDIRECT)
657 t-verify-nodata-reject.log: t-verify-nodata-reject
658 @p='t-verify-nodata-reject'; \
659 b='t-verify-nodata-reject'; \
660 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
661 --log-file $$b.log --trs-file $$b.trs \
662 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
663 "$$tst" $(AM_TESTS_FD_REDIRECT)
664 t-verify-unspec.log: t-verify-unspec
665 @p='t-verify-unspec'; \
666 b='t-verify-unspec'; \
667 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
668 --log-file $$b.log --trs-file $$b.trs \
669 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
670 "$$tst" $(AM_TESTS_FD_REDIRECT)
671 .test.log:
672 @p='$<'; \
673 $(am__set_b); \
674 $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
675 --log-file $$b.log --trs-file $$b.trs \
676 $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
677 "$$tst" $(AM_TESTS_FD_REDIRECT)
678 @am__EXEEXT_TRUE@.test$(EXEEXT).log:
679 @am__EXEEXT_TRUE@ @p='$<'; \
680 @am__EXEEXT_TRUE@ $(am__set_b); \
681 @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
682 @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
683 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
684 @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
685
686 distdir: $(DISTFILES)
687 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
688 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
689 list='$(DISTFILES)'; \
690 dist_files=`for file in $$list; do echo $$file; done | \
691 sed -e "s|^$$srcdirstrip/||;t" \
692 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
693 case $$dist_files in \
694 */*) $(MKDIR_P) `echo "$$dist_files" | \
695 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
696 sort -u` ;; \
697 esac; \
698 for file in $$dist_files; do \
699 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
700 if test -d $$d/$$file; then \
701 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
702 if test -d "$(distdir)/$$file"; then \
703 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
704 fi; \
705 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
706 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
707 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
708 fi; \
709 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
710 else \
711 test -f "$(distdir)/$$file" \
712 || cp -p $$d/$$file "$(distdir)/$$file" \
713 || exit 1; \
714 fi; \
715 done
716 check-am: all-am
717 $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
718 $(MAKE) $(AM_MAKEFLAGS) check-TESTS
719 check: check-am
720 all-am: Makefile
721 installdirs:
722 install: install-am
723 install-exec: install-exec-am
724 install-data: install-data-am
725 uninstall: uninstall-am
726
727 install-am: all-am
728 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
729
730 installcheck: installcheck-am
731 install-strip:
732 if test -z '$(STRIP)'; then \
733 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
734 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
735 install; \
736 else \
737 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
738 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
739 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
740 fi
741 mostlyclean-generic:
742 -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
743 -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
744 -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
745 -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
746
747 clean-generic:
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-libtool mostlyclean-am
759
760 distclean: distclean-am
761 -rm -f Makefile
762 distclean-am: clean-am distclean-generic
763
764 dvi: dvi-am
765
766 dvi-am:
767
768 html: html-am
769
770 html-am:
771
772 info: info-am
773
774 info-am:
775
776 install-data-am:
777
778 install-dvi: install-dvi-am
779
780 install-dvi-am:
781
782 install-exec-am:
783
784 install-html: install-html-am
785
786 install-html-am:
787
788 install-info: install-info-am
789
790 install-info-am:
791
792 install-man:
793
794 install-pdf: install-pdf-am
795
796 install-pdf-am:
797
798 install-ps: install-ps-am
799
800 install-ps-am:
801
802 installcheck-am:
803
804 maintainer-clean: maintainer-clean-am
805 -rm -f Makefile
806 maintainer-clean-am: distclean-am maintainer-clean-generic
807
808 mostlyclean: mostlyclean-am
809
810 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
811
812 pdf: pdf-am
813
814 pdf-am:
815
816 ps: ps-am
817
818 ps-am:
819
820 uninstall-am:
821
822 .MAKE: check-am install-am install-strip
823
824 .PHONY: all all-am check check-TESTS check-am clean clean-generic \
825 clean-libtool cscopelist-am ctags-am distclean \
826 distclean-generic distclean-libtool distdir dvi dvi-am html \
827 html-am info info-am install install-am install-data \
828 install-data-am install-dvi install-dvi-am install-exec \
829 install-exec-am install-html install-html-am install-info \
830 install-info-am install-man install-pdf install-pdf-am \
831 install-ps install-ps-am install-strip installcheck \
832 installcheck-am installdirs maintainer-clean \
833 maintainer-clean-generic mostlyclean mostlyclean-generic \
834 mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \
835 uninstall uninstall-am
836
837
838 # Tell versions [3.59,3.63) of GNU make to not export all variables.
839 # Otherwise a system limit (for SysV at least) may be exceeded.
840 .NOEXPORT:
0 #!/bin/sh
1 #
2 # Test a forged message from paypal.com with no SPF or DKIM data.
3 #
4 # As of 7/1/2012, paypal.com advertises a "p=reject" DMARC policy, so a message
5 # with no SPF or DKIM data on it should be rejected. This version checks
6 # for proper generation of an Authentication-Results field rather than outright
7 # rejection.
8
9 if [ x"$srcdir" = x"" ]
10 then
11 srcdir=`pwd`
12 fi
13
14 miltertest -s $srcdir/t-verify-nodata.lua
0 #!/bin/sh
1 #
2 # Test a forged message from paypal.com with no SPF or DKIM data.
3 #
4 # As of 7/1/2012, paypal.com advertises a "p=reject" DMARC policy, so a message
5 # with no SPF or DKIM data on it should be rejected. This variant actually
6 # does rejection, rather than testing Authentication-Results header field
7 # generation.
8
9 if [ x"$srcdir" = x"" ]
10 then
11 srcdir=`pwd`
12 fi
13
14 miltertest -s $srcdir/t-verify-nodata-reject.lua
0 # paypal.com no data message test (should reject)
1
2 Background No
3 RejectFailures Yes
0 -- Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1
2 -- Test message from paypal.com with no DKIM or SPF DATA
3 --
4 -- Confirms that a message with no authentication data claiming to be from a
5 -- "p=reject" domain will provoke a rejection. This variant confirms a
6 -- reject request from the filter rather than checking production of an
7 -- Authentication-Results field.
8
9 mt.echo("*** no data reject test (rejection)")
10
11 -- setup
12 sock = "unix:" .. mt.getcwd() .. "/t-verify-nodata-reject.sock"
13 binpath = mt.getcwd() .. "/.."
14 if os.getenv("srcdir") ~= nil then
15 mt.chdir(os.getenv("srcdir"))
16 end
17
18 -- try to start the filter
19 mt.startfilter(binpath .. "/opendmarc", "-c", "t-verify-nodata-reject.conf",
20 "-p", sock)
21
22 -- try to connect to it
23 conn = mt.connect(sock, 40, 0.05)
24 if conn == nil then
25 error("mt.connect() failed")
26 end
27
28 -- send connection information
29 -- mt.negotiate() is called implicitly
30 if mt.conninfo(conn, "localhost2", "127.0.0.2") ~= nil then
31 error("mt.conninfo() failed")
32 end
33 if mt.getreply(conn) ~= SMFIR_CONTINUE then
34 error("mt.conninfo() unexpected reply")
35 end
36
37 -- send envelope macros and sender data
38 -- mt.helo() is called implicitly
39 mt.macro(conn, SMFIC_MAIL, "i", "t-verify-nodata-reject")
40 if mt.mailfrom(conn, "user@paypal.com") ~= nil then
41 error("mt.mailfrom() failed")
42 end
43 if mt.getreply(conn) ~= SMFIR_CONTINUE then
44 error("mt.mailfrom() unexpected reply")
45 end
46
47 -- send headers
48 -- mt.rcptto() is called implicitly
49 if mt.header(conn, "From", "user@paypal.com") ~= nil then
50 error("mt.header(From) failed")
51 end
52 if mt.getreply(conn) ~= SMFIR_CONTINUE then
53 error("mt.header(From) unexpected reply")
54 end
55 if mt.header(conn, "To", "user@example.com") ~= nil then
56 error("mt.header(To) failed")
57 end
58 if mt.getreply(conn) ~= SMFIR_CONTINUE then
59 error("mt.header(To) unexpected reply")
60 end
61 if mt.header(conn, "Date", "Tue, 22 Dec 2009 13:04:12 -0800") ~= nil then
62 error("mt.header(Date) failed")
63 end
64 if mt.getreply(conn) ~= SMFIR_CONTINUE then
65 error("mt.header(Date) unexpected reply")
66 end
67 if mt.header(conn, "Subject", "DMARC test") ~= nil then
68 error("mt.header(Subject) failed")
69 end
70 if mt.getreply(conn) ~= SMFIR_CONTINUE then
71 error("mt.header(Subject) unexpected reply")
72 end
73
74 -- send EOH
75 if mt.eoh(conn) ~= nil then
76 error("mt.eoh() failed")
77 end
78 if mt.getreply(conn) ~= SMFIR_CONTINUE then
79 error("mt.eoh() unexpected reply")
80 end
81
82 -- end of message; let the filter react
83 if mt.eom(conn) ~= nil then
84 error("mt.eom() failed")
85 end
86 if mt.getreply(conn) ~= SMFIR_REPLYCODE then
87 error("mt.eom() unexpected reply")
88 end
89
90 mt.disconnect(conn)
0 # paypal.com no data message test (should reject)
1
2 Background No
0 -- Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
1
2 -- Test message from paypal.com with no DKIM or SPF DATA
3 --
4 -- Confirms that a message with no authentication data claiming to be from a
5 -- "p=reject" domain will provoke a rejection. This variant confirms failure
6 -- by checking for an appropriate Authentication-Results field.
7
8 mt.echo("*** no data reject test (Authentication-Results)")
9
10 -- setup
11 sock = "unix:" .. mt.getcwd() .. "/t-verify-nodata.sock"
12 binpath = mt.getcwd() .. "/.."
13 if os.getenv("srcdir") ~= nil then
14 mt.chdir(os.getenv("srcdir"))
15 end
16
17 -- try to start the filter
18 mt.startfilter(binpath .. "/opendmarc", "-c", "t-verify-nodata.conf",
19 "-p", sock)
20
21 -- try to connect to it
22 conn = mt.connect(sock, 40, 0.05)
23 if conn == nil then
24 error("mt.connect() failed")
25 end
26
27 -- send connection information
28 -- mt.negotiate() is called implicitly
29 if mt.conninfo(conn, "localhost2", "127.0.0.2") ~= nil then
30 error("mt.conninfo() failed")
31 end
32 if mt.getreply(conn) ~= SMFIR_CONTINUE then
33 error("mt.conninfo() unexpected reply")
34 end
35
36 -- send envelope macros and sender data
37 -- mt.helo() is called implicitly
38 mt.macro(conn, SMFIC_MAIL, "i", "t-verify-nodata")
39 if mt.mailfrom(conn, "user@paypal.com") ~= nil then
40 error("mt.mailfrom() failed")
41 end
42 if mt.getreply(conn) ~= SMFIR_CONTINUE then
43 error("mt.mailfrom() unexpected reply")
44 end
45
46 -- send headers
47 -- mt.rcptto() is called implicitly
48 if mt.header(conn, "From", "user@paypal.com") ~= nil then
49 error("mt.header(From) failed")
50 end
51 if mt.getreply(conn) ~= SMFIR_CONTINUE then
52 error("mt.header(From) unexpected reply")
53 end
54 if mt.header(conn, "To", "user@example.com") ~= nil then
55 error("mt.header(To) failed")
56 end
57 if mt.getreply(conn) ~= SMFIR_CONTINUE then
58 error("mt.header(To) unexpected reply")
59 end
60 if mt.header(conn, "Date", "Tue, 22 Dec 2009 13:04:12 -0800") ~= nil then
61 error("mt.header(Date) failed")
62 end
63 if mt.getreply(conn) ~= SMFIR_CONTINUE then
64 error("mt.header(Date) unexpected reply")
65 end
66 if mt.header(conn, "Subject", "DMARC test") ~= nil then
67 error("mt.header(Subject) failed")
68 end
69 if mt.getreply(conn) ~= SMFIR_CONTINUE then
70 error("mt.header(Subject) unexpected reply")
71 end
72
73 -- send EOH
74 if mt.eoh(conn) ~= nil then
75 error("mt.eoh() failed")
76 end
77 if mt.getreply(conn) ~= SMFIR_CONTINUE then
78 error("mt.eoh() unexpected reply")
79 end
80
81 -- end of message; let the filter react
82 if mt.eom(conn) ~= nil then
83 error("mt.eom() failed")
84 end
85 if mt.getreply(conn) ~= SMFIR_CONTINUE then
86 error("mt.eom() unexpected reply")
87 end
88
89 -- verify that an Authentication-Results header field got added
90 if not mt.eom_check(conn, MT_HDRINSERT, "Authentication-Results") and
91 not mt.eom_check(conn, MT_HDRADD, "Authentication-Results") then
92 error("no Authentication-Results added")
93 end
94
95 -- verify that a DMARC fail result was added
96 n = 0
97 found = 0
98 while true do
99 ar = mt.getheader(conn, "Authentication-Results", n)
100 if ar == nil then
101 break
102 end
103 if string.find(ar, "dmarc=fail", 1, true) ~= nil then
104 found = 1
105 break
106 end
107 n = n + 1
108 end
109 if found == 0 then
110 error("incorrect DMARC result")
111 end
112
113 mt.disconnect(conn)
0 #!/bin/sh
1 #
2 # unspecified protocol family test
3
4 if [ x"$srcdir" = x"" ]
5 then
6 srcdir=`pwd`
7 fi
8
9 miltertest $MILTERTESTFLAGS -s $srcdir/t-verify-unspec.lua
0 # unspecified protocol family test
1
2 Background No
0 -- Copyright (c) 2009, 2010, 2012, 2013, The Trusted Domain Project.
1 -- All rights reserved.
2
3 -- unspecified protocol family test
4 --
5 -- Confirms that an unspec message produces the correct result
6
7 mt.echo("*** unspecified protocol family test")
8
9 -- setup
10 if TESTSOCKET ~= nil then
11 sock = TESTSOCKET
12 else
13 sock = "unix:" .. mt.getcwd() .. "/t-verify-unspec.sock"
14 end
15 binpath = mt.getcwd() .. "/.."
16 if os.getenv("srcdir") ~= nil then
17 mt.chdir(os.getenv("srcdir"))
18 end
19
20 -- try to start the filter
21 mt.startfilter(binpath .. "/opendmarc", "-c", "t-verify-unspec.conf",
22 "-p", sock)
23
24 -- try to connect to it
25 conn = mt.connect(sock, 40, 0.25)
26 if conn == nil then
27 error("mt.connect() failed")
28 end
29
30 -- send connection information
31 -- mt.negotiate() is called implicitly
32 if mt.conninfo(conn, "localhost", "unspec") ~= nil then
33 error("mt.conninfo() failed")
34 end
35 if mt.getreply(conn) ~= SMFIR_CONTINUE then
36 error("mt.conninfo() unexpected reply")
37 end
38
39 -- send envelope macros and sender data
40 -- mt.helo() is called implicitly
41 mt.macro(conn, SMFIC_MAIL, "i", "t-verify-unspec")
42 if mt.mailfrom(conn, "user@paypal.com") ~= nil then
43 error("mt.mailfrom() failed")
44 end
45 if mt.getreply(conn) ~= SMFIR_CONTINUE then
46 error("mt.mailfrom() unexpected reply")
47 end
48
49 -- send headers
50 -- mt.rcptto() is called implicitly
51 if mt.header(conn, "From", "user@paypal.com") ~= nil then
52 error("mt.header(From) failed")
53 end
54 if mt.getreply(conn) ~= SMFIR_CONTINUE then
55 error("mt.header(From) unexpected reply")
56 end
57 if mt.header(conn, "To", "user@example.com") ~= nil then
58 error("mt.header(To) failed")
59 end
60 if mt.getreply(conn) ~= SMFIR_CONTINUE then
61 error("mt.header(To) unexpected reply")
62 end
63 if mt.header(conn, "Date", "Tue, 22 Dec 2009 13:04:12 -0800") ~= nil then
64 error("mt.header(Date) failed")
65 end
66 if mt.getreply(conn) ~= SMFIR_CONTINUE then
67 error("mt.header(Date) unexpected reply")
68 end
69 if mt.header(conn, "Subject", "DMARC test") ~= nil then
70 error("mt.header(Subject) failed")
71 end
72 if mt.getreply(conn) ~= SMFIR_CONTINUE then
73 error("mt.header(Subject) unexpected reply")
74 end
75
76 -- send EOH
77 if mt.eoh(conn) ~= nil then
78 error("mt.eoh() failed")
79 end
80 if mt.getreply(conn) ~= SMFIR_CONTINUE then
81 error("mt.eoh() unexpected reply")
82 end
83
84 -- end of message; let the filter react
85 if mt.eom(conn) ~= nil then
86 error("mt.eom() failed")
87 end
88 if mt.getreply(conn) ~= SMFIR_CONTINUE then
89 error("mt.eom() unexpected reply")
90 end
91
92 -- verify that an Authentication-Results header field got added
93 if not mt.eom_check(conn, MT_HDRINSERT, "Authentication-Results") and
94 not mt.eom_check(conn, MT_HDRADD, "Authentication-Results") then
95 error("no Authentication-Results added")
96 end
97
98 -- verify that a DMARC fail result was added
99 n = 0
100 found = 0
101 while true do
102 ar = mt.getheader(conn, "Authentication-Results", n)
103 if ar == nil then
104 break
105 end
106 if string.find(ar, "dmarc=fail", 1, true) ~= nil then
107 found = 1
108 break
109 end
110 n = n + 1
111 end
112 if found == 0 then
113 error("incorrect DMARC result")
114 end
115
116 mt.disconnect(conn)
0 /*
1 ** Copyright (c) 2009-2012, 2014, The Trusted Domain Project.
2 ** All rights reserved.
3 */
4
5 #include "build-config.h"
6
7 /* system includes */
8 #include <sys/param.h>
9 #include <sys/types.h>
10 #include <sys/time.h>
11 #include <sys/socket.h>
12 #include <sys/un.h>
13 #include <sys/resource.h>
14 #include <unistd.h>
15 #include <errno.h>
16 #include <syslog.h>
17 #include <assert.h>
18 #include <stdio.h>
19 #include <string.h>
20 #include <ctype.h>
21
22 #ifdef HAVE_PATHS_H
23 # include <paths.h>
24 #endif /* HAVE_PATHS_H */
25 #ifndef _PATH_DEVNULL
26 # define _PATH_DEVNULL "/dev/null"
27 #endif /* ! _PATH_DEVNULL */
28
29 #ifdef SOLARIS
30 # if SOLARIS <= 20600
31 # define socklen_t size_t
32 # endif /* SOLARIS <= 20600 */
33 #endif /* SOLARIS */
34
35 #ifndef FALSE
36 # define FALSE 0
37 #endif /* ! FALSE */
38 #ifndef TRUE
39 # define TRUE 1
40 #endif /* ! TRUE */
41
42 /* libbsd if found */
43 #ifdef USE_BSD_H
44 # include <bsd/string.h>
45 #endif /* USE_BSD_H */
46
47 /* libstrl if needed */
48 #ifdef USE_STRL_H
49 # include <strl.h>
50 #endif /* USE_STRL_H */
51
52 /* opendmarc_strl if needed */
53 #ifdef USE_DMARCSTRL_H
54 # include <opendmarc_strl.h>
55 #endif /* USE_DMARCSTRL_H */
56
57 /* opendmarc includes */
58 #include "util.h"
59
60 static char *optlist[] =
61 {
62 #if DEBUG
63 "DEBUG",
64 #endif /* DEBUG */
65
66 #if POLL
67 "POLL",
68 #endif /* POLL */
69
70 #if WITH_SPF
71 "WITH_SPF",
72 #endif /* WITH_SPF */
73
74 #if HAVE_SPF2_H
75 "WITH_SPF2",
76 #endif /* HAVE_SPF2_H */
77
78 NULL
79 };
80
81 /*
82 ** DMARCF_OPTLIST -- print active options and FFRs
83 **
84 ** Parameters:
85 ** where -- where to write the list
86 **
87 ** Return value:
88 ** None.
89 */
90
91 void
92 dmarcf_optlist(FILE *where)
93 {
94 _Bool first = TRUE;
95 int c;
96
97 assert(where != NULL);
98
99 for (c = 0; optlist[c] != NULL; c++)
100 {
101 if (first)
102 {
103 fprintf(where, "\tActive code options:\n");
104 first = FALSE;
105 }
106
107 fprintf(where, "\t\t%s\n", optlist[c]);
108 }
109 }
110
111 /*
112 ** DMARCF_SETMAXFD -- increase the file descriptor limit as much as possible
113 **
114 ** Parameters:
115 ** None.
116 **
117 ** Return value:
118 ** None.
119 */
120
121 void
122 dmarcf_setmaxfd(void)
123 {
124 struct rlimit rlp;
125
126 if (getrlimit(RLIMIT_NOFILE, &rlp) != 0)
127 {
128 syslog(LOG_WARNING, "getrlimit(): %s", strerror(errno));
129 }
130 else
131 {
132 rlp.rlim_cur = rlp.rlim_max;
133 if (setrlimit(RLIMIT_NOFILE, &rlp) != 0)
134 {
135 syslog(LOG_WARNING, "setrlimit(): %s",
136 strerror(errno));
137 }
138 }
139 }
140
141 /*
142 ** DMARCF_SOCKET_CLEANUP -- try to clean up the socket
143 **
144 ** Parameters:
145 ** sockspec -- socket specification
146 **
147 ** Return value:
148 ** 0 -- nothing to cleanup or cleanup successful
149 ** other -- an error code (a la errno)
150 */
151
152 int
153 dmarcf_socket_cleanup(char *sockspec)
154 {
155 int s;
156 char *colon;
157 struct sockaddr_un sock;
158
159 assert(sockspec != NULL);
160
161 /* we only care about "local" or "unix" sockets */
162 colon = strchr(sockspec, ':');
163 if (colon != NULL)
164 {
165 if (strncasecmp(sockspec, "local:", 6) != 0 &&
166 strncasecmp(sockspec, "unix:", 5) != 0)
167 return 0;
168 }
169
170 /* find the filename */
171 if (colon == NULL)
172 {
173 colon = sockspec;
174 }
175 else
176 {
177 if (*(colon + 1) == '\0')
178 return EINVAL;
179 }
180
181 /* get a socket */
182 s = socket(PF_UNIX, SOCK_STREAM, 0);
183 if (s == -1)
184 return errno;
185
186 /* set up a connection */
187 memset(&sock, '\0', sizeof sock);
188 #ifdef BSD
189 sock.sun_len = sizeof sock;
190 #endif /* BSD */
191 sock.sun_family = PF_UNIX;
192 strlcpy(sock.sun_path, colon + 1, sizeof sock.sun_path);
193
194 /* try to connect */
195 if (connect(s, (struct sockaddr *) &sock, (socklen_t) sizeof sock) != 0)
196 {
197 /* if ECONNREFUSED, try to unlink */
198 if (errno == ECONNREFUSED)
199 {
200 close(s);
201
202 if (unlink(sock.sun_path) == 0)
203 return 0;
204 else
205 return errno;
206 }
207
208 /* if ENOENT, the socket's not there */
209 else if (errno == ENOENT)
210 {
211 close(s);
212
213 return 0;
214 }
215
216 /* something else happened */
217 else
218 {
219 int saveerr;
220
221 saveerr = errno;
222
223 close(s);
224
225 return saveerr;
226 }
227 }
228
229 /* connection apparently succeeded */
230 close(s);
231 return EADDRINUSE;
232 }
233
234 /*
235 ** DMARCF_LOWERCASE -- lowercase-ize a string
236 **
237 ** Parameters:
238 ** str -- string to convert
239 **
240 ** Return value:
241 ** None.
242 */
243
244 void
245 dmarcf_lowercase(u_char *str)
246 {
247 u_char *p;
248
249 assert(str != NULL);
250
251 for (p = str; *p != '\0'; p++)
252 {
253 if (isascii(*p) && isupper(*p))
254 *p = tolower(*p);
255 }
256 }
257
258 /*
259 ** DMARCF_INET_NTOA -- thread-safe inet_ntoa()
260 **
261 ** Parameters:
262 ** a -- (struct in_addr) to be converted
263 ** buf -- destination buffer
264 ** buflen -- number of bytes at buf
265 **
266 ** Return value:
267 ** Size of the resultant string. If the result is greater than buflen,
268 ** then buf does not contain the complete result.
269 */
270
271 size_t
272 dmarcf_inet_ntoa(struct in_addr a, char *buf, size_t buflen)
273 {
274 in_addr_t addr;
275
276 assert(buf != NULL);
277
278 addr = ntohl(a.s_addr);
279
280 return snprintf(buf, buflen, "%d.%d.%d.%d",
281 (addr >> 24), (addr >> 16) & 0xff,
282 (addr >> 8) & 0xff, addr & 0xff);
283 }
0 /*
1 ** Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
2 */
3
4 #ifndef _UTIL_H_
5 #define _UTIL_H_
6
7 /* system includes */
8 #include <sys/types.h>
9 #include <netinet/in.h>
10 #include <stdio.h>
11
12 #ifdef __STDC__
13 # ifndef __P
14 # define __P(x) x
15 # endif /* ! __P */
16 #else /* __STDC__ */
17 # ifndef __P
18 # define __P(x) ()
19 # endif /* ! __P */
20 #endif /* __STDC__ */
21
22 /* PROTOTYPES */
23 extern size_t dmarcf_inet_ntoa __P((struct in_addr, char *, size_t));
24 extern void dmarcf_lowercase __P((u_char *));
25 extern void dmarcf_optlist __P((FILE *));
26 extern void dmarcf_setmaxfd __P((void));
27 extern int dmarcf_socket_cleanup __P((char *));
28
29 #endif /* _UTIL_H_ */
0 # Copyright (c) 2012, 2013, 2016, The Trusted Domain Project.
1 # All rights reserved.
2
3 AUTOMAKE_OPTIONS = foreign
4
5 dist_doc_DATA = README
6
7 dist_sbin_SCRIPTS = opendmarc-expire opendmarc-import opendmarc-importstats \
8 opendmarc-params opendmarc-reports
9
10 dist_man_MANS = opendmarc-expire.8 opendmarc-import.8 opendmarc-params.8 \
11 opendmarc-reports.8 opendmarc-importstats.8
0 # Makefile.in generated by automake 1.13.2 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # Copyright (c) 2012, 2013, 2016, The Trusted Domain Project.
17 # All rights reserved.
18
19
20 VPATH = @srcdir@
21 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
22 am__make_running_with_option = \
23 case $${target_option-} in \
24 ?) ;; \
25 *) echo "am__make_running_with_option: internal error: invalid" \
26 "target option '$${target_option-}' specified" >&2; \
27 exit 1;; \
28 esac; \
29 has_opt=no; \
30 sane_makeflags=$$MAKEFLAGS; \
31 if $(am__is_gnu_make); then \
32 sane_makeflags=$$MFLAGS; \
33 else \
34 case $$MAKEFLAGS in \
35 *\\[\ \ ]*) \
36 bs=\\; \
37 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
38 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
39 esac; \
40 fi; \
41 skip_next=no; \
42 strip_trailopt () \
43 { \
44 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
45 }; \
46 for flg in $$sane_makeflags; do \
47 test $$skip_next = yes && { skip_next=no; continue; }; \
48 case $$flg in \
49 *=*|--*) continue;; \
50 -*I) strip_trailopt 'I'; skip_next=yes;; \
51 -*I?*) strip_trailopt 'I';; \
52 -*O) strip_trailopt 'O'; skip_next=yes;; \
53 -*O?*) strip_trailopt 'O';; \
54 -*l) strip_trailopt 'l'; skip_next=yes;; \
55 -*l?*) strip_trailopt 'l';; \
56 -[dEDm]) skip_next=yes;; \
57 -[JT]) skip_next=yes;; \
58 esac; \
59 case $$flg in \
60 *$$target_option*) has_opt=yes; break;; \
61 esac; \
62 done; \
63 test $$has_opt = yes
64 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
65 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
66 pkgdatadir = $(datadir)/@PACKAGE@
67 pkgincludedir = $(includedir)/@PACKAGE@
68 pkglibdir = $(libdir)/@PACKAGE@
69 pkglibexecdir = $(libexecdir)/@PACKAGE@
70 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
71 install_sh_DATA = $(install_sh) -c -m 644
72 install_sh_PROGRAM = $(install_sh) -c
73 install_sh_SCRIPT = $(install_sh) -c
74 INSTALL_HEADER = $(INSTALL_DATA)
75 transform = $(program_transform_name)
76 NORMAL_INSTALL = :
77 PRE_INSTALL = :
78 POST_INSTALL = :
79 NORMAL_UNINSTALL = :
80 PRE_UNINSTALL = :
81 POST_UNINSTALL = :
82 build_triplet = @build@
83 host_triplet = @host@
84 subdir = reports
85 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
86 $(srcdir)/opendmarc-expire.in $(srcdir)/opendmarc-expire.8.in \
87 $(srcdir)/opendmarc-import.in $(srcdir)/opendmarc-import.8.in \
88 $(srcdir)/opendmarc-importstats.8.in \
89 $(srcdir)/opendmarc-params.in $(srcdir)/opendmarc-params.8.in \
90 $(srcdir)/opendmarc-reports.in \
91 $(srcdir)/opendmarc-reports.8.in $(dist_sbin_SCRIPTS) \
92 $(dist_man_MANS) $(dist_doc_DATA) README
93 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
94 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \
95 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
96 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
97 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
98 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
99 $(ACLOCAL_M4)
100 mkinstalldirs = $(install_sh) -d
101 CONFIG_HEADER = $(top_builddir)/build-config.h
102 CONFIG_CLEAN_FILES = opendmarc-expire opendmarc-expire.8 \
103 opendmarc-import opendmarc-import.8 opendmarc-importstats.8 \
104 opendmarc-params opendmarc-params.8 opendmarc-reports \
105 opendmarc-reports.8
106 CONFIG_CLEAN_VPATH_FILES =
107 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
108 am__vpath_adj = case $$p in \
109 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
110 *) f=$$p;; \
111 esac;
112 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
113 am__install_max = 40
114 am__nobase_strip_setup = \
115 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
116 am__nobase_strip = \
117 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
118 am__nobase_list = $(am__nobase_strip_setup); \
119 for p in $$list; do echo "$$p $$p"; done | \
120 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
121 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
122 if (++n[$$2] == $(am__install_max)) \
123 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
124 END { for (dir in files) print dir, files[dir] }'
125 am__base_list = \
126 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
127 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
128 am__uninstall_files_from_dir = { \
129 test -z "$$files" \
130 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
131 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
132 $(am__cd) "$$dir" && rm -f $$files; }; \
133 }
134 am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" \
135 "$(DESTDIR)$(docdir)"
136 SCRIPTS = $(dist_sbin_SCRIPTS)
137 AM_V_P = $(am__v_P_@AM_V@)
138 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
139 am__v_P_0 = false
140 am__v_P_1 = :
141 AM_V_GEN = $(am__v_GEN_@AM_V@)
142 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
143 am__v_GEN_0 = @echo " GEN " $@;
144 am__v_GEN_1 =
145 AM_V_at = $(am__v_at_@AM_V@)
146 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
147 am__v_at_0 = @
148 am__v_at_1 =
149 SOURCES =
150 DIST_SOURCES =
151 am__can_run_installinfo = \
152 case $$AM_UPDATE_INFO_DIR in \
153 n|no|NO) false;; \
154 *) (install-info --version) >/dev/null 2>&1;; \
155 esac
156 man8dir = $(mandir)/man8
157 NROFF = nroff
158 MANS = $(dist_man_MANS)
159 DATA = $(dist_doc_DATA)
160 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
161 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
162 ACLOCAL = @ACLOCAL@
163 AMTAR = @AMTAR@
164 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
165 AR = @AR@
166 AUTOCONF = @AUTOCONF@
167 AUTOHEADER = @AUTOHEADER@
168 AUTOMAKE = @AUTOMAKE@
169 AWK = @AWK@
170 CC = @CC@
171 CCDEPMODE = @CCDEPMODE@
172 CFLAGS = @CFLAGS@
173 CPP = @CPP@
174 CPPFLAGS = @CPPFLAGS@
175 CYGPATH_W = @CYGPATH_W@
176 DEFS = @DEFS@
177 DEPDIR = @DEPDIR@
178 DLLTOOL = @DLLTOOL@
179 DSYMUTIL = @DSYMUTIL@
180 DUMPBIN = @DUMPBIN@
181 ECHO_C = @ECHO_C@
182 ECHO_N = @ECHO_N@
183 ECHO_T = @ECHO_T@
184 EGREP = @EGREP@
185 EXEEXT = @EXEEXT@
186 FGREP = @FGREP@
187 GREP = @GREP@
188 HEX_VERSION = @HEX_VERSION@
189 INSTALL = @INSTALL@
190 INSTALL_DATA = @INSTALL_DATA@
191 INSTALL_PROGRAM = @INSTALL_PROGRAM@
192 INSTALL_SCRIPT = @INSTALL_SCRIPT@
193 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
194 LD = @LD@
195 LDFLAGS = @LDFLAGS@
196 LIBDMARC_DIR = @LIBDMARC_DIR@
197 LIBMILTER_INCDIRS = @LIBMILTER_INCDIRS@
198 LIBMILTER_LIBDIRS = @LIBMILTER_LIBDIRS@
199 LIBMILTER_LIBS = @LIBMILTER_LIBS@
200 LIBOBJS = @LIBOBJS@
201 LIBOPENDMARC_VERSION_INFO = @LIBOPENDMARC_VERSION_INFO@
202 LIBRESOLV = @LIBRESOLV@
203 LIBS = @LIBS@
204 LIBTOOL = @LIBTOOL@
205 LIPO = @LIPO@
206 LN_S = @LN_S@
207 LTLIBOBJS = @LTLIBOBJS@
208 MAKEINFO = @MAKEINFO@
209 MANIFEST_TOOL = @MANIFEST_TOOL@
210 MKDIR_P = @MKDIR_P@
211 NM = @NM@
212 NMEDIT = @NMEDIT@
213 OBJDUMP = @OBJDUMP@
214 OBJEXT = @OBJEXT@
215 OTOOL = @OTOOL@
216 OTOOL64 = @OTOOL64@
217 PACKAGE = @PACKAGE@
218 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
219 PACKAGE_NAME = @PACKAGE_NAME@
220 PACKAGE_STRING = @PACKAGE_STRING@
221 PACKAGE_TARNAME = @PACKAGE_TARNAME@
222 PACKAGE_URL = @PACKAGE_URL@
223 PACKAGE_VERSION = @PACKAGE_VERSION@
224 PATH_SEPARATOR = @PATH_SEPARATOR@
225 PKG_CONFIG = @PKG_CONFIG@
226 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
227 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
228 PTHREAD_CC = @PTHREAD_CC@
229 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
230 PTHREAD_LIBS = @PTHREAD_LIBS@
231 RANLIB = @RANLIB@
232 SED = @SED@
233 SET_MAKE = @SET_MAKE@
234 SHELL = @SHELL@
235 SQL_BACKEND = @SQL_BACKEND@
236 STRIP = @STRIP@
237 SYSCONFDIR = @SYSCONFDIR@
238 VERSION = @VERSION@
239 abs_builddir = @abs_builddir@
240 abs_srcdir = @abs_srcdir@
241 abs_top_builddir = @abs_top_builddir@
242 abs_top_srcdir = @abs_top_srcdir@
243 ac_aux_dir = @ac_aux_dir@
244 ac_ct_AR = @ac_ct_AR@
245 ac_ct_CC = @ac_ct_CC@
246 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
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 ax_pthread_config = @ax_pthread_config@
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 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 miltertest = @miltertest@
280 mkdir_p = @mkdir_p@
281 oldincludedir = @oldincludedir@
282 pdfdir = @pdfdir@
283 prefix = @prefix@
284 program_transform_name = @program_transform_name@
285 psdir = @psdir@
286 sbindir = @sbindir@
287 sharedstatedir = @sharedstatedir@
288 srcdir = @srcdir@
289 sysconfdir = @sysconfdir@
290 target_alias = @target_alias@
291 top_build_prefix = @top_build_prefix@
292 top_builddir = @top_builddir@
293 top_srcdir = @top_srcdir@
294 AUTOMAKE_OPTIONS = foreign
295 dist_doc_DATA = README
296 dist_sbin_SCRIPTS = opendmarc-expire opendmarc-import opendmarc-importstats \
297 opendmarc-params opendmarc-reports
298
299 dist_man_MANS = opendmarc-expire.8 opendmarc-import.8 opendmarc-params.8 \
300 opendmarc-reports.8 opendmarc-importstats.8
301
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) --foreign reports/Makefile'; \
315 $(am__cd) $(top_srcdir) && \
316 $(AUTOMAKE) --foreign reports/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 opendmarc-expire: $(top_builddir)/config.status $(srcdir)/opendmarc-expire.in
336 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
337 opendmarc-expire.8: $(top_builddir)/config.status $(srcdir)/opendmarc-expire.8.in
338 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
339 opendmarc-import: $(top_builddir)/config.status $(srcdir)/opendmarc-import.in
340 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
341 opendmarc-import.8: $(top_builddir)/config.status $(srcdir)/opendmarc-import.8.in
342 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
343 opendmarc-importstats.8: $(top_builddir)/config.status $(srcdir)/opendmarc-importstats.8.in
344 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
345 opendmarc-params: $(top_builddir)/config.status $(srcdir)/opendmarc-params.in
346 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
347 opendmarc-params.8: $(top_builddir)/config.status $(srcdir)/opendmarc-params.8.in
348 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
349 opendmarc-reports: $(top_builddir)/config.status $(srcdir)/opendmarc-reports.in
350 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
351 opendmarc-reports.8: $(top_builddir)/config.status $(srcdir)/opendmarc-reports.8.in
352 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
353 install-dist_sbinSCRIPTS: $(dist_sbin_SCRIPTS)
354 @$(NORMAL_INSTALL)
355 @list='$(dist_sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
356 if test -n "$$list"; then \
357 echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
358 $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
359 fi; \
360 for p in $$list; do \
361 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
362 if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
363 done | \
364 sed -e 'p;s,.*/,,;n' \
365 -e 'h;s|.*|.|' \
366 -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
367 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
368 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
369 if ($$2 == $$4) { files[d] = files[d] " " $$1; \
370 if (++n[d] == $(am__install_max)) { \
371 print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
372 else { print "f", d "/" $$4, $$1 } } \
373 END { for (d in files) print "f", d, files[d] }' | \
374 while read type dir files; do \
375 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
376 test -z "$$files" || { \
377 echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
378 $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
379 } \
380 ; done
381
382 uninstall-dist_sbinSCRIPTS:
383 @$(NORMAL_UNINSTALL)
384 @list='$(dist_sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
385 files=`for p in $$list; do echo "$$p"; done | \
386 sed -e 's,.*/,,;$(transform)'`; \
387 dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir)
388
389 mostlyclean-libtool:
390 -rm -f *.lo
391
392 clean-libtool:
393 -rm -rf .libs _libs
394 install-man8: $(dist_man_MANS)
395 @$(NORMAL_INSTALL)
396 @list1=''; \
397 list2='$(dist_man_MANS)'; \
398 test -n "$(man8dir)" \
399 && test -n "`echo $$list1$$list2`" \
400 || exit 0; \
401 echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
402 $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
403 { for i in $$list1; do echo "$$i"; done; \
404 if test -n "$$list2"; then \
405 for i in $$list2; do echo "$$i"; done \
406 | sed -n '/\.8[a-z]*$$/p'; \
407 fi; \
408 } | while read p; do \
409 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
410 echo "$$d$$p"; echo "$$p"; \
411 done | \
412 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
413 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
414 sed 'N;N;s,\n, ,g' | { \
415 list=; while read file base inst; do \
416 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
417 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
418 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
419 fi; \
420 done; \
421 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
422 while read files; do \
423 test -z "$$files" || { \
424 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
425 $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
426 done; }
427
428 uninstall-man8:
429 @$(NORMAL_UNINSTALL)
430 @list=''; test -n "$(man8dir)" || exit 0; \
431 files=`{ for i in $$list; do echo "$$i"; done; \
432 l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
433 sed -n '/\.8[a-z]*$$/p'; \
434 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
435 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
436 dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
437 install-dist_docDATA: $(dist_doc_DATA)
438 @$(NORMAL_INSTALL)
439 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
440 if test -n "$$list"; then \
441 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
442 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
443 fi; \
444 for p in $$list; do \
445 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
446 echo "$$d$$p"; \
447 done | $(am__base_list) | \
448 while read files; do \
449 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
450 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
451 done
452
453 uninstall-dist_docDATA:
454 @$(NORMAL_UNINSTALL)
455 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
456 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
457 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
458 tags TAGS:
459
460 ctags CTAGS:
461
462 cscope cscopelist:
463
464
465 distdir: $(DISTFILES)
466 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
467 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
468 list='$(DISTFILES)'; \
469 dist_files=`for file in $$list; do echo $$file; done | \
470 sed -e "s|^$$srcdirstrip/||;t" \
471 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
472 case $$dist_files in \
473 */*) $(MKDIR_P) `echo "$$dist_files" | \
474 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
475 sort -u` ;; \
476 esac; \
477 for file in $$dist_files; do \
478 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
479 if test -d $$d/$$file; then \
480 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
481 if test -d "$(distdir)/$$file"; then \
482 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
483 fi; \
484 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
485 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
486 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
487 fi; \
488 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
489 else \
490 test -f "$(distdir)/$$file" \
491 || cp -p $$d/$$file "$(distdir)/$$file" \
492 || exit 1; \
493 fi; \
494 done
495 check-am: all-am
496 check: check-am
497 all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
498 installdirs:
499 for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"; do \
500 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
501 done
502 install: install-am
503 install-exec: install-exec-am
504 install-data: install-data-am
505 uninstall: uninstall-am
506
507 install-am: all-am
508 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
509
510 installcheck: installcheck-am
511 install-strip:
512 if test -z '$(STRIP)'; then \
513 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
514 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
515 install; \
516 else \
517 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
518 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
519 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
520 fi
521 mostlyclean-generic:
522
523 clean-generic:
524
525 distclean-generic:
526 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
527 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
528
529 maintainer-clean-generic:
530 @echo "This command is intended for maintainers to use"
531 @echo "it deletes files that may require special tools to rebuild."
532 clean: clean-am
533
534 clean-am: clean-generic clean-libtool mostlyclean-am
535
536 distclean: distclean-am
537 -rm -f Makefile
538 distclean-am: clean-am distclean-generic
539
540 dvi: dvi-am
541
542 dvi-am:
543
544 html: html-am
545
546 html-am:
547
548 info: info-am
549
550 info-am:
551
552 install-data-am: install-dist_docDATA install-man
553
554 install-dvi: install-dvi-am
555
556 install-dvi-am:
557
558 install-exec-am: install-dist_sbinSCRIPTS
559
560 install-html: install-html-am
561
562 install-html-am:
563
564 install-info: install-info-am
565
566 install-info-am:
567
568 install-man: install-man8
569
570 install-pdf: install-pdf-am
571
572 install-pdf-am:
573
574 install-ps: install-ps-am
575
576 install-ps-am:
577
578 installcheck-am:
579
580 maintainer-clean: maintainer-clean-am
581 -rm -f Makefile
582 maintainer-clean-am: distclean-am maintainer-clean-generic
583
584 mostlyclean: mostlyclean-am
585
586 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
587
588 pdf: pdf-am
589
590 pdf-am:
591
592 ps: ps-am
593
594 ps-am:
595
596 uninstall-am: uninstall-dist_docDATA uninstall-dist_sbinSCRIPTS \
597 uninstall-man
598
599 uninstall-man: uninstall-man8
600
601 .MAKE: install-am install-strip
602
603 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
604 cscopelist-am ctags-am distclean distclean-generic \
605 distclean-libtool distdir dvi dvi-am html html-am info info-am \
606 install install-am install-data install-data-am \
607 install-dist_docDATA install-dist_sbinSCRIPTS install-dvi \
608 install-dvi-am install-exec install-exec-am install-html \
609 install-html-am install-info install-info-am install-man \
610 install-man8 install-pdf install-pdf-am install-ps \
611 install-ps-am install-strip installcheck installcheck-am \
612 installdirs maintainer-clean maintainer-clean-generic \
613 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
614 ps ps-am tags-am uninstall uninstall-am uninstall-dist_docDATA \
615 uninstall-dist_sbinSCRIPTS uninstall-man uninstall-man8
616
617
618 # Tell versions [3.59,3.63) of GNU make to not export all variables.
619 # Otherwise a system limit (for SysV at least) may be exceeded.
620 .NOEXPORT:
0 OPENDMARC REPORTS
1 =================
2
3 This directory contains tools necessary to generate DMARC reports at regular
4 intervals. It includes the following:
5
6 opendmarc-expire perl script to expire old DMARC records from
7 the database; meant to be run from cron
8
9 opendmarc-expire.8 man page for the above
10
11 opendmarc-import perl script to import opendmarc history files
12 into the database; meant to be run from cron
13
14 opendmarc-import.8 man page for the above
15
16 opendmarc-params perl script to adjust domain-specific opendmarc
17 data in the database
18
19 opendmarc-params.8 man page for the above
20
21 opendmarc-reports perl script to generate DMARC reports
22 whenever it is run; meant to be run from cron
23
24 opendmarc-reports.8 man page for the above
25
26 The adjacent "db" directory contains an SQL schema to be used with this
27 package. The opendmarc filter populates the tables in that schema as messages
28 are received and DMARC policies evaluated. The scripts in here use the
29 accumulated information to generate reports, and age out old data.
30
31 To use schema.mysql, enter the MySQL command line tool, connect to the
32 database in which you want to create the required tables, and type
33 "source schema.mysql".
34
35 SETUP
36 =====
37
38 1) From within the MySQL command line environment, "source schema.mysql" to
39 create the required database and tables. You may also wish to set up
40 users and access grants for users that will access this data.
41
42 2) Add a HistoryFile entry to opendmarc.conf referring to the location where
43 per-message DMARC details should be recorded. This location should be
44 readable and writable by the user running the filter, but nobody else.
45
46 3) Add a cron job that will use opendmarc-import to import the history file's
47 contents at regular and fairly frequent intervals (each minute or at least
48 every five minutes). The included opendmarc-importstats script might be
49 useful here. Ensure the appropriate database access parameters (names,
50 users, passwords) are set in the script.
51
52 4) Add a cron job that will run opendmarc-reports to generate and send the
53 XML reports based on recent database entries.
54
55 --
56 Copyright (c) 2012-2014, 2016, 2017, The Trusted Domain Project.
57 All rights reserved.
0 #!/usr/bin/perl
1 #
2 # Copyright (c) 2010-2012, 2014-2016, The Trusted Domain Project.
3 # All rights reserved.
4 #
5 # Script to age out OpenDMARC aggregate report data
6
7 ###
8 ### Setup
9 ###
10
11 use strict;
12 use warnings;
13
14 use DBI;
15 use File::Basename;
16 use Getopt::Long;
17 use IO::Handle;
18 use POSIX;
19
20 require DBD::mysql;
21
22 # general
23 my $progname = basename($0);
24 my $version = "1.3.2";
25 my $verbose = 0;
26 my $helponly = 0;
27 my $showversion = 0;
28 my $alltables = 0;
29
30 my $minmsg;
31 my $rowcount;
32
33 my $dbi_s;
34 my $dbi_h;
35 my $dbi_a;
36
37 # DB parameters
38 my $def_dbhost = "localhost";
39 my $def_dbname = "opendmarc";
40 my $def_dbuser = "opendmarc";
41 my $def_dbpasswd = "opendmarc";
42 my $def_dbport = "3306";
43 my $dbhost;
44 my $dbname;
45 my $dbuser;
46 my $dbpasswd;
47 my $dbport;
48
49 my $dbscheme = "mysql";
50
51 my $def_maxage = 180;
52
53 my $rows;
54 my $maxage;
55
56 ###
57 ### NO user-serviceable parts beyond this point
58 ###
59
60 sub usage
61 {
62 print STDERR "$progname: usage: $progname [options]\n";
63 print STDERR "\t--alltables expire rows from all tables\n";
64 print STDERR "\t--dbhost=host database host [$def_dbhost]\n";
65 print STDERR "\t--dbname=name database name [$def_dbname]\n";
66 print STDERR "\t--dbpasswd=passwd database password [$def_dbpasswd]\n";
67 print STDERR "\t--dbport=port database port [$def_dbport]\n";
68 print STDERR "\t--dbuser=user database user [$def_dbuser]\n";
69 print STDERR "\t--expire=days expiration time, in days [$def_maxage]\n";
70 print STDERR "\t--help print help and exit\n";
71 print STDERR "\t--verbose verbose output\n";
72 print STDERR "\t--version print version and exit\n";
73 }
74
75 # parse command line arguments
76 my $opt_retval = &Getopt::Long::GetOptions ('alltables!' => \$alltables,
77 'dbhost=s' => \$dbhost,
78 'dbname=s' => \$dbname,
79 'dbpasswd=s' => \$dbpasswd,
80 'dbport=s' => \$dbport,
81 'dbuser=s' => \$dbuser,
82 'expire=i' => \$maxage,
83 'help!' => \$helponly,
84 'verbose!' => \$verbose,
85 'version!' => \$showversion,
86 );
87
88 if (!$opt_retval || $helponly)
89 {
90 usage();
91
92 if ($helponly)
93 {
94 exit(0);
95 }
96 else
97 {
98 exit(1);
99 }
100 }
101
102 if ($showversion)
103 {
104 print STDOUT "$progname v$version\n";
105 exit(0);
106 }
107
108 # apply defaults
109 if (!defined($dbhost))
110 {
111 if (defined($ENV{'OPENDMARC_DBHOST'}))
112 {
113 $dbhost = $ENV{'OPENDMARC_DBHOST'};
114 }
115 else
116 {
117 $dbhost = $def_dbhost;
118 }
119 }
120
121 if (!defined($dbname))
122 {
123 if (defined($ENV{'OPENDMARC_DB'}))
124 {
125 $dbname = $ENV{'OPENDMARC_DB'};
126 }
127 else
128 {
129 $dbname = $def_dbname;
130 }
131 }
132
133 if (!defined($dbpasswd))
134 {
135 if (defined($ENV{'OPENDMARC_PASSWORD'}))
136 {
137 $dbpasswd = $ENV{'OPENDMARC_PASSWORD'};
138 }
139 else
140 {
141 $dbpasswd = $def_dbpasswd;
142 }
143 }
144
145 if (!defined($dbport))
146 {
147 if (defined($ENV{'OPENDMARC_PORT'}))
148 {
149 $dbport = $ENV{'OPENDMARC_PORT'};
150 }
151 else
152 {
153 $dbport = $def_dbport;
154 }
155 }
156
157 if (!defined($dbuser))
158 {
159 if (defined($ENV{'OPENDMARC_USER'}))
160 {
161 $dbuser = $ENV{'OPENDMARC_USER'};
162 }
163 else
164 {
165 $dbuser = $def_dbuser;
166 }
167 }
168
169 if (!defined($maxage))
170 {
171 if (defined($ENV{'OPENDMARC_MAXAGE'}))
172 {
173 $maxage = $ENV{'OPENDMARC_MAXAGE'};
174 }
175 else
176 {
177 $maxage = $def_maxage;
178 }
179 }
180
181 # sanity check
182 if ($maxage <= 0)
183 {
184 print STDERR "$progname: invalid expiration time\n";
185 exit(1);
186 }
187
188 #
189 # Let's go!
190 #
191
192 if ($verbose)
193 {
194 print STDERR "$progname: started at " . localtime() . "\n";
195 }
196
197 my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname .
198 ";host=" . $dbhost . ";port=" . $dbport;
199
200 $dbi_h = DBI->connect($dbi_dsn, $dbuser, $dbpasswd, { PrintError => 0 });
201 if (!defined($dbi_h))
202 {
203 print STDERR "$progname: unable to connect to database: $DBI::errstr\n";
204 exit(1);
205 }
206
207 if ($verbose)
208 {
209 print STDERR "$progname: connected to database\n";
210 }
211
212 #
213 # Expire messages
214 #
215
216 if ($verbose)
217 {
218 print STDERR "$progname: expiring messages older than $maxage day(s)\n";
219 }
220
221 $dbi_s = $dbi_h->prepare("DELETE FROM messages WHERE date <= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL ? DAY)");
222 $rows = $dbi_s->execute($maxage);
223 if (!$rows)
224 {
225 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr;
226 $dbi_s->finish;
227 $dbi_h->disconnect;
228 exit(1);
229 }
230 elsif ($verbose)
231 {
232 if ($rows eq "0E0")
233 {
234 print STDOUT "$progname: no rows deleted\n";
235 }
236 else
237 {
238 print STDOUT "$progname: $rows row(s) deleted\n";
239 }
240 }
241
242 $dbi_s->finish;
243
244 #
245 # Expire signatures
246 #
247
248 $dbi_s = $dbi_h->prepare("SELECT MIN(id) FROM messages");
249 if (!$dbi_s->execute)
250 {
251 print STDERR "$progname: SELECT failed: " . $dbi_h->errstr;
252 $dbi_s->finish;
253 $dbi_h->disconnect;
254 exit(1);
255 }
256
257 while ($dbi_a = $dbi_s->fetchrow_arrayref())
258 {
259 $minmsg = $dbi_a->[0];
260 }
261
262 #
263 # We might have emptied the messages table
264 #
265 $dbi_s->finish;
266
267 if (!defined($minmsg))
268 {
269 $dbi_s = $dbi_h->prepare("SELECT COUNT(id) FROM messages");
270 if (!$dbi_s->execute)
271 {
272 print STDERR "$progname: SELECT failed: " . $dbi_h->errstr;
273 $dbi_s->finish;
274 $dbi_h->disconnect;
275 exit(1);
276 }
277
278 while ($dbi_a = $dbi_s->fetchrow_arrayref())
279 {
280 $rowcount = $dbi_a->[0];
281 }
282
283 $dbi_s->finish;
284
285 if (defined($rowcount) && $rowcount == 0)
286 {
287 $dbi_s = $dbi_h->prepare("TRUNCATE TABLE signatures");
288 if (!$dbi_s->execute)
289 {
290 print STDERR "$progname: TRUNCATE failed: " . $dbi_h->errstr;
291 $dbi_s->finish;
292 $dbi_h->disconnect;
293 exit(1);
294 }
295
296 $dbi_s->finish;
297 }
298
299 $dbi_h->disconnect;
300 exit(1);
301 }
302 else
303 {
304 if ($verbose)
305 {
306 print STDERR "$progname: expiring signatures on expired messages (id < $minmsg)\n";
307 }
308
309 $dbi_s = $dbi_h->prepare("DELETE FROM signatures WHERE message < ?");
310 $rows = $dbi_s->execute($minmsg);
311 if (!$rows)
312 {
313 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr;
314 $dbi_s->finish;
315 $dbi_h->disconnect;
316 exit(1);
317 }
318 elsif ($verbose)
319 {
320 if ($rows eq "0E0")
321 {
322 print STDOUT "$progname: no rows deleted\n";
323 }
324 else
325 {
326 print STDOUT "$progname: $rows row(s) deleted\n";
327 }
328 }
329
330 $dbi_s->finish;
331 }
332
333 #
334 # Expire request data
335 #
336
337 if ($verbose)
338 {
339 print STDERR "$progname: expiring request data older than $maxage days\n";
340 }
341
342 $dbi_s = $dbi_h->prepare("DELETE FROM requests WHERE lastsent <= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL ? DAY) AND NOT lastsent = '0000-00-00 00:00:00'");
343 $rows = $dbi_s->execute($maxage);
344 if (!$rows)
345 {
346 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr . "\n";
347 $dbi_s->finish;
348 $dbi_h->disconnect;
349 exit(1);
350 }
351 elsif ($verbose)
352 {
353 if ($rows eq "0E0")
354 {
355 print STDOUT "$progname: no rows deleted\n";
356 }
357 else
358 {
359 print STDOUT "$progname: $rows row(s) deleted\n";
360 }
361 }
362
363 $dbi_s->finish;
364
365 if ($alltables)
366 {
367 if ($verbose)
368 {
369 print STDERR "$progname: expiring unneeded domain data\n";
370 }
371
372 $dbi_s = $dbi_h->prepare("DELETE FROM domains WHERE id NOT IN
373 (SELECT DISTINCT domain FROM requests) AND id NOT IN
374 (SELECT DISTINCT from_domain FROM messages) AND id NOT IN
375 (SELECT DISTINCT env_domain FROM messages) AND id NOT IN
376 (SELECT DISTINCT policy_domain FROM messages) AND id NOT IN
377 (SELECT DISTINCT domain FROM signatures)");
378 $rows = $dbi_s->execute();
379 if (!$rows)
380 {
381 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr . "\n";
382 $dbi_s->finish;
383 $dbi_h->disconnect;
384 exit(1);
385 }
386 elsif ($verbose)
387 {
388 if ($rows eq "0E0")
389 {
390 print STDOUT "$progname: no rows deleted\n";
391 }
392 else
393 {
394 print STDOUT "$progname: $rows row(s) deleted\n";
395 }
396 }
397
398 if ($verbose)
399 {
400 print STDERR "$progname: expiring unneeded IP data\n";
401 }
402
403 $dbi_s = $dbi_h->prepare("DELETE FROM ipaddr WHERE id NOT IN
404 (SELECT DISTINCT ip FROM messages)");
405 $rows = $dbi_s->execute();
406 if (!$rows)
407 {
408 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr . "\n";
409 $dbi_s->finish;
410 $dbi_h->disconnect;
411 exit(1);
412 }
413 elsif ($verbose)
414 {
415 if ($rows eq "0E0")
416 {
417 print STDOUT "$progname: no rows deleted\n";
418 }
419 else
420 {
421 print STDOUT "$progname: $rows row(s) deleted\n";
422 }
423 }
424
425 if ($verbose)
426 {
427 print STDERR "$progname: expiring unneeded reporter data\n";
428 }
429
430 $dbi_s = $dbi_h->prepare("DELETE FROM reporters WHERE id NOT IN
431 (SELECT DISTINCT reporter FROM messages)");
432 $rows = $dbi_s->execute();
433 if (!$rows)
434 {
435 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr . "\n";
436 $dbi_s->finish;
437 $dbi_h->disconnect;
438 exit(1);
439 }
440 elsif ($verbose)
441 {
442 if ($rows eq "0E0")
443 {
444 print STDOUT "$progname: no rows deleted\n";
445 }
446 else
447 {
448 print STDOUT "$progname: $rows row(s) deleted\n";
449 }
450 }
451 }
452
453 #
454 # All done!
455 #
456
457 if ($verbose)
458 {
459 print STDERR "$progname: terminating at " . localtime() . "\n";
460 }
461
462 $dbi_h->disconnect;
463
464 exit(0);
0 .TH opendmarc-expire 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-expire
3 \- OpenDMARC history data expiration tool
4 .SH SYNOPSIS
5 .B opendmarc-expire
6 [options]
7 .SH DESCRIPTION
8 .B opendmarc-expire
9 expires old records from the database that is part of the OpenDMARC aggregate
10 reporting feature.
11 .SH OPTIONS
12 .TP
13 .I --alltables
14 Expire records in all tables rather than only the large ones.
15 .TP
16 .I --dbhost=host
17 Attempts to connect to the database server on the named
18 .I host.
19 The default is "localhost".
20 .TP
21 .I --dbname=name
22 Requests a connection to the database called
23 .I name.
24 The default is "opendmarc".
25 .TP
26 .I --dbpasswd=password
27 Attempts to authenticate to the database server using the specified
28 .I password.
29 The default is "opendmarc".
30 .TP
31 .I --dbport=port
32 Tries to connect to the database at the specified TCP
33 .I port.
34 The default is 3306.
35 .TP
36 .I --dbuser=user
37 Attempts to authenticate to the database server as the specified
38 .I user.
39 The default is "opendmarc".
40 .TP
41 .I --expire=days
42 Indicates the number of days of data to keep. The default is 180.
43 .TP
44 .I --help
45 Prints a usage message and exits.
46 .TP
47 .I --verbose
48 Requests verbose output.
49 .TP
50 .I --version
51 Prints version number and exits.
52 .SH VERSION
53 This man page covers the version of
54 .I opendmarc-expire
55 that shipped with version 1.3.2 of
56 .I OpenDMARC.
57 .SH COPYRIGHT
58 Copyright (c) 2012, 2014, The Trusted Domain Project. All rights reserved.
59 .SH SEE ALSO
60 .I opendmarc(8),
61 .I opendmarc-import(8)
0 .TH opendmarc-expire 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-expire
3 \- OpenDMARC history data expiration tool
4 .SH SYNOPSIS
5 .B opendmarc-expire
6 [options]
7 .SH DESCRIPTION
8 .B opendmarc-expire
9 expires old records from the database that is part of the OpenDMARC aggregate
10 reporting feature.
11 .SH OPTIONS
12 .TP
13 .I --alltables
14 Expire records in all tables rather than only the large ones.
15 .TP
16 .I --dbhost=host
17 Attempts to connect to the database server on the named
18 .I host.
19 The default is "localhost".
20 .TP
21 .I --dbname=name
22 Requests a connection to the database called
23 .I name.
24 The default is "opendmarc".
25 .TP
26 .I --dbpasswd=password
27 Attempts to authenticate to the database server using the specified
28 .I password.
29 The default is "opendmarc".
30 .TP
31 .I --dbport=port
32 Tries to connect to the database at the specified TCP
33 .I port.
34 The default is 3306.
35 .TP
36 .I --dbuser=user
37 Attempts to authenticate to the database server as the specified
38 .I user.
39 The default is "opendmarc".
40 .TP
41 .I --expire=days
42 Indicates the number of days of data to keep. The default is 180.
43 .TP
44 .I --help
45 Prints a usage message and exits.
46 .TP
47 .I --verbose
48 Requests verbose output.
49 .TP
50 .I --version
51 Prints version number and exits.
52 .SH VERSION
53 This man page covers the version of
54 .I opendmarc-expire
55 that shipped with version @VERSION@ of
56 .I OpenDMARC.
57 .SH COPYRIGHT
58 Copyright (c) 2012, 2014, The Trusted Domain Project. All rights reserved.
59 .SH SEE ALSO
60 .I opendmarc(8),
61 .I opendmarc-import(8)
0 #!/usr/bin/perl
1 #
2 # Copyright (c) 2010-2012, 2014-2016, The Trusted Domain Project.
3 # All rights reserved.
4 #
5 # Script to age out OpenDMARC aggregate report data
6
7 ###
8 ### Setup
9 ###
10
11 use strict;
12 use warnings;
13
14 use DBI;
15 use File::Basename;
16 use Getopt::Long;
17 use IO::Handle;
18 use POSIX;
19
20 require DBD::@SQL_BACKEND@;
21
22 # general
23 my $progname = basename($0);
24 my $version = "@VERSION@";
25 my $verbose = 0;
26 my $helponly = 0;
27 my $showversion = 0;
28 my $alltables = 0;
29
30 my $minmsg;
31 my $rowcount;
32
33 my $dbi_s;
34 my $dbi_h;
35 my $dbi_a;
36
37 # DB parameters
38 my $def_dbhost = "localhost";
39 my $def_dbname = "opendmarc";
40 my $def_dbuser = "opendmarc";
41 my $def_dbpasswd = "opendmarc";
42 my $def_dbport = "3306";
43 my $dbhost;
44 my $dbname;
45 my $dbuser;
46 my $dbpasswd;
47 my $dbport;
48
49 my $dbscheme = "@SQL_BACKEND@";
50
51 my $def_maxage = 180;
52
53 my $rows;
54 my $maxage;
55
56 ###
57 ### NO user-serviceable parts beyond this point
58 ###
59
60 sub usage
61 {
62 print STDERR "$progname: usage: $progname [options]\n";
63 print STDERR "\t--alltables expire rows from all tables\n";
64 print STDERR "\t--dbhost=host database host [$def_dbhost]\n";
65 print STDERR "\t--dbname=name database name [$def_dbname]\n";
66 print STDERR "\t--dbpasswd=passwd database password [$def_dbpasswd]\n";
67 print STDERR "\t--dbport=port database port [$def_dbport]\n";
68 print STDERR "\t--dbuser=user database user [$def_dbuser]\n";
69 print STDERR "\t--expire=days expiration time, in days [$def_maxage]\n";
70 print STDERR "\t--help print help and exit\n";
71 print STDERR "\t--verbose verbose output\n";
72 print STDERR "\t--version print version and exit\n";
73 }
74
75 # parse command line arguments
76 my $opt_retval = &Getopt::Long::GetOptions ('alltables!' => \$alltables,
77 'dbhost=s' => \$dbhost,
78 'dbname=s' => \$dbname,
79 'dbpasswd=s' => \$dbpasswd,
80 'dbport=s' => \$dbport,
81 'dbuser=s' => \$dbuser,
82 'expire=i' => \$maxage,
83 'help!' => \$helponly,
84 'verbose!' => \$verbose,
85 'version!' => \$showversion,
86 );
87
88 if (!$opt_retval || $helponly)
89 {
90 usage();
91
92 if ($helponly)
93 {
94 exit(0);
95 }
96 else
97 {
98 exit(1);
99 }
100 }
101
102 if ($showversion)
103 {
104 print STDOUT "$progname v$version\n";
105 exit(0);
106 }
107
108 # apply defaults
109 if (!defined($dbhost))
110 {
111 if (defined($ENV{'OPENDMARC_DBHOST'}))
112 {
113 $dbhost = $ENV{'OPENDMARC_DBHOST'};
114 }
115 else
116 {
117 $dbhost = $def_dbhost;
118 }
119 }
120
121 if (!defined($dbname))
122 {
123 if (defined($ENV{'OPENDMARC_DB'}))
124 {
125 $dbname = $ENV{'OPENDMARC_DB'};
126 }
127 else
128 {
129 $dbname = $def_dbname;
130 }
131 }
132
133 if (!defined($dbpasswd))
134 {
135 if (defined($ENV{'OPENDMARC_PASSWORD'}))
136 {
137 $dbpasswd = $ENV{'OPENDMARC_PASSWORD'};
138 }
139 else
140 {
141 $dbpasswd = $def_dbpasswd;
142 }
143 }
144
145 if (!defined($dbport))
146 {
147 if (defined($ENV{'OPENDMARC_PORT'}))
148 {
149 $dbport = $ENV{'OPENDMARC_PORT'};
150 }
151 else
152 {
153 $dbport = $def_dbport;
154 }
155 }
156
157 if (!defined($dbuser))
158 {
159 if (defined($ENV{'OPENDMARC_USER'}))
160 {
161 $dbuser = $ENV{'OPENDMARC_USER'};
162 }
163 else
164 {
165 $dbuser = $def_dbuser;
166 }
167 }
168
169 if (!defined($maxage))
170 {
171 if (defined($ENV{'OPENDMARC_MAXAGE'}))
172 {
173 $maxage = $ENV{'OPENDMARC_MAXAGE'};
174 }
175 else
176 {
177 $maxage = $def_maxage;
178 }
179 }
180
181 # sanity check
182 if ($maxage <= 0)
183 {
184 print STDERR "$progname: invalid expiration time\n";
185 exit(1);
186 }
187
188 #
189 # Let's go!
190 #
191
192 if ($verbose)
193 {
194 print STDERR "$progname: started at " . localtime() . "\n";
195 }
196
197 my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname .
198 ";host=" . $dbhost . ";port=" . $dbport;
199
200 $dbi_h = DBI->connect($dbi_dsn, $dbuser, $dbpasswd, { PrintError => 0 });
201 if (!defined($dbi_h))
202 {
203 print STDERR "$progname: unable to connect to database: $DBI::errstr\n";
204 exit(1);
205 }
206
207 if ($verbose)
208 {
209 print STDERR "$progname: connected to database\n";
210 }
211
212 #
213 # Expire messages
214 #
215
216 if ($verbose)
217 {
218 print STDERR "$progname: expiring messages older than $maxage day(s)\n";
219 }
220
221 $dbi_s = $dbi_h->prepare("DELETE FROM messages WHERE date <= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL ? DAY)");
222 $rows = $dbi_s->execute($maxage);
223 if (!$rows)
224 {
225 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr;
226 $dbi_s->finish;
227 $dbi_h->disconnect;
228 exit(1);
229 }
230 elsif ($verbose)
231 {
232 if ($rows eq "0E0")
233 {
234 print STDOUT "$progname: no rows deleted\n";
235 }
236 else
237 {
238 print STDOUT "$progname: $rows row(s) deleted\n";
239 }
240 }
241
242 $dbi_s->finish;
243
244 #
245 # Expire signatures
246 #
247
248 $dbi_s = $dbi_h->prepare("SELECT MIN(id) FROM messages");
249 if (!$dbi_s->execute)
250 {
251 print STDERR "$progname: SELECT failed: " . $dbi_h->errstr;
252 $dbi_s->finish;
253 $dbi_h->disconnect;
254 exit(1);
255 }
256
257 while ($dbi_a = $dbi_s->fetchrow_arrayref())
258 {
259 $minmsg = $dbi_a->[0];
260 }
261
262 #
263 # We might have emptied the messages table
264 #
265 $dbi_s->finish;
266
267 if (!defined($minmsg))
268 {
269 $dbi_s = $dbi_h->prepare("SELECT COUNT(id) FROM messages");
270 if (!$dbi_s->execute)
271 {
272 print STDERR "$progname: SELECT failed: " . $dbi_h->errstr;
273 $dbi_s->finish;
274 $dbi_h->disconnect;
275 exit(1);
276 }
277
278 while ($dbi_a = $dbi_s->fetchrow_arrayref())
279 {
280 $rowcount = $dbi_a->[0];
281 }
282
283 $dbi_s->finish;
284
285 if (defined($rowcount) && $rowcount == 0)
286 {
287 $dbi_s = $dbi_h->prepare("TRUNCATE TABLE signatures");
288 if (!$dbi_s->execute)
289 {
290 print STDERR "$progname: TRUNCATE failed: " . $dbi_h->errstr;
291 $dbi_s->finish;
292 $dbi_h->disconnect;
293 exit(1);
294 }
295
296 $dbi_s->finish;
297 }
298
299 $dbi_h->disconnect;
300 exit(1);
301 }
302 else
303 {
304 if ($verbose)
305 {
306 print STDERR "$progname: expiring signatures on expired messages (id < $minmsg)\n";
307 }
308
309 $dbi_s = $dbi_h->prepare("DELETE FROM signatures WHERE message < ?");
310 $rows = $dbi_s->execute($minmsg);
311 if (!$rows)
312 {
313 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr;
314 $dbi_s->finish;
315 $dbi_h->disconnect;
316 exit(1);
317 }
318 elsif ($verbose)
319 {
320 if ($rows eq "0E0")
321 {
322 print STDOUT "$progname: no rows deleted\n";
323 }
324 else
325 {
326 print STDOUT "$progname: $rows row(s) deleted\n";
327 }
328 }
329
330 $dbi_s->finish;
331 }
332
333 #
334 # Expire request data
335 #
336
337 if ($verbose)
338 {
339 print STDERR "$progname: expiring request data older than $maxage days\n";
340 }
341
342 $dbi_s = $dbi_h->prepare("DELETE FROM requests WHERE lastsent <= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL ? DAY) AND NOT lastsent = '0000-00-00 00:00:00'");
343 $rows = $dbi_s->execute($maxage);
344 if (!$rows)
345 {
346 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr . "\n";
347 $dbi_s->finish;
348 $dbi_h->disconnect;
349 exit(1);
350 }
351 elsif ($verbose)
352 {
353 if ($rows eq "0E0")
354 {
355 print STDOUT "$progname: no rows deleted\n";
356 }
357 else
358 {
359 print STDOUT "$progname: $rows row(s) deleted\n";
360 }
361 }
362
363 $dbi_s->finish;
364
365 if ($alltables)
366 {
367 if ($verbose)
368 {
369 print STDERR "$progname: expiring unneeded domain data\n";
370 }
371
372 $dbi_s = $dbi_h->prepare("DELETE FROM domains WHERE id NOT IN
373 (SELECT DISTINCT domain FROM requests) AND id NOT IN
374 (SELECT DISTINCT from_domain FROM messages) AND id NOT IN
375 (SELECT DISTINCT env_domain FROM messages) AND id NOT IN
376 (SELECT DISTINCT policy_domain FROM messages) AND id NOT IN
377 (SELECT DISTINCT domain FROM signatures)");
378 $rows = $dbi_s->execute();
379 if (!$rows)
380 {
381 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr . "\n";
382 $dbi_s->finish;
383 $dbi_h->disconnect;
384 exit(1);
385 }
386 elsif ($verbose)
387 {
388 if ($rows eq "0E0")
389 {
390 print STDOUT "$progname: no rows deleted\n";
391 }
392 else
393 {
394 print STDOUT "$progname: $rows row(s) deleted\n";
395 }
396 }
397
398 if ($verbose)
399 {
400 print STDERR "$progname: expiring unneeded IP data\n";
401 }
402
403 $dbi_s = $dbi_h->prepare("DELETE FROM ipaddr WHERE id NOT IN
404 (SELECT DISTINCT ip FROM messages)");
405 $rows = $dbi_s->execute();
406 if (!$rows)
407 {
408 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr . "\n";
409 $dbi_s->finish;
410 $dbi_h->disconnect;
411 exit(1);
412 }
413 elsif ($verbose)
414 {
415 if ($rows eq "0E0")
416 {
417 print STDOUT "$progname: no rows deleted\n";
418 }
419 else
420 {
421 print STDOUT "$progname: $rows row(s) deleted\n";
422 }
423 }
424
425 if ($verbose)
426 {
427 print STDERR "$progname: expiring unneeded reporter data\n";
428 }
429
430 $dbi_s = $dbi_h->prepare("DELETE FROM reporters WHERE id NOT IN
431 (SELECT DISTINCT reporter FROM messages)");
432 $rows = $dbi_s->execute();
433 if (!$rows)
434 {
435 print STDERR "$progname: DELETE failed: " . $dbi_h->errstr . "\n";
436 $dbi_s->finish;
437 $dbi_h->disconnect;
438 exit(1);
439 }
440 elsif ($verbose)
441 {
442 if ($rows eq "0E0")
443 {
444 print STDOUT "$progname: no rows deleted\n";
445 }
446 else
447 {
448 print STDOUT "$progname: $rows row(s) deleted\n";
449 }
450 }
451 }
452
453 #
454 # All done!
455 #
456
457 if ($verbose)
458 {
459 print STDERR "$progname: terminating at " . localtime() . "\n";
460 }
461
462 $dbi_h->disconnect;
463
464 exit(0);
0 #!/usr/bin/perl
1 #
2 # Copyright (c) 2012, 2014, The Trusted Domain Project. All rights reserved.
3 #
4 # Script to import per-message DMARC data.
5
6 ###
7 ### Setup
8 ###
9
10 use strict;
11 use warnings;
12
13 use Switch;
14
15 use DBI;
16 use File::Basename;
17 use Fcntl qw(:flock);
18 use Getopt::Long;
19 use POSIX;
20
21 require DBD::mysql;
22
23 # general
24 my $progname = basename($0);
25 my $version = "1.3.2";
26 my $verbose = 0;
27 my $helponly = 0;
28 my $showversion = 0;
29
30 # DB parameters
31 my $def_dbhost = "localhost";
32 my $def_dbname = "opendmarc";
33 my $def_dbuser = "opendmarc";
34 my $def_dbpasswd = "opendmarc";
35 my $def_dbport = "3306";
36 my $def_interval = "86400";
37 my $dbhost;
38 my $dbname;
39 my $dbuser;
40 my $dbpasswd;
41 my $dbport;
42
43 my $dbscheme = "mysql";
44
45 my $dbi_a;
46 my $dbi_h;
47 my $dbi_s;
48 my $dbi_t;
49
50 my $lineno;
51 my $key;
52 my $value;
53
54 my $action;
55 my $adkim;
56 my $align_dkim;
57 my $align_spf;
58 my $aspf;
59 my $dd;
60 my $dkim_align;
61 my @dkim_data;
62 my $dkim_domain;
63 my @dkim_entry;
64 my $dkim_result;
65 my $envdomain;
66 my $fdomain;
67 my $ipaddr;
68 my $jobid;
69 my $p;
70 my $pct;
71 my $pdomain;
72 my $policy;
73 my $received;
74 my $reporter;
75 my $repuri;
76 my $sigcount = 0;
77 my $sp;
78 my $spf;
79 my @rua;
80
81 ###
82 ### NO user-serviceable parts beyond this point
83 ###
84
85 sub get_value
86 {
87 my $table;
88 my $column;
89 my $id;
90 my $out;
91
92 ($table, $column, $id) = @_;
93
94 $dbi_t = $dbi_h->prepare("SELECT $column FROM $table WHERE id = ?");
95 if (!$dbi_t->execute($id))
96 {
97 print STDERR "$progname: failed to $column value for ID $id: " . $dbi_h->errstr . "\n";
98 return undef;
99 }
100
101 while ($dbi_a = $dbi_t->fetchrow_arrayref())
102 {
103 if (defined($dbi_a->[0]))
104 {
105 $out = $dbi_a->[0];
106 }
107 }
108
109 return $out;
110 }
111
112 sub get_table_id
113 {
114 my $name;
115 my $table;
116 my $column;
117 my $out;
118
119 ($name, $table, $column) = @_;
120
121 if (!defined($name) || !defined($table))
122 {
123 return undef;
124 }
125
126 if (!defined($column))
127 {
128 $column = "name";
129 }
130
131 $dbi_t = $dbi_h->prepare("SELECT id FROM $table WHERE $column = ?");
132 if (!$dbi_t->execute($name))
133 {
134 print STDERR "$progname: failed to retrieve table ID: " . $dbi_h->errstr . "\n";
135 return undef;
136 }
137
138 undef $out;
139 while ($dbi_a = $dbi_t->fetchrow_arrayref())
140 {
141 if (defined($dbi_a->[0]))
142 {
143 $out = $dbi_a->[0];
144 }
145 }
146
147 $dbi_t->finish;
148
149 if (!defined($out))
150 {
151 $dbi_t = $dbi_h->prepare("INSERT INTO $table ($column) VALUES(?)");
152 if (!$dbi_t->execute($name))
153 {
154 print STDERR "$progname: failed to create table ID: " . $dbi_h->errstr . "\n";
155 return undef;
156 }
157
158 $dbi_t = $dbi_h->prepare("SELECT LAST_INSERT_ID()");
159 if (!$dbi_t->execute())
160 {
161 print STDERR "$progname: failed to retrieve created table ID: " . $dbi_h->errstr . "\n";
162 return undef;
163 }
164
165 while ($dbi_a = $dbi_t->fetchrow_arrayref())
166 {
167 if (defined($dbi_a->[0]))
168 {
169 $out = $dbi_a->[0];
170 }
171 }
172
173 $dbi_t->finish;
174
175 if (!defined($out))
176 {
177 print STDERR "$progname: failed to retrieve created table ID: " . $dbi_h->errstr . "\n";
178 return undef;
179 }
180 }
181
182 return $out;
183 }
184
185 sub update_db
186 {
187 my $rep_id;
188 my $from_id;
189 my $envfrom_id;
190 my $pdomain_id;
191 my $ipaddr_id;
192 my $msg_id;
193 my $sdomain_id;
194 my $request_id;
195
196 if ($verbose)
197 {
198 print STDERR "$progname: updating at line $lineno\n";
199 }
200
201 $rep_id = get_table_id($reporter, "reporters");
202 $from_id = get_table_id($fdomain, "domains");
203 $envfrom_id = get_table_id($envdomain, "domains");
204 $pdomain_id = get_table_id($pdomain, "domains");
205 $ipaddr_id = get_table_id($ipaddr, "ipaddr", "addr");
206 $request_id = get_table_id($from_id, "requests", "domain");
207
208 if (!defined($rep_id) ||
209 !defined($from_id) ||
210 !defined($envfrom_id) ||
211 !defined($pdomain_id) ||
212 !defined($ipaddr_id) ||
213 !defined($request_id))
214 {
215 return;
216 }
217
218 $dbi_s = $dbi_h->prepare("INSERT INTO messages (date, jobid, reporter, policy, disp, ip, env_domain, from_domain, spf, align_spf, align_dkim, sigcount) VALUES(FROM_UNIXTIME(?), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
219 if (!$dbi_s->execute($received, $jobid, $rep_id, $policy, $action, $ipaddr_id, $envfrom_id, $from_id, $spf, $align_spf, $align_dkim, $sigcount))
220 {
221 print STDERR "$progname: failed to insert message: " . $dbi_h->errstr . "\n";
222 return;
223 }
224
225 $dbi_s->finish;
226
227 undef $msg_id;
228 $dbi_s = $dbi_h->prepare("SELECT LAST_INSERT_ID()");
229 if (!$dbi_s->execute())
230 {
231 print STDERR "$progname: failed to retrieve message ID: " . $dbi_h->errstr . "\n";
232 return;
233 }
234
235 while ($dbi_a = $dbi_s->fetchrow_arrayref())
236 {
237 if (defined($dbi_a->[0]))
238 {
239 $msg_id = $dbi_a->[0];
240 }
241 }
242
243 $dbi_s->finish;
244
245 if (!defined($msg_id))
246 {
247 print STDERR "$progname: failed to retrieve message ID: " . $dbi_h->errstr . "\n";
248 return;
249 }
250
251 $dbi_s = $dbi_h->prepare("INSERT INTO signatures (message, domain, pass, error) VALUES(?, ?, ?, ?)");
252 foreach $dd (0 .. $#dkim_data)
253 {
254 my $sdomain;
255 my $pass;
256 my $error;
257
258 $sdomain = $dkim_data[$dd][0];
259 $pass = $dkim_data[$dd][1];
260 $error = $dkim_data[$dd][2];
261
262 $sdomain_id = get_table_id($sdomain, "domains");
263 if (!defined($sdomain_id))
264 {
265 next;
266 }
267
268 if (!$dbi_s->execute($msg_id, $sdomain_id, $pass, $error))
269 {
270 print STDERR "$progname: failed to insert DKIM data: " . $dbi_h->errstr . "\n";
271 $dbi_s->finish;
272 return;
273 }
274 }
275 $dbi_s->finish;
276
277 if (get_value("requests", "locked", $request_id) != 1)
278 {
279 if (scalar @rua > 0)
280 {
281 $repuri = join(",", @rua);
282 $dbi_s = $dbi_h->prepare("UPDATE requests SET repuri = ? WHERE id = ?");
283
284 if (!$dbi_s->execute($repuri, $request_id))
285 {
286 print STDERR "$progname: failed to update reporting URI for $fdomain: " . $dbi_h->errstr . "\n";
287 $dbi_s->finish;
288 return;
289 }
290
291 $dbi_s->finish;
292 }
293 else
294 {
295 $dbi_s = $dbi_h->prepare("UPDATE requests SET repuri = NULL WHERE id = ?");
296
297 if (!$dbi_s->execute($request_id))
298 {
299 print STDERR "$progname: failed to update reporting URI for $fdomain: " . $dbi_h->errstr . "\n";
300 $dbi_s->finish;
301 return;
302 }
303
304 $dbi_s->finish;
305 }
306
307 $dbi_s = $dbi_h->prepare("UPDATE requests SET adkim = ?, aspf = ?, policy = ?, spolicy = ?, pct = ? WHERE id = ?");
308
309 if (!$dbi_s->execute($adkim, $aspf, $p, $sp, $pct, $request_id))
310 {
311 print STDERR "$progname: failed to update policy data for $fdomain: " . $dbi_h->errstr . "\n";
312 $dbi_s->finish;
313 return;
314 }
315 }
316
317 $dbi_s->finish;
318 }
319
320 sub usage
321 {
322 print STDERR "$progname: usage: $progname [options]\n";
323 print STDERR "\t--dbhost=host database host [$def_dbhost]\n";
324 print STDERR "\t--dbname=name database name [$def_dbname]\n";
325 print STDERR "\t--dbpasswd=passwd database password [$def_dbpasswd]\n";
326 print STDERR "\t--dbport=port database port [$def_dbport]\n";
327 print STDERR "\t--dbuser=user database user [$def_dbuser]\n";
328 print STDERR "\t--help print help and exit\n";
329 print STDERR "\t--verbose verbose output\n";
330 print STDERR "\t--version print version and exit\n";
331 }
332
333 # parse command line arguments
334 my $opt_retval = &Getopt::Long::GetOptions ('dbhost=s' => \$dbhost,
335 'dbname=s' => \$dbname,
336 'dbpasswd=s' => \$dbpasswd,
337 'dbport=s' => \$dbport,
338 'dbuser=s' => \$dbuser,
339 'help!' => \$helponly,
340 'verbose!' => \$verbose,
341 'version!' => \$showversion,
342 );
343
344 if (!$opt_retval || $helponly)
345 {
346 usage();
347
348 if ($helponly)
349 {
350 exit(0);
351 }
352 else
353 {
354 exit(1);
355 }
356 }
357
358 if ($showversion)
359 {
360 print STDOUT "$progname v$version\n";
361 exit(0);
362 }
363
364 # apply defaults
365 if (!defined($dbhost))
366 {
367 if (defined($ENV{'OPENDMARC_DBHOST'}))
368 {
369 $dbhost = $ENV{'OPENDMARC_DBHOST'};
370 }
371 else
372 {
373 $dbhost = $def_dbhost;
374 }
375 }
376
377 if (!defined($dbname))
378 {
379 if (defined($ENV{'OPENDMARC_DB'}))
380 {
381 $dbname = $ENV{'OPENDMARC_DB'};
382 }
383 else
384 {
385 $dbname = $def_dbname;
386 }
387 }
388
389 if (!defined($dbpasswd))
390 {
391 if (defined($ENV{'OPENDMARC_PASSWORD'}))
392 {
393 $dbpasswd = $ENV{'OPENDMARC_PASSWORD'};
394 }
395 else
396 {
397 $dbpasswd = $def_dbpasswd;
398 }
399 }
400
401 if (!defined($dbport))
402 {
403 if (defined($ENV{'OPENDMARC_PORT'}))
404 {
405 $dbport = $ENV{'OPENDMARC_PORT'};
406 }
407 else
408 {
409 $dbport = $def_dbport;
410 }
411 }
412
413 if (!defined($dbuser))
414 {
415 if (defined($ENV{'OPENDMARC_USER'}))
416 {
417 $dbuser = $ENV{'OPENDMARC_USER'};
418 }
419 else
420 {
421 $dbuser = $def_dbuser;
422 }
423 }
424
425 if ($verbose)
426 {
427 print STDERR "$progname: started at " . localtime() . "\n";
428 }
429
430 my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname .
431 ";host=" . $dbhost . ";port=" . $dbport;
432
433 $dbi_h = DBI->connect($dbi_dsn, $dbuser, $dbpasswd, { PrintError => 0 });
434 if (!defined($dbi_h))
435 {
436 print STDERR "$progname: unable to connect to database: $DBI::errstr\n";
437 exit(1);
438 }
439
440 if ($verbose)
441 {
442 print STDERR "$progname: connected to database\n";
443 }
444
445 #
446 # Read history file from stdin.
447 #
448
449 $lineno = 0;
450 if (!flock(STDIN, LOCK_SH))
451 {
452 print STDERR "$progname: warning: unable to establish read lock\n";
453 }
454
455 while (<STDIN>)
456 {
457 $lineno++;
458
459 chomp;
460 ($key, $value, $dkim_result) = split;
461
462 switch ($key)
463 {
464 case "action" {
465 $action = $value;
466 }
467
468 case "adkim" {
469 $adkim = $value;
470 }
471
472 case "align_dkim" {
473 $align_dkim = $value;
474 }
475
476 case "align_spf" {
477 $align_spf = $value;
478 }
479
480 case "aspf" {
481 $aspf = $value;
482 }
483
484 case "dkim" {
485 undef @dkim_entry;
486 push(@dkim_entry, $value);
487 push(@dkim_entry, $dkim_result);
488 if ($dkim_result eq "4" ||
489 $dkim_result eq "5")
490 {
491 push(@dkim_entry, 1);
492 }
493 else
494 {
495 push(@dkim_entry, 0);
496 }
497 push(@dkim_data, [ @dkim_entry ]);
498
499 $sigcount++;
500 }
501
502 case "from" {
503 $fdomain = $value;
504 }
505
506 case "job" {
507 if (defined($jobid))
508 {
509 update_db();
510
511 undef $action;
512 undef $adkim;
513 undef $align_dkim;
514 undef $align_spf;
515 undef $aspf;
516 undef @dkim_data;
517 undef $envdomain;
518 undef $fdomain;
519 undef $ipaddr;
520 undef $jobid;
521 undef $p;
522 undef $pct;
523 undef $pdomain;
524 undef $policy;
525 undef $received;
526 undef $reporter;
527 undef @rua;
528 $sigcount = 0;
529 undef $sp;
530 undef $spf;
531 }
532
533 $jobid = $value;
534 }
535
536 case "ipaddr" {
537 $ipaddr = $value;
538 }
539
540 case "mfrom" {
541 $envdomain = $value;
542 }
543
544 case "p" {
545 $p = $value;
546 }
547
548 case "pct" {
549 $pct = $value;
550 }
551
552 case "pdomain" {
553 $pdomain = $value;
554 }
555
556 case "policy" {
557 $policy = $value;
558 }
559
560 case "received" {
561 $received = $value;
562 }
563
564 case "reporter" {
565 $reporter = $value;
566 }
567
568 case "rua" {
569 if ($value ne "-")
570 {
571 push(@rua, $value);
572 }
573 }
574
575 case "sp" {
576 $sp = $value;
577 }
578
579 case "spf" {
580 $spf = $value;
581 }
582
583 else {
584 print STDERR "$progname: unknown key '$key' at line $lineno\n";
585 }
586 }
587 }
588
589 if (defined($jobid))
590 {
591 update_db();
592 }
593
594 #
595 # all done!
596 #
597
598 if ($verbose)
599 {
600 print STDERR "$progname: terminating at " . localtime() . "\n";
601 }
602
603 $dbi_h->disconnect;
604
605 exit(0);
0 .TH opendmarc-import 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-import
3 \- OpenDMARC aggregate report data import tool
4 .SH SYNOPSIS
5 .B opendmarc-import
6 [options]
7 .SH DESCRIPTION
8 .B opendmarc-import
9 reads per-message data recorded by an instance of
10 .B opendmarc(8)
11 and inserts it into an SQL database, for later use by
12 .B opendmarc-reports(8)
13 to generate aggregate reports.
14
15 Records are read from standard input.
16 .SH OPTIONS
17 .TP
18 .I --dbhost=hostname
19 Specifies the hostname on which the SQL server is running. Defaults to
20 the value of the environment variable OPENDMARC_DBHOST, or "localhost" if
21 the environment variable is not set.
22 .TP
23 .I --dbname=name
24 Specifies the SQL database name to be accessed. Defaults to
25 the value of the environment variable OPENDMARC_DB, or "opendmarc" if
26 the environment variable is not set.
27 .TP
28 .I --dbpasswd=password
29 Specifies the password for the SQL database to be accessed. Defaults to
30 the value of the environment variable OPENDMARC_PASSWORD, or "opendmarc" if
31 the environment variable is not set.
32 .TP
33 .I --dbport=port
34 Specifies the TCP port on which the SQL server is expected to be listening.
35 Defaults to the value of the environment variable OPENDMARC_PORT, or 3306
36 if the environment variable is not set.
37 .TP
38 .I --dbuser=user
39 Specifies the SQL user to be used to access the database. Defaults to
40 the value of the environment variable OPENDMARC_USER, or "opendmarc" if
41 the environment variable is not set.
42 .TP
43 .I --help
44 Prints a help message and terminates.
45 .TP
46 .I --verbose
47 Increase the amount of verbosity written to standard output.
48 .TP
49 .I --version
50 Print version number and exit.
51 .SH VERSION
52 This man page covers the version of
53 .I opendmarc-import
54 that shipped with version 1.3.2 of
55 .I OpenDMARC.
56 .SH COPYRIGHT
57 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
58 .SH SEE ALSO
59 .I opendmarc(8),
60 .I opendmarc.conf(5)
61 .I opendmarc-reports(8)
0 .TH opendmarc-import 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-import
3 \- OpenDMARC aggregate report data import tool
4 .SH SYNOPSIS
5 .B opendmarc-import
6 [options]
7 .SH DESCRIPTION
8 .B opendmarc-import
9 reads per-message data recorded by an instance of
10 .B opendmarc(8)
11 and inserts it into an SQL database, for later use by
12 .B opendmarc-reports(8)
13 to generate aggregate reports.
14
15 Records are read from standard input.
16 .SH OPTIONS
17 .TP
18 .I --dbhost=hostname
19 Specifies the hostname on which the SQL server is running. Defaults to
20 the value of the environment variable OPENDMARC_DBHOST, or "localhost" if
21 the environment variable is not set.
22 .TP
23 .I --dbname=name
24 Specifies the SQL database name to be accessed. Defaults to
25 the value of the environment variable OPENDMARC_DB, or "opendmarc" if
26 the environment variable is not set.
27 .TP
28 .I --dbpasswd=password
29 Specifies the password for the SQL database to be accessed. Defaults to
30 the value of the environment variable OPENDMARC_PASSWORD, or "opendmarc" if
31 the environment variable is not set.
32 .TP
33 .I --dbport=port
34 Specifies the TCP port on which the SQL server is expected to be listening.
35 Defaults to the value of the environment variable OPENDMARC_PORT, or 3306
36 if the environment variable is not set.
37 .TP
38 .I --dbuser=user
39 Specifies the SQL user to be used to access the database. Defaults to
40 the value of the environment variable OPENDMARC_USER, or "opendmarc" if
41 the environment variable is not set.
42 .TP
43 .I --help
44 Prints a help message and terminates.
45 .TP
46 .I --verbose
47 Increase the amount of verbosity written to standard output.
48 .TP
49 .I --version
50 Print version number and exit.
51 .SH VERSION
52 This man page covers the version of
53 .I opendmarc-import
54 that shipped with version @VERSION@ of
55 .I OpenDMARC.
56 .SH COPYRIGHT
57 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
58 .SH SEE ALSO
59 .I opendmarc(8),
60 .I opendmarc.conf(5)
61 .I opendmarc-reports(8)
0 #!/usr/bin/perl
1 #
2 # Copyright (c) 2012, 2014, The Trusted Domain Project. All rights reserved.
3 #
4 # Script to import per-message DMARC data.
5
6 ###
7 ### Setup
8 ###
9
10 use strict;
11 use warnings;
12
13 use Switch;
14
15 use DBI;
16 use File::Basename;
17 use Fcntl qw(:flock);
18 use Getopt::Long;
19 use POSIX;
20
21 require DBD::@SQL_BACKEND@;
22
23 # general
24 my $progname = basename($0);
25 my $version = "@VERSION@";
26 my $verbose = 0;
27 my $helponly = 0;
28 my $showversion = 0;
29
30 # DB parameters
31 my $def_dbhost = "localhost";
32 my $def_dbname = "opendmarc";
33 my $def_dbuser = "opendmarc";
34 my $def_dbpasswd = "opendmarc";
35 my $def_dbport = "3306";
36 my $def_interval = "86400";
37 my $dbhost;
38 my $dbname;
39 my $dbuser;
40 my $dbpasswd;
41 my $dbport;
42
43 my $dbscheme = "@SQL_BACKEND@";
44
45 my $dbi_a;
46 my $dbi_h;
47 my $dbi_s;
48 my $dbi_t;
49
50 my $lineno;
51 my $key;
52 my $value;
53
54 my $action;
55 my $adkim;
56 my $align_dkim;
57 my $align_spf;
58 my $aspf;
59 my $dd;
60 my $dkim_align;
61 my @dkim_data;
62 my $dkim_domain;
63 my @dkim_entry;
64 my $dkim_result;
65 my $envdomain;
66 my $fdomain;
67 my $ipaddr;
68 my $jobid;
69 my $p;
70 my $pct;
71 my $pdomain;
72 my $policy;
73 my $received;
74 my $reporter;
75 my $repuri;
76 my $sigcount = 0;
77 my $sp;
78 my $spf;
79 my @rua;
80
81 ###
82 ### NO user-serviceable parts beyond this point
83 ###
84
85 sub get_value
86 {
87 my $table;
88 my $column;
89 my $id;
90 my $out;
91
92 ($table, $column, $id) = @_;
93
94 $dbi_t = $dbi_h->prepare("SELECT $column FROM $table WHERE id = ?");
95 if (!$dbi_t->execute($id))
96 {
97 print STDERR "$progname: failed to $column value for ID $id: " . $dbi_h->errstr . "\n";
98 return undef;
99 }
100
101 while ($dbi_a = $dbi_t->fetchrow_arrayref())
102 {
103 if (defined($dbi_a->[0]))
104 {
105 $out = $dbi_a->[0];
106 }
107 }
108
109 return $out;
110 }
111
112 sub get_table_id
113 {
114 my $name;
115 my $table;
116 my $column;
117 my $out;
118
119 ($name, $table, $column) = @_;
120
121 if (!defined($name) || !defined($table))
122 {
123 return undef;
124 }
125
126 if (!defined($column))
127 {
128 $column = "name";
129 }
130
131 $dbi_t = $dbi_h->prepare("SELECT id FROM $table WHERE $column = ?");
132 if (!$dbi_t->execute($name))
133 {
134 print STDERR "$progname: failed to retrieve table ID: " . $dbi_h->errstr . "\n";
135 return undef;
136 }
137
138 undef $out;
139 while ($dbi_a = $dbi_t->fetchrow_arrayref())
140 {
141 if (defined($dbi_a->[0]))
142 {
143 $out = $dbi_a->[0];
144 }
145 }
146
147 $dbi_t->finish;
148
149 if (!defined($out))
150 {
151 $dbi_t = $dbi_h->prepare("INSERT INTO $table ($column) VALUES(?)");
152 if (!$dbi_t->execute($name))
153 {
154 print STDERR "$progname: failed to create table ID: " . $dbi_h->errstr . "\n";
155 return undef;
156 }
157
158 $dbi_t = $dbi_h->prepare("SELECT LAST_INSERT_ID()");
159 if (!$dbi_t->execute())
160 {
161 print STDERR "$progname: failed to retrieve created table ID: " . $dbi_h->errstr . "\n";
162 return undef;
163 }
164
165 while ($dbi_a = $dbi_t->fetchrow_arrayref())
166 {
167 if (defined($dbi_a->[0]))
168 {
169 $out = $dbi_a->[0];
170 }
171 }
172
173 $dbi_t->finish;
174
175 if (!defined($out))
176 {
177 print STDERR "$progname: failed to retrieve created table ID: " . $dbi_h->errstr . "\n";
178 return undef;
179 }
180 }
181
182 return $out;
183 }
184
185 sub update_db
186 {
187 my $rep_id;
188 my $from_id;
189 my $envfrom_id;
190 my $pdomain_id;
191 my $ipaddr_id;
192 my $msg_id;
193 my $sdomain_id;
194 my $request_id;
195
196 if ($verbose)
197 {
198 print STDERR "$progname: updating at line $lineno\n";
199 }
200
201 $rep_id = get_table_id($reporter, "reporters");
202 $from_id = get_table_id($fdomain, "domains");
203 $envfrom_id = get_table_id($envdomain, "domains");
204 $pdomain_id = get_table_id($pdomain, "domains");
205 $ipaddr_id = get_table_id($ipaddr, "ipaddr", "addr");
206 $request_id = get_table_id($from_id, "requests", "domain");
207
208 if (!defined($rep_id) ||
209 !defined($from_id) ||
210 !defined($envfrom_id) ||
211 !defined($pdomain_id) ||
212 !defined($ipaddr_id) ||
213 !defined($request_id))
214 {
215 return;
216 }
217
218 $dbi_s = $dbi_h->prepare("INSERT INTO messages (date, jobid, reporter, policy, disp, ip, env_domain, from_domain, spf, align_spf, align_dkim, sigcount) VALUES(FROM_UNIXTIME(?), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
219 if (!$dbi_s->execute($received, $jobid, $rep_id, $policy, $action, $ipaddr_id, $envfrom_id, $from_id, $spf, $align_spf, $align_dkim, $sigcount))
220 {
221 print STDERR "$progname: failed to insert message: " . $dbi_h->errstr . "\n";
222 return;
223 }
224
225 $dbi_s->finish;
226
227 undef $msg_id;
228 $dbi_s = $dbi_h->prepare("SELECT LAST_INSERT_ID()");
229 if (!$dbi_s->execute())
230 {
231 print STDERR "$progname: failed to retrieve message ID: " . $dbi_h->errstr . "\n";
232 return;
233 }
234
235 while ($dbi_a = $dbi_s->fetchrow_arrayref())
236 {
237 if (defined($dbi_a->[0]))
238 {
239 $msg_id = $dbi_a->[0];
240 }
241 }
242
243 $dbi_s->finish;
244
245 if (!defined($msg_id))
246 {
247 print STDERR "$progname: failed to retrieve message ID: " . $dbi_h->errstr . "\n";
248 return;
249 }
250
251 $dbi_s = $dbi_h->prepare("INSERT INTO signatures (message, domain, pass, error) VALUES(?, ?, ?, ?)");
252 foreach $dd (0 .. $#dkim_data)
253 {
254 my $sdomain;
255 my $pass;
256 my $error;
257
258 $sdomain = $dkim_data[$dd][0];
259 $pass = $dkim_data[$dd][1];
260 $error = $dkim_data[$dd][2];
261
262 $sdomain_id = get_table_id($sdomain, "domains");
263 if (!defined($sdomain_id))
264 {
265 next;
266 }
267
268 if (!$dbi_s->execute($msg_id, $sdomain_id, $pass, $error))
269 {
270 print STDERR "$progname: failed to insert DKIM data: " . $dbi_h->errstr . "\n";
271 $dbi_s->finish;
272 return;
273 }
274 }
275 $dbi_s->finish;
276
277 if (get_value("requests", "locked", $request_id) != 1)
278 {
279 if (scalar @rua > 0)
280 {
281 $repuri = join(",", @rua);
282 $dbi_s = $dbi_h->prepare("UPDATE requests SET repuri = ? WHERE id = ?");
283
284 if (!$dbi_s->execute($repuri, $request_id))
285 {
286 print STDERR "$progname: failed to update reporting URI for $fdomain: " . $dbi_h->errstr . "\n";
287 $dbi_s->finish;
288 return;
289 }
290
291 $dbi_s->finish;
292 }
293 else
294 {
295 $dbi_s = $dbi_h->prepare("UPDATE requests SET repuri = NULL WHERE id = ?");
296
297 if (!$dbi_s->execute($request_id))
298 {
299 print STDERR "$progname: failed to update reporting URI for $fdomain: " . $dbi_h->errstr . "\n";
300 $dbi_s->finish;
301 return;
302 }
303
304 $dbi_s->finish;
305 }
306
307 $dbi_s = $dbi_h->prepare("UPDATE requests SET adkim = ?, aspf = ?, policy = ?, spolicy = ?, pct = ? WHERE id = ?");
308
309 if (!$dbi_s->execute($adkim, $aspf, $p, $sp, $pct, $request_id))
310 {
311 print STDERR "$progname: failed to update policy data for $fdomain: " . $dbi_h->errstr . "\n";
312 $dbi_s->finish;
313 return;
314 }
315 }
316
317 $dbi_s->finish;
318 }
319
320 sub usage
321 {
322 print STDERR "$progname: usage: $progname [options]\n";
323 print STDERR "\t--dbhost=host database host [$def_dbhost]\n";
324 print STDERR "\t--dbname=name database name [$def_dbname]\n";
325 print STDERR "\t--dbpasswd=passwd database password [$def_dbpasswd]\n";
326 print STDERR "\t--dbport=port database port [$def_dbport]\n";
327 print STDERR "\t--dbuser=user database user [$def_dbuser]\n";
328 print STDERR "\t--help print help and exit\n";
329 print STDERR "\t--verbose verbose output\n";
330 print STDERR "\t--version print version and exit\n";
331 }
332
333 # parse command line arguments
334 my $opt_retval = &Getopt::Long::GetOptions ('dbhost=s' => \$dbhost,
335 'dbname=s' => \$dbname,
336 'dbpasswd=s' => \$dbpasswd,
337 'dbport=s' => \$dbport,
338 'dbuser=s' => \$dbuser,
339 'help!' => \$helponly,
340 'verbose!' => \$verbose,
341 'version!' => \$showversion,
342 );
343
344 if (!$opt_retval || $helponly)
345 {
346 usage();
347
348 if ($helponly)
349 {
350 exit(0);
351 }
352 else
353 {
354 exit(1);
355 }
356 }
357
358 if ($showversion)
359 {
360 print STDOUT "$progname v$version\n";
361 exit(0);
362 }
363
364 # apply defaults
365 if (!defined($dbhost))
366 {
367 if (defined($ENV{'OPENDMARC_DBHOST'}))
368 {
369 $dbhost = $ENV{'OPENDMARC_DBHOST'};
370 }
371 else
372 {
373 $dbhost = $def_dbhost;
374 }
375 }
376
377 if (!defined($dbname))
378 {
379 if (defined($ENV{'OPENDMARC_DB'}))
380 {
381 $dbname = $ENV{'OPENDMARC_DB'};
382 }
383 else
384 {
385 $dbname = $def_dbname;
386 }
387 }
388
389 if (!defined($dbpasswd))
390 {
391 if (defined($ENV{'OPENDMARC_PASSWORD'}))
392 {
393 $dbpasswd = $ENV{'OPENDMARC_PASSWORD'};
394 }
395 else
396 {
397 $dbpasswd = $def_dbpasswd;
398 }
399 }
400
401 if (!defined($dbport))
402 {
403 if (defined($ENV{'OPENDMARC_PORT'}))
404 {
405 $dbport = $ENV{'OPENDMARC_PORT'};
406 }
407 else
408 {
409 $dbport = $def_dbport;
410 }
411 }
412
413 if (!defined($dbuser))
414 {
415 if (defined($ENV{'OPENDMARC_USER'}))
416 {
417 $dbuser = $ENV{'OPENDMARC_USER'};
418 }
419 else
420 {
421 $dbuser = $def_dbuser;
422 }
423 }
424
425 if ($verbose)
426 {
427 print STDERR "$progname: started at " . localtime() . "\n";
428 }
429
430 my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname .
431 ";host=" . $dbhost . ";port=" . $dbport;
432
433 $dbi_h = DBI->connect($dbi_dsn, $dbuser, $dbpasswd, { PrintError => 0 });
434 if (!defined($dbi_h))
435 {
436 print STDERR "$progname: unable to connect to database: $DBI::errstr\n";
437 exit(1);
438 }
439
440 if ($verbose)
441 {
442 print STDERR "$progname: connected to database\n";
443 }
444
445 #
446 # Read history file from stdin.
447 #
448
449 $lineno = 0;
450 if (!flock(STDIN, LOCK_SH))
451 {
452 print STDERR "$progname: warning: unable to establish read lock\n";
453 }
454
455 while (<STDIN>)
456 {
457 $lineno++;
458
459 chomp;
460 ($key, $value, $dkim_result) = split;
461
462 switch ($key)
463 {
464 case "action" {
465 $action = $value;
466 }
467
468 case "adkim" {
469 $adkim = $value;
470 }
471
472 case "align_dkim" {
473 $align_dkim = $value;
474 }
475
476 case "align_spf" {
477 $align_spf = $value;
478 }
479
480 case "aspf" {
481 $aspf = $value;
482 }
483
484 case "dkim" {
485 undef @dkim_entry;
486 push(@dkim_entry, $value);
487 push(@dkim_entry, $dkim_result);
488 if ($dkim_result eq "4" ||
489 $dkim_result eq "5")
490 {
491 push(@dkim_entry, 1);
492 }
493 else
494 {
495 push(@dkim_entry, 0);
496 }
497 push(@dkim_data, [ @dkim_entry ]);
498
499 $sigcount++;
500 }
501
502 case "from" {
503 $fdomain = $value;
504 }
505
506 case "job" {
507 if (defined($jobid))
508 {
509 update_db();
510
511 undef $action;
512 undef $adkim;
513 undef $align_dkim;
514 undef $align_spf;
515 undef $aspf;
516 undef @dkim_data;
517 undef $envdomain;
518 undef $fdomain;
519 undef $ipaddr;
520 undef $jobid;
521 undef $p;
522 undef $pct;
523 undef $pdomain;
524 undef $policy;
525 undef $received;
526 undef $reporter;
527 undef @rua;
528 $sigcount = 0;
529 undef $sp;
530 undef $spf;
531 }
532
533 $jobid = $value;
534 }
535
536 case "ipaddr" {
537 $ipaddr = $value;
538 }
539
540 case "mfrom" {
541 $envdomain = $value;
542 }
543
544 case "p" {
545 $p = $value;
546 }
547
548 case "pct" {
549 $pct = $value;
550 }
551
552 case "pdomain" {
553 $pdomain = $value;
554 }
555
556 case "policy" {
557 $policy = $value;
558 }
559
560 case "received" {
561 $received = $value;
562 }
563
564 case "reporter" {
565 $reporter = $value;
566 }
567
568 case "rua" {
569 if ($value ne "-")
570 {
571 push(@rua, $value);
572 }
573 }
574
575 case "sp" {
576 $sp = $value;
577 }
578
579 case "spf" {
580 $spf = $value;
581 }
582
583 else {
584 print STDERR "$progname: unknown key '$key' at line $lineno\n";
585 }
586 }
587 }
588
589 if (defined($jobid))
590 {
591 update_db();
592 }
593
594 #
595 # all done!
596 #
597
598 if ($verbose)
599 {
600 print STDERR "$progname: terminating at " . localtime() . "\n";
601 }
602
603 $dbi_h->disconnect;
604
605 exit(0);
0 #!/bin/sh
1 ##
2 ## Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
3 ##
4 ## opendmarc-importstats -- import opendmarc output to MySQL
5 ##
6 ## This is intended to be used via a crontab. If import is successful,
7 ## this code exits quietly so there's no output. If it fails, it does
8 ## "ls -l" on the temporary file, so that cron generates mail to whever
9 ## ran the job.
10
11 ## setup
12 statsdb="/var/tmp/dmarc.dat"
13 # OPENDMARC_PASSWORD="password"; export OPENDMARC_PASSWORD
14
15 if [ -s $statsdb ]
16 then
17 mv $statsdb ${statsdb}.OLD.$$
18
19 if opendmarc-import < ${statsdb}.OLD.$$
20 then
21 rm ${statsdb}.OLD.$$
22 else
23 ls -l ${statsdb}.OLD.$$
24 fi
25 fi
0 .TH opendmarc-importstats 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-importstats
3 \- import OpenDMARC statistics/history data
4 .SH SYNOPSIS
5 .B opendmarc-importstats
6 .SH DESCRIPTION
7 .B opendmarc-importstats
8 is a fairly trivial shell script, typically executed by
9 .I cron(8),
10 that rotates an OpenDMARC statistics/history data file to a unique filename
11 and then attempts to import it to a local database for later processing by
12 executing
13 .I opendmarc-import(8).
14 On successful import, the unique file is removed; on failure, the script
15 executes
16 .I ls(1)
17 on the file and exits without removing the unique file. The intent of this
18 last step is to cause
19 .I cron
20 to generate a message to a responsible party so that the failure will be
21 investigated.
22 .SH VERSION
23 This man page covers the version of
24 .I opendmarc-importstats
25 that shipped with version 1.3.2 of
26 .I OpenDMARC.
27 .SH COPYRIGHT
28 Copyright (c) 2013, The Trusted Domain Project. All rights reserved.
29 .SH SEE ALSO
30 .I cron(8),
31 .I opendmarc(8),
32 .I opendmarc-import(8)
0 .TH opendmarc-importstats 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-importstats
3 \- import OpenDMARC statistics/history data
4 .SH SYNOPSIS
5 .B opendmarc-importstats
6 .SH DESCRIPTION
7 .B opendmarc-importstats
8 is a fairly trivial shell script, typically executed by
9 .I cron(8),
10 that rotates an OpenDMARC statistics/history data file to a unique filename
11 and then attempts to import it to a local database for later processing by
12 executing
13 .I opendmarc-import(8).
14 On successful import, the unique file is removed; on failure, the script
15 executes
16 .I ls(1)
17 on the file and exits without removing the unique file. The intent of this
18 last step is to cause
19 .I cron
20 to generate a message to a responsible party so that the failure will be
21 investigated.
22 .SH VERSION
23 This man page covers the version of
24 .I opendmarc-importstats
25 that shipped with version @VERSION@ of
26 .I OpenDMARC.
27 .SH COPYRIGHT
28 Copyright (c) 2013, The Trusted Domain Project. All rights reserved.
29 .SH SEE ALSO
30 .I cron(8),
31 .I opendmarc(8),
32 .I opendmarc-import(8)
0 #!/usr/bin/perl
1 #
2 # Copyright (c) 2012, 2013, The Trusted Domain Project. All rights reserved.
3 #
4 # Script to apply manual changes to DMARC reporting parameters.
5
6 ###
7 ### Setup
8 ###
9
10 use strict;
11 use warnings;
12
13 use Switch;
14
15 use DBI;
16 use File::Basename;
17 use Getopt::Long;
18 use POSIX;
19
20 require DBD::mysql;
21
22 # general
23 my $progname = basename($0);
24 my $version = "1.3.2";
25 my $verbose = 0;
26 my $helponly = 0;
27 my $showversion = 0;
28
29 # DB parameters
30 my $def_dbhost = "localhost";
31 my $def_dbname = "opendmarc";
32 my $def_dbuser = "opendmarc";
33 my $def_dbpasswd = "opendmarc";
34 my $def_dbport = "3306";
35 my $dbhost;
36 my $dbname;
37 my $dbuser;
38 my $dbpasswd;
39 my $dbport;
40
41 my $dbscheme = "mysql";
42
43 my $dbi_a;
44 my $dbi_h;
45 my $dbi_t;
46
47 my $domain;
48 my $domainid;
49 my $requestid;
50 my $rua;
51 my $unlock;
52
53 sub get_table_id
54 {
55 my $name;
56 my $table;
57 my $column;
58 my $out;
59
60 ($name, $table, $column) = @_;
61
62 if (!defined($name) || !defined($table))
63 {
64 return undef;
65 }
66
67 if (!defined($column))
68 {
69 $column = "name";
70 }
71
72 $dbi_t = $dbi_h->prepare("SELECT id FROM $table WHERE $column = ?");
73 if (!$dbi_t->execute($name))
74 {
75 print STDERR "$progname: failed to retrieve table ID: " . $dbi_h->errstr . "\n";
76 return undef;
77 }
78
79 undef $out;
80 while ($dbi_a = $dbi_t->fetchrow_arrayref())
81 {
82 if (defined($dbi_a->[0]))
83 {
84 $out = $dbi_a->[0];
85 }
86 }
87
88 $dbi_t->finish;
89
90 if (!defined($out))
91 {
92 $dbi_t = $dbi_h->prepare("INSERT INTO $table ($column) VALUES(?)");
93 if (!$dbi_t->execute($name))
94 {
95 print STDERR "$progname: failed to create table ID: " . $dbi_h->errstr . "\n";
96 return undef;
97 }
98
99 $dbi_t = $dbi_h->prepare("SELECT LAST_INSERT_ID()");
100 if (!$dbi_t->execute())
101 {
102 print STDERR "$progname: failed to retrieve created table ID: " . $dbi_h->errstr . "\n";
103 return undef;
104 }
105
106 while ($dbi_a = $dbi_t->fetchrow_arrayref())
107 {
108 if (defined($dbi_a->[0]))
109 {
110 $out = $dbi_a->[0];
111 }
112 }
113
114 $dbi_t->finish;
115
116 if (!defined($out))
117 {
118 print STDERR "$progname: failed to retrieve created table ID: " . $dbi_h->errstr . "\n";
119 return undef;
120 }
121 }
122
123 return $out;
124 }
125
126 sub usage
127 {
128 print STDERR "$progname: usage: $progname [options] domain\n";
129 print STDERR "\t--dbhost=host database host [$def_dbhost]\n";
130 print STDERR "\t--dbname=name database name [$def_dbname]\n";
131 print STDERR "\t--dbpasswd=passwd database password [$def_dbpasswd]\n";
132 print STDERR "\t--dbport=port database port [$def_dbport]\n";
133 print STDERR "\t--dbuser=user database user [$def_dbuser]\n";
134 print STDERR "\t--rua=string aggregate report URI(s)\n";
135 print STDERR "\t--help print help and exit\n";
136 print STDERR "\t--unlock unlocks named record\n";
137 print STDERR "\t--verbose verbose output\n";
138 print STDERR "\t--version print version and exit\n";
139 }
140
141 # parse command line arguments
142 my $opt_retval = &Getopt::Long::GetOptions ('dbhost=s' => \$dbhost,
143 'dbname=s' => \$dbname,
144 'dbpasswd=s' => \$dbpasswd,
145 'dbport=s' => \$dbport,
146 'dbuser=s' => \$dbuser,
147 'help!' => \$helponly,
148 'rua=s' => \$rua,
149 'unlock!' => \$unlock,
150 'verbose!' => \$verbose,
151 'version!' => \$showversion,
152 );
153
154 $domain = $ARGV[0];
155
156 if (!$opt_retval || $helponly || !defined($domain))
157 {
158 usage();
159
160 if ($helponly)
161 {
162 exit(0);
163 }
164 else
165 {
166 exit(1);
167 }
168 }
169
170 if ($showversion)
171 {
172 print STDOUT "$progname v$version\n";
173 exit(0);
174 }
175
176 # apply defaults
177 if (!defined($dbhost))
178 {
179 if (defined($ENV{'OPENDMARC_DBHOST'}))
180 {
181 $dbhost = $ENV{'OPENDMARC_DBHOST'};
182 }
183 else
184 {
185 $dbhost = $def_dbhost;
186 }
187 }
188
189 if (!defined($dbname))
190 {
191 if (defined($ENV{'OPENDMARC_DB'}))
192 {
193 $dbname = $ENV{'OPENDMARC_DB'};
194 }
195 else
196 {
197 $dbname = $def_dbname;
198 }
199 }
200
201 if (!defined($dbpasswd))
202 {
203 if (defined($ENV{'OPENDMARC_PASSWORD'}))
204 {
205 $dbpasswd = $ENV{'OPENDMARC_PASSWORD'};
206 }
207 else
208 {
209 $dbpasswd = $def_dbpasswd;
210 }
211 }
212
213 if (!defined($dbport))
214 {
215 if (defined($ENV{'OPENDMARC_PORT'}))
216 {
217 $dbport = $ENV{'OPENDMARC_PORT'};
218 }
219 else
220 {
221 $dbport = $def_dbport;
222 }
223 }
224
225 if (!defined($dbuser))
226 {
227 if (defined($ENV{'OPENDMARC_USER'}))
228 {
229 $dbuser = $ENV{'OPENDMARC_USER'};
230 }
231 else
232 {
233 $dbuser = $def_dbuser;
234 }
235 }
236
237 if ($verbose)
238 {
239 print STDERR "$progname: started at " . localtime() . "\n";
240 }
241
242 my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname .
243 ";host=" . $dbhost . ";port=" . $dbport;
244
245 $dbi_h = DBI->connect($dbi_dsn, $dbuser, $dbpasswd, { PrintError => 0 });
246 if (!defined($dbi_h))
247 {
248 print STDERR "$progname: unable to connect to database: $DBI::errstr\n";
249 exit(1);
250 }
251
252 if ($verbose)
253 {
254 print STDERR "$progname: connected to database\n";
255 }
256
257 $domainid = get_table_id($domain, "domains", "name");
258 $requestid = get_table_id($domainid, "requests", "domain");
259
260 if ($unlock)
261 {
262 $dbi_t = $dbi_h->prepare("UPDATE requests SET locked = 0 WHERE id = ?");
263 if (!$dbi_t->execute($requestid))
264 {
265 print STDERR "$progname: failed to update requests table for $domain: " . $dbi_h->errstr . "\n";
266 }
267 }
268 else
269 {
270 $dbi_t = $dbi_h->prepare("UPDATE requests SET locked = 1, repuri = ? WHERE id = ?");
271 if (!$dbi_t->execute($rua, $requestid))
272 {
273 print STDERR "$progname: failed to update requests table for $domain: " . $dbi_h->errstr . "\n";
274 }
275 }
276
277 #
278 # all done!
279 #
280
281 $dbi_h->disconnect;
282
283 exit(0);
0 .TH opendmarc-params 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-params
3 \- OpenDMARC reporting parameters setup tool
4 .SH SYNOPSIS
5 .B opendmarc-params
6 [options] domain
7 .SH DESCRIPTION
8 .B opendmarc-params
9 records a specific reporting address for aggregate reports about the named
10 .I domain
11 and flags it as "locked" in the reporting requests database. This is done
12 to allow an administrator to force generation of reports and have them sent
13 to a specific address regardless of what data may (or may not) be found in
14 the DNS for the named domain.
15 .SH OPTIONS
16 .TP
17 .I --dbhost=host
18 Attempts to connect to the database server on the named
19 .I host.
20 The default is "localhost".
21 .TP
22 .I --dbname=name
23 Requests a connection to the database called
24 .I name.
25 The default is "opendmarc".
26 .TP
27 .I --dbpasswd=password
28 Attempts to authenticate to the database server using the specified
29 .I password.
30 The default is "opendmarc".
31 .TP
32 .I --dbport=port
33 Tries to connect to the database at the specified TCP
34 .I port.
35 The default is 3306.
36 .TP
37 .I --dbuser=user
38 Attempts to authenticate to the database server as the specified
39 .I user.
40 The default is "opendmarc".
41 .TP
42 .I --help
43 Prints a usage message and exits.
44 .TP
45 .I --rua=string
46 Sets the reporting URI for the named
47 .I domain
48 to the specified
49 .I string.
50 .TP
51 .I --unlock
52 Unlocks the record for the named
53 .I domain.
54 .TP
55 .I --verbose
56 Requests verbose output.
57 .TP
58 .I --version
59 Prints version number and exits.
60 .SH VERSION
61 This man page covers the version of
62 .I opendmarc-params
63 that shipped with version 1.3.2 of
64 .I OpenDMARC.
65 .SH COPYRIGHT
66 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
67 .SH SEE ALSO
68 .I opendmarc(8),
69 .I opendmarc-import(8),
70 .I opendmarc-reports(8)
0 .TH opendmarc-params 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-params
3 \- OpenDMARC reporting parameters setup tool
4 .SH SYNOPSIS
5 .B opendmarc-params
6 [options] domain
7 .SH DESCRIPTION
8 .B opendmarc-params
9 records a specific reporting address for aggregate reports about the named
10 .I domain
11 and flags it as "locked" in the reporting requests database. This is done
12 to allow an administrator to force generation of reports and have them sent
13 to a specific address regardless of what data may (or may not) be found in
14 the DNS for the named domain.
15 .SH OPTIONS
16 .TP
17 .I --dbhost=host
18 Attempts to connect to the database server on the named
19 .I host.
20 The default is "localhost".
21 .TP
22 .I --dbname=name
23 Requests a connection to the database called
24 .I name.
25 The default is "opendmarc".
26 .TP
27 .I --dbpasswd=password
28 Attempts to authenticate to the database server using the specified
29 .I password.
30 The default is "opendmarc".
31 .TP
32 .I --dbport=port
33 Tries to connect to the database at the specified TCP
34 .I port.
35 The default is 3306.
36 .TP
37 .I --dbuser=user
38 Attempts to authenticate to the database server as the specified
39 .I user.
40 The default is "opendmarc".
41 .TP
42 .I --help
43 Prints a usage message and exits.
44 .TP
45 .I --rua=string
46 Sets the reporting URI for the named
47 .I domain
48 to the specified
49 .I string.
50 .TP
51 .I --unlock
52 Unlocks the record for the named
53 .I domain.
54 .TP
55 .I --verbose
56 Requests verbose output.
57 .TP
58 .I --version
59 Prints version number and exits.
60 .SH VERSION
61 This man page covers the version of
62 .I opendmarc-params
63 that shipped with version @VERSION@ of
64 .I OpenDMARC.
65 .SH COPYRIGHT
66 Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
67 .SH SEE ALSO
68 .I opendmarc(8),
69 .I opendmarc-import(8),
70 .I opendmarc-reports(8)
0 #!/usr/bin/perl
1 #
2 # Copyright (c) 2012, 2013, The Trusted Domain Project. All rights reserved.
3 #
4 # Script to apply manual changes to DMARC reporting parameters.
5
6 ###
7 ### Setup
8 ###
9
10 use strict;
11 use warnings;
12
13 use Switch;
14
15 use DBI;
16 use File::Basename;
17 use Getopt::Long;
18 use POSIX;
19
20 require DBD::@SQL_BACKEND@;
21
22 # general
23 my $progname = basename($0);
24 my $version = "@VERSION@";
25 my $verbose = 0;
26 my $helponly = 0;
27 my $showversion = 0;
28
29 # DB parameters
30 my $def_dbhost = "localhost";
31 my $def_dbname = "opendmarc";
32 my $def_dbuser = "opendmarc";
33 my $def_dbpasswd = "opendmarc";
34 my $def_dbport = "3306";
35 my $dbhost;
36 my $dbname;
37 my $dbuser;
38 my $dbpasswd;
39 my $dbport;
40
41 my $dbscheme = "@SQL_BACKEND@";
42
43 my $dbi_a;
44 my $dbi_h;
45 my $dbi_t;
46
47 my $domain;
48 my $domainid;
49 my $requestid;
50 my $rua;
51 my $unlock;
52
53 sub get_table_id
54 {
55 my $name;
56 my $table;
57 my $column;
58 my $out;
59
60 ($name, $table, $column) = @_;
61
62 if (!defined($name) || !defined($table))
63 {
64 return undef;
65 }
66
67 if (!defined($column))
68 {
69 $column = "name";
70 }
71
72 $dbi_t = $dbi_h->prepare("SELECT id FROM $table WHERE $column = ?");
73 if (!$dbi_t->execute($name))
74 {
75 print STDERR "$progname: failed to retrieve table ID: " . $dbi_h->errstr . "\n";
76 return undef;
77 }
78
79 undef $out;
80 while ($dbi_a = $dbi_t->fetchrow_arrayref())
81 {
82 if (defined($dbi_a->[0]))
83 {
84 $out = $dbi_a->[0];
85 }
86 }
87
88 $dbi_t->finish;
89
90 if (!defined($out))
91 {
92 $dbi_t = $dbi_h->prepare("INSERT INTO $table ($column) VALUES(?)");
93 if (!$dbi_t->execute($name))
94 {
95 print STDERR "$progname: failed to create table ID: " . $dbi_h->errstr . "\n";
96 return undef;
97 }
98
99 $dbi_t = $dbi_h->prepare("SELECT LAST_INSERT_ID()");
100 if (!$dbi_t->execute())
101 {
102 print STDERR "$progname: failed to retrieve created table ID: " . $dbi_h->errstr . "\n";
103 return undef;
104 }
105
106 while ($dbi_a = $dbi_t->fetchrow_arrayref())
107 {
108 if (defined($dbi_a->[0]))
109 {
110 $out = $dbi_a->[0];
111 }
112 }
113
114 $dbi_t->finish;
115
116 if (!defined($out))
117 {
118 print STDERR "$progname: failed to retrieve created table ID: " . $dbi_h->errstr . "\n";
119 return undef;
120 }
121 }
122
123 return $out;
124 }
125
126 sub usage
127 {
128 print STDERR "$progname: usage: $progname [options] domain\n";
129 print STDERR "\t--dbhost=host database host [$def_dbhost]\n";
130 print STDERR "\t--dbname=name database name [$def_dbname]\n";
131 print STDERR "\t--dbpasswd=passwd database password [$def_dbpasswd]\n";
132 print STDERR "\t--dbport=port database port [$def_dbport]\n";
133 print STDERR "\t--dbuser=user database user [$def_dbuser]\n";
134 print STDERR "\t--rua=string aggregate report URI(s)\n";
135 print STDERR "\t--help print help and exit\n";
136 print STDERR "\t--unlock unlocks named record\n";
137 print STDERR "\t--verbose verbose output\n";
138 print STDERR "\t--version print version and exit\n";
139 }
140
141 # parse command line arguments
142 my $opt_retval = &Getopt::Long::GetOptions ('dbhost=s' => \$dbhost,
143 'dbname=s' => \$dbname,
144 'dbpasswd=s' => \$dbpasswd,
145 'dbport=s' => \$dbport,
146 'dbuser=s' => \$dbuser,
147 'help!' => \$helponly,
148 'rua=s' => \$rua,
149 'unlock!' => \$unlock,
150 'verbose!' => \$verbose,
151 'version!' => \$showversion,
152 );
153
154 $domain = $ARGV[0];
155
156 if (!$opt_retval || $helponly || !defined($domain))
157 {
158 usage();
159
160 if ($helponly)
161 {
162 exit(0);
163 }
164 else
165 {
166 exit(1);
167 }
168 }
169
170 if ($showversion)
171 {
172 print STDOUT "$progname v$version\n";
173 exit(0);
174 }
175
176 # apply defaults
177 if (!defined($dbhost))
178 {
179 if (defined($ENV{'OPENDMARC_DBHOST'}))
180 {
181 $dbhost = $ENV{'OPENDMARC_DBHOST'};
182 }
183 else
184 {
185 $dbhost = $def_dbhost;
186 }
187 }
188
189 if (!defined($dbname))
190 {
191 if (defined($ENV{'OPENDMARC_DB'}))
192 {
193 $dbname = $ENV{'OPENDMARC_DB'};
194 }
195 else
196 {
197 $dbname = $def_dbname;
198 }
199 }
200
201 if (!defined($dbpasswd))
202 {
203 if (defined($ENV{'OPENDMARC_PASSWORD'}))
204 {
205 $dbpasswd = $ENV{'OPENDMARC_PASSWORD'};
206 }
207 else
208 {
209 $dbpasswd = $def_dbpasswd;
210 }
211 }
212
213 if (!defined($dbport))
214 {
215 if (defined($ENV{'OPENDMARC_PORT'}))
216 {
217 $dbport = $ENV{'OPENDMARC_PORT'};
218 }
219 else
220 {
221 $dbport = $def_dbport;
222 }
223 }
224
225 if (!defined($dbuser))
226 {
227 if (defined($ENV{'OPENDMARC_USER'}))
228 {
229 $dbuser = $ENV{'OPENDMARC_USER'};
230 }
231 else
232 {
233 $dbuser = $def_dbuser;
234 }
235 }
236
237 if ($verbose)
238 {
239 print STDERR "$progname: started at " . localtime() . "\n";
240 }
241
242 my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname .
243 ";host=" . $dbhost . ";port=" . $dbport;
244
245 $dbi_h = DBI->connect($dbi_dsn, $dbuser, $dbpasswd, { PrintError => 0 });
246 if (!defined($dbi_h))
247 {
248 print STDERR "$progname: unable to connect to database: $DBI::errstr\n";
249 exit(1);
250 }
251
252 if ($verbose)
253 {
254 print STDERR "$progname: connected to database\n";
255 }
256
257 $domainid = get_table_id($domain, "domains", "name");
258 $requestid = get_table_id($domainid, "requests", "domain");
259
260 if ($unlock)
261 {
262 $dbi_t = $dbi_h->prepare("UPDATE requests SET locked = 0 WHERE id = ?");
263 if (!$dbi_t->execute($requestid))
264 {
265 print STDERR "$progname: failed to update requests table for $domain: " . $dbi_h->errstr . "\n";
266 }
267 }
268 else
269 {
270 $dbi_t = $dbi_h->prepare("UPDATE requests SET locked = 1, repuri = ? WHERE id = ?");
271 if (!$dbi_t->execute($rua, $requestid))
272 {
273 print STDERR "$progname: failed to update requests table for $domain: " . $dbi_h->errstr . "\n";
274 }
275 }
276
277 #
278 # all done!
279 #
280
281 $dbi_h->disconnect;
282
283 exit(0);
0 #!/usr/bin/perl
1 #
2 # Copyright (c) 2012-2016, 2017, The Trusted Domain Project.
3 # All rights reserved.
4 #
5 # Script to generate regular DMARC reports.
6
7 ###
8 ### Setup
9 ###
10
11 use strict;
12 use warnings;
13
14 use Switch;
15
16 use DBI;
17 use File::Basename;
18 use File::Temp;
19 use Net::Domain qw(hostfqdn hostdomain);
20 use Getopt::Long;
21 use IO::Handle;
22 use IO::Compress::Zip qw(zip);
23 use POSIX;
24 use MIME::Base64;
25 use Net::SMTP;
26 use Time::Local;
27
28 require DBD::mysql;
29
30 require HTTP::Request;
31
32 # general
33 my $progname = basename($0);
34 my $version = "1.3.2";
35 my $verbose = 0;
36 my $helponly = 0;
37 my $showversion = 0;
38
39 my $interval;
40
41 my $gen;
42 my $uri;
43
44 my $buf;
45
46 my $mailout;
47 my $boundary;
48
49 my $tmpout;
50
51 my $repfile;
52 my $zipfile;
53
54 my $zipin;
55
56 my $now = time();
57
58 my $repstart;
59 my $repend;
60
61 my $domain;
62 my $domainid;
63 my $domainset;
64 my $forcedomain;
65 my @skipdomains;
66
67 my $policy;
68 my $spolicy;
69 my $policystr;
70 my $spolicystr;
71 my $pct;
72
73 my $repuri;
74 my @repuris;
75 my $lastsent;
76
77 my $aspf;
78 my $aspfstr;
79 my $adkim;
80 my $adkimstr;
81 my $align_dkim;
82 my $align_dkimstr;
83 my $align_spf;
84 my $align_spfstr;
85 my $spfresult;
86 my $dkimresult;
87 my $disp;
88 my $spfresultstr;
89 my $dkimresultstr;
90 my $dispstr;
91 my $ipaddr;
92 my $fromdomain;
93 my $envdomain;
94 my $dkimdomain;
95
96 my $repdest;
97
98 my $smtpstatus;
99 my $smtpfail;
100
101 my $doupdate = 1;
102 my $testmode = 0;
103 my $keepfiles = 0;
104 my $use_utc = 0;
105 my $daybound = 0;
106 my $report_maxbytes_global = 15728640; # default: 15M, per spec
107
108 my $msgid;
109
110 my $rowcount;
111
112 my $dbi_s;
113 my $dbi_h;
114 my $dbi_a;
115 my $dbi_d;
116
117 # DB parameters
118 my $def_dbhost = "localhost";
119 my $def_dbname = "opendmarc";
120 my $def_dbuser = "opendmarc";
121 my $def_dbpasswd = "opendmarc";
122 my $def_dbport = "3306";
123 my $def_interval = "86400";
124 my $dbhost;
125 my $dbname;
126 my $dbuser;
127 my $dbpasswd;
128 my $dbport;
129
130 my $dbscheme = "mysql";
131
132 my $repdom = hostdomain();
133 my $repemail = "postmaster@" . $repdom;
134
135 my $smtp_server = '127.0.0.1';
136 my $smtp_port = 25;
137 my $smtp;
138
139 my $answer;
140
141 ###
142 ### NO user-serviceable parts beyond this point
143 ###
144
145 sub usage
146 {
147 print STDERR "$progname: usage: $progname [options]\n";
148 print STDERR "\t--day send yesterday's data\n";
149 print STDERR "\t--dbhost=host database host [$def_dbhost]\n";
150 print STDERR "\t--dbname=name database name [$def_dbname]\n";
151 print STDERR "\t--dbpasswd=passwd database password [$def_dbpasswd]\n";
152 print STDERR "\t--dbport=port database port [$def_dbport]\n";
153 print STDERR "\t--dbuser=user database user [$def_dbuser]\n";
154 print STDERR "\t--domain=name force a report for named domain\n";
155 print STDERR "\t--help print help and exit\n";
156 print STDERR "\t--interval=secs report interval [$def_interval]\n";
157 print STDERR "\t--keepfiles keep xml files (in local directory)\n";
158 print STDERR "\t -n synonym for --test\n";
159 print STDERR "\t--nodomain=name omit a report for named domain\n";
160 print STDERR "\t--noupdate don't record report transmission\n";
161 print STDERR "\t--report-email reporting contact [$repemail]\n";
162 print STDERR "\t--report-org reporting organization [$repdom]\n";
163 print STDERR "\t--smtp-port smtp server port [$smtp_port]\n";
164 print STDERR "\t--smtp-server smtp server [$smtp_server]\n";
165 print STDERR "\t--test don't send reports\n";
166 print STDERR "\t (implies --keepfiles --noupdate)\n";
167 print STDERR "\t--utc operate in UTC\n";
168 print STDERR "\t--verbose verbose output\n";
169 print STDERR "\t (repeat for increased output)\n";
170 print STDERR "\t--version print version and exit\n";
171 }
172
173 # set locale
174 setlocale(LC_ALL, 'C');
175
176 # parse command line arguments
177 my $opt_retval = &Getopt::Long::GetOptions ('day!' => \$daybound,
178 'dbhost=s' => \$dbhost,
179 'dbname=s' => \$dbname,
180 'dbpasswd=s' => \$dbpasswd,
181 'dbport=s' => \$dbport,
182 'dbuser=s' => \$dbuser,
183 'domain=s' => \$forcedomain,
184 'help!' => \$helponly,
185 'interval=i' => \$interval,
186 'keepfiles' => \$keepfiles,
187 'n|test' => \$testmode,
188 'nodomain=s' => \@skipdomains,
189 'report-email=s' => \$repemail,
190 'report-org=s' => \$repdom,
191 'smtp-server=s' => \$smtp_server,
192 'smtp-port=i' => \$smtp_port,
193 'update!' => \$doupdate,
194 'utc!' => \$use_utc,
195 'verbose+' => \$verbose,
196 'version!' => \$showversion,
197 );
198
199 if (!$opt_retval || $helponly)
200 {
201 usage();
202
203 if ($helponly)
204 {
205 exit(0);
206 }
207 else
208 {
209 exit(1);
210 }
211 }
212
213 if ($showversion)
214 {
215 print STDOUT "$progname v$version\n";
216 exit(0);
217 }
218
219 # apply defaults
220 if (!defined($dbhost))
221 {
222 if (defined($ENV{'OPENDMARC_DBHOST'}))
223 {
224 $dbhost = $ENV{'OPENDMARC_DBHOST'};
225 }
226 else
227 {
228 $dbhost = $def_dbhost;
229 }
230 }
231
232 if (!defined($dbname))
233 {
234 if (defined($ENV{'OPENDMARC_DB'}))
235 {
236 $dbname = $ENV{'OPENDMARC_DB'};
237 }
238 else
239 {
240 $dbname = $def_dbname;
241 }
242 }
243
244 if (!defined($dbpasswd))
245 {
246 if (defined($ENV{'OPENDMARC_PASSWORD'}))
247 {
248 $dbpasswd = $ENV{'OPENDMARC_PASSWORD'};
249 }
250 else
251 {
252 $dbpasswd = $def_dbpasswd;
253 }
254 }
255
256 if (!defined($dbport))
257 {
258 if (defined($ENV{'OPENDMARC_PORT'}))
259 {
260 $dbport = $ENV{'OPENDMARC_PORT'};
261 }
262 else
263 {
264 $dbport = $def_dbport;
265 }
266 }
267
268 if (!defined($dbuser))
269 {
270 if (defined($ENV{'OPENDMARC_USER'}))
271 {
272 $dbuser = $ENV{'OPENDMARC_USER'};
273 }
274 else
275 {
276 $dbuser = $def_dbuser;
277 }
278 }
279
280 if (defined($interval) && $daybound)
281 {
282 print STDERR "$progname: WARN: --day overrides --interval\n";
283 }
284
285 if (!defined($interval) || $daybound)
286 {
287 $interval = $def_interval;
288 }
289
290 # Test mode requested, don't update last sent and keep xml files
291 $doupdate = ($testmode == 1) ? 0 : $doupdate;
292 $keepfiles = ($testmode == 1) ? 1 : $keepfiles;
293
294 if ($verbose)
295 {
296 print STDERR "$progname: started at " . localtime($now) . "\n";
297 }
298
299 my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname .
300 ";host=" . $dbhost . ";port=" . $dbport;
301
302 $dbi_h = DBI->connect($dbi_dsn, $dbuser, $dbpasswd, { PrintError => 0 });
303 if (!defined($dbi_h))
304 {
305 print STDERR "$progname: unable to connect to database: $DBI::errstr\n";
306 exit(1);
307 }
308
309 if ($verbose >= 2)
310 {
311 print STDERR "$progname: connected to database\n";
312 }
313
314 if ($use_utc)
315 {
316 $dbi_s = $dbi_h->prepare("SET TIME_ZONE='+00:00'");
317
318 if (!$dbi_s->execute())
319 {
320 print STDERR "$progname: failed to change to UTC: " . $dbi_h->errstr . "\n";
321 $dbi_s->finish;
322 $dbi_h->disconnect;
323 exit(1);
324 }
325 }
326
327 #
328 # Select domains on which to report
329 #
330
331 if ($verbose >= 2)
332 {
333 print STDERR "$progname: selecting target domains\n";
334 }
335
336 if (defined($forcedomain))
337 {
338 $dbi_s = $dbi_h->prepare("SELECT name FROM domains WHERE name = ?");
339
340 if (!$dbi_s->execute($forcedomain))
341 {
342 print STDERR "$progname: failed to test for database entry: " . $dbi_h->errstr . "\n";
343 $dbi_s->finish;
344 $dbi_h->disconnect;
345 exit(1);
346 }
347 }
348 elsif ($daybound)
349 {
350 $dbi_s = $dbi_h->prepare("SELECT domains.name FROM requests JOIN domains ON requests.domain = domains.id WHERE DATE(lastsent) < DATE(FROM_UNIXTIME(?))");
351
352 if (!$dbi_s->execute($now))
353 {
354 print STDERR "$progname: failed to collect domain names: " . $dbi_h->errstr . "\n";
355 $dbi_s->finish;
356 $dbi_h->disconnect;
357 exit(1);
358 }
359 }
360 else
361 {
362 $dbi_s = $dbi_h->prepare("SELECT domains.name FROM requests JOIN domains ON requests.domain = domains.id WHERE lastsent <= DATE_SUB(FROM_UNIXTIME(?), INTERVAL ? SECOND)");
363
364 if (!$dbi_s->execute($now, $interval))
365 {
366 print STDERR "$progname: failed to collect domain names: " . $dbi_h->errstr . "\n";
367 $dbi_s->finish;
368 $dbi_h->disconnect;
369 exit(1);
370 }
371 }
372
373 $domainset = $dbi_s->fetchall_arrayref([0]);
374 $dbi_s->finish;
375
376 if ($verbose)
377 {
378 print STDERR "$progname: selected " . scalar(@$domainset) . " domain(s)\n";
379 }
380
381 #
382 # For each domain:
383 # -- extract reporting address
384 # -- extract messages/signatures to report
385 # -- generate and send report
386 # -- update "last sent" timestamp
387 #
388
389 $smtp = Net::SMTP->new($smtp_server,
390 'Port' => $smtp_port,
391 'Hello' => hostfqdn());
392 if (!defined($smtp))
393 {
394 print STDERR "$progname: open SMTP server $smtp_server:$smtp_port failed\n";
395 exit(1);
396 }
397
398 foreach (@$domainset)
399 {
400 $domain = $_->[0];
401
402 if (!defined($domain))
403 {
404 next;
405 }
406
407 if (@skipdomains && grep({$_ eq $domain} @skipdomains) != 0)
408 {
409 next;
410 }
411
412 if ($verbose >= 2)
413 {
414 print STDERR "$progname: processing $domain\n";
415 }
416
417 # extract this domain's reporting parameters
418 $dbi_s = $dbi_h->prepare("SELECT id FROM domains WHERE name = ?");
419 if (!$dbi_s->execute($domain))
420 {
421 print STDERR "$progname: can't get ID for domain $domain: " . $dbi_h->errstr . "\n";
422 $dbi_s->finish;
423 $dbi_h->disconnect;
424 exit(1);
425 }
426
427 undef $domainid;
428 while ($dbi_a = $dbi_s->fetchrow_arrayref())
429 {
430 if (defined($dbi_a->[0]))
431 {
432 $domainid = $dbi_a->[0];
433 }
434 }
435 $dbi_s->finish;
436
437 if (!defined($domainid))
438 {
439 print STDERR "$progname: ID for domain $domain not found\n";
440 next;
441 }
442
443 $dbi_s = $dbi_h->prepare("SELECT repuri, adkim, aspf, policy, spolicy, pct, UNIX_TIMESTAMP(lastsent) FROM requests WHERE domain = ?");
444 if (!$dbi_s->execute($domainid))
445 {
446 print STDERR "$progname: can't get reporting URI for domain $domain: " . $dbi_h->errstr . "\n";
447 $dbi_s->finish;
448 $dbi_h->disconnect;
449 exit(1);
450 }
451
452 undef $repuri;
453
454 while ($dbi_a = $dbi_s->fetchrow_arrayref())
455 {
456 if (defined($dbi_a->[0]))
457 {
458 $repuri = $dbi_a->[0];
459 }
460 if (defined($dbi_a->[1]))
461 {
462 $adkim = $dbi_a->[1];
463 }
464 if (defined($dbi_a->[2]))
465 {
466 $aspf = $dbi_a->[2];
467 }
468 if (defined($dbi_a->[3]))
469 {
470 $policy = $dbi_a->[3];
471 }
472 if (defined($dbi_a->[4]))
473 {
474 $spolicy = $dbi_a->[4];
475 }
476 if (defined($dbi_a->[5]))
477 {
478 $pct = $dbi_a->[5];
479 }
480 if (defined($dbi_a->[6]))
481 {
482 $lastsent = $dbi_a->[6];
483 }
484 }
485
486 $dbi_s->finish;
487
488 if (!defined($repuri) || ("" eq $repuri))
489 {
490 if ($verbose >= 2)
491 {
492 print STDERR "$progname: no reporting URI for domain $domain; skipping\n";
493 }
494
495 next;
496 }
497
498 if ($daybound)
499 {
500 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now - $interval);
501 $repstart = timelocal(0, 0, 0, $mday, $mon, $year);
502 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now);
503 $repend = timelocal(0, 0, 0, $mday, $mon, $year);
504 }
505 else
506 {
507 $repstart = $now - $interval;
508 $repend = $now;
509 }
510
511 # construct the temporary file
512 $repfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".xml";
513 $zipfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".zip";
514 if (!open($tmpout, ">", $repfile))
515 {
516 print STDERR "$progname: can't create report file for domain $domain\n";
517 next;
518 }
519
520 switch ($adkim)
521 {
522 case ord("r") { $adkimstr = "r"; }
523 case ord("s") { $adkimstr = "s"; }
524 else { $adkimstr = "unknown"; }
525 }
526
527 switch ($aspf)
528 {
529 case ord("r") { $aspfstr = "r"; }
530 case ord("s") { $aspfstr = "s"; }
531 else { $aspfstr = "unknown"; }
532 }
533
534 switch ($policy)
535 {
536 case ord("n") { $policystr = "none"; }
537 case ord("q") { $policystr = "quarantine"; }
538 case ord("r") { $policystr = "reject"; }
539 else { $policystr = "unknown"; }
540 }
541
542 switch ($spolicy)
543 {
544 case 0 { $spolicystr = $policystr; }
545 case ord("n") { $spolicystr = "none"; }
546 case ord("q") { $spolicystr = "quarantine"; }
547 case ord("r") { $spolicystr = "reject"; }
548 else { $spolicystr = "unknown"; }
549 }
550
551
552 print $tmpout "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
553 print $tmpout "<feedback>\n";
554
555 print $tmpout " <report_metadata>\n";
556 print $tmpout " <org_name>$repdom</org_name>\n";
557 print $tmpout " <email>$repemail</email>\n";
558 print $tmpout " <report_id>$domain:$now</report_id>\n";
559 print $tmpout " <date_range>\n";
560 print $tmpout " <begin>$repstart</begin>\n";
561 print $tmpout " <end>$repend</end>\n";
562 print $tmpout " </date_range>\n";
563 print $tmpout " </report_metadata>\n";
564
565 print $tmpout " <policy_published>\n";
566 print $tmpout " <domain>$domain</domain>\n";
567 print $tmpout " <adkim>$adkimstr</adkim>\n";
568 print $tmpout " <aspf>$aspfstr</aspf>\n";
569 print $tmpout " <p>$policystr</p>\n";
570 print $tmpout " <sp>$spolicystr</sp>\n";
571 print $tmpout " <pct>$pct</pct>\n";
572 print $tmpout " </policy_published>\n";
573
574 if ($daybound)
575 {
576 $dbi_s = $dbi_h->prepare("SELECT messages.id, ipaddr.addr, messages.disp, d1.name, d2.name, messages.spf, messages.align_spf, messages.align_dkim FROM messages JOIN ipaddr ON messages.ip = ipaddr.id JOIN domains d1 ON messages.from_domain = d1.id JOIN domains d2 ON messages.env_domain = d2.id WHERE messages.from_domain = ? AND DATE(messages.date) >= DATE(FROM_UNIXTIME(?)) AND DATE(messages.date) < DATE(FROM_UNIXTIME(?))");
577 }
578 else
579 {
580 $dbi_s = $dbi_h->prepare("SELECT messages.id, ipaddr.addr, messages.disp, d1.name, d2.name, messages.spf, messages.align_spf, messages.align_dkim FROM messages JOIN ipaddr ON messages.ip = ipaddr.id JOIN domains d1 ON messages.from_domain = d1.id JOIN domains d2 ON messages.env_domain = d2.id WHERE messages.from_domain = ? AND messages.date > FROM_UNIXTIME(?) AND messages.date <= FROM_UNIXTIME(?)");
581 }
582
583 if (!$dbi_s->execute($domainid, $repstart, $repend))
584 {
585 print STDERR "$progname: can't extract report for domain $domain: " . $dbi_h->errstr . "\n";
586 $dbi_s->finish;
587 $dbi_h->disconnect;
588 exit(1);
589 }
590
591 $rowcount = 0;
592
593 while ($dbi_a = $dbi_s->fetchrow_arrayref())
594 {
595 undef $msgid;
596
597 if (defined($dbi_a->[0]))
598 {
599 $msgid = $dbi_a->[0];
600 }
601 if (defined($dbi_a->[1]))
602 {
603 $ipaddr = $dbi_a->[1];
604 }
605 if (defined($dbi_a->[2]))
606 {
607 $disp = $dbi_a->[2];
608 }
609 if (defined($dbi_a->[3]))
610 {
611 $fromdomain = $dbi_a->[3];
612 }
613 if (defined($dbi_a->[4]))
614 {
615 $envdomain = $dbi_a->[4];
616 }
617 if (defined($dbi_a->[5]))
618 {
619 $spfresult = $dbi_a->[5];
620 }
621 if (defined($dbi_a->[6]))
622 {
623 $align_spf = $dbi_a->[6];
624 }
625 if (defined($dbi_a->[7]))
626 {
627 $align_dkim = $dbi_a->[7];
628 }
629
630 if (!defined($msgid))
631 {
632 next;
633 }
634
635 $rowcount++;
636
637 switch ($disp)
638 {
639 case 0 { $dispstr = "reject"; }
640 case 1 { $dispstr = "reject"; }
641 case 2 { $dispstr = "none"; }
642 case 4 { $dispstr = "quarantine"; }
643 else { $dispstr = "unknown"; }
644 }
645
646 switch ($spfresult)
647 {
648 case 0 { $spfresultstr = "pass"; }
649 case 2 { $spfresultstr = "softfail"; }
650 case 3 { $spfresultstr = "neutral"; }
651 case 4 { $spfresultstr = "temperror"; }
652 case 5 { $spfresultstr = "permerror"; }
653 case 6 { $spfresultstr = "none"; }
654 case 7 { $spfresultstr = "fail"; }
655 case 8 { $spfresultstr = "policy"; }
656 case 9 { $spfresultstr = "nxdomain"; }
657 case 10 { $spfresultstr = "signed"; }
658 case 12 { $spfresultstr = "discard"; }
659 else { $spfresultstr = "unknown"; }
660 }
661
662 switch ($align_dkim)
663 {
664 case 4 { $align_dkimstr = "pass"; }
665 case 5 { $align_dkimstr = "fail"; }
666 else { $align_dkimstr = "unknown"; }
667 }
668
669 switch ($align_spf)
670 {
671 case 4 { $align_spfstr = "pass"; }
672 case 5 { $align_spfstr = "fail"; }
673 else { $align_spfstr = "unknown"; }
674 }
675
676 print $tmpout " <record>\n";
677 print $tmpout " <row>\n";
678 print $tmpout " <source_ip>$ipaddr</source_ip>\n";
679 print $tmpout " <count>1</count>\n";
680 print $tmpout " <policy_evaluated>\n";
681 print $tmpout " <disposition>$dispstr</disposition>\n";
682 print $tmpout " <dkim>$align_dkimstr</dkim>\n";
683 print $tmpout " <spf>$align_spfstr</spf>\n";
684 print $tmpout " </policy_evaluated>\n";
685 print $tmpout " </row>\n";
686 print $tmpout " <identifiers>\n";
687 print $tmpout " <header_from>$fromdomain</header_from>\n";
688 print $tmpout " </identifiers>\n";
689 print $tmpout " <auth_results>\n";
690 print $tmpout " <spf>\n";
691 print $tmpout " <domain>$envdomain</domain>\n";
692 print $tmpout " <result>$spfresultstr</result>\n";
693 print $tmpout " </spf>\n";
694
695 $dbi_d = $dbi_h->prepare("SELECT domains.name, pass FROM signatures JOIN domains ON signatures.domain = domains.id WHERE signatures.message = ?");
696 if (!$dbi_d->execute($msgid))
697 {
698 print STDERR "$progname: can't extract report for message $msgid: " . $dbi_h->errstr . "\n";
699 $dbi_s->finish;
700 $dbi_d->finish;
701 $dbi_h->disconnect;
702 exit(1);
703 }
704
705 while ($dbi_a = $dbi_d->fetchrow_arrayref())
706 {
707 undef $dkimdomain;
708
709 if (defined($dbi_a->[0]))
710 {
711 $dkimdomain = $dbi_a->[0];
712 }
713 if (defined($dbi_a->[1]))
714 {
715 $dkimresult = $dbi_a->[1];
716 }
717
718
719 if (!defined($dkimdomain))
720 {
721 next;
722 }
723
724 switch ($dkimresult)
725 {
726 case 0 { $dkimresultstr = "pass"; }
727 case 2 { $dkimresultstr = "softfail"; }
728 case 3 { $dkimresultstr = "neutral"; }
729 case 4 { $dkimresultstr = "temperror"; }
730 case 5 { $dkimresultstr = "permerror"; }
731 case 6 { $dkimresultstr = "none"; }
732 case 7 { $dkimresultstr = "fail"; }
733 case 8 { $dkimresultstr = "policy"; }
734 case 9 { $dkimresultstr = "nxdomain"; }
735 case 10 { $dkimresultstr = "signed"; }
736 case 12 { $dkimresultstr = "discard"; }
737 else { $dkimresultstr = "unknown"; }
738 }
739
740 print $tmpout " <dkim>\n";
741 print $tmpout " <domain>$dkimdomain</domain>\n";
742 print $tmpout " <result>$dkimresultstr</result>\n";
743 print $tmpout " </dkim>\n";
744 }
745
746 $dbi_d->finish;
747
748 print $tmpout " </auth_results>\n";
749 print $tmpout " </record>\n";
750 }
751
752 $dbi_s->finish;
753
754 print $tmpout "</feedback>\n";
755
756 close($tmpout);
757
758 if ($rowcount == 0)
759 {
760 if ($verbose >= 2)
761 {
762 print STDERR "$progname: no activity selected for $domain; skipping\n";
763 }
764
765 unlink($repfile);
766 next;
767 }
768
769 # zip the report
770 if (!zip [ $repfile ] => $zipfile)
771 {
772 print STDERR "$progname: can't zip report for domain $domain: $!\n";
773 next;
774 }
775
776 if ($keepfiles)
777 {
778 print STDERR "$progname: keeping report file \"$repfile\"\n";
779 }
780
781 # decode the URI
782 @repuris = split(',', $repuri);
783
784 for $repuri (@repuris)
785 {
786 $uri = URI->new($repuri);
787 if (!defined($uri) ||
788 !defined($uri->scheme) ||
789 $uri->opaque eq "")
790 {
791 print STDERR "$progname: can't parse reporting URI for domain $domain\n";
792 next;
793 }
794
795 $repdest = $uri->opaque;
796 my $report_maxbytes = $report_maxbytes_global;
797
798 # check for max report size
799 if ($repdest =~ m/^(\S+)!(\d{1,15})([kmgt])?$/i)
800 {
801 $repdest = $1;
802 $report_maxbytes = $2;
803 if ($3)
804 {
805 my $letter = lc($3);
806 if ($letter eq 'k')
807 {
808 $report_maxbytes = $report_maxbytes * 1024;
809 }
810 if ($letter eq 'm')
811 {
812 $report_maxbytes = $report_maxbytes * 1048576;
813 }
814 if ($letter eq 'g')
815 {
816 $report_maxbytes = $report_maxbytes * (2**30);
817 }
818 if ($letter eq 't')
819 {
820 $report_maxbytes = $report_maxbytes * (2**40);
821 }
822 }
823 }
824
825 # Test mode, just report what would have been done
826 if ($testmode)
827 {
828 print STDERR "$progname: would email $domain report for " .
829 "$rowcount records to " . $uri->opaque . "\n";
830 }
831 # ensure a scheme is present
832 elsif (!defined($uri->scheme))
833 {
834 if ($verbose >= 2)
835 {
836 print STDERR "$progname: unknown URI scheme in '$repuri' for domain $domain\n";
837 }
838 next;
839 }
840 # send/post report
841 elsif ($uri->scheme eq "mailto")
842 {
843 my $datestr;
844 my $report_id;
845
846 if (!open($zipin, $zipfile))
847 {
848 print STDERR "$progname: can't read zipped report for $domain: $!\n";
849 next;
850 }
851
852 $boundary = "report_section";
853
854 $report_id = $domain . "-" . $now . "@" . $repdom;
855 $datestr = strftime("%a, %e %b %Y %H:%M:%S %z (%Z)",
856 localtime);
857
858 $mailout = "To: $repdest\n";
859 $mailout .= "From: $repemail\n";
860 $mailout .= "Subject: Report Domain: " . $domain . " Submitter: " . $repdom . " Report-ID: " . $report_id . "\n";
861 $mailout .= "X-Mailer: " . $progname . " v" . $version ."\n";
862 $mailout .= "Date: " . $datestr . "\n";
863 $mailout .= "Message-ID: <$report_id>\n";
864 $mailout .= "Auto-Submitted: auto-generated\n";
865 $mailout .= "MIME-Version: 1.0\n";
866 $mailout .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
867 $mailout .= "\n";
868 $mailout .= "This is a MIME-encapsulated message.\n";
869 $mailout .= "\n";
870 $mailout .= "--$boundary\n";
871 $mailout .= "Content-Type: text/plain;\n";
872 $mailout .= "\n";
873 $mailout .= "This is a DMARC aggregate report for $domain\n";
874 $mailout .= "generated at " . localtime() . "\n";
875 $mailout .= "\n";
876 $mailout .= "--$boundary\n";
877 $mailout .= "Content-Type: application/zip\n";
878 $mailout .= "Content-Disposition: attachment; filename=\"$zipfile\"\n";
879 $mailout .= "Content-Transfer-Encoding: base64\n";
880 $mailout .= "\n";
881
882 while (read($zipin, $buf, 60*57))
883 {
884 $mailout .= encode_base64($buf);
885 }
886
887 $mailout .= "\n";
888 $mailout .= "--$boundary--\n";
889 my $reportsize = length($mailout);
890
891 if ($reportsize > $report_maxbytes)
892 {
893 # XXX -- generate an error report here
894 print STDERR "$progname: report was too large ($reportsize bytes) per limitation of URI " . $uri->opaque . " for domain $domain\n";
895 }
896 else
897 {
898 $smtpstatus = "sent";
899 $smtpfail = 0;
900 if (!$smtp->mail($repemail) ||
901 !$smtp->to($repdest) ||
902 !$smtp->data() ||
903 !$smtp->datasend($mailout) ||
904 !$smtp->dataend())
905 {
906 $smtpfail = 1;
907 $smtpstatus = "failed to send";
908 }
909
910 if ($verbose || $smtpfail)
911 {
912 # now perl voodoo:
913 $answer = ${${*$smtp}{'net_cmd_resp'}}[1] || $smtp->message() || 'unknown error';
914 chomp($answer);
915 print STDERR "$progname: $smtpstatus report for $domain to $repdest ($answer)\n";
916 }
917 }
918
919 $smtp->reset();
920
921 close($zipin);
922 }
923 else
924 {
925 print STDERR "$progname: unsupported reporting URI scheme " . $uri->scheme . " for domain $domain\n";
926 next;
927 }
928 }
929
930 # update "last sent" timestamp
931 if ($doupdate)
932 {
933 $dbi_s = $dbi_h->prepare("UPDATE requests SET lastsent = FROM_UNIXTIME(?) WHERE domain = ?");
934 if (!$dbi_s->execute($repend, $domainid))
935 {
936 print STDERR "$progname: can't update last sent time for domain $domain: " . $dbi_h->errstr . "\n";
937 $dbi_s->finish;
938 $dbi_h->disconnect;
939 exit(1);
940 }
941 }
942
943 unlink($zipfile);
944 if (!$keepfiles)
945 {
946 unlink($repfile);
947 }
948 }
949
950 $smtp->quit();
951
952 #
953 # all done!
954 #
955
956 $dbi_s->finish;
957
958 if ($verbose)
959 {
960 print STDERR "$progname: terminating at " . localtime() . "\n";
961 }
962
963 $dbi_h->disconnect;
964
965 exit(0);
0 .TH opendmarc-reports 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-reports
3 \- OpenDMARC aggregate report generation tool
4 .SH SYNOPSIS
5 .B opendmarc-reports
6 [options]
7 .SH DESCRIPTION
8 .B opendmarc-reports
9 pulls data from an OpenDMARC database and generates periodic aggregate
10 reports. The database is populated by a running
11 .B opendmarc-import(8)
12 on a message history file generated by an
13 .B opendmarc(8)
14 filter as messages arrive and are processed. This includes the collection
15 of reporting URIs, which this script uses to make reports available to those
16 that request them.
17 .SH OPTIONS
18 .TP
19 .I --day
20 Generate reports on day boundaries. Overrides the value of
21 .I --interval
22 (see below).
23 .TP
24 .I --dbhost=hostname
25 Specifies the hostname on which the SQL server is running. Defaults to
26 the value of the environment variable OPENDMARC_DBHOST, or "localhost" if
27 the environment variable is not set.
28 .TP
29 .I --dbname=name
30 Specifies the SQL database name to be accessed. Defaults to
31 the value of the environment variable OPENDMARC_DB, or "opendmarc" if
32 the environment variable is not set.
33 .TP
34 .I --dbpasswd=password
35 Specifies the password for the SQL database to be accessed. Defaults to
36 the value of the environment variable OPENDMARC_PASSWORD, or "opendmarc" if
37 the environment variable is not set.
38 .TP
39 .I --dbport=port
40 Specifies the TCP port on which the SQL server is expected to be listening.
41 Defaults to the value of the environment variable OPENDMARC_PORT, or 3306
42 if the environment variable is not set.
43 .TP
44 .I --dbuser=user
45 Specifies the SQL user to be used to access the database. Defaults to
46 the value of the environment variable OPENDMARC_USER, or "opendmarc" if
47 the environment variable is not set.
48 .TP
49 .I --domain=name
50 Generates a report (if one is due) for the named domain, rather than checking
51 all of them.
52 .TP
53 .I --help
54 Prints a help message and terminates.
55 .TP
56 .I --interval=secs
57 Generates reports only for hosts that have not had a report generated in
58 at least the last
59 .I secs
60 seconds.
61 .TP
62 .I --nodomain=name
63 Skips generating a report for the named domain. Can be specified multiple
64 times to skip multiple reporting domains.
65 .TP
66 .I --noupdate
67 Suppresses marking the time of the transmission of the report in the database.
68 Normally this would be done to prevent reports from being sent too close
69 together.
70 .TP
71 .I --report-email=addr
72 Generates reports using the specified address, which is used in the report
73 content and in the SMTP transaction. The default is "postmaster@HOSTNAME"
74 where HOSTNAME is replaced by the hostname of the host generating the report.
75 .TP
76 .I --report-org=domain
77 Generates reports using the specified domain name as the organization
78 responsible for the report. This is used to create the archive filename
79 and is included in the report content. The default is the hostname of
80 the host generating the report.
81 .TP
82 .I --smtp-host=host
83 Causes reports to be sent by transmitting them using SMTP to the named
84 .I host
85 which can be an IP address or a hostname. The default is "127.0.0.1".
86 .TP
87 .I --smtp-port=port
88 Causes reports to be sent by transmitting them using SMTP to the specified
89 .I port.
90 The default is 25.
91 .TP
92 .I --utc
93 Instructs the database to change to the UTC timezone when generating output.
94 Otherwise, the database default is used.
95 .TP
96 .I --verbose
97 Increase the amount of verbosity written to standard output.
98 .TP
99 .I --version
100 Print version number and exit.
101 .SH VERSION
102 This man page covers the version of
103 .I opendmarc-reports
104 that shipped with version 1.3.2 of
105 .I OpenDMARC.
106 .SH COPYRIGHT
107 Copyright (c) 2012, 2014, 2015, The Trusted Domain Project.
108 All rights reserved.
109 .SH SEE ALSO
110 .I opendmarc(8),
111 .I opendmarc.conf(5),
112 .I opendmarc-import(8)
0 .TH opendmarc-reports 8 "The Trusted Domain Project"
1 .SH NAME
2 .B opendmarc-reports
3 \- OpenDMARC aggregate report generation tool
4 .SH SYNOPSIS
5 .B opendmarc-reports
6 [options]
7 .SH DESCRIPTION
8 .B opendmarc-reports
9 pulls data from an OpenDMARC database and generates periodic aggregate
10 reports. The database is populated by a running
11 .B opendmarc-import(8)
12 on a message history file generated by an
13 .B opendmarc(8)
14 filter as messages arrive and are processed. This includes the collection
15 of reporting URIs, which this script uses to make reports available to those
16 that request them.
17 .SH OPTIONS
18 .TP
19 .I --day
20 Generate reports on day boundaries. Overrides the value of
21 .I --interval
22 (see below).
23 .TP
24 .I --dbhost=hostname
25 Specifies the hostname on which the SQL server is running. Defaults to
26 the value of the environment variable OPENDMARC_DBHOST, or "localhost" if
27 the environment variable is not set.
28 .TP
29 .I --dbname=name
30 Specifies the SQL database name to be accessed. Defaults to
31 the value of the environment variable OPENDMARC_DB, or "opendmarc" if
32 the environment variable is not set.
33 .TP
34 .I --dbpasswd=password
35 Specifies the password for the SQL database to be accessed. Defaults to
36 the value of the environment variable OPENDMARC_PASSWORD, or "opendmarc" if
37 the environment variable is not set.
38 .TP
39 .I --dbport=port
40 Specifies the TCP port on which the SQL server is expected to be listening.
41 Defaults to the value of the environment variable OPENDMARC_PORT, or 3306
42 if the environment variable is not set.
43 .TP
44 .I --dbuser=user
45 Specifies the SQL user to be used to access the database. Defaults to
46 the value of the environment variable OPENDMARC_USER, or "opendmarc" if
47 the environment variable is not set.
48 .TP
49 .I --domain=name
50 Generates a report (if one is due) for the named domain, rather than checking
51 all of them.
52 .TP
53 .I --help
54 Prints a help message and terminates.
55 .TP
56 .I --interval=secs
57 Generates reports only for hosts that have not had a report generated in
58 at least the last
59 .I secs
60 seconds.
61 .TP
62 .I --nodomain=name
63 Skips generating a report for the named domain. Can be specified multiple
64 times to skip multiple reporting domains.
65 .TP
66 .I --noupdate
67 Suppresses marking the time of the transmission of the report in the database.
68 Normally this would be done to prevent reports from being sent too close
69 together.
70 .TP
71 .I --report-email=addr
72 Generates reports using the specified address, which is used in the report
73 content and in the SMTP transaction. The default is "postmaster@HOSTNAME"
74 where HOSTNAME is replaced by the hostname of the host generating the report.
75 .TP
76 .I --report-org=domain
77 Generates reports using the specified domain name as the organization
78 responsible for the report. This is used to create the archive filename
79 and is included in the report content. The default is the hostname of
80 the host generating the report.
81 .TP
82 .I --smtp-host=host
83 Causes reports to be sent by transmitting them using SMTP to the named
84 .I host
85 which can be an IP address or a hostname. The default is "127.0.0.1".
86 .TP
87 .I --smtp-port=port
88 Causes reports to be sent by transmitting them using SMTP to the specified
89 .I port.
90 The default is 25.
91 .TP
92 .I --utc
93 Instructs the database to change to the UTC timezone when generating output.
94 Otherwise, the database default is used.
95 .TP
96 .I --verbose
97 Increase the amount of verbosity written to standard output.
98 .TP
99 .I --version
100 Print version number and exit.
101 .SH VERSION
102 This man page covers the version of
103 .I opendmarc-reports
104 that shipped with version @VERSION@ of
105 .I OpenDMARC.
106 .SH COPYRIGHT
107 Copyright (c) 2012, 2014, 2015, The Trusted Domain Project.
108 All rights reserved.
109 .SH SEE ALSO
110 .I opendmarc(8),
111 .I opendmarc.conf(5),
112 .I opendmarc-import(8)
0 #!/usr/bin/perl
1 #
2 # Copyright (c) 2012-2016, 2017, The Trusted Domain Project.
3 # All rights reserved.
4 #
5 # Script to generate regular DMARC reports.
6
7 ###
8 ### Setup
9 ###
10
11 use strict;
12 use warnings;
13
14 use Switch;
15
16 use DBI;
17 use File::Basename;
18 use File::Temp;
19 use Net::Domain qw(hostfqdn hostdomain);
20 use Getopt::Long;
21 use IO::Handle;
22 use IO::Compress::Zip qw(zip);
23 use POSIX;
24 use MIME::Base64;
25 use Net::SMTP;
26 use Time::Local;
27
28 require DBD::@SQL_BACKEND@;
29
30 require HTTP::Request;
31
32 # general
33 my $progname = basename($0);
34 my $version = "@VERSION@";
35 my $verbose = 0;
36 my $helponly = 0;
37 my $showversion = 0;
38
39 my $interval;
40
41 my $gen;
42 my $uri;
43
44 my $buf;
45
46 my $mailout;
47 my $boundary;
48
49 my $tmpout;
50
51 my $repfile;
52 my $zipfile;
53
54 my $zipin;
55
56 my $now = time();
57
58 my $repstart;
59 my $repend;
60
61 my $domain;
62 my $domainid;
63 my $domainset;
64 my $forcedomain;
65 my @skipdomains;
66
67 my $policy;
68 my $spolicy;
69 my $policystr;
70 my $spolicystr;
71 my $pct;
72
73 my $repuri;
74 my @repuris;
75 my $lastsent;
76
77 my $aspf;
78 my $aspfstr;
79 my $adkim;
80 my $adkimstr;
81 my $align_dkim;
82 my $align_dkimstr;
83 my $align_spf;
84 my $align_spfstr;
85 my $spfresult;
86 my $dkimresult;
87 my $disp;
88 my $spfresultstr;
89 my $dkimresultstr;
90 my $dispstr;
91 my $ipaddr;
92 my $fromdomain;
93 my $envdomain;
94 my $dkimdomain;
95
96 my $repdest;
97
98 my $smtpstatus;
99 my $smtpfail;
100
101 my $doupdate = 1;
102 my $testmode = 0;
103 my $keepfiles = 0;
104 my $use_utc = 0;
105 my $daybound = 0;
106 my $report_maxbytes_global = 15728640; # default: 15M, per spec
107
108 my $msgid;
109
110 my $rowcount;
111
112 my $dbi_s;
113 my $dbi_h;
114 my $dbi_a;
115 my $dbi_d;
116
117 # DB parameters
118 my $def_dbhost = "localhost";
119 my $def_dbname = "opendmarc";
120 my $def_dbuser = "opendmarc";
121 my $def_dbpasswd = "opendmarc";
122 my $def_dbport = "3306";
123 my $def_interval = "86400";
124 my $dbhost;
125 my $dbname;
126 my $dbuser;
127 my $dbpasswd;
128 my $dbport;
129
130 my $dbscheme = "@SQL_BACKEND@";
131
132 my $repdom = hostdomain();
133 my $repemail = "postmaster@" . $repdom;
134
135 my $smtp_server = '127.0.0.1';
136 my $smtp_port = 25;
137 my $smtp;
138
139 my $answer;
140
141 ###
142 ### NO user-serviceable parts beyond this point
143 ###
144
145 sub usage
146 {
147 print STDERR "$progname: usage: $progname [options]\n";
148 print STDERR "\t--day send yesterday's data\n";
149 print STDERR "\t--dbhost=host database host [$def_dbhost]\n";
150 print STDERR "\t--dbname=name database name [$def_dbname]\n";
151 print STDERR "\t--dbpasswd=passwd database password [$def_dbpasswd]\n";
152 print STDERR "\t--dbport=port database port [$def_dbport]\n";
153 print STDERR "\t--dbuser=user database user [$def_dbuser]\n";
154 print STDERR "\t--domain=name force a report for named domain\n";
155 print STDERR "\t--help print help and exit\n";
156 print STDERR "\t--interval=secs report interval [$def_interval]\n";
157 print STDERR "\t--keepfiles keep xml files (in local directory)\n";
158 print STDERR "\t -n synonym for --test\n";
159 print STDERR "\t--nodomain=name omit a report for named domain\n";
160 print STDERR "\t--noupdate don't record report transmission\n";
161 print STDERR "\t--report-email reporting contact [$repemail]\n";
162 print STDERR "\t--report-org reporting organization [$repdom]\n";
163 print STDERR "\t--smtp-port smtp server port [$smtp_port]\n";
164 print STDERR "\t--smtp-server smtp server [$smtp_server]\n";
165 print STDERR "\t--test don't send reports\n";
166 print STDERR "\t (implies --keepfiles --noupdate)\n";
167 print STDERR "\t--utc operate in UTC\n";
168 print STDERR "\t--verbose verbose output\n";
169 print STDERR "\t (repeat for increased output)\n";
170 print STDERR "\t--version print version and exit\n";
171 }
172
173 # set locale
174 setlocale(LC_ALL, 'C');
175
176 # parse command line arguments
177 my $opt_retval = &Getopt::Long::GetOptions ('day!' => \$daybound,
178 'dbhost=s' => \$dbhost,
179 'dbname=s' => \$dbname,
180 'dbpasswd=s' => \$dbpasswd,
181 'dbport=s' => \$dbport,
182 'dbuser=s' => \$dbuser,
183 'domain=s' => \$forcedomain,
184 'help!' => \$helponly,
185 'interval=i' => \$interval,
186 'keepfiles' => \$keepfiles,
187 'n|test' => \$testmode,
188 'nodomain=s' => \@skipdomains,
189 'report-email=s' => \$repemail,
190 'report-org=s' => \$repdom,
191 'smtp-server=s' => \$smtp_server,
192 'smtp-port=i' => \$smtp_port,
193 'update!' => \$doupdate,
194 'utc!' => \$use_utc,
195 'verbose+' => \$verbose,
196 'version!' => \$showversion,
197 );
198
199 if (!$opt_retval || $helponly)
200 {
201 usage();
202
203 if ($helponly)
204 {
205 exit(0);
206 }
207 else
208 {
209 exit(1);
210 }
211 }
212
213 if ($showversion)
214 {
215 print STDOUT "$progname v$version\n";
216 exit(0);
217 }
218
219 # apply defaults
220 if (!defined($dbhost))
221 {
222 if (defined($ENV{'OPENDMARC_DBHOST'}))
223 {
224 $dbhost = $ENV{'OPENDMARC_DBHOST'};
225 }
226 else
227 {
228 $dbhost = $def_dbhost;
229 }
230 }
231
232 if (!defined($dbname))
233 {
234 if (defined($ENV{'OPENDMARC_DB'}))
235 {
236 $dbname = $ENV{'OPENDMARC_DB'};
237 }
238 else
239 {
240 $dbname = $def_dbname;
241 }
242 }
243
244 if (!defined($dbpasswd))
245 {
246 if (defined($ENV{'OPENDMARC_PASSWORD'}))
247 {
248 $dbpasswd = $ENV{'OPENDMARC_PASSWORD'};
249 }
250 else
251 {
252 $dbpasswd = $def_dbpasswd;
253 }
254 }
255
256 if (!defined($dbport))
257 {
258 if (defined($ENV{'OPENDMARC_PORT'}))
259 {
260 $dbport = $ENV{'OPENDMARC_PORT'};
261 }
262 else
263 {
264 $dbport = $def_dbport;
265 }
266 }
267
268 if (!defined($dbuser))
269 {
270 if (defined($ENV{'OPENDMARC_USER'}))
271 {
272 $dbuser = $ENV{'OPENDMARC_USER'};
273 }
274 else
275 {
276 $dbuser = $def_dbuser;
277 }
278 }
279
280 if (defined($interval) && $daybound)
281 {
282 print STDERR "$progname: WARN: --day overrides --interval\n";
283 }
284
285 if (!defined($interval) || $daybound)
286 {
287 $interval = $def_interval;
288 }
289
290 # Test mode requested, don't update last sent and keep xml files
291 $doupdate = ($testmode == 1) ? 0 : $doupdate;
292 $keepfiles = ($testmode == 1) ? 1 : $keepfiles;
293
294 if ($verbose)
295 {
296 print STDERR "$progname: started at " . localtime($now) . "\n";
297 }
298
299 my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname .
300 ";host=" . $dbhost . ";port=" . $dbport;
301
302 $dbi_h = DBI->connect($dbi_dsn, $dbuser, $dbpasswd, { PrintError => 0 });
303 if (!defined($dbi_h))
304 {
305 print STDERR "$progname: unable to connect to database: $DBI::errstr\n";
306 exit(1);
307 }
308
309 if ($verbose >= 2)
310 {
311 print STDERR "$progname: connected to database\n";
312 }
313
314 if ($use_utc)
315 {
316 $dbi_s = $dbi_h->prepare("SET TIME_ZONE='+00:00'");
317
318 if (!$dbi_s->execute())
319 {
320 print STDERR "$progname: failed to change to UTC: " . $dbi_h->errstr . "\n";
321 $dbi_s->finish;
322 $dbi_h->disconnect;
323 exit(1);
324 }
325 }
326
327 #
328 # Select domains on which to report
329 #
330
331 if ($verbose >= 2)
332 {
333 print STDERR "$progname: selecting target domains\n";
334 }
335
336 if (defined($forcedomain))
337 {
338 $dbi_s = $dbi_h->prepare("SELECT name FROM domains WHERE name = ?");
339
340 if (!$dbi_s->execute($forcedomain))
341 {
342 print STDERR "$progname: failed to test for database entry: " . $dbi_h->errstr . "\n";
343 $dbi_s->finish;
344 $dbi_h->disconnect;
345 exit(1);
346 }
347 }
348 elsif ($daybound)
349 {
350 $dbi_s = $dbi_h->prepare("SELECT domains.name FROM requests JOIN domains ON requests.domain = domains.id WHERE DATE(lastsent) < DATE(FROM_UNIXTIME(?))");
351
352 if (!$dbi_s->execute($now))
353 {
354 print STDERR "$progname: failed to collect domain names: " . $dbi_h->errstr . "\n";
355 $dbi_s->finish;
356 $dbi_h->disconnect;
357 exit(1);
358 }
359 }
360 else
361 {
362 $dbi_s = $dbi_h->prepare("SELECT domains.name FROM requests JOIN domains ON requests.domain = domains.id WHERE lastsent <= DATE_SUB(FROM_UNIXTIME(?), INTERVAL ? SECOND)");
363
364 if (!$dbi_s->execute($now, $interval))
365 {
366 print STDERR "$progname: failed to collect domain names: " . $dbi_h->errstr . "\n";
367 $dbi_s->finish;
368 $dbi_h->disconnect;
369 exit(1);
370 }
371 }
372
373 $domainset = $dbi_s->fetchall_arrayref([0]);
374 $dbi_s->finish;
375
376 if ($verbose)
377 {
378 print STDERR "$progname: selected " . scalar(@$domainset) . " domain(s)\n";
379 }
380
381 #
382 # For each domain:
383 # -- extract reporting address
384 # -- extract messages/signatures to report
385 # -- generate and send report
386 # -- update "last sent" timestamp
387 #
388
389 $smtp = Net::SMTP->new($smtp_server,
390 'Port' => $smtp_port,
391 'Hello' => hostfqdn());
392 if (!defined($smtp))
393 {
394 print STDERR "$progname: open SMTP server $smtp_server:$smtp_port failed\n";
395 exit(1);
396 }
397
398 foreach (@$domainset)
399 {
400 $domain = $_->[0];
401
402 if (!defined($domain))
403 {
404 next;
405 }
406
407 if (@skipdomains && grep({$_ eq $domain} @skipdomains) != 0)
408 {
409 next;
410 }
411
412 if ($verbose >= 2)
413 {
414 print STDERR "$progname: processing $domain\n";
415 }
416
417 # extract this domain's reporting parameters
418 $dbi_s = $dbi_h->prepare("SELECT id FROM domains WHERE name = ?");
419 if (!$dbi_s->execute($domain))
420 {
421 print STDERR "$progname: can't get ID for domain $domain: " . $dbi_h->errstr . "\n";
422 $dbi_s->finish;
423 $dbi_h->disconnect;
424 exit(1);
425 }
426
427 undef $domainid;
428 while ($dbi_a = $dbi_s->fetchrow_arrayref())
429 {
430 if (defined($dbi_a->[0]))
431 {
432 $domainid = $dbi_a->[0];
433 }
434 }
435 $dbi_s->finish;
436
437 if (!defined($domainid))
438 {
439 print STDERR "$progname: ID for domain $domain not found\n";
440 next;
441 }
442
443 $dbi_s = $dbi_h->prepare("SELECT repuri, adkim, aspf, policy, spolicy, pct, UNIX_TIMESTAMP(lastsent) FROM requests WHERE domain = ?");
444 if (!$dbi_s->execute($domainid))
445 {
446 print STDERR "$progname: can't get reporting URI for domain $domain: " . $dbi_h->errstr . "\n";
447 $dbi_s->finish;
448 $dbi_h->disconnect;
449 exit(1);
450 }
451
452 undef $repuri;
453
454 while ($dbi_a = $dbi_s->fetchrow_arrayref())
455 {
456 if (defined($dbi_a->[0]))
457 {
458 $repuri = $dbi_a->[0];
459 }
460 if (defined($dbi_a->[1]))
461 {
462 $adkim = $dbi_a->[1];
463 }
464 if (defined($dbi_a->[2]))
465 {
466 $aspf = $dbi_a->[2];
467 }
468 if (defined($dbi_a->[3]))
469 {
470 $policy = $dbi_a->[3];
471 }
472 if (defined($dbi_a->[4]))
473 {
474 $spolicy = $dbi_a->[4];
475 }
476 if (defined($dbi_a->[5]))
477 {
478 $pct = $dbi_a->[5];
479 }
480 if (defined($dbi_a->[6]))
481 {
482 $lastsent = $dbi_a->[6];
483 }
484 }
485
486 $dbi_s->finish;
487
488 if (!defined($repuri) || ("" eq $repuri))
489 {
490 if ($verbose >= 2)
491 {
492 print STDERR "$progname: no reporting URI for domain $domain; skipping\n";
493 }
494
495 next;
496 }
497
498 if ($daybound)
499 {
500 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now - $interval);
501 $repstart = timelocal(0, 0, 0, $mday, $mon, $year);
502 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now);
503 $repend = timelocal(0, 0, 0, $mday, $mon, $year);
504 }
505 else
506 {
507 $repstart = $now - $interval;
508 $repend = $now;
509 }
510
511 # construct the temporary file
512 $repfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".xml";
513 $zipfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".zip";
514 if (!open($tmpout, ">", $repfile))
515 {
516 print STDERR "$progname: can't create report file for domain $domain\n";
517 next;
518 }
519
520 switch ($adkim)
521 {
522 case ord("r") { $adkimstr = "r"; }
523 case ord("s") { $adkimstr = "s"; }
524 else { $adkimstr = "unknown"; }
525 }
526
527 switch ($aspf)
528 {
529 case ord("r") { $aspfstr = "r"; }
530 case ord("s") { $aspfstr = "s"; }
531 else { $aspfstr = "unknown"; }
532 }
533
534 switch ($policy)
535 {
536 case ord("n") { $policystr = "none"; }
537 case ord("q") { $policystr = "quarantine"; }
538 case ord("r") { $policystr = "reject"; }
539 else { $policystr = "unknown"; }
540 }
541
542 switch ($spolicy)
543 {
544 case 0 { $spolicystr = $policystr; }
545 case ord("n") { $spolicystr = "none"; }
546 case ord("q") { $spolicystr = "quarantine"; }
547 case ord("r") { $spolicystr = "reject"; }
548 else { $spolicystr = "unknown"; }
549 }
550
551
552 print $tmpout "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
553 print $tmpout "<feedback>\n";
554
555 print $tmpout " <report_metadata>\n";
556 print $tmpout " <org_name>$repdom</org_name>\n";
557 print $tmpout " <email>$repemail</email>\n";
558 print $tmpout " <report_id>$domain:$now</report_id>\n";
559 print $tmpout " <date_range>\n";
560 print $tmpout " <begin>$repstart</begin>\n";
561 print $tmpout " <end>$repend</end>\n";
562 print $tmpout " </date_range>\n";
563 print $tmpout " </report_metadata>\n";
564
565 print $tmpout " <policy_published>\n";
566 print $tmpout " <domain>$domain</domain>\n";
567 print $tmpout " <adkim>$adkimstr</adkim>\n";
568 print $tmpout " <aspf>$aspfstr</aspf>\n";
569 print $tmpout " <p>$policystr</p>\n";
570 print $tmpout " <sp>$spolicystr</sp>\n";
571 print $tmpout " <pct>$pct</pct>\n";
572 print $tmpout " </policy_published>\n";
573
574 if ($daybound)
575 {
576 $dbi_s = $dbi_h->prepare("SELECT messages.id, ipaddr.addr, messages.disp, d1.name, d2.name, messages.spf, messages.align_spf, messages.align_dkim FROM messages JOIN ipaddr ON messages.ip = ipaddr.id JOIN domains d1 ON messages.from_domain = d1.id JOIN domains d2 ON messages.env_domain = d2.id WHERE messages.from_domain = ? AND DATE(messages.date) >= DATE(FROM_UNIXTIME(?)) AND DATE(messages.date) < DATE(FROM_UNIXTIME(?))");
577 }
578 else
579 {
580 $dbi_s = $dbi_h->prepare("SELECT messages.id, ipaddr.addr, messages.disp, d1.name, d2.name, messages.spf, messages.align_spf, messages.align_dkim FROM messages JOIN ipaddr ON messages.ip = ipaddr.id JOIN domains d1 ON messages.from_domain = d1.id JOIN domains d2 ON messages.env_domain = d2.id WHERE messages.from_domain = ? AND messages.date > FROM_UNIXTIME(?) AND messages.date <= FROM_UNIXTIME(?)");
581 }
582
583 if (!$dbi_s->execute($domainid, $repstart, $repend))
584 {
585 print STDERR "$progname: can't extract report for domain $domain: " . $dbi_h->errstr . "\n";
586 $dbi_s->finish;
587 $dbi_h->disconnect;
588 exit(1);
589 }
590
591 $rowcount = 0;
592
593 while ($dbi_a = $dbi_s->fetchrow_arrayref())
594 {
595 undef $msgid;
596
597 if (defined($dbi_a->[0]))
598 {
599 $msgid = $dbi_a->[0];
600 }
601 if (defined($dbi_a->[1]))
602 {
603 $ipaddr = $dbi_a->[1];
604 }
605 if (defined($dbi_a->[2]))
606 {
607 $disp = $dbi_a->[2];
608 }
609 if (defined($dbi_a->[3]))
610 {
611 $fromdomain = $dbi_a->[3];
612 }
613 if (defined($dbi_a->[4]))
614 {
615 $envdomain = $dbi_a->[4];
616 }
617 if (defined($dbi_a->[5]))
618 {
619 $spfresult = $dbi_a->[5];
620 }
621 if (defined($dbi_a->[6]))
622 {
623 $align_spf = $dbi_a->[6];
624 }
625 if (defined($dbi_a->[7]))
626 {
627 $align_dkim = $dbi_a->[7];
628 }
629
630 if (!defined($msgid))
631 {
632 next;
633 }
634
635 $rowcount++;
636
637 switch ($disp)
638 {
639 case 0 { $dispstr = "reject"; }
640 case 1 { $dispstr = "reject"; }
641 case 2 { $dispstr = "none"; }
642 case 4 { $dispstr = "quarantine"; }
643 else { $dispstr = "unknown"; }
644 }
645
646 switch ($spfresult)
647 {
648 case 0 { $spfresultstr = "pass"; }
649 case 2 { $spfresultstr = "softfail"; }
650 case 3 { $spfresultstr = "neutral"; }
651 case 4 { $spfresultstr = "temperror"; }
652 case 5 { $spfresultstr = "permerror"; }
653 case 6 { $spfresultstr = "none"; }
654 case 7 { $spfresultstr = "fail"; }
655 case 8 { $spfresultstr = "policy"; }
656 case 9 { $spfresultstr = "nxdomain"; }
657 case 10 { $spfresultstr = "signed"; }
658 case 12 { $spfresultstr = "discard"; }
659 else { $spfresultstr = "unknown"; }
660 }
661
662 switch ($align_dkim)
663 {
664 case 4 { $align_dkimstr = "pass"; }
665 case 5 { $align_dkimstr = "fail"; }
666 else { $align_dkimstr = "unknown"; }
667 }
668
669 switch ($align_spf)
670 {
671 case 4 { $align_spfstr = "pass"; }
672 case 5 { $align_spfstr = "fail"; }
673 else { $align_spfstr = "unknown"; }
674 }
675
676 print $tmpout " <record>\n";
677 print $tmpout " <row>\n";
678 print $tmpout " <source_ip>$ipaddr</source_ip>\n";
679 print $tmpout " <count>1</count>\n";
680 print $tmpout " <policy_evaluated>\n";
681 print $tmpout " <disposition>$dispstr</disposition>\n";
682 print $tmpout " <dkim>$align_dkimstr</dkim>\n";
683 print $tmpout " <spf>$align_spfstr</spf>\n";
684 print $tmpout " </policy_evaluated>\n";
685 print $tmpout " </row>\n";
686 print $tmpout " <identifiers>\n";
687 print $tmpout " <header_from>$fromdomain</header_from>\n";
688 print $tmpout " </identifiers>\n";
689 print $tmpout " <auth_results>\n";
690 print $tmpout " <spf>\n";
691 print $tmpout " <domain>$envdomain</domain>\n";
692 print $tmpout " <result>$spfresultstr</result>\n";
693 print $tmpout " </spf>\n";
694
695 $dbi_d = $dbi_h->prepare("SELECT domains.name, pass FROM signatures JOIN domains ON signatures.domain = domains.id WHERE signatures.message = ?");
696 if (!$dbi_d->execute($msgid))
697 {
698 print STDERR "$progname: can't extract report for message $msgid: " . $dbi_h->errstr . "\n";
699 $dbi_s->finish;
700 $dbi_d->finish;
701 $dbi_h->disconnect;
702 exit(1);
703 }
704
705 while ($dbi_a = $dbi_d->fetchrow_arrayref())
706 {
707 undef $dkimdomain;
708
709 if (defined($dbi_a->[0]))
710 {
711 $dkimdomain = $dbi_a->[0];
712 }
713 if (defined($dbi_a->[1]))
714 {
715 $dkimresult = $dbi_a->[1];
716 }
717
718
719 if (!defined($dkimdomain))
720 {
721 next;
722 }
723
724 switch ($dkimresult)
725 {
726 case 0 { $dkimresultstr = "pass"; }
727 case 2 { $dkimresultstr = "softfail"; }
728 case 3 { $dkimresultstr = "neutral"; }
729 case 4 { $dkimresultstr = "temperror"; }
730 case 5 { $dkimresultstr = "permerror"; }
731 case 6 { $dkimresultstr = "none"; }
732 case 7 { $dkimresultstr = "fail"; }
733 case 8 { $dkimresultstr = "policy"; }
734 case 9 { $dkimresultstr = "nxdomain"; }
735 case 10 { $dkimresultstr = "signed"; }
736 case 12 { $dkimresultstr = "discard"; }
737 else { $dkimresultstr = "unknown"; }
738 }
739
740 print $tmpout " <dkim>\n";
741 print $tmpout " <domain>$dkimdomain</domain>\n";
742 print $tmpout " <result>$dkimresultstr</result>\n";
743 print $tmpout " </dkim>\n";
744 }
745
746 $dbi_d->finish;
747
748 print $tmpout " </auth_results>\n";
749 print $tmpout " </record>\n";
750 }
751
752 $dbi_s->finish;
753
754 print $tmpout "</feedback>\n";
755
756 close($tmpout);
757
758 if ($rowcount == 0)
759 {
760 if ($verbose >= 2)
761 {
762 print STDERR "$progname: no activity selected for $domain; skipping\n";
763 }
764
765 unlink($repfile);
766 next;
767 }
768
769 # zip the report
770 if (!zip [ $repfile ] => $zipfile)
771 {
772 print STDERR "$progname: can't zip report for domain $domain: $!\n";
773 next;
774 }
775
776 if ($keepfiles)
777 {
778 print STDERR "$progname: keeping report file \"$repfile\"\n";
779 }
780
781 # decode the URI
782 @repuris = split(',', $repuri);
783
784 for $repuri (@repuris)
785 {
786 $uri = URI->new($repuri);
787 if (!defined($uri) ||
788 !defined($uri->scheme) ||
789 $uri->opaque eq "")
790 {
791 print STDERR "$progname: can't parse reporting URI for domain $domain\n";
792 next;
793 }
794
795 $repdest = $uri->opaque;
796 my $report_maxbytes = $report_maxbytes_global;
797
798 # check for max report size
799 if ($repdest =~ m/^(\S+)!(\d{1,15})([kmgt])?$/i)
800 {
801 $repdest = $1;
802 $report_maxbytes = $2;
803 if ($3)
804 {
805 my $letter = lc($3);
806 if ($letter eq 'k')
807 {
808 $report_maxbytes = $report_maxbytes * 1024;
809 }
810 if ($letter eq 'm')
811 {
812 $report_maxbytes = $report_maxbytes * 1048576;
813 }
814 if ($letter eq 'g')
815 {
816 $report_maxbytes = $report_maxbytes * (2**30);
817 }
818 if ($letter eq 't')
819 {
820 $report_maxbytes = $report_maxbytes * (2**40);
821 }
822 }
823 }
824
825 # Test mode, just report what would have been done
826 if ($testmode)
827 {
828 print STDERR "$progname: would email $domain report for " .
829 "$rowcount records to " . $uri->opaque . "\n";
830 }
831 # ensure a scheme is present
832 elsif (!defined($uri->scheme))
833 {
834 if ($verbose >= 2)
835 {
836 print STDERR "$progname: unknown URI scheme in '$repuri' for domain $domain\n";
837 }
838 next;
839 }
840 # send/post report
841 elsif ($uri->scheme eq "mailto")
842 {
843 my $datestr;
844 my $report_id;
845
846 if (!open($zipin, $zipfile))
847 {
848 print STDERR "$progname: can't read zipped report for $domain: $!\n";
849 next;
850 }
851
852 $boundary = "report_section";
853
854 $report_id = $domain . "-" . $now . "@" . $repdom;
855 $datestr = strftime("%a, %e %b %Y %H:%M:%S %z (%Z)",
856 localtime);
857
858 $mailout = "To: $repdest\n";
859 $mailout .= "From: $repemail\n";
860 $mailout .= "Subject: Report Domain: " . $domain . " Submitter: " . $repdom . " Report-ID: " . $report_id . "\n";
861 $mailout .= "X-Mailer: " . $progname . " v" . $version ."\n";
862 $mailout .= "Date: " . $datestr . "\n";
863 $mailout .= "Message-ID: <$report_id>\n";
864 $mailout .= "Auto-Submitted: auto-generated\n";
865 $mailout .= "MIME-Version: 1.0\n";
866 $mailout .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
867 $mailout .= "\n";
868 $mailout .= "This is a MIME-encapsulated message.\n";
869 $mailout .= "\n";
870 $mailout .= "--$boundary\n";
871 $mailout .= "Content-Type: text/plain;\n";
872 $mailout .= "\n";
873 $mailout .= "This is a DMARC aggregate report for $domain\n";
874 $mailout .= "generated at " . localtime() . "\n";
875 $mailout .= "\n";
876 $mailout .= "--$boundary\n";
877 $mailout .= "Content-Type: application/zip\n";
878 $mailout .= "Content-Disposition: attachment; filename=\"$zipfile\"\n";
879 $mailout .= "Content-Transfer-Encoding: base64\n";
880 $mailout .= "\n";
881
882 while (read($zipin, $buf, 60*57))
883 {
884 $mailout .= encode_base64($buf);
885 }
886
887 $mailout .= "\n";
888 $mailout .= "--$boundary--\n";
889 my $reportsize = length($mailout);
890
891 if ($reportsize > $report_maxbytes)
892 {
893 # XXX -- generate an error report here
894 print STDERR "$progname: report was too large ($reportsize bytes) per limitation of URI " . $uri->opaque . " for domain $domain\n";
895 }
896 else
897 {
898 $smtpstatus = "sent";
899 $smtpfail = 0;
900 if (!$smtp->mail($repemail) ||
901 !$smtp->to($repdest) ||
902 !$smtp->data() ||
903 !$smtp->datasend($mailout) ||
904 !$smtp->dataend())
905 {
906 $smtpfail = 1;
907 $smtpstatus = "failed to send";
908 }
909
910 if ($verbose || $smtpfail)
911 {
912 # now perl voodoo:
913 $answer = ${${*$smtp}{'net_cmd_resp'}}[1] || $smtp->message() || 'unknown error';
914 chomp($answer);
915 print STDERR "$progname: $smtpstatus report for $domain to $repdest ($answer)\n";
916 }
917 }
918
919 $smtp->reset();
920
921 close($zipin);
922 }
923 else
924 {
925 print STDERR "$progname: unsupported reporting URI scheme " . $uri->scheme . " for domain $domain\n";
926 next;
927 }
928 }
929
930 # update "last sent" timestamp
931 if ($doupdate)
932 {
933 $dbi_s = $dbi_h->prepare("UPDATE requests SET lastsent = FROM_UNIXTIME(?) WHERE domain = ?");
934 if (!$dbi_s->execute($repend, $domainid))
935 {
936 print STDERR "$progname: can't update last sent time for domain $domain: " . $dbi_h->errstr . "\n";
937 $dbi_s->finish;
938 $dbi_h->disconnect;
939 exit(1);
940 }
941 }
942
943 unlink($zipfile);
944 if (!$keepfiles)
945 {
946 unlink($repfile);
947 }
948 }
949
950 $smtp->quit();
951
952 #
953 # all done!
954 #
955
956 $dbi_s->finish;
957
958 if ($verbose)
959 {
960 print STDERR "$progname: terminating at " . localtime() . "\n";
961 }
962
963 $dbi_h->disconnect;
964
965 exit(0);