Merge lp:~wibblymat/ubuntu/oneiric/couchdb/update-to-1.1.0 into lp:ubuntu/oneiric/couchdb

Proposed by Mat Scales
Status: Work in progress
Proposed branch: lp:~wibblymat/ubuntu/oneiric/couchdb/update-to-1.1.0
Merge into: lp:ubuntu/oneiric/couchdb
Diff against target: 48668 lines (+19677/-13379)
268 files modified
AUTHORS (+1/-1)
CHANGES (+56/-1)
INSTALL (+80/-17)
INSTALL.Windows (+12/-7)
LICENSE (+29/-0)
Makefile.am (+1/-1)
Makefile.in (+10/-9)
NEWS (+30/-4)
NOTICE (+5/-1)
THANKS (+16/-0)
acinclude.m4 (+2/-2)
aclocal.m4 (+5/-5)
bin/Makefile.in (+1/-1)
bin/couchdb.1 (+0/-83)
bin/couchjs.1 (+0/-32)
build-aux/config.guess (+82/-141)
build-aux/config.sub (+43/-15)
build-aux/ltmain.sh (+26/-19)
configure (+357/-282)
configure.ac (+6/-0)
debian/binary.lintian-overrides (+0/-1)
debian/changelog (+42/-0)
debian/control (+28/-11)
debian/couchdb-bin.dirs (+0/-1)
debian/patches/couchio-fix-0001-replicator_redirect_atts.patch (+0/-26)
debian/patches/couchio-fix-0002-replicator_db_proxy_fix.patch (+0/-25)
debian/patches/couchio-fix-0003-changes_redirect_1.patch (+0/-13)
debian/patches/couchio-fix-0004-changes_redirect_2.patch (+0/-17)
debian/patches/couchio-fix-0005-changes_proxy.patch (+0/-77)
debian/patches/couchio-fix-0006-replicator_reader_errors.patch (+0/-126)
debian/patches/couchio-fix-0007-ibrowse_upgrade.patch (+0/-3481)
debian/patches/couchio-fix-0008-replicator_doc_id_encoding.patch (+0/-91)
debian/patches/couchio-fix-0009-replicator_changes_error.patch (+0/-33)
debian/patches/couchio-fix-0010-replicator_changes_connection_close.patch (+0/-74)
debian/patches/couchio-fix-0011-ibrowse_chunked_encoding_streaming.patch (+0/-92)
debian/patches/couchio-fix-0012-replicator_ssl.patch (+0/-99)
debian/patches/jquery15-fix.patch (+0/-124)
debian/patches/moz0003-spidermonkey1.8.5_autotools.patch (+1884/-3648)
debian/rules (+6/-1)
etc/Makefile.in (+3/-3)
etc/couchdb/Makefile.am (+3/-0)
etc/couchdb/Makefile.in (+4/-1)
etc/couchdb/default.ini.tpl.in (+36/-12)
etc/couchdb/local.ini (+29/-0)
etc/default/Makefile.in (+1/-1)
etc/init/Makefile.in (+1/-1)
etc/launchd/Makefile.in (+1/-1)
etc/logrotate.d/Makefile.in (+1/-1)
etc/windows/Makefile.in (+1/-1)
etc/windows/couchdb.iss.tpl (+8/-5)
license.skip (+4/-0)
m4/libtool.m4 (+30/-10)
m4/ltversion.m4 (+5/-5)
share/Makefile.am (+9/-1)
share/Makefile.in (+10/-2)
share/server/json2.js (+2/-1)
share/server/loop.js (+2/-0)
share/server/render.js (+4/-4)
share/server/state.js (+6/-1)
share/server/util.js (+72/-38)
share/server/views.js (+2/-13)
share/www/_sidebar.html (+6/-7)
share/www/couch_tests.html (+4/-1)
share/www/custom_test.html (+1/-1)
share/www/database.html (+10/-6)
share/www/dialog/_change_password.html (+31/-0)
share/www/index.html (+1/-1)
share/www/replicator.html (+50/-21)
share/www/script/couch.js (+40/-40)
share/www/script/couch_test_runner.js (+19/-7)
share/www/script/couch_tests.js (+5/-0)
share/www/script/futon.browse.js (+28/-17)
share/www/script/futon.format.js (+4/-1)
share/www/script/futon.js (+68/-4)
share/www/script/jquery-ui-1.8.11.custom.min.js (+81/-0)
share/www/script/jquery.couch.js (+70/-33)
share/www/script/json2.js (+2/-1)
share/www/script/jspec/jspec.js (+1/-1)
share/www/script/test/all_docs.js (+41/-0)
share/www/script/test/attachment_conflicts.js (+56/-0)
share/www/script/test/attachment_names.js (+28/-17)
share/www/script/test/attachment_paths.js (+10/-4)
share/www/script/test/attachment_ranges.js (+134/-0)
share/www/script/test/attachment_views.js (+2/-2)
share/www/script/test/attachments.js (+15/-13)
share/www/script/test/attachments_multipart.js (+175/-10)
share/www/script/test/auth_cache.js (+31/-0)
share/www/script/test/basics.js (+11/-13)
share/www/script/test/bulk_docs.js (+5/-5)
share/www/script/test/changes.js (+134/-23)
share/www/script/test/compact.js (+3/-3)
share/www/script/test/config.js (+101/-5)
share/www/script/test/conflicts.js (+26/-1)
share/www/script/test/cookie_auth.js (+21/-9)
share/www/script/test/copy_doc.js (+3/-0)
share/www/script/test/design_docs.js (+403/-141)
share/www/script/test/erlang_views.js (+1/-1)
share/www/script/test/etags_views.js (+95/-9)
share/www/script/test/http.js (+3/-3)
share/www/script/test/jsonp.js (+1/-1)
share/www/script/test/list_views.js (+48/-1)
share/www/script/test/method_override.js (+1/-1)
share/www/script/test/oauth.js (+14/-14)
share/www/script/test/proxyauth.js (+7/-8)
share/www/script/test/purge.js (+44/-4)
share/www/script/test/recreate_doc.js (+1/-1)
share/www/script/test/reduce.js (+20/-4)
share/www/script/test/reduce_builtin.js (+30/-4)
share/www/script/test/replication.js (+421/-80)
share/www/script/test/replicator_db.js (+1380/-0)
share/www/script/test/rewrite.js (+64/-4)
share/www/script/test/security_validation.js (+18/-11)
share/www/script/test/show_documents.js (+22/-0)
share/www/script/test/stats.js (+5/-5)
share/www/script/test/update_documents.js (+4/-0)
share/www/script/test/users_db.js (+22/-1)
share/www/script/test/view_errors.js (+30/-3)
share/www/script/test/view_include_docs.js (+54/-0)
share/www/script/test/view_multi_key_all_docs.js (+37/-0)
share/www/script/test/view_multi_key_design.js (+81/-3)
share/www/script/test/view_pagination.js (+74/-49)
share/www/script/test/view_sandboxing.js (+90/-2)
share/www/script/test/view_update_seq.js (+27/-10)
share/www/session.html (+1/-1)
share/www/style/jquery-ui-1.8.11.custom.css (+347/-0)
share/www/style/layout.css (+4/-4)
src/Makefile.in (+3/-3)
src/couchdb/Makefile.am (+8/-0)
src/couchdb/Makefile.in (+11/-3)
src/couchdb/couch_auth_cache.erl (+11/-2)
src/couchdb/couch_btree.erl (+5/-2)
src/couchdb/couch_changes.erl (+157/-88)
src/couchdb/couch_config.erl (+27/-16)
src/couchdb/couch_config_writer.erl (+8/-1)
src/couchdb/couch_db.erl (+32/-10)
src/couchdb/couch_db.hrl (+12/-28)
src/couchdb/couch_db_updater.erl (+76/-59)
src/couchdb/couch_doc.erl (+46/-10)
src/couchdb/couch_event_sup.erl (+6/-2)
src/couchdb/couch_file.erl (+59/-33)
src/couchdb/couch_httpd.erl (+124/-110)
src/couchdb/couch_httpd_auth.erl (+21/-11)
src/couchdb/couch_httpd_db.erl (+197/-108)
src/couchdb/couch_httpd_external.erl (+10/-3)
src/couchdb/couch_httpd_misc_handlers.erl (+86/-21)
src/couchdb/couch_httpd_proxy.erl (+431/-0)
src/couchdb/couch_httpd_rewrite.erl (+114/-79)
src/couchdb/couch_httpd_show.erl (+18/-13)
src/couchdb/couch_httpd_vhost.erl (+403/-0)
src/couchdb/couch_httpd_view.erl (+99/-36)
src/couchdb/couch_js_functions.hrl (+142/-1)
src/couchdb/couch_key_tree.erl (+99/-73)
src/couchdb/couch_log.erl (+54/-12)
src/couchdb/couch_os_daemons.erl (+364/-0)
src/couchdb/couch_query_servers.erl (+187/-83)
src/couchdb/couch_rep.erl (+435/-181)
src/couchdb/couch_rep_att.erl (+1/-2)
src/couchdb/couch_rep_changes_feed.erl (+212/-95)
src/couchdb/couch_rep_httpc.erl (+88/-16)
src/couchdb/couch_rep_missing_revs.erl (+6/-6)
src/couchdb/couch_rep_reader.erl (+29/-86)
src/couchdb/couch_rep_writer.erl (+11/-16)
src/couchdb/couch_replication_manager.erl (+387/-0)
src/couchdb/couch_server.erl (+15/-9)
src/couchdb/couch_server_sup.erl (+32/-5)
src/couchdb/couch_stream.erl (+41/-3)
src/couchdb/couch_util.erl (+58/-34)
src/couchdb/couch_view.erl (+54/-32)
src/couchdb/couch_view_compactor.erl (+9/-5)
src/couchdb/couch_view_group.erl (+99/-49)
src/couchdb/couch_view_updater.erl (+21/-8)
src/couchdb/couch_work_queue.erl (+88/-48)
src/couchdb/priv/Makefile.in (+1/-1)
src/couchdb/priv/stat_descriptions.cfg.in (+0/-1)
src/erlang-oauth/Makefile.in (+1/-1)
src/erlang-oauth/oauth_uri.erl (+38/-28)
src/etap/Makefile.in (+1/-1)
src/ibrowse/Makefile.am (+1/-1)
src/ibrowse/Makefile.in (+2/-2)
src/ibrowse/ibrowse.app.in (+5/-5)
src/ibrowse/ibrowse.erl (+354/-251)
src/ibrowse/ibrowse.hrl (+10/-1)
src/ibrowse/ibrowse_app.erl (+4/-5)
src/ibrowse/ibrowse_http_client.erl (+1171/-792)
src/ibrowse/ibrowse_lb.erl (+25/-6)
src/ibrowse/ibrowse_lib.erl (+173/-181)
src/ibrowse/ibrowse_sup.erl (+2/-4)
src/ibrowse/ibrowse_test.erl (+173/-37)
src/mochiweb/Makefile.am (+70/-48)
src/mochiweb/Makefile.in (+71/-49)
src/mochiweb/internal.hrl (+3/-0)
src/mochiweb/mochifmt.erl (+13/-14)
src/mochiweb/mochifmt_records.erl (+8/-0)
src/mochiweb/mochifmt_std.erl (+7/-0)
src/mochiweb/mochiglobal.erl (+107/-0)
src/mochiweb/mochihex.erl (+27/-11)
src/mochiweb/mochijson.erl (+15/-12)
src/mochiweb/mochijson2.erl (+181/-39)
src/mochiweb/mochilists.erl (+104/-0)
src/mochiweb/mochilogfile2.erl (+140/-0)
src/mochiweb/mochinum.erl (+62/-20)
src/mochiweb/mochitemp.erl (+310/-0)
src/mochiweb/mochiutf8.erl (+316/-0)
src/mochiweb/mochiweb.app.in (+1/-1)
src/mochiweb/mochiweb.app.src (+9/-0)
src/mochiweb/mochiweb.erl (+200/-21)
src/mochiweb/mochiweb_acceptor.erl (+48/-0)
src/mochiweb/mochiweb_app.erl (+7/-0)
src/mochiweb/mochiweb_charref.erl (+24/-11)
src/mochiweb/mochiweb_cookies.erl (+80/-28)
src/mochiweb/mochiweb_cover.erl (+75/-0)
src/mochiweb/mochiweb_echo.erl (+9/-2)
src/mochiweb/mochiweb_headers.erl (+115/-67)
src/mochiweb/mochiweb_html.erl (+418/-250)
src/mochiweb/mochiweb_http.erl (+150/-29)
src/mochiweb/mochiweb_io.erl (+46/-0)
src/mochiweb/mochiweb_mime.erl (+94/-0)
src/mochiweb/mochiweb_multipart.erl (+358/-64)
src/mochiweb/mochiweb_request.erl (+140/-239)
src/mochiweb/mochiweb_response.erl (+8/-0)
src/mochiweb/mochiweb_skel.erl (+27/-14)
src/mochiweb/mochiweb_socket.erl (+84/-0)
src/mochiweb/mochiweb_socket_server.erl (+106/-82)
src/mochiweb/mochiweb_sup.erl (+7/-0)
src/mochiweb/mochiweb_util.erl (+291/-177)
src/mochiweb/reloader.erl (+39/-1)
test/Makefile.in (+3/-3)
test/bench/Makefile.in (+1/-1)
test/etap/010-file-basics.t (+2/-1)
test/etap/021-btree-reductions.t (+2/-2)
test/etap/030-doc-from-json.t (+2/-5)
test/etap/031-doc-to-json.t (+2/-5)
test/etap/050-stream.t (+3/-3)
test/etap/060-kt-merging.t (+37/-62)
test/etap/070-couch-db.t (+1/-3)
test/etap/083-config-no-files.t (+1/-1)
test/etap/110-replication-httpc.t (+6/-8)
test/etap/111-replication-changes-feed.t (+7/-8)
test/etap/112-replication-missing-revs.t (+23/-11)
test/etap/113-replication-attachment-comp.t (+53/-12)
test/etap/130-attachments-md5.t (+2/-6)
test/etap/140-attachment-comp.t (+71/-20)
test/etap/150-invalid-view-seq.t (+4/-6)
test/etap/160-vhosts.t (+181/-21)
test/etap/170-os-daemons.es (+26/-0)
test/etap/170-os-daemons.t (+114/-0)
test/etap/171-os-daemons-config.es (+83/-0)
test/etap/171-os-daemons-config.t (+74/-0)
test/etap/172-os-daemon-errors.1.sh (+17/-0)
test/etap/172-os-daemon-errors.2.sh (+15/-0)
test/etap/172-os-daemon-errors.3.sh (+15/-0)
test/etap/172-os-daemon-errors.4.sh (+15/-0)
test/etap/172-os-daemon-errors.t (+126/-0)
test/etap/173-os-daemon-cfg-register.t (+93/-0)
test/etap/180-http-proxy.ini (+20/-0)
test/etap/180-http-proxy.t (+378/-0)
test/etap/190-oauth.t (+31/-0)
test/etap/200-view-group-no-db-leaks.t (+262/-0)
test/etap/Makefile.am (+22/-2)
test/etap/Makefile.in (+175/-22)
test/etap/random_port.ini (+19/-0)
test/etap/test_cfg_register.c (+30/-0)
test/etap/test_util.erl.in (+9/-2)
test/etap/test_web.erl (+99/-0)
test/javascript/Makefile.in (+1/-1)
test/view_server/Makefile.in (+1/-1)
utils/Makefile.in (+1/-1)
var/Makefile.in (+1/-1)
To merge this branch: bzr merge lp:~wibblymat/ubuntu/oneiric/couchdb/update-to-1.1.0
Reviewer Review Type Date Requested Status
James Page Needs Fixing
Daniel Holbach Pending
Ubuntu branches Pending
Review via email: mp+74236@code.launchpad.net

This proposal supersedes a proposal from 2011-07-28.

Description of the change

Merges the latest debian version of couchdb, updates to upstream version 1.1.0

Merge bug #817656

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal

Thanks a lot for your work on this. Could you please edit debian/changelog and list all the changes that we still carry on top of Debian below "Merged from Debian"? Just copying the relevant bits from older Ubuntu changelog entries would be good enough.

This would make reviewing a lot easier.

review: Needs Fixing
Revision history for this message
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal

Thanks a lot for your work on this. Could you please edit debian/changelog and list all the changes that we still carry on top of Debian below "Merged from Debian"? Just copying the relevant bits from older Ubuntu changelog entries would be good enough.

This would make reviewing a lot easier.

review: Needs Fixing
Revision history for this message
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal

libjs-jquery-form is in universe. It would need to follow https://wiki.ubuntu.com/MainInclusionProcess

Revision history for this message
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal

Also: are all the new erlang-* build-depends necessary - there's nothing about them in debian/changelog.

Revision history for this message
Samuele Pedroni (pedronis) wrote : Posted in a previous version of this proposal

can confirm that the dropped patches are superseded

desktopcouch tests pass with a locally built version of this, same for the smoke-test internal U1 replication test

Revision history for this message
Sebastien Bacher (seb128) wrote : Posted in a previous version of this proposal

You will also need a feature freeze exception granted to get that on in Oneiric, setting to Work in progress until Daniel's points about the mir and build depends and changelog points are adressed, you should set it back to "Needs review" once you have an update adressing those

Revision history for this message
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal
Revision history for this message
John Lenton (chipaca) wrote : Posted in a previous version of this proposal

Is there a reason the dependency on libjs-jquery-form can't be made a recommends instead?

Revision history for this message
Michael Chang (thenewme91) wrote : Posted in a previous version of this proposal

The current couchdb-bin package in oneiric contains the contents of libjs-jquery-form verbatim (i.e. jquery.form.js), albeit a version from Nov 2009; if it's in oneiric it makes more sense to point to a single updated copy in a package in the repos then to have two copies (one in couchdb and one in libjs-jquery-form).

Also, couchdb-bin currently depends on libjs-jquery in a similar fashion.

Revision history for this message
Michael Chang (thenewme91) wrote : Posted in a previous version of this proposal

libjs-jquery-form recommends javascript-common; either this will will need to be changed to suggests or javascript-common will need to also have a MIR.
javascript-common depends on wwwconfig-common, so if adding a MIR for javascript-common, also need one for wwwconfig-common.

Note that libjs-jquery only suggests javascript-common, not recommends it.

Note that libjs-jquery-form is new in oneiric (appears to have come from the autosync with Debian unstable).

Revision history for this message
Mat Scales (wibblymat) wrote : Posted in a previous version of this proposal

A note on the diff between the Debian version and my version. If you see the bug at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635762 there was some regression in the Debian version. I submitted a patch that would fix things up but the Debian maintainer appears to be AWOL.

This branch fixes that regression, which is the largest source of difference. I'll update the changelog to state that along with which Ubuntu patches we sill have.

Revision history for this message
Mat Scales (wibblymat) wrote : Posted in a previous version of this proposal

The erlang-* build dependencies replace the erlang-nox dependency. erlang-nox depends on a whole bunch of other packages, including ones we don't need. Only erlang-eunit is actually new since the last Ubuntu version, a new dependency upstream.

Revision history for this message
James Page (james-page) wrote :

1.1.0-2 is now in Debian testing - which looks like it may resolve some of the regressions in the Debian version.

Please can this merge proposal be revised in light of this new Debian version.

Thanks

review: Needs Fixing

Unmerged revisions

63. By Mat Scales

Updated the changelog to make it easier to spot changes:

* Fixed a regression in the latest debian version
  - See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635762
* Ubuntu changes still remaining:
  - moz000*.patch: Build against spidermonkey 1.8.5:
  - init.patch: Improved init script
  - fix-help2man.patch: Build with newer versions of help2man

62. By Mat Scales

Use the same version of autotools to rebuild moz0003 as was used by the previous uploader to keep the diff smaller.

61. By Mat Scales

* Merge from debian unstable.
  - New upstream release (closes: #590334).
  - Empty dependency_libs in *.la (closes: #621202).
  - Fix several lintian errors and warnings:
    - use real erlang dependency, not just the virtual ABI one
    - remove embedded jquery.form.js , depend on its package

* Removed superceded patches:
  - couchio-fix-0001-replicator_redirect_atts.patch
  - couchio-fix-0002-replicator_db_proxy_fix.patch
  - couchio-fix-0003-changes_redirect_1.patch
  - couchio-fix-0004-changes_redirect_2.patch
  - couchio-fix-0005-changes_proxy.patch
  - couchio-fix-0006-replicator_reader_errors.patch
  - couchio-fix-0007-ibrowse_upgrade.patch
  - couchio-fix-0008-replicator_doc_id_encoding.patch
  - couchio-fix-0009-replicator_changes_error.patch
  - couchio-fix-0010-replicator_changes_connection_close.patch
  - couchio-fix-0011-ibrowse_chunked_encoding_streaming.patch
  - couchio-fix-0012-replicator_ssl.patch
  - jquery15-fix.patch
* Rebuilt debian/patches/moz0003-spidermonkey1.8.5_autotools.patch

60. By Mat Scales

Patch has been partly superceded, updating.

59. By Mat Scales

Another superceded patch

58. By Mat Scales

Looks like all the CouchIO fixes were applied or superceded upstream.

57. By Mat Scales

Some extraneous files were not removed by the upstream merge though they aren't included in the latest version of upstream.

56. By Mat Scales

* New upstream release (1.1.0)
* Begun removing patches that are no longer needed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AUTHORS'
2--- AUTHORS 2010-07-26 10:24:11 +0000
3+++ AUTHORS 2011-09-06 14:51:24 +0000
4@@ -15,6 +15,6 @@
5 * Mark Hammond <mhammond@skippinet.com.au>
6 * Benoît Chesneau <benoitc@apache.org>
7 * Filipe Manana <fdmanana@apache.org>
8- * Robert Newson <robert.newson@gmail.com>
9+ * Robert Newson <rnewson@apache.org>
10
11 For a list of other credits see the `THANKS` file.
12
13=== modified file 'CHANGES'
14--- CHANGES 2010-08-16 19:45:48 +0000
15+++ CHANGES 2011-09-06 14:51:24 +0000
16@@ -1,6 +1,61 @@
17 Apache CouchDB CHANGES
18 ======================
19
20+Version 1.1.0
21+-------------
22+
23+All CHANGES for 1.0.2 and 1.0.3 also apply to 1.1.0.
24+
25+HTTP Interface:
26+
27+ * Native SSL support.
28+ * Added support for HTTP range requests for attachments.
29+ * Added built-in filters for `_changes`: `_doc_ids` and `_design`.
30+ * Added configuration option for TCP_NODELAY aka "Nagle".
31+ * Allow POSTing arguments to `_changes`.
32+ * Allow `keys` parameter for GET requests to views.
33+ * Allow wildcards in vhosts definitions.
34+ * More granular ETag support for views.
35+ * More flexible URL rewriter.
36+ * Added support for recognizing "Q values" and media parameters in
37+ HTTP Accept headers.
38+ * Validate doc ids that come from a PUT to a URL.
39+
40+Externals:
41+
42+ * Added OS Process module to manage daemons outside of CouchDB.
43+ * Added HTTP Proxy handler for more scalable externals.
44+
45+Replicator:
46+
47+ * Added `_replicator` database to manage replications.
48+ * Fixed issues when an endpoint is a remote database accessible via SSL.
49+ * Added support for continuous by-doc-IDs replication.
50+ * Fix issue where revision info was omitted when replicating attachments.
51+ * Integrity of attachment replication is now verified by MD5.
52+
53+Storage System:
54+
55+ * Multiple micro-optimizations when reading data.
56+
57+View Server:
58+
59+ * Added CommonJS support to map functions.
60+ * Added `stale=update_after` query option that triggers a view update after
61+ returning a `stale=ok` response.
62+ * Warn about empty result caused by `startkey` and `endkey` limiting.
63+ * Built-in reduce function `_sum` now accepts lists of integers as input.
64+ * Added view query aliases start_key, end_key, start_key_doc_id and
65+ end_key_doc_id.
66+
67+Futon:
68+
69+ * Added a "change password"-feature to Futon.
70+
71+URL Rewriter & Vhosts:
72+
73+ * Fix for variable substituion
74+
75 Version 1.0.1
76 -------------
77
78@@ -11,7 +66,7 @@
79
80 Replicator:
81
82- * Added support for replication via an HTTP/HTTP proxy.
83+ * Added support for replication via an HTTP/HTTPS proxy.
84 * Fix pull replication of attachments from 0.11 to 1.0.x.
85 * Make the _changes feed work with non-integer seqnums.
86
87
88=== modified file 'INSTALL'
89--- INSTALL 2010-07-26 10:24:11 +0000
90+++ INSTALL 2011-09-06 14:51:24 +0000
91@@ -4,8 +4,10 @@
92 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
93 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
94
95- This file is free documentation; the Free Software Foundation gives
96-unlimited permission to copy, distribute and modify it.
97+ Copying and distribution of this file, with or without modification,
98+are permitted in any medium without royalty provided the copyright
99+notice and this notice are preserved. This file is offered as-is,
100+without warranty of any kind.
101
102 Basic Installation
103 ==================
104@@ -13,7 +15,11 @@
105 Briefly, the shell commands `./configure; make; make install' should
106 configure, build, and install this package. The following
107 more-detailed instructions are generic; see the `README' file for
108-instructions specific to this package.
109+instructions specific to this package. Some packages provide this
110+`INSTALL' file but do not implement all of the features documented
111+below. The lack of an optional feature in a given package is not
112+necessarily a bug. More recommendations for GNU packages can be found
113+in *note Makefile Conventions: (standards)Makefile Conventions.
114
115 The `configure' shell script attempts to guess correct values for
116 various system-dependent variables used during compilation. It uses
117@@ -42,7 +48,7 @@
118 you want to change it or regenerate `configure' using a newer version
119 of `autoconf'.
120
121-The simplest way to compile this package is:
122+ The simplest way to compile this package is:
123
124 1. `cd' to the directory containing the package's source code and type
125 `./configure' to configure the package for your system.
126@@ -53,12 +59,22 @@
127 2. Type `make' to compile the package.
128
129 3. Optionally, type `make check' to run any self-tests that come with
130- the package.
131+ the package, generally using the just-built uninstalled binaries.
132
133 4. Type `make install' to install the programs and any data files and
134- documentation.
135-
136- 5. You can remove the program binaries and object files from the
137+ documentation. When installing into a prefix owned by root, it is
138+ recommended that the package be configured and built as a regular
139+ user, and only the `make install' phase executed with root
140+ privileges.
141+
142+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
143+ this time using the binaries in their final installed location.
144+ This target does not install anything. Running this target as a
145+ regular user, particularly if the prior `make install' required
146+ root privileges, verifies that the installation completed
147+ correctly.
148+
149+ 6. You can remove the program binaries and object files from the
150 source code directory by typing `make clean'. To also remove the
151 files that `configure' created (so you can compile the package for
152 a different kind of computer), type `make distclean'. There is
153@@ -67,8 +83,15 @@
154 all sorts of other programs in order to regenerate files that came
155 with the distribution.
156
157- 6. Often, you can also type `make uninstall' to remove the installed
158- files again.
159+ 7. Often, you can also type `make uninstall' to remove the installed
160+ files again. In practice, not all packages have tested that
161+ uninstallation works correctly, even though it is required by the
162+ GNU Coding Standards.
163+
164+ 8. Some packages, particularly those that use Automake, provide `make
165+ distcheck', which can by used by developers to test that all other
166+ targets like `make install' and `make uninstall' work correctly.
167+ This target is generally not run by end users.
168
169 Compilers and Options
170 =====================
171@@ -93,7 +116,8 @@
172 own directory. To do this, you can use GNU `make'. `cd' to the
173 directory where you want the object files and executables to go and run
174 the `configure' script. `configure' automatically checks for the
175-source code in the directory that `configure' is in and in `..'.
176+source code in the directory that `configure' is in and in `..'. This
177+is known as a "VPATH" build.
178
179 With a non-GNU `make', it is safer to compile the package for one
180 architecture at a time in the source code directory. After you have
181@@ -120,7 +144,8 @@
182 By default, `make install' installs the package's commands under
183 `/usr/local/bin', include files under `/usr/local/include', etc. You
184 can specify an installation prefix other than `/usr/local' by giving
185-`configure' the option `--prefix=PREFIX'.
186+`configure' the option `--prefix=PREFIX', where PREFIX must be an
187+absolute file name.
188
189 You can specify separate installation prefixes for
190 architecture-specific files and architecture-independent files. If you
191@@ -131,15 +156,46 @@
192 In addition, if you use an unusual directory layout you can give
193 options like `--bindir=DIR' to specify different values for particular
194 kinds of files. Run `configure --help' for a list of the directories
195-you can set and what kinds of files go in them.
196+you can set and what kinds of files go in them. In general, the
197+default for these options is expressed in terms of `${prefix}', so that
198+specifying just `--prefix' will affect all of the other directory
199+specifications that were not explicitly provided.
200+
201+ The most portable way to affect installation locations is to pass the
202+correct locations to `configure'; however, many packages provide one or
203+both of the following shortcuts of passing variable assignments to the
204+`make install' command line to change installation locations without
205+having to reconfigure or recompile.
206+
207+ The first method involves providing an override variable for each
208+affected directory. For example, `make install
209+prefix=/alternate/directory' will choose an alternate location for all
210+directory configuration variables that were expressed in terms of
211+`${prefix}'. Any directories that were specified during `configure',
212+but not in terms of `${prefix}', must each be overridden at install
213+time for the entire installation to be relocated. The approach of
214+makefile variable overrides for each directory variable is required by
215+the GNU Coding Standards, and ideally causes no recompilation.
216+However, some platforms have known limitations with the semantics of
217+shared libraries that end up requiring recompilation when using this
218+method, particularly noticeable in packages that use GNU Libtool.
219+
220+ The second method involves providing the `DESTDIR' variable. For
221+example, `make install DESTDIR=/alternate/directory' will prepend
222+`/alternate/directory' before all installation names. The approach of
223+`DESTDIR' overrides is not required by the GNU Coding Standards, and
224+does not work on platforms that have drive letters. On the other hand,
225+it does better at avoiding recompilation issues, and works well even
226+when some directory options were not specified in terms of `${prefix}'
227+at `configure' time.
228+
229+Optional Features
230+=================
231
232 If the package supports it, you can cause programs to be installed
233 with an extra prefix or suffix on their names by giving `configure' the
234 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
235
236-Optional Features
237-=================
238-
239 Some packages pay attention to `--enable-FEATURE' options to
240 `configure', where FEATURE indicates an optional part of the package.
241 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
242@@ -152,6 +208,13 @@
243 you can use the `configure' options `--x-includes=DIR' and
244 `--x-libraries=DIR' to specify their locations.
245
246+ Some packages offer the ability to configure how verbose the
247+execution of `make' will be. For these packages, running `./configure
248+--enable-silent-rules' sets the default to minimal output, which can be
249+overridden with `make V=1'; while running `./configure
250+--disable-silent-rules' sets the default to verbose, which can be
251+overridden with `make V=0'.
252+
253 Particular systems
254 ==================
255
256@@ -288,7 +351,7 @@
257 `configure' can determine that directory automatically.
258
259 `--prefix=DIR'
260- Use DIR as the installation prefix. *Note Installation Names::
261+ Use DIR as the installation prefix. *note Installation Names::
262 for more details, including other options available for fine-tuning
263 the installation locations.
264
265
266=== modified file 'INSTALL.Windows'
267--- INSTALL.Windows 2010-07-26 10:24:11 +0000
268+++ INSTALL.Windows 2011-09-06 14:51:24 +0000
269@@ -8,7 +8,7 @@
270
271 You will need the following installed:
272
273- * Erlang OTP (>=R12B5) (http://erlang.org/)
274+ * Erlang OTP (=14B01) (http://erlang.org/)
275 * ICU (http://icu.sourceforge.net/)
276 * OpenSSL (http://www.openssl.org/)
277 * Mozilla SpiderMonkey (1.8) (http://www.mozilla.org/js/spidermonkey/)
278@@ -50,12 +50,17 @@
279
280 * The `which cl` command points to the Microsoft compiler.
281
282-If you do not do this, the ones found in `/usr/bin` may be used instead.
283+ * The `which mc` command points to the Microsoft message compiler.
284+
285+ * The `which mt` command points to the Microsoft manifest tool.
286+
287+If you do not do this, the build may fail due to Cygwin ones found in `/usr/bin`
288+being used instead.
289
290 Building Erlang
291 ---------------
292
293-You must include OpenSSL.
294+You must include Win32 OpenSSL.
295
296 However, you can skip the GUI tools by running:
297
298@@ -89,7 +94,7 @@
299
300 To set up your path, run:
301
302- export PATH=$ERL_TOP/release/win32/erts-5.7.2/bin:$PATH
303+ export PATH=$ERL_TOP/release/win32/erts-5.8.2/bin:$PATH
304
305 If everything was successful, you should be ready to build CouchDB.
306
307@@ -101,8 +106,8 @@
308 Once you have satisfied the dependencies you should run:
309
310 ./configure \
311- --with-js-include=/cygdrive/c/path_to_seamonkey_include \
312- --with-js-lib=/cygdrive/c/path_to_seamonkey_lib \
313+ --with-js-include=/cygdrive/c/path_to_spidermonkey_include \
314+ --with-js-lib=/cygdrive/c/path_to_spidermonkey_lib \
315 --with-win32-icu-binaries=/cygdrive/c/path_to_icu_binaries_root \
316 --with-erlang=$ERL_TOP/release/win32/usr/include \
317 --with-win32-curl=/cygdrive/c/path/to/curl/root/directory \
318@@ -145,4 +150,4 @@
319
320 http://127.0.0.1:5984/_utils/index.html
321
322-From here you should run the test suite.
323+From here you should run the test suite in either Firefox 3.6+ or Safari 4+.
324
325=== modified file 'LICENSE'
326--- LICENSE 2009-10-13 16:50:35 +0000
327+++ LICENSE 2011-09-06 14:51:24 +0000
328@@ -239,6 +239,35 @@
329 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
330 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
331
332+For the share/www/script/jquery-ui-1.8.11.custom.min.js and
333+ share/www/style/jquery-ui-1.8.11.custom.css components:
334+
335+ Copyright (c) 2011 Paul Bakaus, http://jqueryui.com/
336+
337+ This software consists of voluntary contributions made by many
338+ individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
339+ contribution history, see the revision history and logs, available
340+ at http://jquery-ui.googlecode.com/svn/
341+
342+ Permission is hereby granted, free of charge, to any person obtaining
343+ a copy of this software and associated documentation files (the
344+ "Software"), to deal in the Software without restriction, including
345+ without limitation the rights to use, copy, modify, merge, publish,
346+ distribute, sublicense, and/or sell copies of the Software, and to
347+ permit persons to whom the Software is furnished to do so, subject to
348+ the following conditions:
349+
350+ The above copyright notice and this permission notice shall be
351+ included in all copies or substantial portions of the Software.
352+
353+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
354+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
355+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
356+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
357+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
358+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
359+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
360+
361 For the share/www/script/jquery.form.js component:
362
363 http://malsup.com/jquery/form/
364
365=== modified file 'Makefile.am'
366--- Makefile.am 2010-08-16 19:45:48 +0000
367+++ Makefile.am 2011-09-06 14:51:24 +0000
368@@ -140,7 +140,7 @@
369 distsign: distcheck check
370 @# @@ unpack archive and run diff -r to double check missing files
371 @# @@ does automake have anything that does this?
372- gpg --armor --detach-sig --default-key 8FBFCFBF \
373+ gpg --armor --detach-sig --default-key DF3CEBA3 \
374 < $(top_srcdir)/$(distdir).tar.gz \
375 > $(top_srcdir)/$(distdir).tar.gz.asc
376 md5sum $(top_srcdir)/$(distdir).tar.gz \
377
378=== modified file 'Makefile.in'
379--- Makefile.in 2010-08-16 19:45:48 +0000
380+++ Makefile.in 2011-09-06 14:51:24 +0000
381@@ -1,4 +1,4 @@
382-# Makefile.in generated by automake 1.11 from Makefile.am.
383+# Makefile.in generated by automake 1.11.1 from Makefile.am.
384 # @configure_input@
385
386 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
387@@ -412,7 +412,7 @@
388 # (which will cause the Makefiles to be regenerated when you run `make');
389 # (2) otherwise, pass the desired values on the `make' command line.
390 $(RECURSIVE_TARGETS):
391- @failcom='exit 1'; \
392+ @fail= failcom='exit 1'; \
393 for f in x $$MAKEFLAGS; do \
394 case $$f in \
395 *=* | --[!k]*);; \
396@@ -437,7 +437,7 @@
397 fi; test -z "$$fail"
398
399 $(RECURSIVE_CLEAN_TARGETS):
400- @failcom='exit 1'; \
401+ @fail= failcom='exit 1'; \
402 for f in x $$MAKEFLAGS; do \
403 case $$f in \
404 *=* | --[!k]*);; \
405@@ -604,7 +604,8 @@
406 top_distdir="$(top_distdir)" distdir="$(distdir)" \
407 dist-hook
408 -test -n "$(am__skip_mode_fix)" \
409- || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
410+ || find "$(distdir)" -type d ! -perm -755 \
411+ -exec chmod u+rwx,go+rx {} \; -o \
412 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
413 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
414 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
415@@ -648,17 +649,17 @@
416 distcheck: dist
417 case '$(DIST_ARCHIVES)' in \
418 *.tar.gz*) \
419- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
420+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
421 *.tar.bz2*) \
422- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
423+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
424 *.tar.lzma*) \
425- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
426+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
427 *.tar.xz*) \
428 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
429 *.tar.Z*) \
430 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
431 *.shar.gz*) \
432- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
433+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
434 *.zip*) \
435 unzip $(distdir).zip ;;\
436 esac
437@@ -941,7 +942,7 @@
438 distsign: distcheck check
439 @# @@ unpack archive and run diff -r to double check missing files
440 @# @@ does automake have anything that does this?
441- gpg --armor --detach-sig --default-key 8FBFCFBF \
442+ gpg --armor --detach-sig --default-key DF3CEBA3 \
443 < $(top_srcdir)/$(distdir).tar.gz \
444 > $(top_srcdir)/$(distdir).tar.gz.asc
445 md5sum $(top_srcdir)/$(distdir).tar.gz \
446
447=== modified file 'NEWS'
448--- NEWS 2010-08-16 19:45:48 +0000
449+++ NEWS 2011-09-06 14:51:24 +0000
450@@ -7,12 +7,37 @@
451
452 Each release section notes when backwards incompatible changes have been made.
453
454+Version 1.1.0
455+-------------
456+
457+All NEWS for 1.0.2 also apply to 1.1.0.
458+
459+This release contains backwards incompatible changes.
460+
461+ * Native SSL support.
462+ * Added support for HTTP range requests for attachments.
463+ * Added built-in filters for `_changes`: `_doc_ids` and `_design`.
464+ * Added configuration option for TCP_NODELAY aka "Nagle".
465+ * Allow wildcards in vhosts definitions.
466+ * More granular ETag support for views.
467+ * More flexible URL rewriter.
468+ * Added OS Process module to manage daemons outside of CouchDB.
469+ * Added HTTP Proxy handler for more scalable externals.
470+ * Added `_replicator` database to manage replications.
471+ * Multiple micro-optimizations when reading data.
472+ * Added CommonJS support to map functions.
473+ * Added `stale=update_after` query option that triggers a view update after
474+ returning a `stale=ok` response.
475+ * More explicit error messages when it's not possible to access a file due
476+ to lack of permissions.
477+ * Added a "change password"-feature to Futon.
478+
479 Version 1.0.1
480 -------------
481
482 * Fix data corruption bug COUCHDB-844. Please see
483 http://couchdb.apache.org/notice/1.0.1.html for details.
484- * Added support for replication via an HTTP/HTTP proxy.
485+ * Added support for replication via an HTTP/HTTPS proxy.
486 * Fixed various replicator bugs for interop with older CouchDB versions.
487 * Show fields saved along with _deleted=true. Allows for auditing of deletes.
488 * Enable basic-auth popup when required to access the server, to prevent
489@@ -38,6 +63,7 @@
490 * User documents can now be deleted by admins or the user.
491 * Avoid potential DOS attack by guarding all creation of atoms.
492 * Some Futon and JavaScript library bugfixes.
493+ * Fixed CVE-2010-2234: Apache CouchDB Cross Site Request Forgery Attack
494
495 Version 0.11.1
496 --------------
497@@ -143,7 +169,7 @@
498 Version 0.10.0
499 --------------
500
501-This release contains backwards incompatible changes, please see above for help.
502+This release contains backwards incompatible changes.
503
504 * General performance improvements.
505 * View index generation speedups.
506@@ -175,7 +201,7 @@
507 Version 0.9.0
508 -------------
509
510-This release contains backwards incompatible changes, please see above for help.
511+This release contains backwards incompatible changes.
512
513 * Modular configuration.
514 * Performance enhancements for document and view access.
515@@ -199,7 +225,7 @@
516 Version 0.8.0-incubating
517 ------------------------
518
519-This release contains backwards incompatible changes, please see above for help.
520+This release contains backwards incompatible changes.
521
522 * Changed core licensing to the Apache Software License 2.0.
523 * Refactoring of the core view and storage engines.
524
525=== modified file 'NOTICE'
526--- NOTICE 2010-07-26 10:24:11 +0000
527+++ NOTICE 2011-09-06 14:51:24 +0000
528@@ -17,6 +17,10 @@
529 * jQuery (http://jquery.com/)
530
531 Copyright 2010, John Resig
532+
533+ * jQuery UI (http://jqueryui.com)
534+
535+ Copyright 2011, Paul Bakaus
536
537 * json2.js (http://www.json.org/)
538
539@@ -46,6 +50,6 @@
540
541 Copyright 1999, Masanao Izumo <iz@onicos.co.jp>
542
543-* jspec.js (http://visionmedia.github.com/jspec/)
544+ * jspec.js (http://visionmedia.github.com/jspec/)
545
546 Copyright 2010 TJ Holowaychuk <tj@vision-media.ca>
547
548=== modified file 'THANKS'
549--- THANKS 2010-08-16 19:45:48 +0000
550+++ THANKS 2011-09-06 14:51:24 +0000
551@@ -63,7 +63,23 @@
552 * Paul Bonser <pib@paulbonser.com>
553 * Caleb Land <caleb.land@gmail.com>
554 * Juhani Ränkimies <juhani@juranki.com>
555+ * Kev Jackson <foamdino@gmail.com>
556+ * Jonathan D. Knezek <jdknezek@gmail.com>
557+ * David Rose <doppler@gmail.com>
558 * Lim Yue Chuan <shasderias@gmail.com>
559 * David Davis <xantus@xantus.org>
560+ * Klaus Trainer <klaus.trainer@web.de>
561+ * Dale Harvey <dale@arandomurl.com>
562+ * Juuso Väänänen <juuso@vaananen.org>
563+ * Jeff Zellner <jeff.zellner@gmail.com>
564+ * Benjamin Young <byoung@bigbluehat.com>
565+ * Gabriel Farrell <gsf747@gmail.com>
566+ * Mike Leddy <mike@loop.com.br>
567+ * Felix Hummel <apache@felixhummel.de>
568+ * Tim Smith <tim@couchbase.com>
569+ * Sam Bisbee <sam@sbisbee.com>
570+ * Nathan Vander Wilt <natevw@yahoo.com>
571+ * Caolan McMahon <caolan.mcmahon@googlemail.com>
572+
573
574 For a list of authors see the `AUTHORS` file.
575
576=== modified file 'acinclude.m4'
577--- acinclude.m4 2010-08-16 19:45:48 +0000
578+++ acinclude.m4 2011-09-06 14:51:24 +0000
579@@ -17,8 +17,8 @@
580 m4_define([LOCAL_PACKAGE_NAME], [Apache CouchDB])
581 m4_define([LOCAL_BUG_URI], [https://issues.apache.org/jira/browse/COUCHDB])
582 m4_define([LOCAL_VERSION_MAJOR], [1])
583-m4_define([LOCAL_VERSION_MINOR], [0])
584-m4_define([LOCAL_VERSION_REVISION], [1])
585+m4_define([LOCAL_VERSION_MINOR], [1])
586+m4_define([LOCAL_VERSION_REVISION], [0])
587 m4_define([LOCAL_VERSION_STAGE], [])
588 m4_define([LOCAL_VERSION_RELEASE], [])
589 m4_define([LOCAL_VERSION_PRIMARY],
590
591=== modified file 'aclocal.m4'
592--- aclocal.m4 2010-07-26 10:24:11 +0000
593+++ aclocal.m4 2011-09-06 14:51:24 +0000
594@@ -1,4 +1,4 @@
595-# generated automatically by aclocal 1.11 -*- Autoconf -*-
596+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
597
598 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
599 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
600@@ -13,8 +13,8 @@
601
602 m4_ifndef([AC_AUTOCONF_VERSION],
603 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
604-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
605-[m4_warning([this file was generated for autoconf 2.64.
606+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
607+[m4_warning([this file was generated for autoconf 2.67.
608 You have another version of autoconf. It may work, but is not guaranteed to.
609 If you have problems, you may need to regenerate the build system entirely.
610 To do so, use the procedure documented by the package, typically `autoreconf'.])])
611@@ -34,7 +34,7 @@
612 [am__api_version='1.11'
613 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
614 dnl require some minimum version. Point them to the right macro.
615-m4_if([$1], [1.11], [],
616+m4_if([$1], [1.11.1], [],
617 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
618 ])
619
620@@ -50,7 +50,7 @@
621 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
622 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
623 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
624-[AM_AUTOMAKE_VERSION([1.11])dnl
625+[AM_AUTOMAKE_VERSION([1.11.1])dnl
626 m4_ifndef([AC_AUTOCONF_VERSION],
627 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
628 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
629
630=== modified file 'bin/Makefile.in'
631--- bin/Makefile.in 2010-07-26 10:24:11 +0000
632+++ bin/Makefile.in 2011-09-06 14:51:24 +0000
633@@ -1,4 +1,4 @@
634-# Makefile.in generated by automake 1.11 from Makefile.am.
635+# Makefile.in generated by automake 1.11.1 from Makefile.am.
636 # @configure_input@
637
638 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
639
640=== removed file 'bin/couchdb.1'
641--- bin/couchdb.1 2010-08-16 19:45:48 +0000
642+++ bin/couchdb.1 1970-01-01 00:00:00 +0000
643@@ -1,83 +0,0 @@
644-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
645-.TH COUCHDB "1" "August 2010" "couchdb - Apache CouchDB 1.0.1" "User Commands"
646-.SH NAME
647-couchdb \- Apache CouchDB database server
648-.SH SYNOPSIS
649-.B couchdb
650-[\fIOPTION\fR]
651-.SH DESCRIPTION
652-The couchdb command runs the Apache CouchDB server.
653-.PP
654-Erlang is called with:
655-.HP
656-\fB\-sasl\fR errlog_type error +K true +A 4
657-.PP
658-Erlang inherits the environment of this command.
659-.PP
660-You can override these options using the environment:
661-.IP
662-ERL_AFLAGS, ERL_FLAGS, ERL_ZFLAGS
663-.PP
664-See erl(1) for more information about the environment variables.
665-.PP
666-The exit status is 0 for success or 1 for failure.
667-.SH OPTIONS
668-
669-.TP
670-\fB\-h\fR
671-display a short help message and exit
672-.TP
673-\fB\-V\fR
674-display version information and exit
675-.TP
676-\fB\-a\fR FILE
677-add configuration FILE to chain
678-.TP
679-\fB\-A\fR DIR
680-add configuration DIR to chain
681-.TP
682-\fB\-n\fR
683-reset configuration file chain (including system default)
684-.TP
685-\fB\-c\fR
686-print configuration file chain and exit
687-.TP
688-\fB\-i\fR
689-use the interactive Erlang shell
690-.TP
691-\fB\-b\fR
692-spawn as a background process
693-.TP
694-\fB\-p\fR FILE
695-set the background PID FILE (overrides system default)
696-.TP
697-\fB\-r\fR SECONDS
698-respawn background process after SECONDS (defaults to no respawn)
699-.TP
700-\fB\-o\fR FILE
701-redirect background stdout to FILE (defaults to couchdb.stdout)
702-.TP
703-\fB\-e\fR FILE
704-redirect background stderr to FILE (defaults to couchdb.stderr)
705-.TP
706-\fB\-s\fR
707-display the status of the background process
708-.TP
709-\fB\-k\fR
710-kill the background process, will respawn if needed
711-.TP
712-\fB\-d\fR
713-shutdown the background process
714-.SH "REPORTING BUGS"
715-Report bugs at <https://issues.apache.org/jira/browse/COUCHDB>.
716-.PP
717-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
718-this file except in compliance with the License. You may obtain a copy of the
719-License at
720-.IP
721-http://www.apache.org/licenses/LICENSE\-2.0
722-.PP
723-Unless required by applicable law or agreed to in writing, software distributed
724-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
725-CONDITIONS OF ANY KIND, either express or implied. See the License for the
726-specific language governing permissions and limitations under the License.
727
728=== removed file 'bin/couchjs.1'
729--- bin/couchjs.1 2010-08-16 19:45:48 +0000
730+++ bin/couchjs.1 1970-01-01 00:00:00 +0000
731@@ -1,32 +0,0 @@
732-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
733-.TH COUCHJS "1" "August 2010" "couchjs - Apache CouchDB 1.0.1" "User Commands"
734-.SH NAME
735-couchjs \- Apache CouchDB JavaScript interpreter
736-.SH SYNOPSIS
737-.B couchjs
738-[\fIFILE\fR]
739-.SH DESCRIPTION
740-The couchjs command runs the Apache CouchDB JavaScript interpreter.
741-.PP
742-The exit status is 0 for success or 1 for failure.
743-.SH OPTIONS
744-
745-.TP
746-\fB\-h\fR
747-display a short help message and exit
748-.TP
749-\fB\-V\fR
750-display version information and exit
751-.SH "REPORTING BUGS"
752-Report bugs at <https://issues.apache.org/jira/browse/COUCHDB>.
753-.PP
754-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
755-this file except in compliance with the License. You may obtain a copy of the
756-License at
757-.IP
758-http://www.apache.org/licenses/LICENSE\-2.0
759-.PP
760-Unless required by applicable law or agreed to in writing, software distributed
761-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
762-CONDITIONS OF ANY KIND, either express or implied. See the License for the
763-specific language governing permissions and limitations under the License.
764
765=== modified file 'build-aux/config.guess'
766--- build-aux/config.guess 2009-08-31 09:06:26 +0000
767+++ build-aux/config.guess 2011-09-06 14:51:24 +0000
768@@ -1,10 +1,10 @@
769 #! /bin/sh
770 # Attempt to guess a canonical system name.
771 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
772-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
773+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
774 # Free Software Foundation, Inc.
775
776-timestamp='2009-04-27'
777+timestamp='2009-12-30'
778
779 # This file is free software; you can redistribute it and/or modify it
780 # under the terms of the GNU General Public License as published by
781@@ -27,16 +27,16 @@
782 # the same distribution terms that you use for the rest of that program.
783
784
785-# Originally written by Per Bothner <per@bothner.com>.
786-# Please send patches to <config-patches@gnu.org>. Submit a context
787-# diff and a properly formatted ChangeLog entry.
788+# Originally written by Per Bothner. Please send patches (context
789+# diff format) to <config-patches@gnu.org> and include a ChangeLog
790+# entry.
791 #
792 # This script attempts to guess a canonical system name similar to
793 # config.sub. If it succeeds, it prints the system name on stdout, and
794 # exits with 0. Otherwise, it exits with 1.
795 #
796-# The plan is that this can be called by configure scripts if you
797-# don't specify an explicit build system type.
798+# You can get the latest version of this script from:
799+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
800
801 me=`echo "$0" | sed -e 's,.*/,,'`
802
803@@ -56,8 +56,9 @@
804 GNU config.guess ($timestamp)
805
806 Originally written by Per Bothner.
807-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
808-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
809+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
810+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
811+Software Foundation, Inc.
812
813 This is free software; see the source for copying conditions. There is NO
814 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
815@@ -170,7 +171,7 @@
816 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
817 eval $set_cc_for_build
818 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
819- | grep __ELF__ >/dev/null
820+ | grep -q __ELF__
821 then
822 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
823 # Return netbsd for either. FIX?
824@@ -333,6 +334,9 @@
825 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
826 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
827 exit ;;
828+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
829+ echo i386-pc-auroraux${UNAME_RELEASE}
830+ exit ;;
831 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
832 eval $set_cc_for_build
833 SUN_ARCH="i386"
834@@ -656,7 +660,7 @@
835 # => hppa64-hp-hpux11.23
836
837 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
838- grep __LP64__ >/dev/null
839+ grep -q __LP64__
840 then
841 HP_ARCH="hppa2.0w"
842 else
843@@ -807,12 +811,12 @@
844 i*:PW*:*)
845 echo ${UNAME_MACHINE}-pc-pw32
846 exit ;;
847- *:Interix*:[3456]*)
848+ *:Interix*:*)
849 case ${UNAME_MACHINE} in
850 x86)
851 echo i586-pc-interix${UNAME_RELEASE}
852 exit ;;
853- EM64T | authenticamd | genuineintel)
854+ authenticamd | genuineintel | EM64T)
855 echo x86_64-unknown-interix${UNAME_RELEASE}
856 exit ;;
857 IA64)
858@@ -822,6 +826,9 @@
859 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
860 echo i${UNAME_MACHINE}-pc-mks
861 exit ;;
862+ 8664:Windows_NT:*)
863+ echo x86_64-pc-mks
864+ exit ;;
865 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
866 # How do we know it's Interix rather than the generic POSIX subsystem?
867 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
868@@ -851,6 +858,20 @@
869 i*86:Minix:*:*)
870 echo ${UNAME_MACHINE}-pc-minix
871 exit ;;
872+ alpha:Linux:*:*)
873+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
874+ EV5) UNAME_MACHINE=alphaev5 ;;
875+ EV56) UNAME_MACHINE=alphaev56 ;;
876+ PCA56) UNAME_MACHINE=alphapca56 ;;
877+ PCA57) UNAME_MACHINE=alphapca56 ;;
878+ EV6) UNAME_MACHINE=alphaev6 ;;
879+ EV67) UNAME_MACHINE=alphaev67 ;;
880+ EV68*) UNAME_MACHINE=alphaev68 ;;
881+ esac
882+ objdump --private-headers /bin/sh | grep -q ld.so.1
883+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
884+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
885+ exit ;;
886 arm*:Linux:*:*)
887 eval $set_cc_for_build
888 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
889@@ -873,6 +894,17 @@
890 frv:Linux:*:*)
891 echo frv-unknown-linux-gnu
892 exit ;;
893+ i*86:Linux:*:*)
894+ LIBC=gnu
895+ eval $set_cc_for_build
896+ sed 's/^ //' << EOF >$dummy.c
897+ #ifdef __dietlibc__
898+ LIBC=dietlibc
899+ #endif
900+EOF
901+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
902+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
903+ exit ;;
904 ia64:Linux:*:*)
905 echo ${UNAME_MACHINE}-unknown-linux-gnu
906 exit ;;
907@@ -882,78 +914,34 @@
908 m68*:Linux:*:*)
909 echo ${UNAME_MACHINE}-unknown-linux-gnu
910 exit ;;
911- mips:Linux:*:*)
912- eval $set_cc_for_build
913- sed 's/^ //' << EOF >$dummy.c
914- #undef CPU
915- #undef mips
916- #undef mipsel
917- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
918- CPU=mipsel
919- #else
920- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
921- CPU=mips
922- #else
923- CPU=
924- #endif
925- #endif
926-EOF
927- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
928- /^CPU/{
929- s: ::g
930- p
931- }'`"
932- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
933- ;;
934- mips64:Linux:*:*)
935- eval $set_cc_for_build
936- sed 's/^ //' << EOF >$dummy.c
937- #undef CPU
938- #undef mips64
939- #undef mips64el
940- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
941- CPU=mips64el
942- #else
943- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
944- CPU=mips64
945- #else
946- CPU=
947- #endif
948- #endif
949-EOF
950- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
951- /^CPU/{
952- s: ::g
953- p
954- }'`"
955+ mips:Linux:*:* | mips64:Linux:*:*)
956+ eval $set_cc_for_build
957+ sed 's/^ //' << EOF >$dummy.c
958+ #undef CPU
959+ #undef ${UNAME_MACHINE}
960+ #undef ${UNAME_MACHINE}el
961+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
962+ CPU=${UNAME_MACHINE}el
963+ #else
964+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
965+ CPU=${UNAME_MACHINE}
966+ #else
967+ CPU=
968+ #endif
969+ #endif
970+EOF
971+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
972 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
973 ;;
974 or32:Linux:*:*)
975 echo or32-unknown-linux-gnu
976 exit ;;
977- ppc:Linux:*:*)
978- echo powerpc-unknown-linux-gnu
979- exit ;;
980- ppc64:Linux:*:*)
981- echo powerpc64-unknown-linux-gnu
982- exit ;;
983- alpha:Linux:*:*)
984- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
985- EV5) UNAME_MACHINE=alphaev5 ;;
986- EV56) UNAME_MACHINE=alphaev56 ;;
987- PCA56) UNAME_MACHINE=alphapca56 ;;
988- PCA57) UNAME_MACHINE=alphapca56 ;;
989- EV6) UNAME_MACHINE=alphaev6 ;;
990- EV67) UNAME_MACHINE=alphaev67 ;;
991- EV68*) UNAME_MACHINE=alphaev68 ;;
992- esac
993- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
994- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
995- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
996- exit ;;
997 padre:Linux:*:*)
998 echo sparc-unknown-linux-gnu
999 exit ;;
1000+ parisc64:Linux:*:* | hppa64:Linux:*:*)
1001+ echo hppa64-unknown-linux-gnu
1002+ exit ;;
1003 parisc:Linux:*:* | hppa:Linux:*:*)
1004 # Look for CPU level
1005 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1006@@ -962,8 +950,11 @@
1007 *) echo hppa-unknown-linux-gnu ;;
1008 esac
1009 exit ;;
1010- parisc64:Linux:*:* | hppa64:Linux:*:*)
1011- echo hppa64-unknown-linux-gnu
1012+ ppc64:Linux:*:*)
1013+ echo powerpc64-unknown-linux-gnu
1014+ exit ;;
1015+ ppc:Linux:*:*)
1016+ echo powerpc-unknown-linux-gnu
1017 exit ;;
1018 s390:Linux:*:* | s390x:Linux:*:*)
1019 echo ${UNAME_MACHINE}-ibm-linux
1020@@ -986,66 +977,6 @@
1021 xtensa*:Linux:*:*)
1022 echo ${UNAME_MACHINE}-unknown-linux-gnu
1023 exit ;;
1024- i*86:Linux:*:*)
1025- # The BFD linker knows what the default object file format is, so
1026- # first see if it will tell us. cd to the root directory to prevent
1027- # problems with other programs or directories called `ld' in the path.
1028- # Set LC_ALL=C to ensure ld outputs messages in English.
1029- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
1030- | sed -ne '/supported targets:/!d
1031- s/[ ][ ]*/ /g
1032- s/.*supported targets: *//
1033- s/ .*//
1034- p'`
1035- case "$ld_supported_targets" in
1036- elf32-i386)
1037- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
1038- ;;
1039- a.out-i386-linux)
1040- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
1041- exit ;;
1042- "")
1043- # Either a pre-BFD a.out linker (linux-gnuoldld) or
1044- # one that does not give us useful --help.
1045- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
1046- exit ;;
1047- esac
1048- # Determine whether the default compiler is a.out or elf
1049- eval $set_cc_for_build
1050- sed 's/^ //' << EOF >$dummy.c
1051- #include <features.h>
1052- #ifdef __ELF__
1053- # ifdef __GLIBC__
1054- # if __GLIBC__ >= 2
1055- LIBC=gnu
1056- # else
1057- LIBC=gnulibc1
1058- # endif
1059- # else
1060- LIBC=gnulibc1
1061- # endif
1062- #else
1063- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1064- LIBC=gnu
1065- #else
1066- LIBC=gnuaout
1067- #endif
1068- #endif
1069- #ifdef __dietlibc__
1070- LIBC=dietlibc
1071- #endif
1072-EOF
1073- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1074- /^LIBC/{
1075- s: ::g
1076- p
1077- }'`"
1078- test x"${LIBC}" != x && {
1079- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1080- exit
1081- }
1082- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1083- ;;
1084 i*86:DYNIX/ptx:4*:*)
1085 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1086 # earlier versions are messed up and put the nodename in both
1087@@ -1074,7 +1005,7 @@
1088 i*86:syllable:*:*)
1089 echo ${UNAME_MACHINE}-pc-syllable
1090 exit ;;
1091- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1092+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1093 echo i386-unknown-lynxos${UNAME_RELEASE}
1094 exit ;;
1095 i*86:*DOS:*:*)
1096@@ -1182,7 +1113,7 @@
1097 rs6000:LynxOS:2.*:*)
1098 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1099 exit ;;
1100- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1101+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1102 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1103 exit ;;
1104 SM[BE]S:UNIX_SV:*:*)
1105@@ -1275,6 +1206,16 @@
1106 *:Darwin:*:*)
1107 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1108 case $UNAME_PROCESSOR in
1109+ i386)
1110+ eval $set_cc_for_build
1111+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1112+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1113+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1114+ grep IS_64BIT_ARCH >/dev/null
1115+ then
1116+ UNAME_PROCESSOR="x86_64"
1117+ fi
1118+ fi ;;
1119 unknown) UNAME_PROCESSOR=powerpc ;;
1120 esac
1121 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1122
1123=== modified file 'build-aux/config.sub'
1124--- build-aux/config.sub 2009-08-31 09:06:26 +0000
1125+++ build-aux/config.sub 2011-09-06 14:51:24 +0000
1126@@ -1,10 +1,10 @@
1127 #! /bin/sh
1128 # Configuration validation subroutine script.
1129 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1130-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
1131+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
1132 # Free Software Foundation, Inc.
1133
1134-timestamp='2009-04-17'
1135+timestamp='2010-01-22'
1136
1137 # This file is (in principle) common to ALL GNU software.
1138 # The presence of a machine in this file suggests that SOME GNU software
1139@@ -32,13 +32,16 @@
1140
1141
1142 # Please send patches to <config-patches@gnu.org>. Submit a context
1143-# diff and a properly formatted ChangeLog entry.
1144+# diff and a properly formatted GNU ChangeLog entry.
1145 #
1146 # Configuration subroutine to validate and canonicalize a configuration type.
1147 # Supply the specified configuration type as an argument.
1148 # If it is invalid, we print an error message on stderr and exit with code 1.
1149 # Otherwise, we print the canonical config type on stdout and succeed.
1150
1151+# You can get the latest version of this script from:
1152+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1153+
1154 # This file is supposed to be the same for all GNU packages
1155 # and recognize all the CPU types, system types and aliases
1156 # that are meaningful with *any* GNU software.
1157@@ -72,8 +75,9 @@
1158 version="\
1159 GNU config.sub ($timestamp)
1160
1161-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
1162-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1163+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
1164+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
1165+Software Foundation, Inc.
1166
1167 This is free software; see the source for copying conditions. There is NO
1168 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
1169@@ -149,10 +153,13 @@
1170 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
1171 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
1172 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
1173- -apple | -axis | -knuth | -cray)
1174+ -apple | -axis | -knuth | -cray | -microblaze)
1175 os=
1176 basic_machine=$1
1177 ;;
1178+ -bluegene*)
1179+ os=-cnk
1180+ ;;
1181 -sim | -cisco | -oki | -wec | -winbond)
1182 os=
1183 basic_machine=$1
1184@@ -281,6 +288,7 @@
1185 | pdp10 | pdp11 | pj | pjl \
1186 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
1187 | pyramid \
1188+ | rx \
1189 | score \
1190 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
1191 | sh64 | sh64le \
1192@@ -288,13 +296,14 @@
1193 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
1194 | spu | strongarm \
1195 | tahoe | thumb | tic4x | tic80 | tron \
1196+ | ubicom32 \
1197 | v850 | v850e \
1198 | we32k \
1199 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
1200 | z8k | z80)
1201 basic_machine=$basic_machine-unknown
1202 ;;
1203- m6811 | m68hc11 | m6812 | m68hc12)
1204+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
1205 # Motorola 68HC11/12.
1206 basic_machine=$basic_machine-unknown
1207 os=-none
1208@@ -337,7 +346,7 @@
1209 | lm32-* \
1210 | m32c-* | m32r-* | m32rle-* \
1211 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
1212- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
1213+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
1214 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
1215 | mips16-* \
1216 | mips64-* | mips64el-* \
1217@@ -365,15 +374,17 @@
1218 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
1219 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
1220 | pyramid-* \
1221- | romp-* | rs6000-* \
1222+ | romp-* | rs6000-* | rx-* \
1223 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1224 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
1225 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
1226 | sparclite-* \
1227 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
1228 | tahoe-* | thumb-* \
1229- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
1230+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
1231+ | tile-* | tilegx-* \
1232 | tron-* \
1233+ | ubicom32-* \
1234 | v850-* | v850e-* | vax-* \
1235 | we32k-* \
1236 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
1237@@ -467,6 +478,10 @@
1238 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
1239 os=-linux
1240 ;;
1241+ bluegene*)
1242+ basic_machine=powerpc-ibm
1243+ os=-cnk
1244+ ;;
1245 c90)
1246 basic_machine=c90-cray
1247 os=-unicos
1248@@ -719,6 +734,9 @@
1249 basic_machine=ns32k-utek
1250 os=-sysv
1251 ;;
1252+ microblaze)
1253+ basic_machine=microblaze-xilinx
1254+ ;;
1255 mingw32)
1256 basic_machine=i386-pc
1257 os=-mingw32
1258@@ -1069,6 +1087,11 @@
1259 basic_machine=tic6x-unknown
1260 os=-coff
1261 ;;
1262+ # This must be matched before tile*.
1263+ tilegx*)
1264+ basic_machine=tilegx-unknown
1265+ os=-linux-gnu
1266+ ;;
1267 tile*)
1268 basic_machine=tile-unknown
1269 os=-linux-gnu
1270@@ -1240,6 +1263,9 @@
1271 # First match some system type aliases
1272 # that might get confused with valid system types.
1273 # -solaris* is a basic system type, with this one exception.
1274+ -auroraux)
1275+ os=-auroraux
1276+ ;;
1277 -solaris1 | -solaris1.*)
1278 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1279 ;;
1280@@ -1260,9 +1286,9 @@
1281 # Each alternative MUST END IN A *, to match a version number.
1282 # -sysv* is not here because it comes later, after sysvr4.
1283 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1284- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1285- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1286- | -kopensolaris* \
1287+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1288+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1289+ | -sym* | -kopensolaris* \
1290 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1291 | -aos* | -aros* \
1292 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1293@@ -1283,7 +1309,7 @@
1294 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1295 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1296 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1297- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1298+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1299 # Remember, each alternative MUST END IN *, to match a version number.
1300 ;;
1301 -qnx*)
1302@@ -1416,6 +1442,8 @@
1303 -dicos*)
1304 os=-dicos
1305 ;;
1306+ -nacl*)
1307+ ;;
1308 -none)
1309 ;;
1310 *)
1311@@ -1613,7 +1641,7 @@
1312 -sunos*)
1313 vendor=sun
1314 ;;
1315- -aix*)
1316+ -cnk*|-aix*)
1317 vendor=ibm
1318 ;;
1319 -beos*)
1320
1321=== modified file 'build-aux/ltmain.sh'
1322--- build-aux/ltmain.sh 2010-07-26 10:24:11 +0000
1323+++ build-aux/ltmain.sh 2011-09-06 14:51:24 +0000
1324@@ -1,6 +1,6 @@
1325 # Generated from ltmain.m4sh.
1326
1327-# ltmain.sh (GNU libtool) 2.2.6
1328+# ltmain.sh (GNU libtool) 2.2.6b
1329 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1330
1331 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
1332@@ -65,7 +65,7 @@
1333 # compiler: $LTCC
1334 # compiler flags: $LTCFLAGS
1335 # linker: $LD (gnu? $with_gnu_ld)
1336-# $progname: (GNU libtool) 2.2.6
1337+# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2
1338 # automake: $automake_version
1339 # autoconf: $autoconf_version
1340 #
1341@@ -73,9 +73,9 @@
1342
1343 PROGRAM=ltmain.sh
1344 PACKAGE=libtool
1345-VERSION=2.2.6
1346+VERSION="2.2.6b Debian-2.2.6b-2"
1347 TIMESTAMP=""
1348-package_revision=1.3012
1349+package_revision=1.3017
1350
1351 # Be Bourne compatible
1352 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
1353@@ -116,15 +116,15 @@
1354
1355 : ${CP="cp -f"}
1356 : ${ECHO="echo"}
1357-: ${EGREP="/usr/bin/grep -E"}
1358-: ${FGREP="/usr/bin/grep -F"}
1359-: ${GREP="/usr/bin/grep"}
1360+: ${EGREP="/bin/grep -E"}
1361+: ${FGREP="/bin/grep -F"}
1362+: ${GREP="/bin/grep"}
1363 : ${LN_S="ln -s"}
1364 : ${MAKE="make"}
1365 : ${MKDIR="mkdir"}
1366 : ${MV="mv -f"}
1367 : ${RM="rm -f"}
1368-: ${SED="/opt/local/bin/gsed"}
1369+: ${SED="/bin/sed"}
1370 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
1371 : ${Xsed="$SED -e 1s/^X//"}
1372
1373@@ -5033,7 +5033,10 @@
1374 case $pass in
1375 dlopen) libs="$dlfiles" ;;
1376 dlpreopen) libs="$dlprefiles" ;;
1377- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
1378+ link)
1379+ libs="$deplibs %DEPLIBS%"
1380+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
1381+ ;;
1382 esac
1383 fi
1384 if test "$linkmode,$pass" = "lib,dlpreopen"; then
1385@@ -5344,19 +5347,19 @@
1386 # It is a libtool convenience library, so add in its objects.
1387 convenience="$convenience $ladir/$objdir/$old_library"
1388 old_convenience="$old_convenience $ladir/$objdir/$old_library"
1389+ tmp_libs=
1390+ for deplib in $dependency_libs; do
1391+ deplibs="$deplib $deplibs"
1392+ if $opt_duplicate_deps ; then
1393+ case "$tmp_libs " in
1394+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1395+ esac
1396+ fi
1397+ tmp_libs="$tmp_libs $deplib"
1398+ done
1399 elif test "$linkmode" != prog && test "$linkmode" != lib; then
1400 func_fatal_error "\`$lib' is not a convenience library"
1401 fi
1402- tmp_libs=
1403- for deplib in $dependency_libs; do
1404- deplibs="$deplib $deplibs"
1405- if $opt_duplicate_deps ; then
1406- case "$tmp_libs " in
1407- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1408- esac
1409- fi
1410- tmp_libs="$tmp_libs $deplib"
1411- done
1412 continue
1413 fi # $pass = conv
1414
1415@@ -5893,6 +5896,7 @@
1416 if test "$link_all_deplibs" != no; then
1417 # Add the search paths of all dependency libraries
1418 for deplib in $dependency_libs; do
1419+ path=
1420 case $deplib in
1421 -L*) path="$deplib" ;;
1422 *.la)
1423@@ -6206,6 +6210,9 @@
1424 revision="$number_minor"
1425 lt_irix_increment=no
1426 ;;
1427+ *)
1428+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
1429+ ;;
1430 esac
1431 ;;
1432 no)
1433
1434=== modified file 'configure'
1435--- configure 2010-08-16 19:45:48 +0000
1436+++ configure 2011-09-06 14:51:24 +0000
1437@@ -1,12 +1,14 @@
1438 #! /bin/sh
1439-# From configure.ac 1.0.1.
1440+# From configure.ac 1.1.0.
1441 # Guess values for system-dependent variables and create Makefiles.
1442-# Generated by GNU Autoconf 2.64 for Apache CouchDB 1.0.1.
1443+# Generated by GNU Autoconf 2.67 for Apache CouchDB 1.1.0.
1444+#
1445 #
1446 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1447-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
1448+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
1449 # Foundation, Inc.
1450 #
1451+#
1452 # This configure script is free software; the Free Software Foundation
1453 # gives unlimited permission to copy, distribute and modify it.
1454 ## -------------------- ##
1455@@ -315,7 +317,7 @@
1456 test -d "$as_dir" && break
1457 done
1458 test -z "$as_dirs" || eval "mkdir $as_dirs"
1459- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
1460+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
1461
1462
1463 } # as_fn_mkdir_p
1464@@ -355,19 +357,19 @@
1465 fi # as_fn_arith
1466
1467
1468-# as_fn_error ERROR [LINENO LOG_FD]
1469-# ---------------------------------
1470+# as_fn_error STATUS ERROR [LINENO LOG_FD]
1471+# ----------------------------------------
1472 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
1473 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
1474-# script with status $?, using 1 if that was 0.
1475+# script with STATUS, using 1 if that was 0.
1476 as_fn_error ()
1477 {
1478- as_status=$?; test $as_status -eq 0 && as_status=1
1479- if test "$3"; then
1480- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1481- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
1482+ as_status=$1; test $as_status -eq 0 && as_status=1
1483+ if test "$4"; then
1484+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1485+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
1486 fi
1487- $as_echo "$as_me: error: $1" >&2
1488+ $as_echo "$as_me: error: $2" >&2
1489 as_fn_exit $as_status
1490 } # as_fn_error
1491
1492@@ -674,10 +676,11 @@
1493
1494
1495
1496-exec 7<&0 </dev/null 6>&1
1497+test -n "$DJDIR" || exec 7<&0 </dev/null
1498+exec 6>&1
1499
1500 # Name of the host.
1501-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
1502+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
1503 # so uname gets run too.
1504 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
1505
1506@@ -696,8 +699,8 @@
1507 # Identity of this package.
1508 PACKAGE_NAME='Apache CouchDB'
1509 PACKAGE_TARNAME='apache-couchdb'
1510-PACKAGE_VERSION='1.0.1'
1511-PACKAGE_STRING='Apache CouchDB 1.0.1'
1512+PACKAGE_VERSION='1.1.0'
1513+PACKAGE_STRING='Apache CouchDB 1.1.0'
1514 PACKAGE_BUGREPORT=''
1515 PACKAGE_URL=''
1516
1517@@ -1000,8 +1003,9 @@
1518 fi
1519
1520 case $ac_option in
1521- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1522- *) ac_optarg=yes ;;
1523+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1524+ *=) ac_optarg= ;;
1525+ *) ac_optarg=yes ;;
1526 esac
1527
1528 # Accept the important Cygnus configure options, so we can diagnose typos.
1529@@ -1046,7 +1050,7 @@
1530 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1531 # Reject names that are not valid shell variable names.
1532 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1533- as_fn_error "invalid feature name: $ac_useropt"
1534+ as_fn_error $? "invalid feature name: $ac_useropt"
1535 ac_useropt_orig=$ac_useropt
1536 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1537 case $ac_user_opts in
1538@@ -1072,7 +1076,7 @@
1539 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1540 # Reject names that are not valid shell variable names.
1541 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1542- as_fn_error "invalid feature name: $ac_useropt"
1543+ as_fn_error $? "invalid feature name: $ac_useropt"
1544 ac_useropt_orig=$ac_useropt
1545 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1546 case $ac_user_opts in
1547@@ -1276,7 +1280,7 @@
1548 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1549 # Reject names that are not valid shell variable names.
1550 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1551- as_fn_error "invalid package name: $ac_useropt"
1552+ as_fn_error $? "invalid package name: $ac_useropt"
1553 ac_useropt_orig=$ac_useropt
1554 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1555 case $ac_user_opts in
1556@@ -1292,7 +1296,7 @@
1557 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1558 # Reject names that are not valid shell variable names.
1559 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1560- as_fn_error "invalid package name: $ac_useropt"
1561+ as_fn_error $? "invalid package name: $ac_useropt"
1562 ac_useropt_orig=$ac_useropt
1563 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1564 case $ac_user_opts in
1565@@ -1322,8 +1326,8 @@
1566 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1567 x_libraries=$ac_optarg ;;
1568
1569- -*) as_fn_error "unrecognized option: \`$ac_option'
1570-Try \`$0 --help' for more information."
1571+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
1572+Try \`$0 --help' for more information"
1573 ;;
1574
1575 *=*)
1576@@ -1331,7 +1335,7 @@
1577 # Reject names that are not valid shell variable names.
1578 case $ac_envvar in #(
1579 '' | [0-9]* | *[!_$as_cr_alnum]* )
1580- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1581+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1582 esac
1583 eval $ac_envvar=\$ac_optarg
1584 export $ac_envvar ;;
1585@@ -1349,13 +1353,13 @@
1586
1587 if test -n "$ac_prev"; then
1588 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1589- as_fn_error "missing argument to $ac_option"
1590+ as_fn_error $? "missing argument to $ac_option"
1591 fi
1592
1593 if test -n "$ac_unrecognized_opts"; then
1594 case $enable_option_checking in
1595 no) ;;
1596- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1597+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1598 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1599 esac
1600 fi
1601@@ -1378,7 +1382,7 @@
1602 [\\/$]* | ?:[\\/]* ) continue;;
1603 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1604 esac
1605- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1606+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1607 done
1608
1609 # There might be people who depend on the old broken behavior: `$host'
1610@@ -1392,8 +1396,8 @@
1611 if test "x$host_alias" != x; then
1612 if test "x$build_alias" = x; then
1613 cross_compiling=maybe
1614- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1615- If a cross compiler is detected then cross compile mode will be used." >&2
1616+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1617+ If a cross compiler is detected then cross compile mode will be used" >&2
1618 elif test "x$build_alias" != "x$host_alias"; then
1619 cross_compiling=yes
1620 fi
1621@@ -1408,9 +1412,9 @@
1622 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1623 ac_ls_di=`ls -di .` &&
1624 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1625- as_fn_error "working directory cannot be determined"
1626+ as_fn_error $? "working directory cannot be determined"
1627 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1628- as_fn_error "pwd does not report name of working directory"
1629+ as_fn_error $? "pwd does not report name of working directory"
1630
1631
1632 # Find the source files, if location was not specified.
1633@@ -1449,11 +1453,11 @@
1634 fi
1635 if test ! -r "$srcdir/$ac_unique_file"; then
1636 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1637- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1638+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1639 fi
1640 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1641 ac_abs_confdir=`(
1642- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1643+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1644 pwd)`
1645 # When building in place, set srcdir=.
1646 if test "$ac_abs_confdir" = "$ac_pwd"; then
1647@@ -1479,7 +1483,7 @@
1648 # Omit some internal or obsolete options to make the list less imposing.
1649 # This message is too long to be a string in the A/UX 3.1 sh.
1650 cat <<_ACEOF
1651-\`configure' configures Apache CouchDB 1.0.1 to adapt to many kinds of systems.
1652+\`configure' configures Apache CouchDB 1.1.0 to adapt to many kinds of systems.
1653
1654 Usage: $0 [OPTION]... [VAR=VALUE]...
1655
1656@@ -1493,7 +1497,7 @@
1657 --help=short display options specific to this package
1658 --help=recursive display the short help of all the included packages
1659 -V, --version display version information and exit
1660- -q, --quiet, --silent do not print \`checking...' messages
1661+ -q, --quiet, --silent do not print \`checking ...' messages
1662 --cache-file=FILE cache test results in FILE [disabled]
1663 -C, --config-cache alias for \`--cache-file=config.cache'
1664 -n, --no-create do not create output files
1665@@ -1549,7 +1553,7 @@
1666
1667 if test -n "$ac_init_help"; then
1668 case $ac_init_help in
1669- short | recursive ) echo "Configuration of Apache CouchDB 1.0.1:";;
1670+ short | recursive ) echo "Configuration of Apache CouchDB 1.1.0:";;
1671 esac
1672 cat <<\_ACEOF
1673
1674@@ -1592,7 +1596,7 @@
1675 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1676 nonstandard directory <lib dir>
1677 LIBS libraries to pass to the linker, e.g. -l<library>
1678- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1679+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1680 you have headers in a nonstandard directory <include dir>
1681 CPP C preprocessor
1682 ERLC_FLAGS general flags to prepend to ERLC_FLAGS
1683@@ -1668,10 +1672,10 @@
1684 test -n "$ac_init_help" && exit $ac_status
1685 if $ac_init_version; then
1686 cat <<\_ACEOF
1687-Apache CouchDB configure 1.0.1
1688-generated by GNU Autoconf 2.64
1689+Apache CouchDB configure 1.1.0
1690+generated by GNU Autoconf 2.67
1691
1692-Copyright (C) 2009 Free Software Foundation, Inc.
1693+Copyright (C) 2010 Free Software Foundation, Inc.
1694 This configure script is free software; the Free Software Foundation
1695 gives unlimited permission to copy, distribute and modify it.
1696 _ACEOF
1697@@ -1716,7 +1720,7 @@
1698 ac_retval=1
1699 fi
1700 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1701- return $ac_retval
1702+ as_fn_set_status $ac_retval
1703
1704 } # ac_fn_c_try_compile
1705
1706@@ -1741,7 +1745,7 @@
1707 mv -f conftest.er1 conftest.err
1708 fi
1709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1710- test $ac_status = 0; } >/dev/null && {
1711+ test $ac_status = 0; } > conftest.i && {
1712 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 }; then :
1715@@ -1753,7 +1757,7 @@
1716 ac_retval=1
1717 fi
1718 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1719- return $ac_retval
1720+ as_fn_set_status $ac_retval
1721
1722 } # ac_fn_c_try_cpp
1723
1724@@ -1765,10 +1769,10 @@
1725 ac_fn_c_check_header_mongrel ()
1726 {
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1729+ if eval "test \"\${$3+set}\"" = set; then :
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1731 $as_echo_n "checking for $2... " >&6; }
1732-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1733+if eval "test \"\${$3+set}\"" = set; then :
1734 $as_echo_n "(cached) " >&6
1735 fi
1736 eval ac_res=\$$3
1737@@ -1804,7 +1808,7 @@
1738 else
1739 ac_header_preproc=no
1740 fi
1741-rm -f conftest.err conftest.$ac_ext
1742+rm -f conftest.err conftest.i conftest.$ac_ext
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1744 $as_echo "$ac_header_preproc" >&6; }
1745
1746@@ -1831,7 +1835,7 @@
1747 esac
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1749 $as_echo_n "checking for $2... " >&6; }
1750-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1751+if eval "test \"\${$3+set}\"" = set; then :
1752 $as_echo_n "(cached) " >&6
1753 else
1754 eval "$3=\$ac_header_compiler"
1755@@ -1882,7 +1886,7 @@
1756 fi
1757 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1758 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1759- return $ac_retval
1760+ as_fn_set_status $ac_retval
1761
1762 } # ac_fn_c_try_run
1763
1764@@ -1895,7 +1899,7 @@
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1767 $as_echo_n "checking for $2... " >&6; }
1768-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1769+if eval "test \"\${$3+set}\"" = set; then :
1770 $as_echo_n "(cached) " >&6
1771 else
1772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1773@@ -1959,7 +1963,7 @@
1774 # left behind by Apple's compiler. We do this before executing the actions.
1775 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1776 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1777- return $ac_retval
1778+ as_fn_set_status $ac_retval
1779
1780 } # ac_fn_c_try_link
1781
1782@@ -1971,7 +1975,7 @@
1783 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1785 $as_echo_n "checking for $2... " >&6; }
1786-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1787+if eval "test \"\${$3+set}\"" = set; then :
1788 $as_echo_n "(cached) " >&6
1789 else
1790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791@@ -2033,8 +2037,8 @@
1792 This file contains any messages produced by compilers while
1793 running configure, to aid debugging if configure makes a mistake.
1794
1795-It was created by Apache CouchDB $as_me 1.0.1, which was
1796-generated by GNU Autoconf 2.64. Invocation command line was
1797+It was created by Apache CouchDB $as_me 1.1.0, which was
1798+generated by GNU Autoconf 2.67. Invocation command line was
1799
1800 $ $0 $@
1801
1802@@ -2144,11 +2148,9 @@
1803 {
1804 echo
1805
1806- cat <<\_ASBOX
1807-## ---------------- ##
1808+ $as_echo "## ---------------- ##
1809 ## Cache variables. ##
1810-## ---------------- ##
1811-_ASBOX
1812+## ---------------- ##"
1813 echo
1814 # The following way of writing the cache mishandles newlines in values,
1815 (
1816@@ -2182,11 +2184,9 @@
1817 )
1818 echo
1819
1820- cat <<\_ASBOX
1821-## ----------------- ##
1822+ $as_echo "## ----------------- ##
1823 ## Output variables. ##
1824-## ----------------- ##
1825-_ASBOX
1826+## ----------------- ##"
1827 echo
1828 for ac_var in $ac_subst_vars
1829 do
1830@@ -2199,11 +2199,9 @@
1831 echo
1832
1833 if test -n "$ac_subst_files"; then
1834- cat <<\_ASBOX
1835-## ------------------- ##
1836+ $as_echo "## ------------------- ##
1837 ## File substitutions. ##
1838-## ------------------- ##
1839-_ASBOX
1840+## ------------------- ##"
1841 echo
1842 for ac_var in $ac_subst_files
1843 do
1844@@ -2217,11 +2215,9 @@
1845 fi
1846
1847 if test -s confdefs.h; then
1848- cat <<\_ASBOX
1849-## ----------- ##
1850+ $as_echo "## ----------- ##
1851 ## confdefs.h. ##
1852-## ----------- ##
1853-_ASBOX
1854+## ----------- ##"
1855 echo
1856 cat confdefs.h
1857 echo
1858@@ -2276,7 +2272,12 @@
1859 ac_site_file1=NONE
1860 ac_site_file2=NONE
1861 if test -n "$CONFIG_SITE"; then
1862- ac_site_file1=$CONFIG_SITE
1863+ # We do not want a PATH search for config.site.
1864+ case $CONFIG_SITE in #((
1865+ -*) ac_site_file1=./$CONFIG_SITE;;
1866+ */*) ac_site_file1=$CONFIG_SITE;;
1867+ *) ac_site_file1=./$CONFIG_SITE;;
1868+ esac
1869 elif test "x$prefix" != xNONE; then
1870 ac_site_file1=$prefix/share/config.site
1871 ac_site_file2=$prefix/etc/config.site
1872@@ -2287,18 +2288,22 @@
1873 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1874 do
1875 test "x$ac_site_file" = xNONE && continue
1876- if test -r "$ac_site_file"; then
1877+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1879 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1880 sed 's/^/| /' "$ac_site_file" >&5
1881- . "$ac_site_file"
1882+ . "$ac_site_file" \
1883+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1884+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1885+as_fn_error $? "failed to load site script $ac_site_file
1886+See \`config.log' for more details" "$LINENO" 5 ; }
1887 fi
1888 done
1889
1890 if test -r "$cache_file"; then
1891- # Some versions of bash will fail to source /dev/null (special
1892- # files actually), so we avoid doing that.
1893- if test -f "$cache_file"; then
1894+ # Some versions of bash will fail to source /dev/null (special files
1895+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
1896+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
1898 $as_echo "$as_me: loading cache $cache_file" >&6;}
1899 case $cache_file in
1900@@ -2367,7 +2372,7 @@
1901 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
1903 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1904- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
1905+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
1906 fi
1907 ## -------------------- ##
1908 ## Main body of script. ##
1909@@ -2386,16 +2391,22 @@
1910
1911 ac_aux_dir=
1912 for ac_dir in build-aux "$srcdir"/build-aux; do
1913- for ac_t in install-sh install.sh shtool; do
1914- if test -f "$ac_dir/$ac_t"; then
1915- ac_aux_dir=$ac_dir
1916- ac_install_sh="$ac_aux_dir/$ac_t -c"
1917- break 2
1918- fi
1919- done
1920+ if test -f "$ac_dir/install-sh"; then
1921+ ac_aux_dir=$ac_dir
1922+ ac_install_sh="$ac_aux_dir/install-sh -c"
1923+ break
1924+ elif test -f "$ac_dir/install.sh"; then
1925+ ac_aux_dir=$ac_dir
1926+ ac_install_sh="$ac_aux_dir/install.sh -c"
1927+ break
1928+ elif test -f "$ac_dir/shtool"; then
1929+ ac_aux_dir=$ac_dir
1930+ ac_install_sh="$ac_aux_dir/shtool install -c"
1931+ break
1932+ fi
1933 done
1934 if test -z "$ac_aux_dir"; then
1935- as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
1936+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
1937 fi
1938
1939 # These three variables are undocumented and unsupported,
1940@@ -2518,11 +2529,11 @@
1941 '
1942 case `pwd` in
1943 *[\\\"\#\$\&\'\`$am_lf]*)
1944- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
1945+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
1946 esac
1947 case $srcdir in
1948 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
1949- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
1950+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
1951 esac
1952
1953 # Do `set' in a subshell so we don't clobber the current shell's
1954@@ -2544,7 +2555,7 @@
1955 # if, for instance, CONFIG_SHELL is bash and it inherits a
1956 # broken ls alias from the environment. This has actually
1957 # happened. Such a system could not be considered "sane".
1958- as_fn_error "ls -t appears to fail. Make sure there is not a broken
1959+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
1960 alias in your environment" "$LINENO" 5
1961 fi
1962
1963@@ -2554,7 +2565,7 @@
1964 # Ok.
1965 :
1966 else
1967- as_fn_error "newly created file is older than distributed files!
1968+ as_fn_error $? "newly created file is older than distributed files!
1969 Check your system clock" "$LINENO" 5
1970 fi
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1972@@ -2726,6 +2737,7 @@
1973
1974 fi
1975
1976+ test -d ./--version && rmdir ./--version
1977 if test "${ac_cv_path_mkdir+set}" = set; then
1978 MKDIR_P="$ac_cv_path_mkdir -p"
1979 else
1980@@ -2733,7 +2745,6 @@
1981 # value for MKDIR_P within a source directory, because that will
1982 # break other packages using the cache if that directory is
1983 # removed, or if the value is a relative name.
1984- test -d ./--version && rmdir ./--version
1985 MKDIR_P="$ac_install_sh -d"
1986 fi
1987 fi
1988@@ -2792,7 +2803,7 @@
1989 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
1990 set x ${MAKE-make}
1991 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
1992-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
1993+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
1994 $as_echo_n "(cached) " >&6
1995 else
1996 cat >conftest.make <<\_ACEOF
1997@@ -2800,7 +2811,7 @@
1998 all:
1999 @echo '@@@%%%=$(MAKE)=@@@%%%'
2000 _ACEOF
2001-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2002+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2003 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2004 *@@@%%%=?*=@@@%%%*)
2005 eval ac_cv_prog_make_${ac_make}_set=yes;;
2006@@ -2834,7 +2845,7 @@
2007 am__isrc=' -I$(srcdir)'
2008 # test to see if srcdir already configured
2009 if test -f $srcdir/config.status; then
2010- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2011+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2012 fi
2013 fi
2014
2015@@ -2850,7 +2861,7 @@
2016
2017 # Define the identity of the package.
2018 PACKAGE='apache-couchdb'
2019- VERSION='1.0.1'
2020+ VERSION='1.1.0'
2021
2022
2023 cat >>confdefs.h <<_ACEOF
2024@@ -3253,8 +3264,8 @@
2025
2026 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2027 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2028-as_fn_error "no acceptable C compiler found in \$PATH
2029-See \`config.log' for more details." "$LINENO" 5; }
2030+as_fn_error $? "no acceptable C compiler found in \$PATH
2031+See \`config.log' for more details" "$LINENO" 5 ; }
2032
2033 # Provide some information about the compiler.
2034 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2035@@ -3275,32 +3286,30 @@
2036 ... rest of stderr output deleted ...
2037 10q' conftest.err >conftest.er1
2038 cat conftest.er1 >&5
2039- rm -f conftest.er1 conftest.err
2040 fi
2041+ rm -f conftest.er1 conftest.err
2042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2043 test $ac_status = 0; }
2044 done
2045
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047 /* end confdefs.h. */
2048-#include <stdio.h>
2049+
2050 int
2051 main ()
2052 {
2053-FILE *f = fopen ("conftest.out", "w");
2054- return ferror (f) || fclose (f) != 0;
2055
2056 ;
2057 return 0;
2058 }
2059 _ACEOF
2060 ac_clean_files_save=$ac_clean_files
2061-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
2062+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2063 # Try to create an executable without -o first, disregard a.out.
2064 # It will help us diagnose broken compilers, and finding out an intuition
2065 # of exeext.
2066-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2067-$as_echo_n "checking for C compiler default output file name... " >&6; }
2068+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2069+$as_echo_n "checking whether the C compiler works... " >&6; }
2070 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2071
2072 # The possible output files:
2073@@ -3362,62 +3371,28 @@
2074 else
2075 ac_file=''
2076 fi
2077+if test -z "$ac_file"; then :
2078+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2079+$as_echo "no" >&6; }
2080+$as_echo "$as_me: failed program was:" >&5
2081+sed 's/^/| /' conftest.$ac_ext >&5
2082+
2083+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2084+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2085+as_fn_error 77 "C compiler cannot create executables
2086+See \`config.log' for more details" "$LINENO" 5 ; }
2087+else
2088+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2089+$as_echo "yes" >&6; }
2090+fi
2091+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2092+$as_echo_n "checking for C compiler default output file name... " >&6; }
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2094 $as_echo "$ac_file" >&6; }
2095-if test -z "$ac_file"; then :
2096- $as_echo "$as_me: failed program was:" >&5
2097-sed 's/^/| /' conftest.$ac_ext >&5
2098-
2099-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2100-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2101-{ as_fn_set_status 77
2102-as_fn_error "C compiler cannot create executables
2103-See \`config.log' for more details." "$LINENO" 5; }; }
2104-fi
2105 ac_exeext=$ac_cv_exeext
2106
2107-# Check that the compiler produces executables we can run. If not, either
2108-# the compiler is broken, or we cross compile.
2109-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2110-$as_echo_n "checking whether the C compiler works... " >&6; }
2111-# If not cross compiling, check that we can run a simple program.
2112-if test "$cross_compiling" != yes; then
2113- if { ac_try='./$ac_file'
2114- { { case "(($ac_try" in
2115- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2116- *) ac_try_echo=$ac_try;;
2117-esac
2118-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2119-$as_echo "$ac_try_echo"; } >&5
2120- (eval "$ac_try") 2>&5
2121- ac_status=$?
2122- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2123- test $ac_status = 0; }; }; then
2124- cross_compiling=no
2125- else
2126- if test "$cross_compiling" = maybe; then
2127- cross_compiling=yes
2128- else
2129- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2130-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2131-as_fn_error "cannot run C compiled programs.
2132-If you meant to cross compile, use \`--host'.
2133-See \`config.log' for more details." "$LINENO" 5; }
2134- fi
2135- fi
2136-fi
2137-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2138-$as_echo "yes" >&6; }
2139-
2140-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
2141+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2142 ac_clean_files=$ac_clean_files_save
2143-# Check that the compiler produces executables we can run. If not, either
2144-# the compiler is broken, or we cross compile.
2145-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2146-$as_echo_n "checking whether we are cross compiling... " >&6; }
2147-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2148-$as_echo "$cross_compiling" >&6; }
2149-
2150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2151 $as_echo_n "checking for suffix of executables... " >&6; }
2152 if { { ac_try="$ac_link"
2153@@ -3447,16 +3422,75 @@
2154 else
2155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2156 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2157-as_fn_error "cannot compute suffix of executables: cannot compile and link
2158-See \`config.log' for more details." "$LINENO" 5; }
2159+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2160+See \`config.log' for more details" "$LINENO" 5 ; }
2161 fi
2162-rm -f conftest$ac_cv_exeext
2163+rm -f conftest conftest$ac_cv_exeext
2164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2165 $as_echo "$ac_cv_exeext" >&6; }
2166
2167 rm -f conftest.$ac_ext
2168 EXEEXT=$ac_cv_exeext
2169 ac_exeext=$EXEEXT
2170+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171+/* end confdefs.h. */
2172+#include <stdio.h>
2173+int
2174+main ()
2175+{
2176+FILE *f = fopen ("conftest.out", "w");
2177+ return ferror (f) || fclose (f) != 0;
2178+
2179+ ;
2180+ return 0;
2181+}
2182+_ACEOF
2183+ac_clean_files="$ac_clean_files conftest.out"
2184+# Check that the compiler produces executables we can run. If not, either
2185+# the compiler is broken, or we cross compile.
2186+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2187+$as_echo_n "checking whether we are cross compiling... " >&6; }
2188+if test "$cross_compiling" != yes; then
2189+ { { ac_try="$ac_link"
2190+case "(($ac_try" in
2191+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2192+ *) ac_try_echo=$ac_try;;
2193+esac
2194+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2195+$as_echo "$ac_try_echo"; } >&5
2196+ (eval "$ac_link") 2>&5
2197+ ac_status=$?
2198+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2199+ test $ac_status = 0; }
2200+ if { ac_try='./conftest$ac_cv_exeext'
2201+ { { case "(($ac_try" in
2202+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203+ *) ac_try_echo=$ac_try;;
2204+esac
2205+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206+$as_echo "$ac_try_echo"; } >&5
2207+ (eval "$ac_try") 2>&5
2208+ ac_status=$?
2209+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2210+ test $ac_status = 0; }; }; then
2211+ cross_compiling=no
2212+ else
2213+ if test "$cross_compiling" = maybe; then
2214+ cross_compiling=yes
2215+ else
2216+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2217+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2218+as_fn_error $? "cannot run C compiled programs.
2219+If you meant to cross compile, use \`--host'.
2220+See \`config.log' for more details" "$LINENO" 5 ; }
2221+ fi
2222+ fi
2223+fi
2224+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2225+$as_echo "$cross_compiling" >&6; }
2226+
2227+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2228+ac_clean_files=$ac_clean_files_save
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2230 $as_echo_n "checking for suffix of object files... " >&6; }
2231 if test "${ac_cv_objext+set}" = set; then :
2232@@ -3499,8 +3533,8 @@
2233
2234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2235 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2236-as_fn_error "cannot compute suffix of object files: cannot compile
2237-See \`config.log' for more details." "$LINENO" 5; }
2238+as_fn_error $? "cannot compute suffix of object files: cannot compile
2239+See \`config.log' for more details" "$LINENO" 5 ; }
2240 fi
2241 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2242 fi
2243@@ -3890,7 +3924,7 @@
2244 # Broken: fails on valid input.
2245 continue
2246 fi
2247-rm -f conftest.err conftest.$ac_ext
2248+rm -f conftest.err conftest.i conftest.$ac_ext
2249
2250 # OK, works on sane cases. Now check whether nonexistent headers
2251 # can be detected and how.
2252@@ -3906,11 +3940,11 @@
2253 ac_preproc_ok=:
2254 break
2255 fi
2256-rm -f conftest.err conftest.$ac_ext
2257+rm -f conftest.err conftest.i conftest.$ac_ext
2258
2259 done
2260 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2261-rm -f conftest.err conftest.$ac_ext
2262+rm -f conftest.i conftest.err conftest.$ac_ext
2263 if $ac_preproc_ok; then :
2264 break
2265 fi
2266@@ -3949,7 +3983,7 @@
2267 # Broken: fails on valid input.
2268 continue
2269 fi
2270-rm -f conftest.err conftest.$ac_ext
2271+rm -f conftest.err conftest.i conftest.$ac_ext
2272
2273 # OK, works on sane cases. Now check whether nonexistent headers
2274 # can be detected and how.
2275@@ -3965,18 +3999,18 @@
2276 ac_preproc_ok=:
2277 break
2278 fi
2279-rm -f conftest.err conftest.$ac_ext
2280+rm -f conftest.err conftest.i conftest.$ac_ext
2281
2282 done
2283 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2284-rm -f conftest.err conftest.$ac_ext
2285+rm -f conftest.i conftest.err conftest.$ac_ext
2286 if $ac_preproc_ok; then :
2287
2288 else
2289 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2290 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2291-as_fn_error "C preprocessor \"$CPP\" fails sanity check
2292-See \`config.log' for more details." "$LINENO" 5; }
2293+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
2294+See \`config.log' for more details" "$LINENO" 5 ; }
2295 fi
2296
2297 ac_ext=c
2298@@ -4037,7 +4071,7 @@
2299 done
2300 IFS=$as_save_IFS
2301 if test -z "$ac_cv_path_GREP"; then
2302- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
2303+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
2304 fi
2305 else
2306 ac_cv_path_GREP=$GREP
2307@@ -4103,7 +4137,7 @@
2308 done
2309 IFS=$as_save_IFS
2310 if test -z "$ac_cv_path_EGREP"; then
2311- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
2312+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
2313 fi
2314 else
2315 ac_cv_path_EGREP=$EGREP
2316@@ -4235,8 +4269,7 @@
2317 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
2318 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
2319 "
2320-eval as_val=\$$as_ac_Header
2321- if test "x$as_val" = x""yes; then :
2322+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
2323 cat >>confdefs.h <<_ACEOF
2324 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
2325 _ACEOF
2326@@ -4671,8 +4704,8 @@
2327
2328 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2329 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2330-as_fn_error "no acceptable C compiler found in \$PATH
2331-See \`config.log' for more details." "$LINENO" 5; }
2332+as_fn_error $? "no acceptable C compiler found in \$PATH
2333+See \`config.log' for more details" "$LINENO" 5 ; }
2334
2335 # Provide some information about the compiler.
2336 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2337@@ -4693,8 +4726,8 @@
2338 ... rest of stderr output deleted ...
2339 10q' conftest.err >conftest.er1
2340 cat conftest.er1 >&5
2341- rm -f conftest.er1 conftest.err
2342 fi
2343+ rm -f conftest.er1 conftest.err
2344 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2345 test $ac_status = 0; }
2346 done
2347@@ -5046,8 +5079,8 @@
2348
2349
2350
2351-macro_version='2.2.6'
2352-macro_revision='1.3012'
2353+macro_version='2.2.6b'
2354+macro_revision='1.3017'
2355
2356
2357
2358@@ -5065,7 +5098,7 @@
2359
2360 # Make sure we can run config.sub.
2361 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2362- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2363+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2364
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2366 $as_echo_n "checking build system type... " >&6; }
2367@@ -5076,16 +5109,16 @@
2368 test "x$ac_build_alias" = x &&
2369 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2370 test "x$ac_build_alias" = x &&
2371- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2372+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2373 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2374- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2375+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2376
2377 fi
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2379 $as_echo "$ac_cv_build" >&6; }
2380 case $ac_cv_build in
2381 *-*-*) ;;
2382-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2383+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
2384 esac
2385 build=$ac_cv_build
2386 ac_save_IFS=$IFS; IFS='-'
2387@@ -5110,7 +5143,7 @@
2388 ac_cv_host=$ac_cv_build
2389 else
2390 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2391- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2392+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2393 fi
2394
2395 fi
2396@@ -5118,7 +5151,7 @@
2397 $as_echo "$ac_cv_host" >&6; }
2398 case $ac_cv_host in
2399 *-*-*) ;;
2400-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2401+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
2402 esac
2403 host=$ac_cv_host
2404 ac_save_IFS=$IFS; IFS='-'
2405@@ -5191,7 +5224,7 @@
2406 done
2407 IFS=$as_save_IFS
2408 if test -z "$ac_cv_path_SED"; then
2409- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
2410+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
2411 fi
2412 else
2413 ac_cv_path_SED=$SED
2414@@ -5270,7 +5303,7 @@
2415 done
2416 IFS=$as_save_IFS
2417 if test -z "$ac_cv_path_FGREP"; then
2418- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
2419+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
2420 fi
2421 else
2422 ac_cv_path_FGREP=$FGREP
2423@@ -5386,7 +5419,7 @@
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2425 $as_echo "no" >&6; }
2426 fi
2427-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
2428+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
2429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
2430 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
2431 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
2432@@ -5588,13 +5621,13 @@
2433 else
2434 lt_cv_nm_interface="BSD nm"
2435 echo "int some_variable = 0;" > conftest.$ac_ext
2436- (eval echo "\"\$as_me:5591: $ac_compile\"" >&5)
2437+ (eval echo "\"\$as_me:5624: $ac_compile\"" >&5)
2438 (eval "$ac_compile" 2>conftest.err)
2439 cat conftest.err >&5
2440- (eval echo "\"\$as_me:5594: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
2441+ (eval echo "\"\$as_me:5627: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
2442 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
2443 cat conftest.err >&5
2444- (eval echo "\"\$as_me:5597: output\"" >&5)
2445+ (eval echo "\"\$as_me:5630: output\"" >&5)
2446 cat conftest.out >&5
2447 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
2448 lt_cv_nm_interface="MS dumpbin"
2449@@ -6060,11 +6093,11 @@
2450 ;;
2451
2452 # This must be Linux ELF.
2453-linux* | k*bsd*-gnu)
2454+linux* | k*bsd*-gnu | kopensolaris*-gnu)
2455 lt_cv_deplibs_check_method=pass_all
2456 ;;
2457
2458-netbsd*)
2459+netbsd* | netbsdelf*-gnu)
2460 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2461 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
2462 else
2463@@ -6799,7 +6832,7 @@
2464 ;;
2465 *-*-irix6*)
2466 # Find out which ABI we are using.
2467- echo '#line 6802 "configure"' > conftest.$ac_ext
2468+ echo '#line 6835 "configure"' > conftest.$ac_ext
2469 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
2470 (eval $ac_compile) 2>&5
2471 ac_status=$?
2472@@ -8001,11 +8034,11 @@
2473 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2474 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2475 -e 's:$: $lt_compiler_flag:'`
2476- (eval echo "\"\$as_me:8004: $lt_compile\"" >&5)
2477+ (eval echo "\"\$as_me:8037: $lt_compile\"" >&5)
2478 (eval "$lt_compile" 2>conftest.err)
2479 ac_status=$?
2480 cat conftest.err >&5
2481- echo "$as_me:8008: \$? = $ac_status" >&5
2482+ echo "$as_me:8041: \$? = $ac_status" >&5
2483 if (exit $ac_status) && test -s "$ac_outfile"; then
2484 # The compiler can only warn and ignore the option if not recognized
2485 # So say no if there are warnings other than the usual output.
2486@@ -8170,7 +8203,7 @@
2487 lt_prog_compiler_static='-non_shared'
2488 ;;
2489
2490- linux* | k*bsd*-gnu)
2491+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
2492 case $cc_basename in
2493 # old Intel for x86_64 which still supported -KPIC.
2494 ecc*)
2495@@ -8340,11 +8373,11 @@
2496 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2497 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2498 -e 's:$: $lt_compiler_flag:'`
2499- (eval echo "\"\$as_me:8343: $lt_compile\"" >&5)
2500+ (eval echo "\"\$as_me:8376: $lt_compile\"" >&5)
2501 (eval "$lt_compile" 2>conftest.err)
2502 ac_status=$?
2503 cat conftest.err >&5
2504- echo "$as_me:8347: \$? = $ac_status" >&5
2505+ echo "$as_me:8380: \$? = $ac_status" >&5
2506 if (exit $ac_status) && test -s "$ac_outfile"; then
2507 # The compiler can only warn and ignore the option if not recognized
2508 # So say no if there are warnings other than the usual output.
2509@@ -8445,11 +8478,11 @@
2510 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2511 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2512 -e 's:$: $lt_compiler_flag:'`
2513- (eval echo "\"\$as_me:8448: $lt_compile\"" >&5)
2514+ (eval echo "\"\$as_me:8481: $lt_compile\"" >&5)
2515 (eval "$lt_compile" 2>out/conftest.err)
2516 ac_status=$?
2517 cat out/conftest.err >&5
2518- echo "$as_me:8452: \$? = $ac_status" >&5
2519+ echo "$as_me:8485: \$? = $ac_status" >&5
2520 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2521 then
2522 # The compiler can only warn and ignore the option if not recognized
2523@@ -8500,11 +8533,11 @@
2524 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2525 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2526 -e 's:$: $lt_compiler_flag:'`
2527- (eval echo "\"\$as_me:8503: $lt_compile\"" >&5)
2528+ (eval echo "\"\$as_me:8536: $lt_compile\"" >&5)
2529 (eval "$lt_compile" 2>out/conftest.err)
2530 ac_status=$?
2531 cat out/conftest.err >&5
2532- echo "$as_me:8507: \$? = $ac_status" >&5
2533+ echo "$as_me:8540: \$? = $ac_status" >&5
2534 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2535 then
2536 # The compiler can only warn and ignore the option if not recognized
2537@@ -8619,6 +8652,9 @@
2538 openbsd*)
2539 with_gnu_ld=no
2540 ;;
2541+ linux* | k*bsd*-gnu)
2542+ link_all_deplibs=no
2543+ ;;
2544 esac
2545
2546 ld_shlibs=yes
2547@@ -8640,6 +8676,7 @@
2548 fi
2549 supports_anon_versioning=no
2550 case `$LD -v 2>&1` in
2551+ *GNU\ gold*) supports_anon_versioning=yes ;;
2552 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
2553 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
2554 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
2555@@ -8731,7 +8768,7 @@
2556 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'
2557 ;;
2558
2559- gnu* | linux* | tpf* | k*bsd*-gnu)
2560+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
2561 tmp_diet=no
2562 if test "$host_os" = linux-dietlibc; then
2563 case $cc_basename in
2564@@ -8801,7 +8838,7 @@
2565 fi
2566 ;;
2567
2568- netbsd*)
2569+ netbsd* | netbsdelf*-gnu)
2570 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2571 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2572 wlarc=
2573@@ -8976,6 +9013,7 @@
2574 if test "$aix_use_runtimelinking" = yes; then
2575 shared_flag="$shared_flag "'${wl}-G'
2576 fi
2577+ link_all_deplibs=no
2578 else
2579 # not using gcc
2580 if test "$host_cpu" = ia64; then
2581@@ -9302,7 +9340,7 @@
2582 link_all_deplibs=yes
2583 ;;
2584
2585- netbsd*)
2586+ netbsd* | netbsdelf*-gnu)
2587 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2588 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2589 else
2590@@ -10192,7 +10230,7 @@
2591 ;;
2592
2593 # This must be Linux ELF.
2594-linux* | k*bsd*-gnu)
2595+linux* | k*bsd*-gnu | kopensolaris*-gnu)
2596 version_type=linux
2597 need_lib_prefix=no
2598 need_version=no
2599@@ -10247,6 +10285,18 @@
2600 dynamic_linker='GNU/Linux ld.so'
2601 ;;
2602
2603+netbsdelf*-gnu)
2604+ version_type=linux
2605+ need_lib_prefix=no
2606+ need_version=no
2607+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2608+ soname_spec='${libname}${release}${shared_ext}$major'
2609+ shlibpath_var=LD_LIBRARY_PATH
2610+ shlibpath_overrides_runpath=no
2611+ hardcode_into_libs=yes
2612+ dynamic_linker='NetBSD ld.elf_so'
2613+ ;;
2614+
2615 netbsd*)
2616 version_type=sunos
2617 need_lib_prefix=no
2618@@ -10867,7 +10917,7 @@
2619 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2620 lt_status=$lt_dlunknown
2621 cat > conftest.$ac_ext <<_LT_EOF
2622-#line 10870 "configure"
2623+#line 10920 "configure"
2624 #include "confdefs.h"
2625
2626 #if HAVE_DLFCN_H
2627@@ -10963,7 +11013,7 @@
2628 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2629 lt_status=$lt_dlunknown
2630 cat > conftest.$ac_ext <<_LT_EOF
2631-#line 10966 "configure"
2632+#line 11016 "configure"
2633 #include "confdefs.h"
2634
2635 #if HAVE_DLFCN_H
2636@@ -11482,7 +11532,7 @@
2637 JS_LIB_BASE=js32
2638 else
2639
2640- as_fn_error "Could not find the js library.
2641+ as_fn_error $? "Could not find the js library.
2642
2643 Is the Mozilla SpiderMonkey library installed?" "$LINENO" 5
2644 fi
2645@@ -11505,7 +11555,7 @@
2646 if test -f "$JS_LIB_DIR/../bin/$JS_LIB_BASE.dll"; then
2647 JS_LIB_BINARY="$JS_LIB_DIR/../bin/$JS_LIB_BASE.dll"
2648 else
2649- as_fn_error "Could not find $JS_LIB_BASE.dll." "$LINENO" 5
2650+ as_fn_error $? "Could not find $JS_LIB_BASE.dll." "$LINENO" 5
2651 fi
2652 fi
2653
2654@@ -11602,7 +11652,7 @@
2655
2656 else
2657
2658- as_fn_error "Could not find the jsapi header.
2659+ as_fn_error $? "Could not find the jsapi header.
2660
2661 Are the Mozilla SpiderMonkey headers installed?" "$LINENO" 5
2662
2663@@ -11756,7 +11806,7 @@
2664 if test $succeeded = yes; then
2665 :
2666 else
2667- as_fn_error "Library requirements (ICU) not met." "$LINENO" 5
2668+ as_fn_error $? "Library requirements (ICU) not met." "$LINENO" 5
2669 fi
2670
2671 ICU_LOCAL_CFLAGS=`$ICU_CONFIG --cppflags-searchpath`
2672@@ -11869,7 +11919,7 @@
2673 if test $succeeded = yes; then
2674 :
2675 else
2676- as_fn_error "Library requirements (curl) not met." "$LINENO" 5
2677+ as_fn_error $? "Library requirements (curl) not met." "$LINENO" 5
2678 fi
2679
2680 CURL_LDFLAGS=-lcurl
2681@@ -11936,7 +11986,7 @@
2682
2683
2684 if test x${ERL} = x; then
2685- as_fn_error "Could not find the \`erl' executable. Is Erlang installed?" "$LINENO" 5
2686+ as_fn_error $? "Could not find the \`erl' executable. Is Erlang installed?" "$LINENO" 5
2687 fi
2688
2689 erlang_version_error="The installed Erlang version is less than 5.6.5 (R12B05)."
2690@@ -11944,19 +11994,25 @@
2691 version="`${ERL} -version 2>&1 | ${SED} "s/[^0-9]/ /g"`"
2692
2693 if test `echo $version | ${AWK} "{print \\$1}"` -lt 5; then
2694- as_fn_error "$erlang_version_error" "$LINENO" 5
2695+ as_fn_error $? "$erlang_version_error" "$LINENO" 5
2696 fi
2697
2698 if test `echo $version | ${AWK} "{print \\$2}"` -lt 6; then
2699- as_fn_error "$erlang_version_error" "$LINENO" 5
2700+ as_fn_error $? "$erlang_version_error" "$LINENO" 5
2701 fi
2702
2703 if test `echo $version | ${AWK} "{print \\$2}"` -eq 6; then
2704 if test `echo $version | ${AWK} "{print \\$3}"` -lt 5; then
2705- as_fn_error "$erlang_version_error" "$LINENO" 5
2706+ as_fn_error $? "$erlang_version_error" "$LINENO" 5
2707 fi
2708 fi
2709
2710+has_crypto=`${ERL} -eval "case application:load(crypto) of ok -> ok; _ -> exit(no_crypto) end." -noshell -s init stop`
2711+
2712+if test -n "$has_crypto"; then
2713+ as_fn_error $? "Could not find the Erlang crypto library. Has Erlang been compiled with OpenSSL support?" "$LINENO" 5
2714+fi
2715+
2716 # Extract the first word of "erlc", so it can be a program name with args.
2717 set dummy erlc; ac_word=$2
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2719@@ -11999,7 +12055,7 @@
2720
2721
2722 if test x${ERLC} = x; then
2723- as_fn_error "Could not find the \`erlc' executable. Is Erlang installed?" "$LINENO" 5
2724+ as_fn_error $? "Could not find the \`erlc' executable. Is Erlang installed?" "$LINENO" 5
2725 fi
2726
2727 ac_fn_c_check_header_mongrel "$LINENO" "erl_driver.h" "ac_cv_header_erl_driver_h" "$ac_includes_default"
2728@@ -12007,7 +12063,7 @@
2729
2730 else
2731
2732- as_fn_error "Could not find the \`erl_driver.h' header.
2733+ as_fn_error $? "Could not find the \`erl_driver.h' header.
2734
2735 Are the Erlang headers installed? Use the \`--with-erlang' option to specify the
2736 path to the Erlang include directory." "$LINENO" 5
2737@@ -12171,13 +12227,13 @@
2738 package_name="Apache CouchDB"
2739
2740
2741-version="1.0.1"
2742+version="1.1.0"
2743
2744 version_major="1"
2745
2746-version_minor="0"
2747+version_minor="1"
2748
2749-version_revision="1"
2750+version_revision="0"
2751
2752 version_stage=""
2753
2754@@ -12371,6 +12427,7 @@
2755
2756 ac_libobjs=
2757 ac_ltlibobjs=
2758+U=
2759 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
2760 # 1. Remove the extension, and $U if already installed.
2761 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2762@@ -12394,31 +12451,31 @@
2763 fi
2764
2765 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
2766- as_fn_error "conditional \"AMDEP\" was never defined.
2767-Usually this means the macro was only invoked conditionally." "$LINENO" 5
2768-fi
2769-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
2770- as_fn_error "conditional \"am__fastdepCC\" was never defined.
2771-Usually this means the macro was only invoked conditionally." "$LINENO" 5
2772-fi
2773-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
2774- as_fn_error "conditional \"am__fastdepCC\" was never defined.
2775+ as_fn_error $? "conditional \"AMDEP\" was never defined.
2776+Usually this means the macro was only invoked conditionally." "$LINENO" 5
2777+fi
2778+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
2779+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
2780+Usually this means the macro was only invoked conditionally." "$LINENO" 5
2781+fi
2782+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
2783+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
2784 Usually this means the macro was only invoked conditionally." "$LINENO" 5
2785 fi
2786 if test -z "${WINDOWS_TRUE}" && test -z "${WINDOWS_FALSE}"; then
2787- as_fn_error "conditional \"WINDOWS\" was never defined.
2788+ as_fn_error $? "conditional \"WINDOWS\" was never defined.
2789 Usually this means the macro was only invoked conditionally." "$LINENO" 5
2790 fi
2791 if test -z "${INIT_TRUE}" && test -z "${INIT_FALSE}"; then
2792- as_fn_error "conditional \"INIT\" was never defined.
2793+ as_fn_error $? "conditional \"INIT\" was never defined.
2794 Usually this means the macro was only invoked conditionally." "$LINENO" 5
2795 fi
2796 if test -z "${LAUNCHD_TRUE}" && test -z "${LAUNCHD_FALSE}"; then
2797- as_fn_error "conditional \"LAUNCHD\" was never defined.
2798+ as_fn_error $? "conditional \"LAUNCHD\" was never defined.
2799 Usually this means the macro was only invoked conditionally." "$LINENO" 5
2800 fi
2801 if test -z "${HELP2MAN_TRUE}" && test -z "${HELP2MAN_FALSE}"; then
2802- as_fn_error "conditional \"HELP2MAN\" was never defined.
2803+ as_fn_error $? "conditional \"HELP2MAN\" was never defined.
2804 Usually this means the macro was only invoked conditionally." "$LINENO" 5
2805 fi
2806
2807@@ -12568,19 +12625,19 @@
2808 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2809
2810
2811-# as_fn_error ERROR [LINENO LOG_FD]
2812-# ---------------------------------
2813+# as_fn_error STATUS ERROR [LINENO LOG_FD]
2814+# ----------------------------------------
2815 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
2816 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
2817-# script with status $?, using 1 if that was 0.
2818+# script with STATUS, using 1 if that was 0.
2819 as_fn_error ()
2820 {
2821- as_status=$?; test $as_status -eq 0 && as_status=1
2822- if test "$3"; then
2823- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2824- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
2825+ as_status=$1; test $as_status -eq 0 && as_status=1
2826+ if test "$4"; then
2827+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2828+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
2829 fi
2830- $as_echo "$as_me: error: $1" >&2
2831+ $as_echo "$as_me: error: $2" >&2
2832 as_fn_exit $as_status
2833 } # as_fn_error
2834
2835@@ -12776,7 +12833,7 @@
2836 test -d "$as_dir" && break
2837 done
2838 test -z "$as_dirs" || eval "mkdir $as_dirs"
2839- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
2840+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
2841
2842
2843 } # as_fn_mkdir_p
2844@@ -12829,8 +12886,8 @@
2845 # report actual input values of CONFIG_FILES etc. instead of their
2846 # values after options handling.
2847 ac_log="
2848-This file was extended by Apache CouchDB $as_me 1.0.1, which was
2849-generated by GNU Autoconf 2.64. Invocation command line was
2850+This file was extended by Apache CouchDB $as_me 1.1.0, which was
2851+generated by GNU Autoconf 2.67. Invocation command line was
2852
2853 CONFIG_FILES = $CONFIG_FILES
2854 CONFIG_HEADERS = $CONFIG_HEADERS
2855@@ -12870,6 +12927,7 @@
2856
2857 -h, --help print this help, then exit
2858 -V, --version print version number and configuration settings, then exit
2859+ --config print configuration, then exit
2860 -q, --quiet, --silent
2861 do not print progress messages
2862 -d, --debug don't remove temporary files
2863@@ -12892,12 +12950,13 @@
2864
2865 _ACEOF
2866 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2867+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
2868 ac_cs_version="\\
2869-Apache CouchDB config.status 1.0.1
2870-configured by $0, generated by GNU Autoconf 2.64,
2871- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
2872+Apache CouchDB config.status 1.1.0
2873+configured by $0, generated by GNU Autoconf 2.67,
2874+ with options \\"\$ac_cs_config\\"
2875
2876-Copyright (C) 2009 Free Software Foundation, Inc.
2877+Copyright (C) 2010 Free Software Foundation, Inc.
2878 This config.status script is free software; the Free Software Foundation
2879 gives unlimited permission to copy, distribute and modify it."
2880
2881@@ -12915,11 +12974,16 @@
2882 while test $# != 0
2883 do
2884 case $1 in
2885- --*=*)
2886+ --*=?*)
2887 ac_option=`expr "X$1" : 'X\([^=]*\)='`
2888 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
2889 ac_shift=:
2890 ;;
2891+ --*=)
2892+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
2893+ ac_optarg=
2894+ ac_shift=:
2895+ ;;
2896 *)
2897 ac_option=$1
2898 ac_optarg=$2
2899@@ -12933,12 +12997,15 @@
2900 ac_cs_recheck=: ;;
2901 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
2902 $as_echo "$ac_cs_version"; exit ;;
2903+ --config | --confi | --conf | --con | --co | --c )
2904+ $as_echo "$ac_cs_config"; exit ;;
2905 --debug | --debu | --deb | --de | --d | -d )
2906 debug=: ;;
2907 --file | --fil | --fi | --f )
2908 $ac_shift
2909 case $ac_optarg in
2910 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
2911+ '') as_fn_error $? "missing file argument" ;;
2912 esac
2913 as_fn_append CONFIG_FILES " '$ac_optarg'"
2914 ac_need_defaults=false;;
2915@@ -12951,7 +13018,7 @@
2916 ac_need_defaults=false;;
2917 --he | --h)
2918 # Conflict between --help and --header
2919- as_fn_error "ambiguous option: \`$1'
2920+ as_fn_error $? "ambiguous option: \`$1'
2921 Try \`$0 --help' for more information.";;
2922 --help | --hel | -h )
2923 $as_echo "$ac_cs_usage"; exit ;;
2924@@ -12960,7 +13027,7 @@
2925 ac_cs_silent=: ;;
2926
2927 # This is an error.
2928- -*) as_fn_error "unrecognized option: \`$1'
2929+ -*) as_fn_error $? "unrecognized option: \`$1'
2930 Try \`$0 --help' for more information." ;;
2931
2932 *) as_fn_append ac_config_targets " $1"
2933@@ -13306,7 +13373,7 @@
2934 "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
2935 "var/Makefile") CONFIG_FILES="$CONFIG_FILES var/Makefile" ;;
2936
2937- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
2938+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
2939 esac
2940 done
2941
2942@@ -13344,7 +13411,7 @@
2943 {
2944 tmp=./conf$$-$RANDOM
2945 (umask 077 && mkdir "$tmp")
2946-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
2947+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
2948
2949 # Set up the scripts for CONFIG_FILES section.
2950 # No need to generate them if there are no CONFIG_FILES.
2951@@ -13361,7 +13428,7 @@
2952 fi
2953 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
2954 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
2955- ac_cs_awk_cr='\r'
2956+ ac_cs_awk_cr='\\r'
2957 else
2958 ac_cs_awk_cr=$ac_cr
2959 fi
2960@@ -13375,18 +13442,18 @@
2961 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
2962 echo "_ACEOF"
2963 } >conf$$subs.sh ||
2964- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
2965-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
2966+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
2967+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
2968 ac_delim='%!_!# '
2969 for ac_last_try in false false false false false :; do
2970 . ./conf$$subs.sh ||
2971- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
2972+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
2973
2974 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
2975 if test $ac_delim_n = $ac_delim_num; then
2976 break
2977 elif $ac_last_try; then
2978- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
2979+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
2980 else
2981 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
2982 fi
2983@@ -13408,7 +13475,7 @@
2984 t delim
2985 :nl
2986 h
2987-s/\(.\{148\}\).*/\1/
2988+s/\(.\{148\}\)..*/\1/
2989 t more1
2990 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
2991 p
2992@@ -13422,7 +13489,7 @@
2993 t nl
2994 :delim
2995 h
2996-s/\(.\{148\}\).*/\1/
2997+s/\(.\{148\}\)..*/\1/
2998 t more2
2999 s/["\\]/\\&/g; s/^/"/; s/$/"/
3000 p
3001@@ -13475,20 +13542,28 @@
3002 else
3003 cat
3004 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
3005- || as_fn_error "could not setup config files machinery" "$LINENO" 5
3006+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
3007 _ACEOF
3008
3009-# VPATH may cause trouble with some makes, so we remove $(srcdir),
3010-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
3011+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
3012+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
3013 # trailing colons and then remove the whole line if VPATH becomes empty
3014 # (actually we leave an empty line to preserve line numbers).
3015 if test "x$srcdir" = x.; then
3016- ac_vpsub='/^[ ]*VPATH[ ]*=/{
3017-s/:*\$(srcdir):*/:/
3018-s/:*\${srcdir}:*/:/
3019-s/:*@srcdir@:*/:/
3020-s/^\([^=]*=[ ]*\):*/\1/
3021+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
3022+h
3023+s///
3024+s/^/:/
3025+s/[ ]*$/:/
3026+s/:\$(srcdir):/:/g
3027+s/:\${srcdir}:/:/g
3028+s/:@srcdir@:/:/g
3029+s/^:*//
3030 s/:*$//
3031+x
3032+s/\(=[ ]*\).*/\1/
3033+G
3034+s/\n//
3035 s/^[^=]*=[ ]*$//
3036 }'
3037 fi
3038@@ -13516,7 +13591,7 @@
3039 if test -z "$ac_t"; then
3040 break
3041 elif $ac_last_try; then
3042- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
3043+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
3044 else
3045 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
3046 fi
3047@@ -13601,7 +13676,7 @@
3048 _ACAWK
3049 _ACEOF
3050 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3051- as_fn_error "could not setup config headers machinery" "$LINENO" 5
3052+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
3053 fi # test -n "$CONFIG_HEADERS"
3054
3055
3056@@ -13614,7 +13689,7 @@
3057 esac
3058 case $ac_mode$ac_tag in
3059 :[FHL]*:*);;
3060- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
3061+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
3062 :[FH]-) ac_tag=-:-;;
3063 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
3064 esac
3065@@ -13642,7 +13717,7 @@
3066 [\\/$]*) false;;
3067 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
3068 esac ||
3069- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
3070+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
3071 esac
3072 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
3073 as_fn_append ac_file_inputs " '$ac_f'"
3074@@ -13669,7 +13744,7 @@
3075
3076 case $ac_tag in
3077 *:-:* | *:-) cat >"$tmp/stdin" \
3078- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
3079+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
3080 esac
3081 ;;
3082 esac
3083@@ -13806,22 +13881,22 @@
3084 $ac_datarootdir_hack
3085 "
3086 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
3087- || as_fn_error "could not create $ac_file" "$LINENO" 5
3088+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
3089
3090 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
3091 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
3092 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
3094-which seems to be undefined. Please make sure it is defined." >&5
3095+which seems to be undefined. Please make sure it is defined" >&5
3096 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
3097-which seems to be undefined. Please make sure it is defined." >&2;}
3098+which seems to be undefined. Please make sure it is defined" >&2;}
3099
3100 rm -f "$tmp/stdin"
3101 case $ac_file in
3102 -) cat "$tmp/out" && rm -f "$tmp/out";;
3103 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
3104 esac \
3105- || as_fn_error "could not create $ac_file" "$LINENO" 5
3106+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
3107 ;;
3108 :H)
3109 #
3110@@ -13832,19 +13907,19 @@
3111 $as_echo "/* $configure_input */" \
3112 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
3113 } >"$tmp/config.h" \
3114- || as_fn_error "could not create $ac_file" "$LINENO" 5
3115+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
3116 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
3118 $as_echo "$as_me: $ac_file is unchanged" >&6;}
3119 else
3120 rm -f "$ac_file"
3121 mv "$tmp/config.h" "$ac_file" \
3122- || as_fn_error "could not create $ac_file" "$LINENO" 5
3123+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
3124 fi
3125 else
3126 $as_echo "/* $configure_input */" \
3127 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
3128- || as_fn_error "could not create -" "$LINENO" 5
3129+ || as_fn_error $? "could not create -" "$LINENO" 5
3130 fi
3131 # Compute "$ac_file"'s index in $config_headers.
3132 _am_arg="$ac_file"
3133@@ -14629,7 +14704,7 @@
3134 ac_clean_files=$ac_clean_files_save
3135
3136 test $ac_write_fail = 0 ||
3137- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
3138+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
3139
3140
3141 # configure is writing to config.log, and then calls config.status.
3142@@ -14650,7 +14725,7 @@
3143 exec 5>>config.log
3144 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
3145 # would make configure fail if this is the last instruction.
3146- $ac_cs_success || as_fn_exit $?
3147+ $ac_cs_success || as_fn_exit 1
3148 fi
3149 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
3151
3152=== modified file 'configure.ac'
3153--- configure.ac 2010-08-16 19:45:48 +0000
3154+++ configure.ac 2011-09-06 14:51:24 +0000
3155@@ -259,6 +259,12 @@
3156 fi
3157 fi
3158
3159+has_crypto=`${ERL} -eval "case application:load(crypto) of ok -> ok; _ -> exit(no_crypto) end." -noshell -s init stop`
3160+
3161+if test -n "$has_crypto"; then
3162+ AC_MSG_ERROR([Could not find the Erlang crypto library. Has Erlang been compiled with OpenSSL support?])
3163+fi
3164+
3165 AC_PATH_PROG([ERLC], [erlc])
3166
3167 if test x${ERLC} = x; then
3168
3169=== removed file 'debian/binary.lintian-overrides'
3170--- debian/binary.lintian-overrides 2009-12-28 22:37:56 +0000
3171+++ debian/binary.lintian-overrides 1970-01-01 00:00:00 +0000
3172@@ -1,1 +0,0 @@
3173-couchdb-bin: virtual-package-depends-without-real-package-depends
3174
3175=== modified file 'debian/changelog'
3176--- debian/changelog 2011-06-14 17:47:09 +0000
3177+++ debian/changelog 2011-09-06 14:51:24 +0000
3178@@ -1,3 +1,45 @@
3179+couchdb (1.1.0-1ubuntu1) oneiric; urgency=low
3180+
3181+ * Merge from debian unstable.
3182+ * Fixed a regression in the latest debian version
3183+ - See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635762
3184+ * Ubuntu changes still remaining:
3185+ - moz000*.patch: Build against spidermonkey 1.8.5:
3186+ - init.patch: Improved init script
3187+ - fix-help2man.patch: Build with newer versions of help2man
3188+ * Removed superceded patches:
3189+ - couchio-fix-0001-replicator_redirect_atts.patch
3190+ - couchio-fix-0002-replicator_db_proxy_fix.patch
3191+ - couchio-fix-0003-changes_redirect_1.patch
3192+ - couchio-fix-0004-changes_redirect_2.patch
3193+ - couchio-fix-0005-changes_proxy.patch
3194+ - couchio-fix-0006-replicator_reader_errors.patch
3195+ - couchio-fix-0007-ibrowse_upgrade.patch
3196+ - couchio-fix-0008-replicator_doc_id_encoding.patch
3197+ - couchio-fix-0009-replicator_changes_error.patch
3198+ - couchio-fix-0010-replicator_changes_connection_close.patch
3199+ - couchio-fix-0011-ibrowse_chunked_encoding_streaming.patch
3200+ - couchio-fix-0012-replicator_ssl.patch
3201+ - jquery15-fix.patch
3202+ * Rebuilt debian/patches/moz0003-spidermonkey1.8.5_autotools.patch
3203+
3204+ -- Mat Scales <mat@wibbly.org.uk> Mon, 05 Sep 2011 22:28:39 +0100
3205+
3206+couchdb (1.1.0-1) unstable; urgency=low
3207+
3208+ * New upstream release (closes: #590334).
3209+ * Version jQuery dependency (closes: #582022, #614941).
3210+ * Empty dependency_libs in *.la (closes: #621202).
3211+ * Drop pid.patch , applied upstream and drop icu-config.patch not needed.
3212+ * Fix postrm , remove_file_collection is missing.
3213+ * Fix several lintian errors and warnings:
3214+ - add patch to implement force-reload initscript option
3215+ - use real erlang dependency, not just the virtual ABI one
3216+ - remove embedded jquery.form.js , depend on its package
3217+ - remove var/run/couchdb from the package, it'll be created on demand
3218+
3219+ -- Laszlo Boszormenyi (GCS) <gcs@debian.hu> Thu, 14 Apr 2011 11:56:01 +0200
3220+
3221 couchdb (1.0.1-0ubuntu16) oneiric; urgency=low
3222
3223 * Update Spidermonkey 1.8.5 patchset to the more palatable ones I'm
3224
3225=== modified file 'debian/control'
3226--- debian/control 2011-03-24 01:02:03 +0000
3227+++ debian/control 2011-09-06 14:51:24 +0000
3228@@ -2,20 +2,37 @@
3229 Section: misc
3230 Priority: optional
3231 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
3232-XSBC-Original-Maintainer: Erlang Packaging Team <pkg-erlang-devel@lists.alioth.debian.org>
3233-Uploaders: Sergei Golovan <sgolovan@debian.org>, Sam Bisbee <sbisbee@computervip.com>, Elliot Murphy <elliot@ubuntu.com>
3234-Standards-Version: 3.9.1
3235-Build-Depends: cdbs (>= 0.4.42), debhelper (>= 7.2.11),
3236- erlang-dev (>= 1:13.b.1-dfsg-3), help2man (>= 1.37), libcurl4-openssl-dev,
3237- libicu-dev, libreadline-dev,
3238- libmozjs185-dev, erlang-crypto, erlang-inets, erlang-xmerl
3239+XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.hu>
3240+Standards-Version: 3.9.2
3241+Build-Depends: cdbs (>= 0.4.42),
3242+ debhelper (>= 7.2.11),
3243+ erlang-crypto,
3244+ erlang-dev (>= 1:13.b.1-dfsg-3),
3245+ erlang-eunit,
3246+ erlang-inets,
3247+ erlang-xmerl,
3248+ help2man (>= 1.37),
3249+ libcurl4-openssl-dev,
3250+ libicu-dev,
3251+ libmozjs185-dev,
3252+ libreadline-dev
3253 Homepage: http://couchdb.apache.org/
3254-Vcs-Svn: svn+ssh://svn.debian.org/svn/pkg-erlang/couchdb
3255-Vcs-Browser: http://svn.debian.org/viewsvn/pkg-erlang/couchdb
3256
3257 Package: couchdb-bin
3258-Depends: ${misc:Depends}, ${shlibs:Depends}, ${erlang-base:Depends},
3259- ${erlang-crypto:Depends}, ${erlang-inets:Depends}, ${erlang-xmerl:Depends}, ${erlang-abi:Depends}, ${shlibs:Depends}, ${misc:Depends}, adduser, libjs-jquery, lsb-base, procps, mawk
3260+Depends: adduser,
3261+ libjs-jquery (>= 1.4.2),
3262+ libjs-jquery-form (>= 2.36),
3263+ lsb-base,
3264+ mawk,
3265+ procps,
3266+ erlang-base-hipe | erlang-base | ${erlang-abi:Depends},
3267+ ${erlang-base:Depends},
3268+ ${erlang-crypto:Depends},
3269+ ${erlang-eunit:Depends},
3270+ ${erlang-inets:Depends},
3271+ ${erlang-xmerl:Depends},
3272+ ${misc:Depends},
3273+ ${shlibs:Depends}
3274 Suggests: couchdb
3275 Architecture: any
3276 Description: RESTful document oriented database, programs
3277
3278=== modified file 'debian/couchdb-bin.dirs'
3279--- debian/couchdb-bin.dirs 2009-09-25 19:18:26 +0000
3280+++ debian/couchdb-bin.dirs 2011-09-06 14:51:24 +0000
3281@@ -1,3 +1,2 @@
3282 etc/couchdb/default.d
3283 etc/couchdb/local.d
3284-usr/share/lintian/overrides
3285
3286=== removed file 'debian/patches/couchio-fix-0001-replicator_redirect_atts.patch'
3287--- debian/patches/couchio-fix-0001-replicator_redirect_atts.patch 2010-09-24 14:53:26 +0000
3288+++ debian/patches/couchio-fix-0001-replicator_redirect_atts.patch 1970-01-01 00:00:00 +0000
3289@@ -1,26 +0,0 @@
3290-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep_att.erl b/couchdb-1.0.1/src/couchdb/couch_rep_att.erl
3291-index 28b8945..3c09b90 100644
3292---- a/couchdb-1.0.1/src/couchdb/couch_rep_att.erl
3293-+++ b/couchdb-1.0.1/src/couchdb/couch_rep_att.erl
3294-@@ -106,7 +106,7 @@ validate_headers(_Req, 200, Headers) ->
3295- MochiHeaders = mochiweb_headers:make(Headers),
3296- {ok, mochiweb_headers:get_value("Content-Encoding", MochiHeaders)};
3297- validate_headers(Req, Code, Headers) when Code > 299, Code < 400 ->
3298-- Url = mochiweb_headers:get_value("Location",mochiweb_headers:make(Headers)),
3299-+ Url = couch_rep_httpc:redirect_url(Headers, Req#http_db.url),
3300- NewReq = couch_rep_httpc:redirected_request(Req, Url),
3301- {ibrowse_req_id, ReqId} = couch_rep_httpc:request(NewReq),
3302- receive {ibrowse_async_headers, ReqId, NewCode, NewHeaders} ->
3303-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl b/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3304-index 768d88a..ff25e4d 100644
3305---- a/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3306-+++ b/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3307-@@ -15,7 +15,7 @@
3308- -include("../ibrowse/ibrowse.hrl").
3309-
3310- -export([db_exists/1, db_exists/2, full_url/1, request/1, redirected_request/2,
3311-- spawn_worker_process/1, spawn_link_worker_process/1]).
3312-+ redirect_url/2, spawn_worker_process/1, spawn_link_worker_process/1]).
3313-
3314- request(#http_db{} = Req) ->
3315- do_request(Req).
3316
3317=== removed file 'debian/patches/couchio-fix-0002-replicator_db_proxy_fix.patch'
3318--- debian/patches/couchio-fix-0002-replicator_db_proxy_fix.patch 2010-09-24 14:53:26 +0000
3319+++ debian/patches/couchio-fix-0002-replicator_db_proxy_fix.patch 1970-01-01 00:00:00 +0000
3320@@ -1,25 +0,0 @@
3321-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl b/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3322-index 1336575..2371228 100644
3323---- a/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3324-+++ b/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3325-@@ -73,6 +73,7 @@ db_exists(Req, CanonicalUrl, CreateDB) ->
3326- #http_db{
3327- auth = Auth,
3328- headers = Headers0,
3329-+ options = Options,
3330- url = Url
3331- } = Req,
3332- HeadersFun = fun(Method) ->
3333-@@ -85,10 +86,10 @@ db_exists(Req, CanonicalUrl, CreateDB) ->
3334- end,
3335- case CreateDB of
3336- true ->
3337-- catch ibrowse:send_req(Url, HeadersFun(put), put);
3338-+ catch ibrowse:send_req(Url, HeadersFun(put), put, [], Options);
3339- _Else -> ok
3340- end,
3341-- case catch ibrowse:send_req(Url, HeadersFun(head), head) of
3342-+ case catch ibrowse:send_req(Url, HeadersFun(head), head, [], Options) of
3343- {ok, "200", _, _} ->
3344- Req#http_db{url = CanonicalUrl};
3345- {ok, "301", RespHeaders, _} ->
3346
3347=== removed file 'debian/patches/couchio-fix-0003-changes_redirect_1.patch'
3348--- debian/patches/couchio-fix-0003-changes_redirect_1.patch 2010-09-24 14:53:26 +0000
3349+++ debian/patches/couchio-fix-0003-changes_redirect_1.patch 1970-01-01 00:00:00 +0000
3350@@ -1,13 +0,0 @@
3351-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl b/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3352-index 1682d37..65a67ba 100644
3353---- a/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3354-+++ b/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3355-@@ -95,7 +95,7 @@ init([_Parent, #http_db{}=Source, Since, PostProps] = Args) ->
3356- {ok, #state{conn=Pid, last_seq=Since, reqid=ReqId, init_args=Args}};
3357- {ibrowse_async_headers, ReqId, Code, Hdrs} when Code=="301"; Code=="302" ->
3358- catch ibrowse:stop_worker_process(Pid),
3359-- Url2 = mochiweb_headers:get_value("Location", mochiweb_headers:make(Hdrs)),
3360-+ Url2 = couch_rep_httpc:redirect_url(Hdrs, Req#http_db.url),
3361- %% TODO use couch_httpc:request instead of start_http_request
3362- {Pid2, ReqId2} = start_http_request(Url2),
3363- receive {ibrowse_async_headers, ReqId2, "200", _} ->
3364
3365=== removed file 'debian/patches/couchio-fix-0004-changes_redirect_2.patch'
3366--- debian/patches/couchio-fix-0004-changes_redirect_2.patch 2010-09-24 14:53:26 +0000
3367+++ debian/patches/couchio-fix-0004-changes_redirect_2.patch 1970-01-01 00:00:00 +0000
3368@@ -1,17 +0,0 @@
3369-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl b/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3370-index 65a67ba..2d55778 100644
3371---- a/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3372-+++ b/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3373-@@ -258,9 +258,10 @@ handle_next_changes(_From, State) ->
3374- handle_headers(200, _, State) ->
3375- maybe_stream_next(State),
3376- {noreply, State};
3377--handle_headers(301, Hdrs, State) ->
3378-+handle_headers(301, Hdrs, #state{init_args = InitArgs} = State) ->
3379- catch ibrowse:stop_worker_process(State#state.conn),
3380-- Url = mochiweb_headers:get_value("Location", mochiweb_headers:make(Hdrs)),
3381-+ [_, #http_db{url = Url1} | _] = InitArgs,
3382-+ Url = couch_rep_httpc:redirect_url(Hdrs, Url1),
3383- %% TODO use couch_httpc:request instead of start_http_request
3384- {Pid, ReqId} = start_http_request(Url),
3385- {noreply, State#state{conn=Pid, reqid=ReqId}};
3386
3387=== removed file 'debian/patches/couchio-fix-0005-changes_proxy.patch'
3388--- debian/patches/couchio-fix-0005-changes_proxy.patch 2010-09-24 14:53:26 +0000
3389+++ debian/patches/couchio-fix-0005-changes_proxy.patch 1970-01-01 00:00:00 +0000
3390@@ -1,77 +0,0 @@
3391-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl b/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3392-index 2d55778..958ee82 100644
3393---- a/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3394-+++ b/couchdb-1.0.1/src/couchdb/couch_rep_changes_feed.erl
3395-@@ -45,7 +45,7 @@ next(Server) ->
3396- stop(Server) ->
3397- gen_server:call(Server, stop).
3398-
3399--init([_Parent, #http_db{}=Source, Since, PostProps] = Args) ->
3400-+init([Parent, #http_db{}=Source, Since, PostProps]) ->
3401- process_flag(trap_exit, true),
3402- Feed = case couch_util:get_value(<<"continuous">>, PostProps, false) of
3403- false ->
3404-@@ -88,6 +88,7 @@ init([_Parent, #http_db{}=Source, Since, PostProps] = Args) ->
3405- headers = Source#http_db.headers -- [{"Accept-Encoding", "gzip"}]
3406- },
3407- {ibrowse_req_id, ReqId} = couch_rep_httpc:request(Req),
3408-+ Args = [Parent, Req, Since, PostProps],
3409-
3410- receive
3411- {ibrowse_async_headers, ReqId, "200", _} ->
3412-@@ -96,10 +97,13 @@ init([_Parent, #http_db{}=Source, Since, PostProps] = Args) ->
3413- {ibrowse_async_headers, ReqId, Code, Hdrs} when Code=="301"; Code=="302" ->
3414- catch ibrowse:stop_worker_process(Pid),
3415- Url2 = couch_rep_httpc:redirect_url(Hdrs, Req#http_db.url),
3416-- %% TODO use couch_httpc:request instead of start_http_request
3417-- {Pid2, ReqId2} = start_http_request(Url2),
3418-+ Req2 = couch_rep_httpc:redirected_request(Req, Url2),
3419-+ Pid2 = couch_rep_httpc:spawn_link_worker_process(Req2),
3420-+ Req3 = Req2#http_db{conn = Pid2},
3421-+ {ibrowse_req_id, ReqId2} = couch_rep_httpc:request(Req3),
3422-+ Args2 = [Parent, Req3, Since, PostProps],
3423- receive {ibrowse_async_headers, ReqId2, "200", _} ->
3424-- {ok, #state{conn=Pid2, last_seq=Since, reqid=ReqId2, init_args=Args}}
3425-+ {ok, #state{conn=Pid2, last_seq=Since, reqid=ReqId2, init_args=Args2}}
3426- after 30000 ->
3427- {stop, changes_timeout}
3428- end;
3429-@@ -258,13 +262,17 @@ handle_next_changes(_From, State) ->
3430- handle_headers(200, _, State) ->
3431- maybe_stream_next(State),
3432- {noreply, State};
3433--handle_headers(301, Hdrs, #state{init_args = InitArgs} = State) ->
3434-+handle_headers(Code, Hdrs, #state{init_args = InitArgs} = State)
3435-+ when Code =:= 301 ; Code =:= 302 ->
3436- catch ibrowse:stop_worker_process(State#state.conn),
3437-- [_, #http_db{url = Url1} | _] = InitArgs,
3438-+ [Parent, #http_db{url = Url1} = Source, Since, PostProps] = InitArgs,
3439- Url = couch_rep_httpc:redirect_url(Hdrs, Url1),
3440-- %% TODO use couch_httpc:request instead of start_http_request
3441-- {Pid, ReqId} = start_http_request(Url),
3442-- {noreply, State#state{conn=Pid, reqid=ReqId}};
3443-+ Source2 = couch_rep_httpc:redirected_request(Source, Url),
3444-+ Pid2 = couch_rep_httpc:spawn_link_worker_process(Source2),
3445-+ Source3 = Source2#http_db{conn = Pid2},
3446-+ {ibrowse_req_id, ReqId} = couch_rep_httpc:request(Source3),
3447-+ InitArgs2 = [Parent, Source3, Since, PostProps],
3448-+ {noreply, State#state{conn=Pid2, reqid=ReqId, init_args=InitArgs2}};
3449- handle_headers(Code, Hdrs, State) ->
3450- ?LOG_ERROR("replicator changes feed failed with code ~s and Headers ~n~p",
3451- [Code,Hdrs]),
3452-@@ -374,15 +382,3 @@ maybe_stream_next(#state{complete=false, count=N} = S) when N < ?BUFFER_SIZE ->
3453- ibrowse:stream_next(S#state.reqid);
3454- maybe_stream_next(_) ->
3455- timer:cancel(get(timeout)).
3456--
3457--start_http_request(RawUrl) ->
3458-- Url = ibrowse_lib:parse_url(RawUrl),
3459-- {ok, Pid} = ibrowse:spawn_link_worker_process(Url#url.host, Url#url.port),
3460-- Opts = [
3461-- {stream_to, {self(), once}},
3462-- {inactivity_timeout, 31000},
3463-- {response_format, binary}
3464-- ],
3465-- {ibrowse_req_id, Id} =
3466-- ibrowse:send_req_direct(Pid, RawUrl, [], get, [], Opts, infinity),
3467-- {Pid, Id}.
3468
3469=== removed file 'debian/patches/couchio-fix-0006-replicator_reader_errors.patch'
3470--- debian/patches/couchio-fix-0006-replicator_reader_errors.patch 2010-09-24 14:53:26 +0000
3471+++ debian/patches/couchio-fix-0006-replicator_reader_errors.patch 1970-01-01 00:00:00 +0000
3472@@ -1,126 +0,0 @@
3473-diff --git a/couchdb-1.0.1/src/couchdb/couch_httpd_misc_handlers.erl b/couchdb-1.0.1/src/couchdb/couch_httpd_misc_handlers.erl
3474-index 0a6f4a4..13d770f 100644
3475---- a/couchdb-1.0.1/src/couchdb/couch_httpd_misc_handlers.erl
3476-+++ b/couchdb-1.0.1/src/couchdb/couch_httpd_misc_handlers.erl
3477-@@ -93,7 +93,12 @@ handle_replicate_req(#httpd{method='POST'}=Req) ->
3478- {error, not_found} ->
3479- send_json(Req, 404, {[{error, not_found}]});
3480- {error, Reason} ->
3481-- send_json(Req, 500, {[{error, Reason}]})
3482-+ try
3483-+ send_json(Req, 500, {[{error, Reason}]})
3484-+ catch
3485-+ exit:{json_encode, _} ->
3486-+ send_json(Req, 500, {[{error, couch_util:to_binary(Reason)}]})
3487-+ end
3488- catch
3489- throw:{db_not_found, Msg} ->
3490- send_json(Req, 404, {[{error, db_not_found}, {reason, Msg}]})
3491-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep.erl b/couchdb-1.0.1/src/couchdb/couch_rep.erl
3492-index ae42e0e..404b1fd 100644
3493---- a/couchdb-1.0.1/src/couchdb/couch_rep.erl
3494-+++ b/couchdb-1.0.1/src/couchdb/couch_rep.erl
3495-@@ -354,16 +354,10 @@ close_db(Db) ->
3496- couch_db:close(Db).
3497-
3498- dbname(#http_db{url = Url}) ->
3499-- strip_password(Url);
3500-+ couch_util:url_strip_password(Url);
3501- dbname(#db{name = Name}) ->
3502- Name.
3503-
3504--strip_password(Url) ->
3505-- re:replace(Url,
3506-- "http(s)?://([^:]+):[^@]+@(.*)$",
3507-- "http\\1://\\2:*****@\\3",
3508-- [{return, list}]).
3509--
3510- dbinfo(#http_db{} = Db) ->
3511- {DbProps} = couch_rep_httpc:request(Db),
3512- [{list_to_existing_atom(?b2l(K)), V} || {K,V} <- DbProps];
3513-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep_reader.erl b/couchdb-1.0.1/src/couchdb/couch_rep_reader.erl
3514-index 3edc1f3..5c824cb 100644
3515---- a/couchdb-1.0.1/src/couchdb/couch_rep_reader.erl
3516-+++ b/couchdb-1.0.1/src/couchdb/couch_rep_reader.erl
3517-@@ -230,7 +230,7 @@ update_sequence_lists(Seq, State) ->
3518- opened_seqs = Opened
3519- }.
3520-
3521--open_doc_revs(#http_db{} = DbS, DocId, Revs) ->
3522-+open_doc_revs(#http_db{url = Url} = DbS, DocId, Revs) ->
3523- %% all this logic just splits up revision lists that are too long for
3524- %% MochiWeb into multiple requests
3525- BaseQS = [{revs,true}, {latest,true}, {att_encoding_info,true}],
3526-@@ -246,28 +246,39 @@ open_doc_revs(#http_db{} = DbS, DocId, Revs) ->
3527- JsonResults = lists:flatten([couch_rep_httpc:request(R) || R <- Requests]),
3528-
3529- Transform =
3530-- fun({[{<<"missing">>, Rev}]}) ->
3531-- {{not_found, missing}, couch_doc:parse_rev(Rev)};
3532-- ({[{<<"ok">>, Json}]}) ->
3533-+ fun({[{<<"ok">>, Json}]}, Acc) ->
3534- #doc{id=Id, revs=Rev, atts=Atts} = Doc = couch_doc:from_json_obj(Json),
3535-- Doc#doc{atts=[couch_rep_att:convert_stub(A, {DbS,Id,Rev}) || A <- Atts]}
3536-+ Doc1 = Doc#doc{
3537-+ atts=[couch_rep_att:convert_stub(A, {DbS,Id,Rev}) || A <- Atts]
3538-+ },
3539-+ [Doc1 | Acc];
3540-+ ({ErrorProps}, Acc) ->
3541-+ Err = couch_util:get_value(<<"error">>, ErrorProps,
3542-+ ?JSON_ENCODE({ErrorProps})),
3543-+ ?LOG_ERROR("Replicator: error accessing doc ~s at ~s, reason: ~s",
3544-+ [DocId, couch_util:url_strip_password(Url), Err]),
3545-+ Acc
3546- end,
3547-- [Transform(Result) || Result <- JsonResults].
3548-+ lists:reverse(lists:foldl(Transform, [], JsonResults)).
3549-
3550--open_doc(#http_db{} = DbS, DocId) ->
3551-+open_doc(#http_db{url = Url} = DbS, DocId) ->
3552- % get latest rev of the doc
3553- Req = DbS#http_db{
3554- resource=url_encode(DocId),
3555- qs=[{att_encoding_info, true}]
3556- },
3557-- case couch_rep_httpc:request(Req) of
3558-- {[{<<"error">>,<<"not_found">>}, {<<"reason">>,<<"missing">>}]} ->
3559-- [];
3560-- Json ->
3561-+ {Props} = Json = couch_rep_httpc:request(Req),
3562-+ case couch_util:get_value(<<"_id">>, Props) of
3563-+ Id when is_binary(Id) ->
3564- #doc{id=Id, revs=Rev, atts=Atts} = Doc = couch_doc:from_json_obj(Json),
3565- [Doc#doc{
3566- atts=[couch_rep_att:convert_stub(A, {DbS,Id,Rev}) || A <- Atts]
3567-- }]
3568-+ }];
3569-+ undefined ->
3570-+ Err = couch_util:get_value(<<"error">>, Props, ?JSON_ENCODE(Json)),
3571-+ ?LOG_ERROR("Replicator: error accessing doc ~s at ~s, reason: ~s",
3572-+ [DocId, couch_util:url_strip_password(Url), Err]),
3573-+ []
3574- end.
3575-
3576- reader_loop(ReaderServer, Source, DocIds) when is_list(DocIds) ->
3577-diff --git a/couchdb-1.0.1/src/couchdb/couch_util.erl b/couchdb-1.0.1/src/couchdb/couch_util.erl
3578-index 8217a26..7a8ae05 100644
3579---- a/couchdb-1.0.1/src/couchdb/couch_util.erl
3580-+++ b/couchdb-1.0.1/src/couchdb/couch_util.erl
3581-@@ -27,6 +27,7 @@
3582- -export([get_value/2, get_value/3]).
3583- -export([md5/1, md5_init/0, md5_update/2, md5_final/1]).
3584- -export([reorder_results/2]).
3585-+-export([url_strip_password/1]).
3586-
3587- -include("couch_db.hrl").
3588- -include_lib("kernel/include/file.hrl").
3589-@@ -452,3 +453,9 @@ reorder_results(Keys, SortedResults) when length(Keys) < 100 ->
3590- reorder_results(Keys, SortedResults) ->
3591- KeyDict = dict:from_list(SortedResults),
3592- [dict:fetch(Key, KeyDict) || Key <- Keys].
3593-+
3594-+url_strip_password(Url) ->
3595-+ re:replace(Url,
3596-+ "http(s)?://([^:]+):[^@]+@(.*)$",
3597-+ "http\\1://\\2:*****@\\3",
3598-+ [{return, list}]).
3599
3600=== removed file 'debian/patches/couchio-fix-0007-ibrowse_upgrade.patch'
3601--- debian/patches/couchio-fix-0007-ibrowse_upgrade.patch 2010-09-24 14:53:26 +0000
3602+++ debian/patches/couchio-fix-0007-ibrowse_upgrade.patch 1970-01-01 00:00:00 +0000
3603@@ -1,3481 +0,0 @@
3604-diff --git a/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl b/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3605-index 2371228..74aa52a 100644
3606---- a/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3607-+++ b/couchdb-1.0.1/src/couchdb/couch_rep_httpc.erl
3608-@@ -205,8 +205,7 @@ spawn_worker_process(Req) ->
3609- Pid.
3610-
3611- spawn_link_worker_process(Req) ->
3612-- Url = ibrowse_lib:parse_url(Req#http_db.url),
3613-- {ok, Pid} = ibrowse_http_client:start_link(Url),
3614-+ {ok, Pid} = ibrowse:spawn_link_worker_process(Req#http_db.url),
3615- Pid.
3616-
3617- maybe_decompress(Headers, Body) ->
3618-diff --git a/couchdb-1.0.1/src/ibrowse/ibrowse.app.in b/couchdb-1.0.1/src/ibrowse/ibrowse.app.in
3619-index 4f43dd9..208c311 100644
3620---- a/couchdb-1.0.1/src/ibrowse/ibrowse.app.in
3621-+++ b/couchdb-1.0.1/src/ibrowse/ibrowse.app.in
3622-@@ -1,10 +1,10 @@
3623- {application, ibrowse,
3624- [{description, "HTTP client application"},
3625-- {vsn, "1.5.1"},
3626-- {modules, [ ibrowse,
3627-- ibrowse_http_client,
3628-- ibrowse_app,
3629-- ibrowse_sup,
3630-+ {vsn, "1.6.2"},
3631-+ {modules, [ ibrowse,
3632-+ ibrowse_http_client,
3633-+ ibrowse_app,
3634-+ ibrowse_sup,
3635- ibrowse_lib,
3636- ibrowse_lb ]},
3637- {registered, []},
3638-diff --git a/couchdb-1.0.1/src/ibrowse/ibrowse.erl b/couchdb-1.0.1/src/ibrowse/ibrowse.erl
3639-index 1913ef5..09d36a3 100644
3640---- a/couchdb-1.0.1/src/ibrowse/ibrowse.erl
3641-+++ b/couchdb-1.0.1/src/ibrowse/ibrowse.erl
3642-@@ -6,8 +6,8 @@
3643- %%% Created : 11 Oct 2003 by Chandrashekhar Mullaparthi <chandrashekhar.mullaparthi@t-mobile.co.uk>
3644- %%%-------------------------------------------------------------------
3645- %% @author Chandrashekhar Mullaparthi <chandrashekhar dot mullaparthi at gmail dot com>
3646--%% @copyright 2005-2009 Chandrashekhar Mullaparthi
3647--%% @version 1.5.2
3648-+%% @copyright 2005-2010 Chandrashekhar Mullaparthi
3649-+%% @version 1.6.0
3650- %% @doc The ibrowse application implements an HTTP 1.1 client. This
3651- %% module implements the API of the HTTP client. There is one named
3652- %% process called 'ibrowse' which assists in load balancing and maintaining configuration. There is one load balancing process per unique webserver. There is
3653-@@ -21,22 +21,22 @@
3654- %% <p>Here are a few sample invocations.</p>
3655- %%
3656- %% <code>
3657--%% ibrowse:send_req("http://intranet/messenger/", [], get).
3658-+%% ibrowse:send_req("http://intranet/messenger/", [], get).
3659- %% <br/><br/>
3660--%%
3661--%% ibrowse:send_req("http://www.google.com/", [], get, [],
3662--%% [{proxy_user, "XXXXX"},
3663--%% {proxy_password, "XXXXX"},
3664--%% {proxy_host, "proxy"},
3665--%% {proxy_port, 8080}], 1000).
3666-+%%
3667-+%% ibrowse:send_req("http://www.google.com/", [], get, [],
3668-+%% [{proxy_user, "XXXXX"},
3669-+%% {proxy_password, "XXXXX"},
3670-+%% {proxy_host, "proxy"},
3671-+%% {proxy_port, 8080}], 1000).
3672- %% <br/><br/>
3673- %%
3674- %%ibrowse:send_req("http://www.erlang.org/download/otp_src_R10B-3.tar.gz", [], get, [],
3675--%% [{proxy_user, "XXXXX"},
3676--%% {proxy_password, "XXXXX"},
3677--%% {proxy_host, "proxy"},
3678--%% {proxy_port, 8080},
3679--%% {save_response_to_file, true}], 1000).
3680-+%% [{proxy_user, "XXXXX"},
3681-+%% {proxy_password, "XXXXX"},
3682-+%% {proxy_host, "proxy"},
3683-+%% {proxy_port, 8080},
3684-+%% {save_response_to_file, true}], 1000).
3685- %% <br/><br/>
3686- %%
3687- %% ibrowse:send_req("http://www.erlang.org", [], head).
3688-@@ -48,17 +48,12 @@
3689- %% ibrowse:send_req("http://www.bbc.co.uk", [], trace).
3690- %%
3691- %% <br/><br/>
3692--%% ibrowse:send_req("http://www.google.com", [], get, [],
3693-+%% ibrowse:send_req("http://www.google.com", [], get, [],
3694- %% [{stream_to, self()}]).
3695- %% </code>
3696- %%
3697--%% <p>A driver exists which implements URL encoding in C, but the
3698--%% speed achieved using only erlang has been good enough, so the
3699--%% driver isn't actually used.</p>
3700-
3701- -module(ibrowse).
3702---vsn('$Id: ibrowse.erl,v 1.8 2009/07/01 22:43:19 chandrusf Exp $ ').
3703--
3704- -behaviour(gen_server).
3705- %%--------------------------------------------------------------------
3706- %% Include files
3707-@@ -70,48 +65,50 @@
3708-
3709- %% gen_server callbacks
3710- -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
3711-- terminate/2, code_change/3]).
3712-+ terminate/2, code_change/3]).
3713-
3714- %% API interface
3715- -export([
3716-- rescan_config/0,
3717-- rescan_config/1,
3718-- get_config_value/1,
3719-- get_config_value/2,
3720-- spawn_worker_process/2,
3721-- spawn_link_worker_process/2,
3722-- stop_worker_process/1,
3723-- send_req/3,
3724-- send_req/4,
3725-- send_req/5,
3726-- send_req/6,
3727-- send_req_direct/4,
3728-- send_req_direct/5,
3729-- send_req_direct/6,
3730-- send_req_direct/7,
3731-- stream_next/1,
3732-- set_max_sessions/3,
3733-- set_max_pipeline_size/3,
3734-- set_dest/3,
3735-- trace_on/0,
3736-- trace_off/0,
3737-- trace_on/2,
3738-- trace_off/2,
3739-- all_trace_off/0,
3740-- show_dest_status/0,
3741-- show_dest_status/2
3742-- ]).
3743-+ rescan_config/0,
3744-+ rescan_config/1,
3745-+ get_config_value/1,
3746-+ get_config_value/2,
3747-+ spawn_worker_process/1,
3748-+ spawn_worker_process/2,
3749-+ spawn_link_worker_process/1,
3750-+ spawn_link_worker_process/2,
3751-+ stop_worker_process/1,
3752-+ send_req/3,
3753-+ send_req/4,
3754-+ send_req/5,
3755-+ send_req/6,
3756-+ send_req_direct/4,
3757-+ send_req_direct/5,
3758-+ send_req_direct/6,
3759-+ send_req_direct/7,
3760-+ stream_next/1,
3761-+ set_max_sessions/3,
3762-+ set_max_pipeline_size/3,
3763-+ set_dest/3,
3764-+ trace_on/0,
3765-+ trace_off/0,
3766-+ trace_on/2,
3767-+ trace_off/2,
3768-+ all_trace_off/0,
3769-+ show_dest_status/0,
3770-+ show_dest_status/2
3771-+ ]).
3772-
3773- -ifdef(debug).
3774- -compile(export_all).
3775- -endif.
3776-
3777- -import(ibrowse_lib, [
3778-- parse_url/1,
3779-- get_value/3,
3780-- do_trace/2
3781-- ]).
3782--
3783-+ parse_url/1,
3784-+ get_value/3,
3785-+ do_trace/2
3786-+ ]).
3787-+
3788- -record(state, {trace = false}).
3789-
3790- -include("ibrowse.hrl").
3791-@@ -159,7 +156,7 @@ stop() ->
3792- send_req(Url, Headers, Method) ->
3793- send_req(Url, Headers, Method, [], []).
3794-
3795--%% @doc Same as send_req/3.
3796-+%% @doc Same as send_req/3.
3797- %% If a list is specified for the body it has to be a flat list. The body can also be a fun/0 or a fun/1. <br/>
3798- %% If fun/0, the connection handling process will repeatdely call the fun until it returns an error or eof. <pre>Fun() = {ok, Data} | eof</pre><br/>
3799- %% If fun/1, the connection handling process will repeatedly call the fun with the supplied state until it returns an error or eof. <pre>Fun(State) = {ok, Data} | {ok, Data, NewState} | eof</pre>
3800-@@ -169,19 +166,19 @@ send_req(Url, Headers, Method) ->
3801- send_req(Url, Headers, Method, Body) ->
3802- send_req(Url, Headers, Method, Body, []).
3803-
3804--%% @doc Same as send_req/4.
3805-+%% @doc Same as send_req/4.
3806- %% For a description of SSL Options, look in the <a href="http://www.erlang.org/doc/apps/ssl/index.html">ssl</a> manpage. If the
3807- %% HTTP Version to use is not specified, the default is 1.1.
3808- %% <br/>
3809--%% <p>The <code>host_header</code> option is useful in the case where ibrowse is
3810-+%% <ul>
3811-+%% <li>The <code>host_header</code> option is useful in the case where ibrowse is
3812- %% connecting to a component such as <a
3813- %% href="http://www.stunnel.org">stunnel</a> which then sets up a
3814- %% secure connection to a webserver. In this case, the URL supplied to
3815- %% ibrowse must have the stunnel host/port details, but that won't
3816- %% make sense to the destination webserver. This option can then be
3817- %% used to specify what should go in the <code>Host</code> header in
3818--%% the request.</p>
3819--%% <ul>
3820-+%% the request.</li>
3821- %% <li>The <code>stream_to</code> option can be used to have the HTTP
3822- %% response streamed to a process as messages as data arrives on the
3823- %% socket. If the calling process wishes to control the rate at which
3824-@@ -220,12 +217,25 @@ send_req(Url, Headers, Method, Body) ->
3825- %% ibrowse:send_req("http://www.example.com/cgi-bin/request", [], get, [], [{connect_timeout, 100}], 1000).
3826- %% </code>
3827- %% In the above invocation, if the connection isn't established within
3828--%% 100 milliseconds, the request will fail with
3829-+%% 100 milliseconds, the request will fail with
3830- %% <code>{error, conn_failed}</code>.<br/>
3831- %% If connection setup succeeds, the total time allowed for the
3832- %% request to complete will be 1000 milliseconds minus the time taken
3833- %% for connection setup.
3834- %% </li>
3835-+%%
3836-+%% <li> The <code>socket_options</code> option can be used to set
3837-+%% specific options on the socket. The <code>{active, true | false | once}</code>
3838-+%% and <code>{packet_type, Packet_type}</code> will be filtered out by ibrowse. </li>
3839-+%%
3840-+%% <li> The <code>headers_as_is</code> option is to enable the caller
3841-+%% to send headers exactly as specified in the request without ibrowse
3842-+%% adding some of its own. Required for some picky servers apparently. </li>
3843-+%%
3844-+%% <li>The <code>give_raw_headers</code> option is to enable the
3845-+%% caller to get access to the raw status line and raw unparsed
3846-+%% headers. Not quite sure why someone would want this, but one of my
3847-+%% users asked for it, so here it is. </li>
3848- %% </ul>
3849- %%
3850- %% @spec send_req(Url::string(), Headers::headerList(), Method::method(), Body::body(), Options::optionList()) -> response()
3851-@@ -234,7 +244,7 @@ send_req(Url, Headers, Method, Body) ->
3852- %% {response_format,response_format()}|
3853- %% {stream_chunk_size, integer()} |
3854- %% {max_pipeline_size, integer()} |
3855--%% {trace, boolean()} |
3856-+%% {trace, boolean()} |
3857- %% {is_ssl, boolean()} |
3858- %% {ssl_options, [SSLOpt]} |
3859- %% {pool_name, atom()} |
3860-@@ -253,13 +263,18 @@ send_req(Url, Headers, Method, Body) ->
3861- %% {host_header, string()} |
3862- %% {inactivity_timeout, integer()} |
3863- %% {connect_timeout, integer()} |
3864--%% {transfer_encoding, {chunked, ChunkSize}}
3865-+%% {socket_options, Sock_opts} |
3866-+%% {transfer_encoding, {chunked, ChunkSize}} |
3867-+%% {headers_as_is, boolean()} |
3868-+%% {give_raw_headers, boolean()}
3869- %%
3870- %% stream_to() = process() | {process(), once}
3871- %% process() = pid() | atom()
3872- %% username() = string()
3873- %% password() = string()
3874- %% SSLOpt = term()
3875-+%% Sock_opts = [Sock_opt]
3876-+%% Sock_opt = term()
3877- %% ChunkSize = integer()
3878- %% srtf() = boolean() | filename()
3879- %% filename() = string()
3880-@@ -267,54 +282,54 @@ send_req(Url, Headers, Method, Body) ->
3881- send_req(Url, Headers, Method, Body, Options) ->
3882- send_req(Url, Headers, Method, Body, Options, 30000).
3883-
3884--%% @doc Same as send_req/5.
3885-+%% @doc Same as send_req/5.
3886- %% All timeout values are in milliseconds.
3887- %% @spec send_req(Url, Headers::headerList(), Method::method(), Body::body(), Options::optionList(), Timeout) -> response()
3888- %% Timeout = integer() | infinity
3889- send_req(Url, Headers, Method, Body, Options, Timeout) ->
3890- case catch parse_url(Url) of
3891-- #url{host = Host,
3892-- port = Port,
3893-- protocol = Protocol} = Parsed_url ->
3894-- Lb_pid = case ets:lookup(ibrowse_lb, {Host, Port}) of
3895-- [] ->
3896-- get_lb_pid(Parsed_url);
3897-- [#lb_pid{pid = Lb_pid_1}] ->
3898-- Lb_pid_1
3899-- end,
3900-- Max_sessions = get_max_sessions(Host, Port, Options),
3901-- Max_pipeline_size = get_max_pipeline_size(Host, Port, Options),
3902-- Options_1 = merge_options(Host, Port, Options),
3903-- {SSLOptions, IsSSL} =
3904-- case (Protocol == https) orelse
3905-- get_value(is_ssl, Options_1, false) of
3906-- false -> {[], false};
3907-- true -> {get_value(ssl_options, Options_1, []), true}
3908-- end,
3909-- case ibrowse_lb:spawn_connection(Lb_pid, Parsed_url,
3910-- Max_sessions,
3911-- Max_pipeline_size,
3912-- {SSLOptions, IsSSL}) of
3913-- {ok, Conn_Pid} ->
3914-- do_send_req(Conn_Pid, Parsed_url, Headers,
3915-- Method, Body, Options_1, Timeout);
3916-- Err ->
3917-- Err
3918-- end;
3919-- Err ->
3920-- {error, {url_parsing_failed, Err}}
3921-+ #url{host = Host,
3922-+ port = Port,
3923-+ protocol = Protocol} = Parsed_url ->
3924-+ Lb_pid = case ets:lookup(ibrowse_lb, {Host, Port}) of
3925-+ [] ->
3926-+ get_lb_pid(Parsed_url);
3927-+ [#lb_pid{pid = Lb_pid_1}] ->
3928-+ Lb_pid_1
3929-+ end,
3930-+ Max_sessions = get_max_sessions(Host, Port, Options),
3931-+ Max_pipeline_size = get_max_pipeline_size(Host, Port, Options),
3932-+ Options_1 = merge_options(Host, Port, Options),
3933-+ {SSLOptions, IsSSL} =
3934-+ case (Protocol == https) orelse
3935-+ get_value(is_ssl, Options_1, false) of
3936-+ false -> {[], false};
3937-+ true -> {get_value(ssl_options, Options_1, []), true}
3938-+ end,
3939-+ case ibrowse_lb:spawn_connection(Lb_pid, Parsed_url,
3940-+ Max_sessions,
3941-+ Max_pipeline_size,
3942-+ {SSLOptions, IsSSL}) of
3943-+ {ok, Conn_Pid} ->
3944-+ do_send_req(Conn_Pid, Parsed_url, Headers,
3945-+ Method, Body, Options_1, Timeout);
3946-+ Err ->
3947-+ Err
3948-+ end;
3949-+ Err ->
3950-+ {error, {url_parsing_failed, Err}}
3951- end.
3952-
3953- merge_options(Host, Port, Options) ->
3954- Config_options = get_config_value({options, Host, Port}, []),
3955- lists:foldl(
3956- fun({Key, Val}, Acc) ->
3957-- case lists:keysearch(Key, 1, Options) of
3958-- false ->
3959-- [{Key, Val} | Acc];
3960-- _ ->
3961-- Acc
3962-- end
3963-+ case lists:keysearch(Key, 1, Options) of
3964-+ false ->
3965-+ [{Key, Val} | Acc];
3966-+ _ ->
3967-+ Acc
3968-+ end
3969- end, Options, Config_options).
3970-
3971- get_lb_pid(Url) ->
3972-@@ -322,11 +337,11 @@ get_lb_pid(Url) ->
3973-
3974- get_max_sessions(Host, Port, Options) ->
3975- get_value(max_sessions, Options,
3976-- get_config_value({max_sessions, Host, Port}, ?DEF_MAX_SESSIONS)).
3977-+ get_config_value({max_sessions, Host, Port}, ?DEF_MAX_SESSIONS)).
3978-
3979- get_max_pipeline_size(Host, Port, Options) ->
3980- get_value(max_pipeline_size, Options,
3981-- get_config_value({max_pipeline_size, Host, Port}, ?DEF_MAX_PIPELINE_SIZE)).
3982-+ get_config_value({max_pipeline_size, Host, Port}, ?DEF_MAX_PIPELINE_SIZE)).
3983-
3984- %% @doc Deprecated. Use set_max_sessions/3 and set_max_pipeline_size/3
3985- %% for achieving the same effect.
3986-@@ -343,7 +358,7 @@ set_dest(_Host, _Port, [H | _]) ->
3987- exit({invalid_option, H});
3988- set_dest(_, _, []) ->
3989- ok.
3990--
3991-+
3992- %% @doc Set the maximum number of connections allowed to a specific Host:Port.
3993- %% @spec set_max_sessions(Host::string(), Port::integer(), Max::integer()) -> ok
3994- set_max_sessions(Host, Port, Max) when is_integer(Max), Max > 0 ->
3995-@@ -356,21 +371,21 @@ set_max_pipeline_size(Host, Port, Max) when is_integer(Max), Max > 0 ->
3996-
3997- do_send_req(Conn_Pid, Parsed_url, Headers, Method, Body, Options, Timeout) ->
3998- case catch ibrowse_http_client:send_req(Conn_Pid, Parsed_url,
3999-- Headers, Method, ensure_bin(Body),
4000-- Options, Timeout) of
4001-- {'EXIT', {timeout, _}} ->
4002-- {error, req_timedout};
4003-- {'EXIT', Reason} ->
4004-- {error, {'EXIT', Reason}};
4005-- {ok, St_code, Headers, Body} = Ret when is_binary(Body) ->
4006-- case get_value(response_format, Options, list) of
4007-- list ->
4008-- {ok, St_code, Headers, binary_to_list(Body)};
4009-- binary ->
4010-- Ret
4011-- end;
4012-- Ret ->
4013-- Ret
4014-+ Headers, Method, ensure_bin(Body),
4015-+ Options, Timeout) of
4016-+ {'EXIT', {timeout, _}} ->
4017-+ {error, req_timedout};
4018-+ {'EXIT', Reason} ->
4019-+ {error, {'EXIT', Reason}};
4020-+ {ok, St_code, Headers, Body} = Ret when is_binary(Body) ->
4021-+ case get_value(response_format, Options, list) of
4022-+ list ->
4023-+ {ok, St_code, Headers, binary_to_list(Body)};
4024-+ binary ->
4025-+ Ret
4026-+ end;
4027-+ Ret ->
4028-+ Ret
4029- end.
4030-
4031- ensure_bin(L) when is_list(L) -> list_to_binary(L);
4032-@@ -391,12 +406,21 @@ ensure_bin({Fun, _} = Body) when is_function(Fun) -> Body.
4033- %% <b>Note:</b> It is the responsibility of the calling process to control
4034- %% pipeline size on such connections.
4035- %%
4036-+%% @spec spawn_worker_process(Url::string()) -> {ok, pid()}
4037-+spawn_worker_process(Url) ->
4038-+ ibrowse_http_client:start(Url).
4039-+
4040- %% @spec spawn_worker_process(Host::string(), Port::integer()) -> {ok, pid()}
4041- spawn_worker_process(Host, Port) ->
4042- ibrowse_http_client:start({Host, Port}).
4043-
4044--%% @doc Same as spawn_worker_process/2 except the the calling process
4045-+%% @doc Same as spawn_worker_process/1 except the the calling process
4046- %% is linked to the worker process which is spawned.
4047-+%% @spec spawn_link_worker_process(Url::string()) -> {ok, pid()}
4048-+spawn_link_worker_process(Url) ->
4049-+ ibrowse_http_client:start_link(Url).
4050-+
4051-+%% @spec spawn_link_worker_process(Host::string(), Port::integer()) -> {ok, pid()}
4052- spawn_link_worker_process(Host, Port) ->
4053- ibrowse_http_client:start_link({Host, Port}).
4054-
4055-@@ -426,30 +450,30 @@ send_req_direct(Conn_pid, Url, Headers, Method, Body, Options) ->
4056- %% returned by spawn_worker_process/2 or spawn_link_worker_process/2
4057- send_req_direct(Conn_pid, Url, Headers, Method, Body, Options, Timeout) ->
4058- case catch parse_url(Url) of
4059-- #url{host = Host,
4060-- port = Port} = Parsed_url ->
4061-- Options_1 = merge_options(Host, Port, Options),
4062-- case do_send_req(Conn_pid, Parsed_url, Headers, Method, Body, Options_1, Timeout) of
4063-- {error, {'EXIT', {noproc, _}}} ->
4064-- {error, worker_is_dead};
4065-- Ret ->
4066-- Ret
4067-- end;
4068-- Err ->
4069-- {error, {url_parsing_failed, Err}}
4070-+ #url{host = Host,
4071-+ port = Port} = Parsed_url ->
4072-+ Options_1 = merge_options(Host, Port, Options),
4073-+ case do_send_req(Conn_pid, Parsed_url, Headers, Method, Body, Options_1, Timeout) of
4074-+ {error, {'EXIT', {noproc, _}}} ->
4075-+ {error, worker_is_dead};
4076-+ Ret ->
4077-+ Ret
4078-+ end;
4079-+ Err ->
4080-+ {error, {url_parsing_failed, Err}}
4081- end.
4082-
4083- %% @doc Tell ibrowse to stream the next chunk of data to the
4084- %% caller. Should be used in conjunction with the
4085- %% <code>stream_to</code> option
4086- %% @spec stream_next(Req_id :: req_id()) -> ok | {error, unknown_req_id}
4087--stream_next(Req_id) ->
4088-+stream_next(Req_id) ->
4089- case ets:lookup(ibrowse_stream, {req_id_pid, Req_id}) of
4090-- [] ->
4091-- {error, unknown_req_id};
4092-- [{_, Pid}] ->
4093-- catch Pid ! {stream_next, Req_id},
4094-- ok
4095-+ [] ->
4096-+ {error, unknown_req_id};
4097-+ [{_, Pid}] ->
4098-+ catch Pid ! {stream_next, Req_id},
4099-+ ok
4100- end.
4101-
4102- %% @doc Turn tracing on for the ibrowse process
4103-@@ -462,7 +486,7 @@ trace_off() ->
4104- %% @doc Turn tracing on for all connections to the specified HTTP
4105- %% server. Host is whatever is specified as the domain name in the URL
4106- %% @spec trace_on(Host, Port) -> ok
4107--%% Host = string()
4108-+%% Host = string()
4109- %% Port = integer()
4110- trace_on(Host, Port) ->
4111- ibrowse ! {trace, true, Host, Port},
4112-@@ -483,75 +507,75 @@ all_trace_off() ->
4113-
4114- show_dest_status() ->
4115- Dests = lists:filter(fun({lb_pid, {Host, Port}, _}) when is_list(Host),
4116-- is_integer(Port) ->
4117-- true;
4118-- (_) ->
4119-- false
4120-- end, ets:tab2list(ibrowse_lb)),
4121-+ is_integer(Port) ->
4122-+ true;
4123-+ (_) ->
4124-+ false
4125-+ end, ets:tab2list(ibrowse_lb)),
4126- All_ets = ets:all(),
4127- io:format("~-40.40s | ~-5.5s | ~-10.10s | ~s~n",
4128-- ["Server:port", "ETS", "Num conns", "LB Pid"]),
4129-+ ["Server:port", "ETS", "Num conns", "LB Pid"]),
4130- io:format("~80.80.=s~n", [""]),
4131- lists:foreach(fun({lb_pid, {Host, Port}, Lb_pid}) ->
4132-- case lists:dropwhile(
4133-- fun(Tid) ->
4134-- ets:info(Tid, owner) /= Lb_pid
4135-- end, All_ets) of
4136-- [] ->
4137-- io:format("~40.40s | ~-5.5s | ~-5.5s | ~s~n",
4138-- [Host ++ ":" ++ integer_to_list(Port),
4139-- "",
4140-- "",
4141-- io_lib:format("~p", [Lb_pid])]
4142-- );
4143-- [Tid | _] ->
4144-- catch (
4145-- begin
4146-- Size = ets:info(Tid, size),
4147-- io:format("~40.40s | ~-5.5s | ~-5.5s | ~s~n",
4148-- [Host ++ ":" ++ integer_to_list(Port),
4149-- integer_to_list(Tid),
4150-- integer_to_list(Size),
4151-- io_lib:format("~p", [Lb_pid])]
4152-- )
4153-- end
4154-- )
4155-- end
4156-- end, Dests).
4157--
4158-+ case lists:dropwhile(
4159-+ fun(Tid) ->
4160-+ ets:info(Tid, owner) /= Lb_pid
4161-+ end, All_ets) of
4162-+ [] ->
4163-+ io:format("~40.40s | ~-5.5s | ~-5.5s | ~s~n",
4164-+ [Host ++ ":" ++ integer_to_list(Port),
4165-+ "",
4166-+ "",
4167-+ io_lib:format("~p", [Lb_pid])]
4168-+ );
4169-+ [Tid | _] ->
4170-+ catch (
4171-+ begin
4172-+ Size = ets:info(Tid, size),
4173-+ io:format("~40.40s | ~-5.5s | ~-5.5s | ~s~n",
4174-+ [Host ++ ":" ++ integer_to_list(Port),
4175-+ io_lib:format("~p", [Tid]),
4176-+ integer_to_list(Size),
4177-+ io_lib:format("~p", [Lb_pid])]
4178-+ )
4179-+ end
4180-+ )
4181-+ end
4182-+ end, Dests).
4183-+
4184- %% @doc Shows some internal information about load balancing to a
4185- %% specified Host:Port. Info about workers spawned using
4186- %% spawn_worker_process/2 or spawn_link_worker_process/2 is not
4187- %% included.
4188- show_dest_status(Host, Port) ->
4189- case ets:lookup(ibrowse_lb, {Host, Port}) of
4190-- [] ->
4191-- no_active_processes;
4192-- [#lb_pid{pid = Lb_pid}] ->
4193-- io:format("Load Balancer Pid : ~p~n", [Lb_pid]),
4194-- io:format("LB process msg q size : ~p~n", [(catch process_info(Lb_pid, message_queue_len))]),
4195-- case lists:dropwhile(
4196-- fun(Tid) ->
4197-- ets:info(Tid, owner) /= Lb_pid
4198-- end, ets:all()) of
4199-- [] ->
4200-- io:format("Couldn't locate ETS table for ~p~n", [Lb_pid]);
4201-- [Tid | _] ->
4202-- First = ets:first(Tid),
4203-- Last = ets:last(Tid),
4204-- Size = ets:info(Tid, size),
4205-- io:format("LB ETS table id : ~p~n", [Tid]),
4206-- io:format("Num Connections : ~p~n", [Size]),
4207-- case Size of
4208-- 0 ->
4209-- ok;
4210-- _ ->
4211-- {First_p_sz, _} = First,
4212-- {Last_p_sz, _} = Last,
4213-- io:format("Smallest pipeline : ~1000.p~n", [First_p_sz]),
4214-- io:format("Largest pipeline : ~1000.p~n", [Last_p_sz])
4215-- end
4216-- end
4217-+ [] ->
4218-+ no_active_processes;
4219-+ [#lb_pid{pid = Lb_pid}] ->
4220-+ io:format("Load Balancer Pid : ~p~n", [Lb_pid]),
4221-+ io:format("LB process msg q size : ~p~n", [(catch process_info(Lb_pid, message_queue_len))]),
4222-+ case lists:dropwhile(
4223-+ fun(Tid) ->
4224-+ ets:info(Tid, owner) /= Lb_pid
4225-+ end, ets:all()) of
4226-+ [] ->
4227-+ io:format("Couldn't locate ETS table for ~p~n", [Lb_pid]);
4228-+ [Tid | _] ->
4229-+ First = ets:first(Tid),
4230-+ Last = ets:last(Tid),
4231-+ Size = ets:info(Tid, size),
4232-+ io:format("LB ETS table id : ~p~n", [Tid]),
4233-+ io:format("Num Connections : ~p~n", [Size]),
4234-+ case Size of
4235-+ 0 ->
4236-+ ok;
4237-+ _ ->
4238-+ {First_p_sz, _} = First,
4239-+ {Last_p_sz, _} = Last,
4240-+ io:format("Smallest pipeline : ~1000.p~n", [First_p_sz]),
4241-+ io:format("Largest pipeline : ~1000.p~n", [Last_p_sz])
4242-+ end
4243-+ end
4244- end.
4245-
4246- %% @doc Clear current configuration for ibrowse and load from the file
4247-@@ -592,40 +616,40 @@ init(_) ->
4248-
4249- import_config() ->
4250- case code:priv_dir(ibrowse) of
4251-- {error, _} = Err ->
4252-- Err;
4253-- PrivDir ->
4254-- Filename = filename:join(PrivDir, "ibrowse.conf"),
4255-- import_config(Filename)
4256-+ {error, _} = Err ->
4257-+ Err;
4258-+ PrivDir ->
4259-+ Filename = filename:join(PrivDir, "ibrowse.conf"),
4260-+ import_config(Filename)
4261- end.
4262-
4263- import_config(Filename) ->
4264- case file:consult(Filename) of
4265-- {ok, Terms} ->
4266-- ets:delete_all_objects(ibrowse_conf),
4267-- Fun = fun({dest, Host, Port, MaxSess, MaxPipe, Options})
4268-- when is_list(Host), is_integer(Port),
4269-- is_integer(MaxSess), MaxSess > 0,
4270-- is_integer(MaxPipe), MaxPipe > 0, is_list(Options) ->
4271-- I = [{{max_sessions, Host, Port}, MaxSess},
4272-- {{max_pipeline_size, Host, Port}, MaxPipe},
4273-- {{options, Host, Port}, Options}],
4274-- lists:foreach(
4275-- fun({X, Y}) ->
4276-- ets:insert(ibrowse_conf,
4277-- #ibrowse_conf{key = X,
4278-- value = Y})
4279-- end, I);
4280-- ({K, V}) ->
4281-- ets:insert(ibrowse_conf,
4282-- #ibrowse_conf{key = K,
4283-- value = V});
4284-- (X) ->
4285-- io:format("Skipping unrecognised term: ~p~n", [X])
4286-- end,
4287-- lists:foreach(Fun, Terms);
4288-- Err ->
4289-- Err
4290-+ {ok, Terms} ->
4291-+ ets:delete_all_objects(ibrowse_conf),
4292-+ Fun = fun({dest, Host, Port, MaxSess, MaxPipe, Options})
4293-+ when is_list(Host), is_integer(Port),
4294-+ is_integer(MaxSess), MaxSess > 0,
4295-+ is_integer(MaxPipe), MaxPipe > 0, is_list(Options) ->
4296-+ I = [{{max_sessions, Host, Port}, MaxSess},
4297-+ {{max_pipeline_size, Host, Port}, MaxPipe},
4298-+ {{options, Host, Port}, Options}],
4299-+ lists:foreach(
4300-+ fun({X, Y}) ->
4301-+ ets:insert(ibrowse_conf,
4302-+ #ibrowse_conf{key = X,
4303-+ value = Y})
4304-+ end, I);
4305-+ ({K, V}) ->
4306-+ ets:insert(ibrowse_conf,
4307-+ #ibrowse_conf{key = K,
4308-+ value = V});
4309-+ (X) ->
4310-+ io:format("Skipping unrecognised term: ~p~n", [X])
4311-+ end,
4312-+ lists:foreach(Fun, Terms);
4313-+ Err ->
4314-+ Err
4315- end.
4316-
4317- %% @doc Internal export
4318-@@ -636,10 +660,10 @@ get_config_value(Key) ->
4319- %% @doc Internal export
4320- get_config_value(Key, DefVal) ->
4321- case ets:lookup(ibrowse_conf, Key) of
4322-- [] ->
4323-- DefVal;
4324-- [#ibrowse_conf{value = V}] ->
4325-- V
4326-+ [] ->
4327-+ DefVal;
4328-+ [#ibrowse_conf{value = V}] ->
4329-+ V
4330- end.
4331-
4332- set_config_value(Key, Val) ->
4333-@@ -700,36 +724,36 @@ handle_info(all_trace_off, State) ->
4334- Mspec = [{{ibrowse_conf,{trace,'$1','$2'},true},[],[{{'$1','$2'}}]}],
4335- Trace_on_dests = ets:select(ibrowse_conf, Mspec),
4336- Fun = fun(#lb_pid{host_port = {H, P}, pid = Pid}, _) ->
4337-- case lists:member({H, P}, Trace_on_dests) of
4338-- false ->
4339-- ok;
4340-- true ->
4341-- catch Pid ! {trace, false}
4342-- end;
4343-- (_, Acc) ->
4344-- Acc
4345-- end,
4346-+ case lists:member({H, P}, Trace_on_dests) of
4347-+ false ->
4348-+ ok;
4349-+ true ->
4350-+ catch Pid ! {trace, false}
4351-+ end;
4352-+ (_, Acc) ->
4353-+ Acc
4354-+ end,
4355- ets:foldl(Fun, undefined, ibrowse_lb),
4356- ets:select_delete(ibrowse_conf, [{{ibrowse_conf,{trace,'$1','$2'},true},[],['true']}]),
4357- {noreply, State};
4358--
4359-+
4360- handle_info({trace, Bool}, State) ->
4361- put(my_trace_flag, Bool),
4362- {noreply, State};
4363-
4364- handle_info({trace, Bool, Host, Port}, State) ->
4365- Fun = fun(#lb_pid{host_port = {H, P}, pid = Pid}, _)
4366-- when H == Host,
4367-- P == Port ->
4368-- catch Pid ! {trace, Bool};
4369-- (_, Acc) ->
4370-- Acc
4371-- end,
4372-+ when H == Host,
4373-+ P == Port ->
4374-+ catch Pid ! {trace, Bool};
4375-+ (_, Acc) ->
4376-+ Acc
4377-+ end,
4378- ets:foldl(Fun, undefined, ibrowse_lb),
4379- ets:insert(ibrowse_conf, #ibrowse_conf{key = {trace, Host, Port},
4380-- value = Bool}),
4381-+ value = Bool}),
4382- {noreply, State};
4383--
4384-+
4385- handle_info(_Info, State) ->
4386- {noreply, State}.
4387-
4388-diff --git a/couchdb-1.0.1/src/ibrowse/ibrowse_app.erl b/couchdb-1.0.1/src/ibrowse/ibrowse_app.erl
4389-index 8c83e8f..d3a0f7b 100644
4390---- a/couchdb-1.0.1/src/ibrowse/ibrowse_app.erl
4391-+++ b/couchdb-1.0.1/src/ibrowse/ibrowse_app.erl
4392-@@ -1,12 +1,11 @@
4393- %%%-------------------------------------------------------------------
4394- %%% File : ibrowse_app.erl
4395- %%% Author : Chandrashekhar Mullaparthi <chandrashekhar.mullaparthi@t-mobile.co.uk>
4396--%%% Description :
4397-+%%% Description :
4398- %%%
4399- %%% Created : 15 Oct 2003 by Chandrashekhar Mullaparthi <chandrashekhar.mullaparthi@t-mobile.co.uk>
4400- %%%-------------------------------------------------------------------
4401- -module(ibrowse_app).
4402---vsn('$Id: ibrowse_app.erl,v 1.1 2005/05/05 22:28:28 chandrusf Exp $ ').
4403-
4404- -behaviour(application).
4405- %%--------------------------------------------------------------------
4406-@@ -42,11 +41,11 @@
4407- %% Func: start/2
4408- %% Returns: {ok, Pid} |
4409- %% {ok, Pid, State} |
4410--%% {error, Reason}
4411-+%% {error, Reason}
4412- %%--------------------------------------------------------------------
4413- start(_Type, _StartArgs) ->
4414- case ibrowse_sup:start_link() of
4415-- {ok, Pid} ->
4416-+ {ok, Pid} ->
4417- {ok, Pid};
4418- Error ->
4419- Error
4420-@@ -54,7 +53,7 @@ start(_Type, _StartArgs) ->
4421-
4422- %%--------------------------------------------------------------------
4423- %% Func: stop/1
4424--%% Returns: any
4425-+%% Returns: any
4426- %%--------------------------------------------------------------------
4427- stop(_State) ->
4428- ok.
4429-diff --git a/couchdb-1.0.1/src/ibrowse/ibrowse_http_client.erl b/couchdb-1.0.1/src/ibrowse/ibrowse_http_client.erl
4430-index 65d9cb9..1633e5b 100644
4431---- a/couchdb-1.0.1/src/ibrowse/ibrowse_http_client.erl
4432-+++ b/couchdb-1.0.1/src/ibrowse/ibrowse_http_client.erl
4433-@@ -6,8 +6,6 @@
4434- %%% Created : 11 Oct 2003 by Chandrashekhar Mullaparthi <chandrashekhar.mullaparthi@t-mobile.co.uk>
4435- %%%-------------------------------------------------------------------
4436- -module(ibrowse_http_client).
4437---vsn('$Id: ibrowse_http_client.erl,v 1.19 2009/07/01 22:43:19 chandrusf Exp $ ').
4438--
4439- -behaviour(gen_server).
4440- %%--------------------------------------------------------------------
4441- %% Include files
4442-@@ -16,11 +14,11 @@
4443- %%--------------------------------------------------------------------
4444- %% External exports
4445- -export([
4446-- start_link/1,
4447-- start/1,
4448-- stop/1,
4449-- send_req/7
4450-- ]).
4451-+ start_link/1,
4452-+ start/1,
4453-+ stop/1,
4454-+ send_req/7
4455-+ ]).
4456-
4457- -ifdef(debug).
4458- -compile(export_all).
4459-@@ -28,41 +26,45 @@
4460-
4461- %% gen_server callbacks
4462- -export([
4463-- init/1,
4464-- handle_call/3,
4465-- handle_cast/2,
4466-- handle_info/2,
4467-- terminate/2,
4468-- code_change/3
4469-- ]).
4470-+ init/1,
4471-+ handle_call/3,
4472-+ handle_cast/2,
4473-+ handle_info/2,
4474-+ terminate/2,
4475-+ code_change/3
4476-+ ]).
4477-
4478- -include("ibrowse.hrl").
4479-
4480---record(state, {host, port,
4481-- use_proxy = false, proxy_auth_digest,
4482-- ssl_options = [], is_ssl = false, socket,
4483-- reqs=queue:new(), cur_req, status=idle, http_status_code,
4484-- reply_buffer = <<>>, rep_buf_size=0, streamed_size = 0,
4485-- recvd_headers=[],
4486-- is_closing, send_timer, content_length,
4487-- deleted_crlf = false, transfer_encoding,
4488-- chunk_size, chunk_size_buffer = <<>>, recvd_chunk_size,
4489-- lb_ets_tid, cur_pipeline_size = 0, prev_req_id
4490-- }).
4491-+-record(state, {host, port, connect_timeout,
4492-+ use_proxy = false, proxy_auth_digest,
4493-+ ssl_options = [], is_ssl = false, socket,
4494-+ proxy_tunnel_setup = false,
4495-+ tunnel_setup_queue = [],
4496-+ reqs=queue:new(), cur_req, status=idle, http_status_code,
4497-+ reply_buffer = <<>>, rep_buf_size=0, streamed_size = 0,
4498-+ recvd_headers=[],
4499-+ status_line, raw_headers,
4500-+ is_closing, send_timer, content_length,
4501-+ deleted_crlf = false, transfer_encoding,
4502-+ chunk_size, chunk_size_buffer = <<>>, recvd_chunk_size,
4503-+ lb_ets_tid, cur_pipeline_size = 0, prev_req_id
4504-+ }).
4505-
4506- -record(request, {url, method, options, from,
4507-- stream_to, caller_controls_socket = false,
4508-- req_id,
4509-- stream_chunk_size,
4510-- save_response_to_file = false,
4511-- tmp_file_name, tmp_file_fd,
4512-- response_format}).
4513-+ stream_to, caller_controls_socket = false,
4514-+ caller_socket_options = [],
4515-+ req_id,
4516-+ stream_chunk_size,
4517-+ save_response_to_file = false,
4518-+ tmp_file_name, tmp_file_fd,
4519-+ response_format}).
4520-
4521- -import(ibrowse_lib, [
4522-- get_value/2,
4523-- get_value/3,
4524-- do_trace/2
4525-- ]).
4526-+ get_value/2,
4527-+ get_value/3,
4528-+ do_trace/2
4529-+ ]).
4530-
4531- -define(DEFAULT_STREAM_CHUNK_SIZE, 1024*1024).
4532-
4533-@@ -80,7 +82,8 @@ start_link(Args) ->
4534- gen_server:start_link(?MODULE, Args, []).
4535-
4536- stop(Conn_pid) ->
4537-- gen_server:call(Conn_pid, stop).
4538-+ catch gen_server:call(Conn_pid, stop),
4539-+ ok.
4540-
4541- send_req(Conn_Pid, Url, Headers, Method, Body, Options, Timeout) ->
4542- gen_server:call(
4543-@@ -101,26 +104,23 @@ send_req(Conn_Pid, Url, Headers, Method, Body, Options, Timeout) ->
4544- %%--------------------------------------------------------------------
4545- init({Lb_Tid, #url{host = Host, port = Port}, {SSLOptions, Is_ssl}}) ->
4546- State = #state{host = Host,
4547-- port = Port,
4548-- ssl_options = SSLOptions,
4549-- is_ssl = Is_ssl,
4550-- lb_ets_tid = Lb_Tid},
4551-+ port = Port,
4552-+ ssl_options = SSLOptions,
4553-+ is_ssl = Is_ssl,
4554-+ lb_ets_tid = Lb_Tid},
4555- put(ibrowse_trace_token, [Host, $:, integer_to_list(Port)]),
4556- put(my_trace_flag, ibrowse_lib:get_trace_status(Host, Port)),
4557- {ok, State};
4558-+init(Url) when is_list(Url) ->
4559-+ case catch ibrowse_lib:parse_url(Url) of
4560-+ #url{protocol = Protocol} = Url_rec ->
4561-+ init({undefined, Url_rec, {[], Protocol == https}});
4562-+ {'EXIT', _} ->
4563-+ {error, invalid_url}
4564-+ end;
4565- init({Host, Port}) ->
4566- State = #state{host = Host,
4567-- port = Port},
4568-- put(ibrowse_trace_token, [Host, $:, integer_to_list(Port)]),
4569-- put(my_trace_flag, ibrowse_lib:get_trace_status(Host, Port)),
4570-- {ok, State};
4571--init(#url{host=Host, port=Port, protocol=Protocol}) ->
4572-- State = #state{
4573-- host = Host,
4574-- port = Port,
4575-- is_ssl = (Protocol == https),
4576-- ssl_options = [{ssl_imp, new}, {depth, 9}]
4577-- },
4578-+ port = Port},
4579- put(ibrowse_trace_token, [Host, $:, integer_to_list(Port)]),
4580- put(my_trace_flag, ibrowse_lib:get_trace_status(Host, Port)),
4581- {ok, State}.
4582-@@ -141,13 +141,13 @@ handle_call({send_req, _}, _From, #state{is_closing = true} = State) ->
4583- {reply, {error, connection_closing}, State};
4584-
4585- handle_call({send_req, {Url, Headers, Method, Body, Options, Timeout}},
4586-- From, State) ->
4587-+ From, State) ->
4588- send_req_1(From, Url, Headers, Method, Body, Options, Timeout, State);
4589-
4590- handle_call(stop, _From, State) ->
4591- do_close(State),
4592- do_error_reply(State, closing_on_request),
4593-- {stop, normal, ok, State#state{socket=undefined}};
4594-+ {stop, normal, ok, State};
4595-
4596- handle_call(Request, _From, State) ->
4597- Reply = {unknown_request, Request},
4598-@@ -177,9 +177,8 @@ handle_info({ssl, _Sock, Data}, State) ->
4599- handle_sock_data(Data, State);
4600-
4601- handle_info({stream_next, Req_id}, #state{socket = Socket,
4602-- is_ssl = Is_ssl,
4603-- cur_req = #request{req_id = Req_id}} = State) ->
4604-- do_setopts(Socket, [{active, once}], Is_ssl),
4605-+ cur_req = #request{req_id = Req_id}} = State) ->
4606-+ do_setopts(Socket, [{active, once}], State),
4607- {noreply, State};
4608-
4609- handle_info({stream_next, _Req_id}, State) ->
4610-@@ -204,13 +203,13 @@ handle_info({ssl_error, _Sock}, State) ->
4611- {stop, normal, State};
4612-
4613- handle_info({req_timedout, From}, State) ->
4614-- case lists:keysearch(From, #request.from, queue:to_list(State#state.reqs)) of
4615-- false ->
4616-- {noreply, State};
4617-- {value, _} ->
4618-- shutting_down(State),
4619-- do_error_reply(State, req_timedout),
4620-- {stop, normal, State}
4621-+ case lists:keymember(From, #request.from, queue:to_list(State#state.reqs)) of
4622-+ false ->
4623-+ {noreply, State};
4624-+ true ->
4625-+ shutting_down(State),
4626-+ do_error_reply(State, req_timedout),
4627-+ {stop, normal, State}
4628- end;
4629-
4630- handle_info(timeout, State) ->
4631-@@ -224,7 +223,7 @@ handle_info({trace, Bool}, State) ->
4632-
4633- handle_info(Info, State) ->
4634- io:format("Unknown message recvd for ~1000.p:~1000.p -> ~p~n",
4635-- [State#state.host, State#state.port, Info]),
4636-+ [State#state.host, State#state.port, Info]),
4637- io:format("Recvd unknown message ~p when in state: ~p~n", [Info, State]),
4638- {noreply, State}.
4639-
4640-@@ -260,133 +259,132 @@ handle_sock_data(Data, #state{status=idle}=State) ->
4641-
4642- handle_sock_data(Data, #state{status = get_header}=State) ->
4643- case parse_response(Data, State) of
4644-- {error, _Reason} ->
4645-- shutting_down(State),
4646-- {stop, normal, State};
4647-- stop ->
4648-- shutting_down(State),
4649-- {stop, normal, State};
4650-- State_1 ->
4651-- active_once(State_1),
4652-- {noreply, State_1, get_inac_timeout(State_1)}
4653-+ {error, _Reason} ->
4654-+ shutting_down(State),
4655-+ {stop, normal, State};
4656-+ State_1 ->
4657-+ active_once(State_1),
4658-+ set_inac_timer(State_1),
4659-+ {noreply, State_1}
4660- end;
4661-
4662- handle_sock_data(Data, #state{status = get_body,
4663-- content_length = CL,
4664-- http_status_code = StatCode,
4665-- recvd_headers = Headers,
4666-- chunk_size = CSz} = State) ->
4667-+ content_length = CL,
4668-+ http_status_code = StatCode,
4669-+ recvd_headers = Headers,
4670-+ chunk_size = CSz} = State) ->
4671- case (CL == undefined) and (CSz == undefined) of
4672-- true ->
4673-- case accumulate_response(Data, State) of
4674-- {error, Reason} ->
4675-- shutting_down(State),
4676-- fail_pipelined_requests(State,
4677-- {error, {Reason, {stat_code, StatCode}, Headers}}),
4678-- {stop, normal, State};
4679-- State_1 ->
4680-- active_once(State_1),
4681-- {noreply, State_1, get_inac_timeout(State_1)}
4682-- end;
4683-- _ ->
4684-- case parse_11_response(Data, State) of
4685-- {error, Reason} ->
4686-- shutting_down(State),
4687-- fail_pipelined_requests(State,
4688-- {error, {Reason, {stat_code, StatCode}, Headers}}),
4689-- {stop, normal, State};
4690-- stop ->
4691-- shutting_down(State),
4692-- {stop, normal, State};
4693-- State_1 ->
4694-- active_once(State_1),
4695-- {noreply, State_1, get_inac_timeout(State_1)}
4696-- end
4697-+ true ->
4698-+ case accumulate_response(Data, State) of
4699-+ {error, Reason} ->
4700-+ shutting_down(State),
4701-+ fail_pipelined_requests(State,
4702-+ {error, {Reason, {stat_code, StatCode}, Headers}}),
4703-+ {stop, normal, State};
4704-+ State_1 ->
4705-+ active_once(State_1),
4706-+ set_inac_timer(State_1),
4707-+ {noreply, State_1}
4708-+ end;
4709-+ _ ->
4710-+ case parse_11_response(Data, State) of
4711-+ {error, Reason} ->
4712-+ shutting_down(State),
4713-+ fail_pipelined_requests(State,
4714-+ {error, {Reason, {stat_code, StatCode}, Headers}}),
4715-+ {stop, normal, State};
4716-+ State_1 ->
4717-+ active_once(State_1),
4718-+ set_inac_timer(State_1),
4719-+ {noreply, State_1}
4720-+ end
4721- end.
4722-
4723- accumulate_response(Data,
4724-- #state{
4725-- cur_req = #request{save_response_to_file = true,
4726-- tmp_file_fd = undefined} = CurReq,
4727-- http_status_code=[$2 | _]}=State) ->
4728-- TmpFilename = make_tmp_filename(),
4729-+ #state{
4730-+ cur_req = #request{save_response_to_file = Srtf,
4731-+ tmp_file_fd = undefined} = CurReq,
4732-+ http_status_code=[$2 | _]}=State) when Srtf /= false ->
4733-+ TmpFilename = make_tmp_filename(Srtf),
4734- case file:open(TmpFilename, [write, delayed_write, raw]) of
4735-- {ok, Fd} ->
4736-- accumulate_response(Data, State#state{
4737-- cur_req = CurReq#request{
4738-- tmp_file_fd = Fd,
4739-- tmp_file_name = TmpFilename}});
4740-- {error, Reason} ->
4741-- {error, {file_open_error, Reason}}
4742-+ {ok, Fd} ->
4743-+ accumulate_response(Data, State#state{
4744-+ cur_req = CurReq#request{
4745-+ tmp_file_fd = Fd,
4746-+ tmp_file_name = TmpFilename}});
4747-+ {error, Reason} ->
4748-+ {error, {file_open_error, Reason}}
4749- end;
4750--accumulate_response(Data, #state{cur_req = #request{save_response_to_file = true,
4751-- tmp_file_fd = Fd},
4752-- transfer_encoding=chunked,
4753-- reply_buffer = Reply_buf,
4754-- http_status_code=[$2 | _]
4755-- } = State) ->
4756-+accumulate_response(Data, #state{cur_req = #request{save_response_to_file = Srtf,
4757-+ tmp_file_fd = Fd},
4758-+ transfer_encoding=chunked,
4759-+ reply_buffer = Reply_buf,
4760-+ http_status_code=[$2 | _]
4761-+ } = State) when Srtf /= false ->
4762- case file:write(Fd, [Reply_buf, Data]) of
4763-- ok ->
4764-- State#state{reply_buffer = <<>>};
4765-- {error, Reason} ->
4766-- {error, {file_write_error, Reason}}
4767-+ ok ->
4768-+ State#state{reply_buffer = <<>>};
4769-+ {error, Reason} ->
4770-+ {error, {file_write_error, Reason}}
4771- end;
4772--accumulate_response(Data, #state{cur_req = #request{save_response_to_file = true,
4773-- tmp_file_fd = Fd},
4774-- reply_buffer = RepBuf,
4775-- http_status_code=[$2 | _]
4776-- } = State) ->
4777-+accumulate_response(Data, #state{cur_req = #request{save_response_to_file = Srtf,
4778-+ tmp_file_fd = Fd},
4779-+ reply_buffer = RepBuf,
4780-+ http_status_code=[$2 | _]
4781-+ } = State) when Srtf /= false ->
4782- case file:write(Fd, [RepBuf, Data]) of
4783-- ok ->
4784-- State#state{reply_buffer = <<>>};
4785-- {error, Reason} ->
4786-- {error, {file_write_error, Reason}}
4787-+ ok ->
4788-+ State#state{reply_buffer = <<>>};
4789-+ {error, Reason} ->
4790-+ {error, {file_write_error, Reason}}
4791- end;
4792- accumulate_response(<<>>, State) ->
4793- State;
4794- accumulate_response(Data, #state{reply_buffer = RepBuf,
4795-- rep_buf_size = RepBufSize,
4796-- streamed_size = Streamed_size,
4797-- cur_req = CurReq}=State) ->
4798-+ rep_buf_size = RepBufSize,
4799-+ streamed_size = Streamed_size,
4800-+ cur_req = CurReq}=State) ->
4801- #request{stream_to=StreamTo, req_id=ReqId,
4802-- stream_chunk_size = Stream_chunk_size,
4803-- response_format = Response_format,
4804-- caller_controls_socket = Caller_controls_socket} = CurReq,
4805-+ stream_chunk_size = Stream_chunk_size,
4806-+ response_format = Response_format,
4807-+ caller_controls_socket = Caller_controls_socket} = CurReq,
4808- RepBuf_1 = list_to_binary([RepBuf, Data]),
4809- New_data_size = RepBufSize - Streamed_size,
4810- case StreamTo of
4811-- undefined ->
4812-- State#state{reply_buffer = RepBuf_1};
4813-- _ when Caller_controls_socket == true ->
4814-- do_interim_reply(StreamTo, Response_format, ReqId, RepBuf_1),
4815-- State#state{reply_buffer = <<>>,
4816-- streamed_size = Streamed_size + size(RepBuf_1)};
4817-- _ when New_data_size >= Stream_chunk_size ->
4818-- {Stream_chunk, Rem_data} = split_binary(RepBuf_1, Stream_chunk_size),
4819-- do_interim_reply(StreamTo, Response_format, ReqId, Stream_chunk),
4820-- accumulate_response(
4821-- Rem_data,
4822-- State#state{
4823-- reply_buffer = <<>>,
4824-- streamed_size = Streamed_size + Stream_chunk_size});
4825-- _ ->
4826-- State#state{reply_buffer = RepBuf_1}
4827-+ undefined ->
4828-+ State#state{reply_buffer = RepBuf_1};
4829-+ _ when Caller_controls_socket == true ->
4830-+ do_interim_reply(StreamTo, Response_format, ReqId, RepBuf_1),
4831-+ State#state{reply_buffer = <<>>,
4832-+ streamed_size = Streamed_size + size(RepBuf_1)};
4833-+ _ when New_data_size >= Stream_chunk_size ->
4834-+ {Stream_chunk, Rem_data} = split_binary(RepBuf_1, Stream_chunk_size),
4835-+ do_interim_reply(StreamTo, Response_format, ReqId, Stream_chunk),
4836-+ accumulate_response(
4837-+ Rem_data,
4838-+ State#state{
4839-+ reply_buffer = <<>>,
4840-+ streamed_size = Streamed_size + Stream_chunk_size});
4841-+ _ ->
4842-+ State#state{reply_buffer = RepBuf_1}
4843- end.
4844-
4845--make_tmp_filename() ->
4846-+make_tmp_filename(true) ->
4847- DownloadDir = ibrowse:get_config_value(download_dir, filename:absname("./")),
4848- {A,B,C} = now(),
4849- filename:join([DownloadDir,
4850-- "ibrowse_tmp_file_"++
4851-- integer_to_list(A) ++
4852-- integer_to_list(B) ++
4853-- integer_to_list(C)]).
4854-+ "ibrowse_tmp_file_"++
4855-+ integer_to_list(A) ++
4856-+ integer_to_list(B) ++
4857-+ integer_to_list(C)]);
4858-+make_tmp_filename(File) when is_list(File) ->
4859-+ File.
4860-
4861-
4862- %%--------------------------------------------------------------------
4863- %% Handles the case when the server closes the socket
4864- %%--------------------------------------------------------------------
4865--handle_sock_closed(#state{status=get_header}=State) ->
4866-+handle_sock_closed(#state{status=get_header} = State) ->
4867- shutting_down(State),
4868- do_error_reply(State, connection_closed);
4869-
4870-@@ -397,40 +395,73 @@ handle_sock_closed(#state{cur_req=undefined} = State) ->
4871- %% Connection-Close header and has closed the socket to indicate end
4872- %% of response. There maybe requests pipelined which need a response.
4873- handle_sock_closed(#state{reply_buffer = Buf, reqs = Reqs, http_status_code = SC,
4874-- is_closing = IsClosing,
4875-- cur_req = #request{tmp_file_name=TmpFilename,
4876-- tmp_file_fd=Fd} = CurReq,
4877-- status = get_body, recvd_headers = Headers}=State) ->
4878-+ is_closing = IsClosing,
4879-+ cur_req = #request{tmp_file_name=TmpFilename,
4880-+ tmp_file_fd=Fd} = CurReq,
4881-+ status = get_body,
4882-+ recvd_headers = Headers,
4883-+ status_line = Status_line,
4884-+ raw_headers = Raw_headers
4885-+ }=State) ->
4886- #request{from=From, stream_to=StreamTo, req_id=ReqId,
4887-- response_format = Resp_format} = CurReq,
4888-+ response_format = Resp_format,
4889-+ options = Options} = CurReq,
4890- case IsClosing of
4891-- true ->
4892-- {_, Reqs_1} = queue:out(Reqs),
4893-- case TmpFilename of
4894-- undefined ->
4895-- do_reply(State, From, StreamTo, ReqId, Resp_format,
4896-- {ok, SC, Headers, Buf});
4897-- _ ->
4898-- file:close(Fd),
4899-- do_reply(State, From, StreamTo, ReqId, Resp_format,
4900-- {ok, SC, Headers, {file, TmpFilename}})
4901-- end,
4902-- do_error_reply(State#state{reqs = Reqs_1}, connection_closed),
4903-- State;
4904-- _ ->
4905-- do_error_reply(State, connection_closed),
4906-- State
4907-+ true ->
4908-+ {_, Reqs_1} = queue:out(Reqs),
4909-+ Body = case TmpFilename of
4910-+ undefined ->
4911-+ Buf;
4912-+ _ ->
4913-+ file:close(Fd),
4914-+ {file, TmpFilename}
4915-+ end,
4916-+ Reply = case get_value(give_raw_headers, Options, false) of
4917-+ true ->
4918-+ {ok, Status_line, Raw_headers, Body};
4919-+ false ->
4920-+ {ok, SC, Headers, Buf}
4921-+ end,
4922-+ do_reply(State, From, StreamTo, ReqId, Resp_format, Reply),
4923-+ do_error_reply(State#state{reqs = Reqs_1}, connection_closed),
4924-+ State;
4925-+ _ ->
4926-+ do_error_reply(State, connection_closed),
4927-+ State
4928- end.
4929-
4930--do_connect(Host, Port, _Options, #state{is_ssl=true, ssl_options=SSLOptions}, Timeout) ->
4931-+do_connect(Host, Port, Options, #state{is_ssl = true,
4932-+ use_proxy = false,
4933-+ ssl_options = SSLOptions},
4934-+ Timeout) ->
4935-+ Caller_socket_options = get_value(socket_options, Options, []),
4936-+ Other_sock_options = filter_sock_options(SSLOptions ++ Caller_socket_options),
4937- ssl:connect(Host, Port,
4938-- [binary, {nodelay, true}, {active, false} | SSLOptions],
4939-- Timeout);
4940--do_connect(Host, Port, _Options, _State, Timeout) ->
4941-- gen_tcp:connect(Host, Port,
4942-- [binary, {nodelay, true}, {active, false}],
4943-- Timeout).
4944--
4945-+ [binary, {nodelay, true}, {active, false} | Other_sock_options],
4946-+ Timeout);
4947-+do_connect(Host, Port, Options, _State, Timeout) ->
4948-+ Caller_socket_options = get_value(socket_options, Options, []),
4949-+ Other_sock_options = filter_sock_options(Caller_socket_options),
4950-+ gen_tcp:connect(Host, to_integer(Port),
4951-+ [binary, {nodelay, true}, {active, false} | Other_sock_options],
4952-+ Timeout).
4953-+
4954-+%% We don't want the caller to specify certain options
4955-+filter_sock_options(Opts) ->
4956-+ lists:filter(fun({active, _}) ->
4957-+ false;
4958-+ ({packet, _}) ->
4959-+ false;
4960-+ (list) ->
4961-+ false;
4962-+ (_) ->
4963-+ true
4964-+ end, Opts).
4965-+
4966-+do_send(Req, #state{socket = Sock,
4967-+ is_ssl = true,
4968-+ use_proxy = true,
4969-+ proxy_tunnel_setup = Pts}) when Pts /= done -> gen_tcp:send(Sock, Req);
4970- do_send(Req, #state{socket = Sock, is_ssl = true}) -> ssl:send(Sock, Req);
4971- do_send(Req, #state{socket = Sock, is_ssl = false}) -> gen_tcp:send(Sock, Req).
4972-
4973-@@ -450,261 +481,328 @@ do_send_body(Body, State) ->
4974-
4975- do_send_body1(Source, Resp, State) ->
4976- case Resp of
4977-- {ok, Data} ->
4978-- do_send(Data, State),
4979-- do_send_body({Source}, State);
4980-- {ok, Data, New_source_state} ->
4981-- do_send(Data, State),
4982-- do_send_body({Source, New_source_state}, State);
4983-- eof ->
4984-- ok;
4985-- Err ->
4986-- Err
4987-+ {ok, Data} ->
4988-+ do_send(Data, State),
4989-+ do_send_body({Source}, State);
4990-+ {ok, Data, New_source_state} ->
4991-+ do_send(Data, State),
4992-+ do_send_body({Source, New_source_state}, State);
4993-+ eof ->
4994-+ ok;
4995-+ Err ->
4996-+ Err
4997- end.
4998-
4999- do_close(#state{socket = undefined}) -> ok;
5000-+do_close(#state{socket = Sock,
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches